[PATCH] BZ 698665 - display ssh key pair name on instance show page
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
---
src/app/views/instances/_properties.html.haml | 3 +++
src/config/locales/en.yml | 1 +
2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/app/views/instances/_properties.html.haml b/src/app/views/instances/_properties.html.haml
index fb90404..3561cd4 100644
--- a/src/app/views/instances/_properties.html.haml
+++ b/src/app/views/instances/_properties.html.haml
@@ -40,6 +40,9 @@
%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}"
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index e4d4d1e..1fff1c7 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -325,6 +325,7 @@ en:
console_connection: Console Connection
via_ssh: via SSH
ssh_key: SSH key
+ ssh_key_name: SSH key name
download: Download
owner: Owner
shared_to: Shared to
--
1.7.7.5
12 years, 4 months
BZ 771519 - blank page when creating a provider account
by Jan Provazník
This patchset fixes errors when creating a provider account and hardware profiles
fetching fails, more info is in commit logs.
I know it would be nice to have a test for last patch (form url generation) but
I didn't find any simple way how to test it (except very huge difficult cuke
test), suggestions are welcomed.
12 years, 4 months
[PATCH 1/2] BZ 773466 - added cucumber test for this bug
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
---
src/app/views/images/edit_xml.html.haml | 2 +-
src/features/image.feature | 14 ++++++++++++++
src/features/step_definitions/image_steps.rb | 5 +++++
src/features/upload_files/template.xml | 20 ++++++++++++++++++++
4 files changed, 40 insertions(+), 1 deletions(-)
create mode 100644 src/features/upload_files/template.xml
diff --git a/src/app/views/images/edit_xml.html.haml b/src/app/views/images/edit_xml.html.haml
index da13b83..14412c1 100644
--- a/src/app/views/images/edit_xml.html.haml
+++ b/src/app/views/images/edit_xml.html.haml
@@ -18,4 +18,4 @@
.centered
%fieldset.align-center
= link_to t(:cancel), pool_family_path(@environment), :class => 'button danger'
- = submit_tag t('.save_and_continue'), :class => 'button primary'
+ = submit_tag t('.save_and_continue'), :class => 'button primary', :id => 'save_image'
diff --git a/src/features/image.feature b/src/features/image.feature
index 7cc4a24..9139025 100644
--- a/src/features/image.feature
+++ b/src/features/image.feature
@@ -16,6 +16,20 @@ Feature: Manage Images
And I press "file_button"
Then I should see "You must specify the template XML file"
+ Scenario: Edit an invalid XML when creating an image
+ Given there is a pool family named "testpoolfamily"
+ And I am on the pool families page
+ And I follow "New Image"
+ Then I should be on the new image page
+ When I fill in "name" with "my template"
+ And I attach the file "features/upload_files/template.xml" to "image_file"
+ And I check "edit"
+ And I press "file_button"
+ Then I should be on the edit xml images page
+ When I fill in "image_xml" with an invalid XML
+ And I press "save_image"
+ Then I should see "Failed to parse XML."
+
#
# FIXME - This test is failing, but fixing it requires fixing a larger bug: we don't
# use VCR the way we think we do when interacting with iwhd... That's a large can of worms.
diff --git a/src/features/step_definitions/image_steps.rb b/src/features/step_definitions/image_steps.rb
index e718e86..ca94176 100644
--- a/src/features/step_definitions/image_steps.rb
+++ b/src/features/step_definitions/image_steps.rb
@@ -28,3 +28,8 @@ Then /^I should see the image's name$/ do
assert page.has_content?((a)image.name)
end
end
+
+When /^I fill in "([^"]*)" with an invalid XML$/ do |arg1|
+ xml = '<?xml version="1.0"?><template>'
+ fill_in(arg1, :with => xml)
+end
diff --git a/src/features/upload_files/template.xml b/src/features/upload_files/template.xml
new file mode 100644
index 0000000..edb7f68
--- /dev/null
+++ b/src/features/upload_files/template.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0"?>
+<template>
+ <name>foo</name>
+ <description>Some text here</description>
+ <os>
+ <name>Fedora</name>
+ <arch>x86_64</arch>
+ <version>14</version>
+ <rootpw>password</rootpw>
+ <install type="url">
+ <url>http://download.fedoraproject.org/pub/fedora/linux/releases/14/Fedora/x86...</url>
+ </install>
+ </os>
+ <repositories>
+ <repository name="custom">
+ <url>http://repos.fedorapeople.org/repos/aeolus/demo/webapp/</url>
+ <signed>false</signed>
+ </repository>
+ </repositories>
+</template>
--
1.7.7.5
12 years, 4 months
[PATCH conductor] Change the Gemfile.lock
by jzigmund@redhat.com
As many of us are developing on F16 (as the target release of Aeolus) and some gems that are used in project were updated it, I'm sending this patch to get better comfort to developers on F16 (because a lot of us now using hacks of Gemfile && Gemfile.lock for running tests and we dont have to).
Is it ok for no Brno guys? I dont know how many of you are still on F15, but I know that recent state is not good for both groups of developers (either F15 nor F16).
12 years, 4 months
[PATCH conductor] BZ772755, BZ773010, BZ773198: Change upload label in deployment card
by Imre Farkas
From: Imre Farkas <ifarkas(a)redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=772755
https://bugzilla.redhat.com/show_bug.cgi?id=773010
https://bugzilla.redhat.com/show_bug.cgi?id=773198
---
src/app/models/deployment.rb | 1 -
src/app/views/pools/_deployments.html.haml | 4 ----
src/config/locales/en.yml | 2 +-
3 files changed, 1 insertions(+), 6 deletions(-)
diff --git a/src/app/models/deployment.rb b/src/app/models/deployment.rb
index 14dfd57..6187d3f 100644
--- a/src/app/models/deployment.rb
+++ b/src/app/models/deployment.rb
@@ -411,7 +411,6 @@ class Deployment < ActiveRecord::Base
:failed_instances_count => failed_instances.count,
:instances_count_text => I18n.t('instances.instances', :count => instances.count.to_i),
:uptime => ApplicationHelper.count_uptime(uptime_1st_instance),
- :global_uptime => ApplicationHelper.count_uptime(uptime_all),
:pool => {
:name => pool.name,
:id => pool.id,
diff --git a/src/app/views/pools/_deployments.html.haml b/src/app/views/pools/_deployments.html.haml
index 5079b07..0aa6143 100644
--- a/src/app/views/pools/_deployments.html.haml
+++ b/src/app/views/pools/_deployments.html.haml
@@ -5,8 +5,6 @@
%li.deployment
%h3.name
= link_to deployment.name, deployment_path(deployment)
- = t 'pools.index.global_uptime'
- = count_uptime(deployment.uptime_all)
%dl.statistics
%ul
%li.right
@@ -22,8 +20,6 @@
<li class="deployment">
<h3 class="name">
<a href="#{deployment_path('replace_id').sub('replace_id', '${id}')}">${name}</a>
- #{t 'pools.index.global_uptime'}
- ${global_uptime}
</h3>
<dl class="statistics">
<ul>
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index e4d4d1e..2ab2ef4 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -1081,7 +1081,7 @@ en:
generic: "Could not validate config server connection (url: %{url}). Check the connection parameters and try again."
generic_with_message: "Could not validate config server connection (url: %{url}). %{msg}"
unhandled_response: "Could not validate config server connection (url: %{url}). HTTP Status Code: %{code}"
- uptime: Uptime
+ uptime: 'Total Usage Time'
deltacloud:
unreachable: "Deltacloud is unreachable. Please verify that it is running."
connection_refused: "The connection to the remote host was refused."
--
1.7.6.5
12 years, 4 months
[PATCH conductor] Pretty view toggle restored on deployments#show
by Imre Farkas
From: Imre Farkas <ifarkas(a)redhat.com>
---
src/app/controllers/application_controller.rb | 3 ++-
src/app/controllers/deployments_controller.rb | 4 ++--
src/app/views/deployments/show.html.haml | 7 ++++++-
src/public/javascripts/application.js | 10 ++++++++++
4 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/src/app/controllers/application_controller.rb b/src/app/controllers/application_controller.rb
index d6890f8..2f82259 100644
--- a/src/app/controllers/application_controller.rb
+++ b/src/app/controllers/application_controller.rb
@@ -303,7 +303,8 @@ class ApplicationController < ActionController::Base
@tabs << {:name => t('role_assignments'),
:view => 'permissions',
:id => 'permissions',
- :count => perm_obj.permissions.count}
+ :count => perm_obj.permissions.count,
+ :pretty_view_toggle => 'disabled'}
end
end
set_permissions_header
diff --git a/src/app/controllers/deployments_controller.rb b/src/app/controllers/deployments_controller.rb
index a03ea4d..5af5707 100644
--- a/src/app/controllers/deployments_controller.rb
+++ b/src/app/controllers/deployments_controller.rb
@@ -165,10 +165,10 @@ class DeploymentsController < ApplicationController
@view = 'pretty_view_show'
end
#TODO add links to real data for history, permissions, services
- @tabs = [{:name => t('instances.instances.other'), :view => @view, :id => 'instances', :count => @deployment.instances.count},
+ @tabs = [{:name => t('instances.instances.other'), :view => @view, :id => 'instances', :count => @deployment.instances.count, :pretty_view_toggle => 'enabled'},
#{:name => 'Services', :view => @view, :id => 'services'},
#{:name => 'History', :view => 'history', :id => 'history'},
- {:name => t('properties'), :view => 'properties', :id => 'properties'}
+ {:name => t('properties'), :view => 'properties', :id => 'properties', :pretty_view_toggle => 'disabled'}
#{:name => 'Permissions', :view => 'permissions', :id => 'permissions'}
]
add_permissions_tab(@deployment)
diff --git a/src/app/views/deployments/show.html.haml b/src/app/views/deployments/show.html.haml
index d41360f..6e734de 100644
--- a/src/app/views/deployments/show.html.haml
+++ b/src/app/views/deployments/show.html.haml
@@ -8,9 +8,14 @@
%ul#tab-container-1-nav
- @tabs.each do |tab|
%li
- %a{ :href => url_for(:details_tab => tab[:id], :only_tab => true), :id => "details_#{tab[:id]}", :class => "#{'active' if @details_tab[:id] == tab[:id]}"}
+ %a{ :href => url_for(:details_tab => tab[:id], :only_tab => true), :id => "details_#{tab[:id]}",
+ :class => "#{'active' if @details_tab[:id] == tab[:id]}", 'data-pretty_view_toggle' => tab[:pretty_view_toggle] }
= tab[:name]
-if tab[:count]
%span.label.badge.count.dark=tab[:count]
+ .section-controls
+ #obj_actions.button-container
+ .button-group
+ = pretty_filter_toggle(deployment_path(@deployment, :view => 'pretty'), deployment_path(@deployment, :view => 'filter'))
.content.collapsible.toggle-view.deployments#tab
= render :partial => @view
diff --git a/src/public/javascripts/application.js b/src/public/javascripts/application.js
index 84fd443..3d06be0 100644
--- a/src/public/javascripts/application.js
+++ b/src/public/javascripts/application.js
@@ -28,6 +28,16 @@ $.extend(Conductor, {
Conductor.tabRemoveActiveClass();
$(this).addClass('active');
+
+ if ($(this).data('pretty_view_toggle') == 'enabled') {
+ $('.button-group > .view-toggle').each(function(index, element) {
+ $(element).show();
+ });
+ } else if ($(this).data('pretty_view_toggle') == 'disabled') {
+ $('.button-group > .view-toggle').each(function(index, element) {
+ $(element).hide();
+ });
+ }
});
},
--
1.7.6.5
12 years, 4 months