From: Tomas Sedovic<tomas(a)sedovic.cz>
https://www.aeolusproject.org/redmine/issues/2820
There is no styling or the actual build/launch functionality yet.
---
src/app/controllers/catalog_entries_controller.rb | 2 +
.../views/catalog_entries/_properties.html.haml | 32 -----------
src/app/views/catalog_entries/show.html.haml | 56 +++++++++++++++++---
src/config/locales/en.yml | 16 +++++-
4 files changed, 63 insertions(+), 43 deletions(-)
delete mode 100644 src/app/views/catalog_entries/_properties.html.haml
diff --git a/src/app/controllers/catalog_entries_controller.rb
b/src/app/controllers/catalog_entries_controller.rb
index 907a52f..f6c5720 100644
--- a/src/app/controllers/catalog_entries_controller.rb
+++ b/src/app/controllers/catalog_entries_controller.rb
@@ -46,6 +46,8 @@ class CatalogEntriesController< ApplicationController
@catalog_entry = CatalogEntry.find(params[:id])
require_privilege(Privilege::VIEW, @catalog_entry.deployable)
save_breadcrumb(catalog_catalog_entry_path((a)catalog_entry.catalog, @catalog_entry),
@catalog_entry.deployable.name)
+ @providers = Provider.all
+ @catalogs_options = Catalog.all.map {|c| [c.name, c.id]}
end
def create
diff --git a/src/app/views/catalog_entries/_properties.html.haml
b/src/app/views/catalog_entries/_properties.html.haml
deleted file mode 100644
index b039efa..0000000
--- a/src/app/views/catalog_entries/_properties.html.haml
+++ /dev/null
@@ -1,32 +0,0 @@
-%table
- %thead
- %tr
- %th.show
- =t'catalog_entries.properties.properties_for'
- = @catalog_entry.deployable.name
- %th.show
- %tbody
- %tr
- %td
- %label{:name =>
'name'}=t('catalog_entries.index.name')+":"
- %td
- = @catalog_entry.deployable.name
- %tr
- %td
- %label{:catalog_id =>
'catalog_id'}=t('catalog_entries.form.catalog') + ":"
- %td
- = @catalog_entry.catalog.name
- %tr
- %td
- %label{:name =>
'description'}=t('catalog_entries.form.description')+":"
- %td
- = @catalog_entry.deployable.description
- %tr
- %td
- %label{:name =>
'xml'}=t('catalog_entries.index.deployable_xml')+":"
- %td
- - if params[:deployable_xml]
- = text_area_tag :xml, @catalog_entry.deployable.xml, :disabled => true
- = link_to t(".edit_deployable_xml"),
edit_catalog_catalog_entry_path((a)catalog_entry.catalog, @catalog_entry.id, :edit_xml =>
true)
- - else
- = link_to @catalog_entry.deployable.xml_filename,
catalog_catalog_entry_path((a)catalog_entry.catalog, @catalog_entry.id, :deployable_xml
=> true)
diff --git a/src/app/views/catalog_entries/show.html.haml
b/src/app/views/catalog_entries/show.html.haml
index 7afc023..4df3f7c 100644
--- a/src/app/views/catalog_entries/show.html.haml
+++ b/src/app/views/catalog_entries/show.html.haml
@@ -2,15 +2,55 @@
%header.admin-page-header
%h1{:class => controller.controller_name}= @catalog_entry.deployable.name
#obj_actions.button-container
- = link_to t('catalog_entries.new_catalog_entry'),
new_catalog_catalog_entry_path((a)catalog_entry.catalog), :class => 'button
primary', :id => 'new_catalog_entry_button'
.button-group
- = link_to t('catalog_entries.show.edit'),
edit_catalog_catalog_entry_path((a)catalog_entry.catalog, @catalog_entry), :class =>
'button', :id => 'edit_button'
= button_to t('catalog_entries.show.delete'),
catalog_catalog_entry_path((a)catalog_entry.catalog, @catalog_entry), :method =>
'delete', :confirm =>
"#{t'catalog_entries.show.confirm_delete'}", :class => 'button
danger', :id => 'delete'
+ = link_to t('catalog_entries.show.edit'),
edit_catalog_catalog_entry_path((a)catalog_entry.catalog, @catalog_entry), :class =>
'button', :id => 'edit_button'
+
+ = link_to t('deployments.overview.launch'), '#'
+
+%section.admin-content-section.deployable
+ %section.image
+ %header
+ %h2= t('.image')
+ %pre= @catalog_entry.deployable.xml
+
+
+ %section.build
+ %header
+ %h2= t('.build')
+
+ = form_tag() do
+ = select_tag :build_option, options_for_select([[t("rebuild_all"),
1]])
+ = submit_tag t('.start'), :id => :start_build
+
+ %p.description= t('.build_description')
+
+ %ul#providers-list
+ - @providers.each do |provider|
+ %li
+ %span.provider= provider.name
+ %span.status Building 98%
+ = form_tag()
+ %button on/off
+
+
+ %section.catalogs
+ %header
+ %h2= t('.catalogs')
+
+ %p= t('.choose_catalog')
+ = form_tag() do
+ = select_tag :catalog, options_for_select(@catalogs_options)
+ = submit_tag t('.add_catalog'), :id => :add_catalog
+
+ %p
+ %label= t('.catalog_name')
+ = @catalog_entry.catalog.name
+ %p
+ %label= t('.environment')
+ = @catalog_entry.catalog.pool.pool_family.name
-%section.admin-content-section.user
- %header
- %h2= t'properties'
- .content
- %div#view
- = render :partial => 'properties'
+ %section.roles
+ %header
+ %h2= t('.roles')
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index f69c3b1..b8ce209 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -590,9 +590,19 @@ en:
edit: Edit
delete: Delete
confirm_delete: "Are you sure you want to delete?"
- properties:
- properties_for: Properties for
- edit_deployable_xml: Edit Deployable XML
+ image: Image
+ build: Build
+ catalogs: Catalogs
+ roles: Roles
+ rebuild_all: Rebuild all images
+ start: Start
+ build_description:
+ "Allow this application blueprint's associated image(s) to be built
and
+ pushed to cloud resource providers by enabling them below."
+ catalog_name: Catalog name
+ environment: Environment
+ choose_catalog: "Choose a catalog to enable access:"
+ add_catalog: "Add +"
edit:
editing_catalog_entry: Editing Catalog Entry
list: