[PATCH conductor] BZ790816 Instance details page - tabbed sections
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/controllers/instances_controller.rb | 11 ++-
src/app/views/instances/_history.html.haml | 14 +---
src/app/views/instances/_parameters.haml | 24 +++---
src/app/views/instances/_properties.html.haml | 109 ++++++++++++-------------
src/app/views/instances/show.html.haml | 18 ++++-
src/config/locales/en.yml | 2 +-
src/features/instance.feature | 4 +-
7 files changed, 93 insertions(+), 89 deletions(-)
diff --git a/src/app/controllers/instances_controller.rb b/src/app/controllers/instances_controller.rb
index 7af1669..a44e7be 100644
--- a/src/app/controllers/instances_controller.rb
+++ b/src/app/controllers/instances_controller.rb
@@ -39,17 +39,22 @@ class InstancesController < ApplicationController
def show
load_instances
- @tab_captions = [t('instances.tab_captions.properties'), t('instances.tab_captions.history'), t('instances.tab_captions.permissions')]
- @details_tab = params[:details_tab].blank? ? 'properties' : params[:details_tab]
save_breadcrumb(instance_path(@instance), @instance.name)
@events = @instance.events.descending_by_created_at.paginate(:page => params[:page] || 1)
+ @view = params[:details_tab].blank? ? 'properties' : params[:details_tab]
+ @tabs = [
+ {:name => t('properties'), :view => @view, :id => 'properties'},
+ {:name => t('instances.parameters.config_parameters'), :view => 'parameters', :id => 'parameters'},
+ {:name => t('history'), :view => 'history', :id => 'history'}
+ ]
+ @details_tab = @tabs.find {|t| t[:view] == @view}
respond_to do |format|
format.html { render :action => 'show'}
format.js do
if params.delete :details_pane
render :partial => 'layouts/details_pane' and return
end
- render :partial => @details_tab and return
+ render :partial => @details_tab[:view] and return
end
format.json { render :json => @instance }
end
diff --git a/src/app/views/instances/_history.html.haml b/src/app/views/instances/_history.html.haml
index 60f09e5..ca2ae5c 100644
--- a/src/app/views/instances/_history.html.haml
+++ b/src/app/views/instances/_history.html.haml
@@ -1,10 +1,4 @@
-%div.instance_details
- %h3
- = t 'instances.history.history_for'
- = @instance.name
- %ol
- - @events.each do |event|
- %li
- = "#{event.event_time.strftime('%d-%b-%Y %H:%M:%S')}: #{event.summary}"
-
- = will_paginate @events
+%ol
+ - @events.each do |event|
+ %li
+ = "#{event.event_time.strftime('%d-%b-%Y %H:%M:%S')}: #{event.summary}"
diff --git a/src/app/views/instances/_parameters.haml b/src/app/views/instances/_parameters.haml
index 7ed7d31..022b5bc 100644
--- a/src/app/views/instances/_parameters.haml
+++ b/src/app/views/instances/_parameters.haml
@@ -1,14 +1,10 @@
-%div.instance_details
- %h3
- = t 'instances.parameters.config_parameters_for'
- = @instance.name
- %ul
- - if @instance.instance_parameters.empty?
- %li= t("instances.parameters.none")
- - else
- - @instance.instance_parameters.each do |parameter|
- %li
- = parameter.service
- = parameter.name
- = parameter.type
- = parameter.value
+%ul
+ - if @instance.instance_parameters.empty?
+ %li= t("instances.parameters.none")
+ - else
+ - @instance.instance_parameters.each do |parameter|
+ %li
+ = parameter.service
+ = parameter.name
+ = parameter.type
+ = parameter.value
diff --git a/src/app/views/instances/_properties.html.haml b/src/app/views/instances/_properties.html.haml
index 8b0951b..817ee8f 100644
--- a/src/app/views/instances/_properties.html.haml
+++ b/src/app/views/instances/_properties.html.haml
@@ -1,56 +1,53 @@
-%div.instance_details
- %h3
- = t 'instances.properties.properties_for'
- = @instance.name
- %ul
- %li
- = label_tag :name, t('instances.properties.name')
- %span= @instance.name
- %li
- = label_tag :status, t('instances.properties.status')
- %span= @instance.state
- %li
- = label_tag :public_addresses, t('instances.properties.public_addresses')
- %span= @instance.public_addresses
- %li
- = label_tag :private_addresses, t('instances.properties.private_adresses')
- %span= @instance.private_addresses
- = label_tag :assembly, t('instances.properties.assembly')
- %span= @instance.assembly_xml.name
- %li
- = label_tag :provider, t('instances.properties.provider')
- %span= @instance.provider_account.provider.name if @instance.provider_account
- %li
- = label_tag :architecture, t('instances.properties.architecture')
- %span= @instance.hardware_profile.architecture.value
- %li
- = label_tag :memory, t('instances.properties.memory')
- %span= @instance.hardware_profile.memory.value
- %li
- = label_tag :storage, t('instances.properties.storage')
- %span= @instance.hardware_profile.storage.value
- %li
- = label_tag :instantiation_time, t('instances.properties.instantiation_time')
- %span= @instance.created_at.strftime("%d-%b-%Y %H:%M:%S")
- %li
- = label_tag :current_alerts, t('instances.properties.current_alerts')
- %span= 0
- = label_tag :console_connection, t('instances.properties.console_connection')
- %span= t('instances.properties.via_ssh')
- - if @instance.instance_key
- %li
- = label_tag :instance_key, t('instances.properties.ssh_key')
- %span= link_to t('instances.properties.download'), key_instance_path(@instance), :id =>'download_ssh_key'
- %li
- = label_tag :instance_key_name, t('instances.properties.ssh_key_name')
- = @instance.instance_key.name
- %li
- = label_tag :owner, t('instances.properties.owner')
- %span= "#{(a)instance.owner.first_name} #{(a)instance.owner.last_name}"
- %li
- = label_tag :shared_to, t('instances.properties.shared_to')
- %span= t('instances.properties.n_a')
- - if @instance.state == Instance::STATE_ERROR
- %li
- = label_tag :error, t('instances.properties.error')
- %span= @instance.last_error
+%ul
+ %li
+ = label_tag :name, t('instances.properties.name')
+ %span= @instance.name
+ %li
+ = label_tag :status, t('instances.properties.status')
+ %span= @instance.state
+ %li
+ = label_tag :public_addresses, t('instances.properties.public_addresses')
+ %span= @instance.public_addresses
+ %li
+ = label_tag :private_addresses, t('instances.properties.private_adresses')
+ %span= @instance.private_addresses
+ = label_tag :assembly, t('instances.properties.assembly')
+ %span= @instance.assembly_xml.name
+ %li
+ = label_tag :provider, t('instances.properties.provider')
+ %span= @instance.provider_account.provider.name if @instance.provider_account
+ %li
+ = label_tag :architecture, t('instances.properties.architecture')
+ %span= @instance.hardware_profile.architecture.value
+ %li
+ = label_tag :memory, t('instances.properties.memory')
+ %span= @instance.hardware_profile.memory.value
+ %li
+ = label_tag :storage, t('instances.properties.storage')
+ %span= @instance.hardware_profile.storage.value
+ %li
+ = label_tag :instantiation_time, t('instances.properties.instantiation_time')
+ %span= @instance.created_at.strftime("%d-%b-%Y %H:%M:%S")
+ %li
+ = label_tag :current_alerts, t('instances.properties.current_alerts')
+ %span= 0
+ %li
+ = label_tag :console_connection, t('instances.properties.console_connection')
+ %span= t('instances.properties.via_ssh')
+ - if @instance.instance_key
+ %li
+ = label_tag :instance_key, t('instances.properties.ssh_key')
+ %span= link_to t('instances.properties.download'), key_instance_path(@instance), :id =>'download_ssh_key'
+ %li
+ = label_tag :instance_key_name, t('instances.properties.ssh_key_name')
+ = @instance.instance_key.name
+ %li
+ = label_tag :owner, t('instances.properties.owner')
+ %span= "#{(a)instance.owner.first_name} #{(a)instance.owner.last_name}"
+ %li
+ = label_tag :shared_to, t('instances.properties.shared_to')
+ %span= t('instances.properties.n_a')
+ - if @instance.state == Instance::STATE_ERROR
+ %li
+ = label_tag :error, t('instances.properties.error')
+ %span= @instance.last_error
diff --git a/src/app/views/instances/show.html.haml b/src/app/views/instances/show.html.haml
index 882abac..633e89f 100644
--- a/src/app/views/instances/show.html.haml
+++ b/src/app/views/instances/show.html.haml
@@ -1,4 +1,16 @@
= render :partial => 'layouts/nav_history'
-= render :partial => 'properties'
-= render :partial => 'parameters'
-= render :partial => 'history'
+%header.page-header
+ %h1.deployments
+ = @instance.name
+ .corner
+
+%section.content-section
+ %header#tab-container-1
+ %nav.faceted
+ %ul#tab-container-1-nav
+ - @tabs.each do |tab|
+ %li
+ %a{ :href => url_for(:details_tab => tab[:id]), :id => "details_#{tab[:id]}", :class => "#{'active' if @details_tab[:id] == tab[:id]}" }
+ = tab[:name]
+ .content.instance_details#tab
+ = render :partial => @view
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index fbacbc0..037734c 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -313,7 +313,7 @@ en:
history:
history_for: "History for: "
parameters:
- config_parameters_for: Config Parameters for
+ config_parameters: Config Parameters
none: None
permissions:
permissions_for: Permissions for
diff --git a/src/features/instance.feature b/src/features/instance.feature
index 997a6ed..1d91333 100644
--- a/src/features/instance.feature
+++ b/src/features/instance.feature
@@ -140,7 +140,7 @@ Feature: Manage Instances
And there is a "mock1" instance
And I am on the the instances page
When I follow "mock1"
- Then I should see "Properties for mock1"
+ Then I should see "Properties"
Scenario: Edit an instance name
Given there is a "Tomct" instance
@@ -197,7 +197,7 @@ Feature: Manage Instances
Scenario: Show instance history
Given a mock running instance exists
And I am viewing the mock instance detail
- Then I should see "History for"
+ And I follow "details_history"
Then I should see "created"
Scenario: Filter Instances
--
1.7.7.6
12 years, 3 months
[PATCH configure] BZ 788644 - multiple RHEV providers with aeolus_cleanup
by Richard Su
https://bugzilla.redhat.com/show_bug.cgi?id=788644
Cleanup process needed to be updated to support multiple
RHEV providers.
---
conf/rhevm_cleanup | 16 +++++++++-----
recipes/aeolus/manifests/profiles/rhevm.pp | 7 +----
recipes/aeolus/manifests/profiles/rhevm/disable.pp | 21 ++++++++++++++++++++
3 files changed, 33 insertions(+), 11 deletions(-)
create mode 100644 recipes/aeolus/manifests/profiles/rhevm/disable.pp
diff --git a/conf/rhevm_cleanup b/conf/rhevm_cleanup
index 55c1b46..d28dad1 100644
--- a/conf/rhevm_cleanup
+++ b/conf/rhevm_cleanup
@@ -8,10 +8,14 @@
parameters:
enable_https: true
enable_security: false
-# Uncomment and provide values to match your RHEV environment.
-# Values below are examples.
-# rhevm_nfs_server: nfs.server.com
-# rhevm_nfs_export: /export/export_domain
-# rhevm_nfs_mount_point: /mnt/rhevm-nfs
+ package_provider: rpm
classes:
-- aeolus::profiles::rhevm::disabled
+ aeolus::profiles::rhevm::disabled:
+ instances:
+ default:
+ # Uncomment and provide values to match your RHEV environment.
+ #
+ # Values below are examples.
+ #
+ # nfs_mount_point: /mnt/rhevm-nfs
+
diff --git a/recipes/aeolus/manifests/profiles/rhevm.pp b/recipes/aeolus/manifests/profiles/rhevm.pp
index 85bc8e6..5d56f80 100644
--- a/recipes/aeolus/manifests/profiles/rhevm.pp
+++ b/recipes/aeolus/manifests/profiles/rhevm.pp
@@ -54,9 +54,6 @@ define aeolus::rhevm::validate($rhevm_rest_api_url,$rhevm_data_center,$rhevm_use
}
}
-class aeolus::profiles::rhevm::disabled {
- exec {"umount $rhevm_nfs_mount_point":
- path => ["/sbin", "/bin"],
- onlyif => [["mount -l | grep $rhevm_nfs_mount_point"],
- ["/bin/sh -c '! (ps -ef | grep -v grep | grep dc-rhev-image)'"]]}
+class aeolus::profiles::rhevm::disabled($instances) {
+ create_resources2('aeolus::profiles::rhevm::disable', $instances)
}
diff --git a/recipes/aeolus/manifests/profiles/rhevm/disable.pp b/recipes/aeolus/manifests/profiles/rhevm/disable.pp
new file mode 100644
index 0000000..4ab8346
--- /dev/null
+++ b/recipes/aeolus/manifests/profiles/rhevm/disable.pp
@@ -0,0 +1,21 @@
+# Copyright 2012 Red Hat, Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+define aeolus::profiles::rhevm::disable ($nfs_mount_point)
+{
+ exec {"umount $nfs_mount_point":
+ path => ["/sbin", "/bin"],
+ onlyif => [["mount -l | grep $nfs_mount_point"],
+ ["/bin/sh -c '! (ps -ef | grep -v grep | grep dc-rhev-image)'"]]}
+}
--
1.7.7.6
12 years, 3 months
[PATCH conductor] BZ 788153 - Remove "All Rights Reserved" text.
by Matt Wagner
There's no evidence that this has any actual reason for being here,
and it's rather out of place on an open-source project.
Resolves https://bugzilla.redhat.com/show_bug.cgi?id=788153
---
src/config/locales/en.yml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index cb31af3..fbacbc0 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -1,6 +1,6 @@
en:
layout:
- copyright: "Copyright © 2009-2012 Red Hat, Inc. All Rights Reserved."
+ copyright: "Copyright © 2009-2012 Red Hat, Inc."
dashboard: Dashboard
datetime:
distance_in_words:
--
1.7.6.5
12 years, 3 months
[PATCH aeolus-conductor] BZ#788863 Removed Sort links on New HWP Page
by Martyn Taylor
From: Martyn Taylor <mtaylor(a)redhat.com>
---
src/app/views/hardware_profiles/_form.html.haml | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/app/views/hardware_profiles/_form.html.haml b/src/app/views/hardware_profiles/_form.html.haml
index d1cffb2..0a0fed8 100644
--- a/src/app/views/hardware_profiles/_form.html.haml
+++ b/src/app/views/hardware_profiles/_form.html.haml
@@ -3,7 +3,11 @@
= hwp_form.label :name, t('hardware_profiles.form.name')
= hwp_form.text_field :name
%table
- = sortable_table_header @header
+ %thead
+ %tr
+ - @header.each do |header|
+ %th
+ = header[:name]
- [:memory, :cpu, :storage, :architecture].each do |type|
= hwp_form.fields_for type do |hwpp_form|
%tr
--
1.7.6.4
12 years, 3 months
[PATCH conductor] Unify badges alignment through app
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/stylesheets/layout.scss | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/app/stylesheets/layout.scss b/src/app/stylesheets/layout.scss
index dc51b67..fa8def9 100644
--- a/src/app/stylesheets/layout.scss
+++ b/src/app/stylesheets/layout.scss
@@ -1599,10 +1599,10 @@ section.content-section{
font-size: 21px;
font-weight: 200;
@include display_inline_block;
+ vertical-align: middle;
margin-bottom: 4px;
}
.badge{
- vertical-align: -6px;
}
.section-controls{
position: absolute;
@@ -1682,6 +1682,7 @@ section.admin-content-section{
font-size: 21px;
font-weight: 200;
@include display_inline_block;
+ vertical-align: middle;
margin-bottom: 4px;
padding: 2px 40px 0px 0px;
--
1.7.7.6
12 years, 3 months
[PATCH conductor] Require a back button/link to return to provider realms.
by Tomas Hrcka
https://bugzilla.redhat.com/show_bug.cgi?id=786010
added back button to Provider realm show view
---
src/app/views/provider_realms/show.html.haml | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/app/views/provider_realms/show.html.haml b/src/app/views/provider_realms/show.html.haml
index afa895a..c221551 100644
--- a/src/app/views/provider_realms/show.html.haml
+++ b/src/app/views/provider_realms/show.html.haml
@@ -1,6 +1,9 @@
= render :partial => 'layouts/admin_nav'
%header.admin-page-header
%h1{:class => controller.controller_name}= @realm.name
+ #obj_actions.button_container
+ .button-group
+ =link_to t('back'), edit_provider_path((a)realm.provider, :details_tab => 'realms', :only_tab => true), :class => 'button primary', :id => 'new_catalog_button'
- unless @realm.available
%section.admin-content-section
--
1.7.1
12 years, 3 months