[PATCH conductor] BZ788048: Fix permission checking on pools/_images
by Imre Farkas
From: Imre Farkas <ifarkas(a)redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=788048
Resending it based on Scott's suggestion.
---
src/app/views/pools/_images.html.haml | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/app/views/pools/_images.html.haml b/src/app/views/pools/_images.html.haml
index c580d96..f5401fa 100644
--- a/src/app/views/pools/_images.html.haml
+++ b/src/app/views/pools/_images.html.haml
@@ -5,7 +5,7 @@
=image_tag 'flash_error_icon.png', :alt => 'Errors'
=flash[:error]
-else
- - @pool.catalogs.each do |catalog|
+ - @pool.catalogs.list_for_user(current_user, Privilege::VIEW).each do |catalog|
%div.catalog_deployments_and_images
%h1
= catalog.name
--
1.7.6.5
12 years
[PATCH] BZ#773768 validating the X-Deltacloud-Provider value
by Tomas Sedovic
https://bugzilla.redhat.com/show_bug.cgi?id=773768
Unfortunately, we cannot validate the X-Deltacloud-Provider value when we're
adding a new provider. This is because the actual validation requires a working
provider account -- which we don't have at the time.
Fixing this the correct way would require a significant changes around the
Provider and Provider Account creation UI workflow. I.e. ain't gonna happen
now.
So what the fix actually does:
1) Checks that the X-Deltacloud-Provider value is correct on Provider Account
creation.
2) Displays a (hopefully) helpful error message when the user tries to push an
image or launch a deployment whilst having X-Deltacloud-Provider set incorrectly.
Notes to the reviewers
----------------------
This code depends on a Deltacloud Core patch that's been ACKed but not pushed
at the time of writing:
http://mail-archives.apache.org/mod_mbox/deltacloud-dev/201202.mbox/%3C13...
Note that 2 cucumber tests are failing:
cucumber features/provider.feature:61 # Scenario: Create a new Provider failure when using wrong url
cucumber features/provider_account.feature:17 # Scenario: List providers in XML format
I didn't have the time to fix them. If the patch is otherwise correct and
there's a pressure for getting this in, would you be so kind and fix them?
Hopefully, it's not that difficult.
Otherwise, I'll fix it on 12th March when I'm back.
Thanks,
Thomas
12 years
[PATCH aeolus-cli] BZ#797157 Validate aeolus config
by Martyn Taylor
From: Martyn Taylor <mtaylor(a)redhat.com>
---
lib/aeolus_cli.rb | 2 ++
lib/aeolus_cli/command/base_command.rb | 28 ++++++++++++++++++++--------
lib/aeolus_cli/exceptions.rb | 28 ++++++++++++++++++++++++++++
spec/command/base_command_spec.rb | 5 +++++
spec/spec_helper.rb | 1 +
5 files changed, 56 insertions(+), 8 deletions(-)
create mode 100644 lib/aeolus_cli/exceptions.rb
diff --git a/lib/aeolus_cli.rb b/lib/aeolus_cli.rb
index 8070845..2e6e88c 100644
--- a/lib/aeolus_cli.rb
+++ b/lib/aeolus_cli.rb
@@ -33,3 +33,5 @@ require File.join(File.dirname(__FILE__), 'aeolus_cli/model', 'provider')
require File.join(File.dirname(__FILE__), 'aeolus_cli/model', 'provider_account')
require File.join(File.dirname(__FILE__), 'aeolus_cli/model', 'provider_type')
require File.join(File.dirname(__FILE__), 'aeolus_cli/model', 'environment')
+
+require File.join(File.dirname(__FILE__), 'aeolus_cli/', 'exceptions')
diff --git a/lib/aeolus_cli/command/base_command.rb b/lib/aeolus_cli/command/base_command.rb
index 422e5f4..b9584d6 100644
--- a/lib/aeolus_cli/command/base_command.rb
+++ b/lib/aeolus_cli/command/base_command.rb
@@ -24,11 +24,15 @@ module Aeolus
attr_accessor :options
def initialize(opts={}, logger=nil)
- logger(logger)
- @options = opts
- @config_location = "~/.aeolus-cli"
- @config = load_config
- configure_active_resource
+ begin
+ logger(logger)
+ @options = opts
+ @config_location = "~/.aeolus-cli"
+ @config = load_config
+ configure_active_resource
+ rescue => e
+ handle_exception(e)
+ end
end
protected
@@ -115,6 +119,10 @@ module Aeolus
code = "Argument Error"
message = e.message
+ elsif e.is_a?(Aeolus::CLI::ConfigError)
+ code = "Config Error"
+ message = e.message + "; please check ~/.aeolus-cli"
+
elsif e.respond_to?(:response)
doc = Nokogiri::XML e.response.body
code = doc.xpath("/error/code").text
@@ -167,9 +175,13 @@ module Aeolus
end
def configure_active_resource
- Aeolus::CLI::Base.site = @config[:conductor][:url]
- Aeolus::CLI::Base.user = @config[:conductor][:username]
- Aeolus::CLI::Base.password = @config[:conductor][:password]
+ if @config.has_key?(:conductor) && @config[:conductor].keys.to_set.subset?([:url, :password, :username].to_set)
+ Aeolus::CLI::Base.site = @config[:conductor][:url]
+ Aeolus::CLI::Base.user = @config[:conductor][:username]
+ Aeolus::CLI::Base.password = @config[:conductor][:password]
+ else
+ raise Aeolus::CLI::ConfigError.new("Error in configuration file")
+ end
end
# Print Collection to STDOUT in a column layout
diff --git a/lib/aeolus_cli/exceptions.rb b/lib/aeolus_cli/exceptions.rb
new file mode 100644
index 0000000..a523266
--- /dev/null
+++ b/lib/aeolus_cli/exceptions.rb
@@ -0,0 +1,28 @@
+#
+# Copyright 2011 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.
+#
+module Aeolus
+ module CLI
+ class Error < StandardError
+ attr_reader :message
+
+ def initialize(message)
+ @message = message
+ end
+ end
+
+ class ConfigError < Error; end
+ end
+end
\ No newline at end of file
diff --git a/spec/command/base_command_spec.rb b/spec/command/base_command_spec.rb
index 8c1ef5f..f71f91a 100644
--- a/spec/command/base_command_spec.rb
+++ b/spec/command/base_command_spec.rb
@@ -26,6 +26,11 @@ module Aeolus
Aeolus::CLI::Base.user.to_s.should == "admin"
Aeolus::CLI::Base.password.to_s.should == "password"
end
+
+ it "should raise error on invalid config" do
+ base_command.instance_eval { @config = {} }
+ lambda { base_command.send(:configure_active_resource) }.should raise_error(Aeolus::CLI::ConfigError, "Error in configuration file")
+ end
end
describe "#read_file" do
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index d198732..368c18f 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -14,6 +14,7 @@
$: << File.expand_path(File.join(File.dirname(__FILE__), "../lib/aeolus_cli/command/"))
$: << File.expand_path(File.join(File.dirname(__FILE__), "../lib/aeolus_cli/model/"))
+$: << File.expand_path(File.join(File.dirname(__FILE__), "../lib/aeolus_cli/"))
require 'aeolus_cli'
require 'stringio'
--
1.7.6.4
12 years
[PATCH conductor] BZ798570 Fixed filter table action buttons alignment, added more-actions dropdown tables where more than two action buttons occur
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/stylesheets/layout.scss | 18 +++++++++++++++---
src/app/views/instances/_list.html.haml | 5 ++++-
src/public/images/more_actions_drop.png | Bin 0 -> 1084 bytes
3 files changed, 19 insertions(+), 4 deletions(-)
create mode 100644 src/public/images/more_actions_drop.png
diff --git a/src/app/stylesheets/layout.scss b/src/app/stylesheets/layout.scss
index d081ae7..e8ff9ce 100644
--- a/src/app/stylesheets/layout.scss
+++ b/src/app/stylesheets/layout.scss
@@ -3018,10 +3018,14 @@ form.filterable-data{
font-size: 12px;
border: 1px solid #ccc;
border-bottom: none;
- padding: 7px 5px;
+ padding: 6px 5px;
ul{ list-style: none; }
- li{ display: inline; vertical-align: middle; }
+ li{
+ @include display_inline_block;
+ vertical-align: middle;
+ padding: 1px 0px;
+ }
li > *{vertical-align: middle;}
ul.filter-controls{
float: right;
@@ -3040,6 +3044,7 @@ form.filterable-data{
li.more_actions{
position: relative;
padding: 8px 0px 8px 0px;
+ display: inline;
& > span {
border: 1px solid #bbb;
border-radius: 3px;
@@ -3054,10 +3059,17 @@ form.filterable-data{
background: white;
border: 1px solid #bbb;
padding: 4px 6px;
- width: 150px;
+ width: 200px;
line-height: 1.5;
li a{ text-decoration: none; }
li a:hover{ text-decoration: underline; }
+ li input[type="submit"]{
+ border: none;
+ padding: 0px;
+ margin: 0px;
+ background: transparent;
+ font-family: $font-family-primary;
+ }
}
&:hover > ul{
display: block;
diff --git a/src/app/views/instances/_list.html.haml b/src/app/views/instances/_list.html.haml
index 675efc2..ea3602e 100644
--- a/src/app/views/instances/_list.html.haml
+++ b/src/app/views/instances/_list.html.haml
@@ -1,7 +1,10 @@
- content_for :form_header do
- %li= link_to "#{t'instances.list.export_events'}", export_events_instances_path(:deployment_id => @deployment), :class => 'button'
%li= restful_submit_tag "#{t'instances.list.stop_selected_instances'}", 'stop', multi_stop_instances_path, 'GET', :class => 'button', :id => 'stop_selected_instances'
%li= restful_submit_tag "#{t'instances.list.reboot_selected_instances'}", 'reboot', multi_reboot_instances_path, 'GET', :class => 'button', :id => 'reboot_selected_instances'
+ %li.more_actions
+ %span= image_tag "more_actions_drop.png"
+ %ul
+ %li= link_to "#{t'instances.list.export_events'}", export_events_instances_path(:deployment_id => @deployment)
= hidden_field_tag 'backlink', request.url
- content_for :filter_controls do
diff --git a/src/public/images/more_actions_drop.png b/src/public/images/more_actions_drop.png
new file mode 100644
index 0000000000000000000000000000000000000000..d83074475225dcc41bde293dd830e981cdae2d52
GIT binary patch
literal 1084
zcmV-C1jGA@P)<h;3K|Lk000e1NJLTq001BW000mO1^@s6cL04^00001b5ch_0Itp)
z=>Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01E2>01E2?f{P7W00007bV*G`2iyYz
z3JW&?>XK6c00X>9L_t(Y$E}r5NGn$q#(xvXXw+8+5h00{1f?PtY%O$EMJS}|Mv=HQ
z>8`Y^w~>b%p}G(%g@T((F`}reAnHcw>LJ0!+w=*BAQ+9l#(-d6ta(oU+?m_WObPyb
z?V}%j%)K+*@60{-eCJXwm$50Oe2|eyL=FrL$Ven2rIfykZ;F(%MoLMAj#4g{t1ES%
zV6DS6O>El8=ktzKD&+!@Qch(u8ER^3$Ye4|DPI6hsZ^>epU?Y&GC+lnG)=Qysrv*A
zimvPb1g@>E<@);CF+V^5^Tox*^U={!PESucI5?oHstUs}=;`Uf@AtE{wS~vyF(xM`
zs~Z~|WuZ{uL!egf93Y#`n(1`<d7)5XeSIAOhr@xC5=Bwi-`{6{e;<d#K{}nT%4V})
zH8wWJOw*Jf@&gXTFt7>W_xqd1$Hy^E6HU`lRh6!;E(Qk&>FVl2RaG=i!!%9C$H(#e
z{a@eJ`7c!Mz<>gLA%vJuCX)c%+}sch1{oR}(p)arwXW+mySuxEXfz5yGMPjO@lsXQ
zPYlC21L}cyKoO9D!{S|-fB;aguCDBt&$hR>|GK!i;Q06$UDxUE?q+IgN>No+u>=u9
zXmfLOZ{zVeE|-grjt)E?4<jQZ^}sFg-NeMiuaBjCc6RnRpU?L_U;sFT5LooCuC5Y`
z#ZXlh0H4o?s;Zh5Tmev3HShEJu*Sq<F;-Vs5kfdEoyCofjZYOtxfgtGZS9-Z*47_{
z5QZJM(uUbkC`4ahA3_KKQmGU|h@7?F&VVzON@0!Z>+2&F3SpXN&eqa(J-)oWJYm~Y
zO3BjFQd_ZD{M|H7QEA1>;<*e20z=_&_+@WzFH%Ypi3B@4J5ty6X8^jc*X-=<yh|h!
zNGa*<?Ij!z{}KoUoOg?>R4T14E-nU|o10l!SO^$~@#di-RL;)M?q=$<!^6WrR#sNf
zG>v>dPiJQ*ZEbCwpPzGdbVNf#1G!v|a5&8H@bKs7=jX2<I&Vc$aJgLdg+k%>F`FtU
zCnt9oX)`l3Z*OmJky76419sm~6otCFI;N+mKax`3@PVkbApk8cExOn1C7n()Ha12w
znY`Bt+uPgO+}y<L_0rVT#O3AXy^Yy5^FAm?M@N<OD$5>UI-O2RrP3(yZ8REn@9pi;
z-``I#82k~~ayp%_OQn(v&>ztK7{~$DKppVszs-O>d1c)ZuYg^*+r3vT7IC}X7>4l^
zaBF?nAJKhN+1;PaKs+9Q?=e|jtJ`{>*f-$+fxiJCnYU^lfF`*B0000<MNUMnLSTY2
CtNVxm
literal 0
HcmV?d00001
--
1.7.7.6
12 years
[PATCH conductor 0/1] #798259 - require_user handles XHR requests
by Matt Wagner
Hi,
If you become logged-out while using Conductor and your next request is done over AJAX, the require_user method fails to find a template it can render and will display an error.
This adds a handler for the :js format, which will emit a 401 Unauthorized header. That, as I learned, will automatically (through Warden?) get you UserSessionsController#unauthenticated, which will display a warning message.
I started to try to customize this because I didn't love the wording that was shown, "Login failed: The Username and Password you entered do not match", which is a fairly odd thing to see if you're browsing along. However, the code is generic enough that we don't know that you *became* logged out, just that you are unauthenticated. We might want to make the message more generic, but I'm not keen on doing that as we have strings already translated.
-- Matt
12 years
[PATCH conductor] BZ790861, BZ788103 Remove only catalog entry when removing deployable from catalog detail page
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
When removing deployables from catalog show page, only catalog entry is removed. If there are no more catalog references to this deployable, deployable gets deleted in catalog_entry after destroy hook.
Catalog_entry removal is done in deployables multi destroy. If necessary deployable is removed in catalog_entry after_destroy hook.
When we have separate deployables list done (an we support deployables without assigned catalogs), the table in catalog show page should list catalog entries and the form should submit to catalog_entries multi_destroy.
Deployables removal should be done separatelly from deployables list or deployable show/edit pages.
BZ788103 is also fixed with this patch
---
src/app/controllers/deployables_controller.rb | 6 +++-
src/app/models/catalog_entry.rb | 6 ++--
src/app/models/deployable.rb | 2 +-
src/app/views/catalogs/show.html.haml | 2 +-
src/config/locales/en.yml | 14 ++++++------
.../controllers/deployables_controller_spec.rb | 23 +++++++++++++------
6 files changed, 32 insertions(+), 21 deletions(-)
diff --git a/src/app/controllers/deployables_controller.rb b/src/app/controllers/deployables_controller.rb
index e37bc4a..1e1477f 100644
--- a/src/app/controllers/deployables_controller.rb
+++ b/src/app/controllers/deployables_controller.rb
@@ -188,10 +188,13 @@ class DeployablesController < ApplicationController
deleted = []
not_deleted = []
not_deleted_perms = []
+
+ @catalog = Catalog.find(params[:catalog_id])
+
if params[:deployables_selected]
Deployable.find(params[:deployables_selected]).to_a.each do |d|
if check_privilege(Privilege::MODIFY, d)
- if d.destroy
+ if d.catalog_entries.where(:catalog_id => @catalog.id).first.destroy
deleted << d.name
else
not_deleted << d.name
@@ -211,7 +214,6 @@ class DeployablesController < ApplicationController
flash[:error] = t("deployables.flash.error.not_selected")
end
- @catalog = Catalog.find(params[:catalog_id]) if params[:catalog_id].present?
if @catalog.present?
redirect_to catalog_path(@catalog)
else
diff --git a/src/app/models/catalog_entry.rb b/src/app/models/catalog_entry.rb
index 8f6b15c..857d013 100644
--- a/src/app/models/catalog_entry.rb
+++ b/src/app/models/catalog_entry.rb
@@ -35,10 +35,10 @@ class CatalogEntry < ActiveRecord::Base
validates_uniqueness_of :catalog_id, :scope => [:deployable_id]
- before_destroy :check_deployable_references
+ after_destroy :destroy_deployable_if_last
- def check_deployable_references
- return deployable.catalogs.count > 1
+ def destroy_deployable_if_last
+ deployable.destroy if deployable.catalog_entries.blank?
end
# This probably goes away once we separate catalog entry creation from deployables
diff --git a/src/app/models/deployable.rb b/src/app/models/deployable.rb
index c77f094..d7ce439 100644
--- a/src/app/models/deployable.rb
+++ b/src/app/models/deployable.rb
@@ -32,7 +32,7 @@ class Deployable < ActiveRecord::Base
has_many :permissions, :as => :permission_object, :dependent => :destroy,
:include => [:role],
:order => "permissions.id ASC"
- has_many :catalog_entries, :dependent => :delete_all
+ has_many :catalog_entries, :dependent => :destroy
has_many :catalogs, :through => :catalog_entries
belongs_to :owner, :class_name => "User", :foreign_key => "owner_id"
diff --git a/src/app/views/catalogs/show.html.haml b/src/app/views/catalogs/show.html.haml
index 0ee2fe7..f925907 100644
--- a/src/app/views/catalogs/show.html.haml
+++ b/src/app/views/catalogs/show.html.haml
@@ -22,7 +22,7 @@
.content
- content_for :form_header do
- %li= restful_submit_tag t("delete"), "destroy", multi_destroy_catalog_deployables_path(@catalog), 'DELETE', :id => 'delete_button', :class => 'button danger'
+ %li= restful_submit_tag t("remove"), "destroy", multi_destroy_catalog_deployables_path(@catalog), 'DELETE', :id => 'delete_button', :class => 'button danger'
- if check_privilege(Privilege::CREATE, Deployable)
%li= link_to t("catalog_entries.new_catalog_entry"), new_catalog_deployable_path(@catalog), :class => 'button', :id => 'new_deployable_button'
diff --git a/src/config/locales/en.yml b/src/config/locales/en.yml
index 126130c..e0e4e79 100644
--- a/src/config/locales/en.yml
+++ b/src/config/locales/en.yml
@@ -913,12 +913,12 @@ en:
attribute_not_exist: "Some attribute(s) is missing in XML, please check the file!"
no_catalog: "No catalogs selected"
not_deleted:
- one: "Deployable %{not_deleted} delete failed!"
- other: "%{count} deployables %{not_deleted} were not deleted!"
+ one: "Deployable %{not_deleted} removal failed!"
+ other: "%{count} deployables %{not_deleted} were not removed!"
not_deleted_perms:
- one: "Insufficient permissions to delete deployable %{not_deleted}!"
- other: "Insufficient permissions to delete %{count} deployables %{not_deleted}!"
- not_selected: "No deployable was not selected!"
+ one: "Insufficient permissions to remove deployable %{not_deleted}!"
+ other: "Insufficient permissions to remove %{count} deployables %{not_deleted}!"
+ not_selected: "No deployable was selected!"
no_catalog_exists: "No catalog exists! Please create one."
no_hwp_exists: "No hardware profile exists! Please create one."
missing_image: "%{assembly}: Image (UUID: %{uuid}) doesn't exist"
@@ -927,8 +927,8 @@ en:
failed: "Deployable was not created: %{message}"
notice:
deleted:
- one: "Deployable %{deleted} delete successfully!"
- other: "%{count} deployables %{deleted} were deleted!"
+ one: "Deployable %{deleted} removed successfully!"
+ other: "%{count} deployables %{deleted} were removed!"
error:
attribute_not_exists: invalid
hwp_not_exists: "Hardware profile %{name} specified in XML doesn't exist."
diff --git a/src/spec/controllers/deployables_controller_spec.rb b/src/spec/controllers/deployables_controller_spec.rb
index 72d89f4..9598b3d 100644
--- a/src/spec/controllers/deployables_controller_spec.rb
+++ b/src/spec/controllers/deployables_controller_spec.rb
@@ -123,6 +123,8 @@ describe DeployablesController do
before do
@deployable1 = Factory :deployable, :name => "test_delete"
@deployable2 = Factory :deployable, :name => "test_delete2"
+ @catalog.deployables << @deployable1
+ @catalog.deployables << @deployable2
end
it "deletes both deployables and shows flash notice" do
@@ -131,16 +133,23 @@ describe DeployablesController do
end
it "not delete deployable1 but not deployable2 and shows flash notice and error" do
- Deployable.any_instance.stub(:destroy).and_return(false)
- delete :multi_destroy, :deployables_selected => [@deployable1.id, @deployable2.id]
+ CatalogEntry.any_instance.stub(:destroy).and_return(false)
+ delete :multi_destroy, :deployables_selected => [@deployable1.id, @deployable2.id], :catalog_id => @catalog.id
flash[:error].should_not be_empty
end
- end
- context "without params[:deployables_selected]" do
- it "not delete a deployable and shows flash error" do
- delete :multi_destroy
- flash[:error].should_not be_empty
+ it "not delete deployable with multiple catalogs" do
+ @catalog2 = FactoryGirl.create(:catalog)
+ @catalog2.deployables << @deployable1
+ delete :multi_destroy, :deployables_selected => [@deployable1.id], :catalog_id => @catalog.id
+ @deployable1.should_not be_nil
+ end
+
+ context "without params[:deployables_selected]" do
+ it "not delete a deployable and shows flash error" do
+ delete :multi_destroy, :catalog_id => @catalog.id
+ flash[:error].should_not be_empty
+ end
end
end
end
--
1.7.7.6
12 years
[PATCH conductor] BZ796862 Launch Time Params, if parameter has new lines in its value, its put into textarea instead of text input
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/stylesheets/layout.scss | 15 ++++++++-------
.../views/deployments/launch_time_params.html.haml | 2 ++
2 files changed, 10 insertions(+), 7 deletions(-)
diff --git a/src/app/stylesheets/layout.scss b/src/app/stylesheets/layout.scss
index cdf3e66..03e5f42 100644
--- a/src/app/stylesheets/layout.scss
+++ b/src/app/stylesheets/layout.scss
@@ -3389,13 +3389,6 @@ body.monitor form.generic{
font-size: 13px;
}
- body.administer input[type="text"],input[type="password"]{
- border: 1px solid #C4C4C4;
- box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.50);
- -moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.50);
- -webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.50);
- }
-
input.em{
font-size: 16px;
padding: 6px 4px;
@@ -3408,6 +3401,14 @@ body.monitor form.generic{
input.short{
width: 100px;
}
+
+ textarea{
+ padding: 5px 4px;
+ margin: 2px 0px;
+ height: 100px;
+
+ &.long{ width: 400px }
+ }
}
/* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/src/app/views/deployments/launch_time_params.html.haml b/src/app/views/deployments/launch_time_params.html.haml
index 7b98ca3..7fcbe58 100644
--- a/src/app/views/deployments/launch_time_params.html.haml
+++ b/src/app/views/deployments/launch_time_params.html.haml
@@ -33,6 +33,8 @@
- value = get_hash_multi(params, [:deployment, :launch_parameters, assembly_name, service.name, parameter.name])
- if parameter.type == "password"
= password_field_tag id, (parameter.value or value)
+ - elsif (parameter.value or value).to_s.include?("\n")
+ = text_area_tag id, (parameter.value or value), :class => 'long'
- else
= text_field_tag id, (parameter.value or value)
- else
--
1.7.7.6
12 years, 1 month
[PATCH conductor] BZ 795655 "Return to User" is not required to show for non-admin's
by jzigmund@redhat.com
From: Jozef Zigmund <jzigmund(a)redhat.com>
https://bugzilla.redhat.com/show_bug.cgi?id=795655
---
src/app/views/users/show.html.haml | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/app/views/users/show.html.haml b/src/app/views/users/show.html.haml
index 67fa197..a823832 100644
--- a/src/app/views/users/show.html.haml
+++ b/src/app/views/users/show.html.haml
@@ -1,9 +1,10 @@
= render :partial => 'layouts/admin_nav'
%header.admin-page-header
- #obj_actions
- .return_to
- =t'return_to'
- = link_to t('users.users'), users_path
+ - if check_privilege(Privilege::VIEW, User)
+ #obj_actions
+ .return_to
+ =t'return_to'
+ = link_to t('users.users'), users_path
%section.admin-content-section.user
.content
--
1.7.7.6
12 years, 1 month
[PATCH conductor] BZ784474 added word-wrap: break-word to all headers, so long words dont get off the ui
by Jirka Tomasek
From: Jiri Tomasek <jtomasek(a)redhat.com>
---
src/app/stylesheets/custom.scss | 4 +++-
src/app/stylesheets/layout.scss | 2 ++
2 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/src/app/stylesheets/custom.scss b/src/app/stylesheets/custom.scss
index be3e1ec..484d3c3 100644
--- a/src/app/stylesheets/custom.scss
+++ b/src/app/stylesheets/custom.scss
@@ -8,7 +8,7 @@
.deployable_details {
color: #606060;
position: relative;
- max-width: 500px;
+ width: 500px;
margin: auto;
background: url(../../images/launch-deployment-icon.png) no-repeat right 75%;
@@ -17,6 +17,7 @@
margin-bottom: 3em;
h2 {
+ width: 400px;
font-size: 28px;
font-weight: normal;
text-align: center;
@@ -28,6 +29,7 @@
font-size: 13px;
margin-left: 50px;
margin-right: 50px;
+ word-wrap: break-word;
}
}
diff --git a/src/app/stylesheets/layout.scss b/src/app/stylesheets/layout.scss
index cdf3e66..a80c07e 100644
--- a/src/app/stylesheets/layout.scss
+++ b/src/app/stylesheets/layout.scss
@@ -115,6 +115,8 @@ xmp {
outline: none;
}
+h1,h2,h3,h4,h5,h6{ word-wrap: break-word; }
+
html,
body {
height: 100%;
--
1.7.7.6
12 years, 1 month
[PATCH conductor] BZ 795659 - Error needs to be handled in the UI
by Tomas Hrcka
https://bugzilla.redhat.com/show_bug.cgi?id=795659
list_for_user is used to sellect ProviderAccount from DB
---
src/app/controllers/pool_families_controller.rb | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/app/controllers/pool_families_controller.rb b/src/app/controllers/pool_families_controller.rb
index fbe5ec6..8907375 100644
--- a/src/app/controllers/pool_families_controller.rb
+++ b/src/app/controllers/pool_families_controller.rb
@@ -106,14 +106,14 @@ class PoolFamiliesController < ApplicationController
def add_provider_accounts
@pool_family = PoolFamily.find(params[:id])
require_privilege(Privilege::MODIFY, @pool_family)
+ provider_accounts_for_user = ProviderAccount.list_for_user(current_user, Privilege::USE)
- if ProviderAccount.count == 0
+ if provider_accounts_for_user.count == 0
flash[:error] = t('pool_families.flash.error.no_provider_accounts')
redirect_to pool_family_path(@pool_family, :details_tab => 'provider_accounts') and return
end
- @provider_accounts = ProviderAccount.
- list_for_user(current_user, Privilege::USE).
+ @provider_accounts = provider_accounts_for_user.
where('id not in (?)', @pool_family.provider_accounts.empty? ?
0 : @pool_family.provider_accounts.map(&:id))
--
1.7.1
12 years, 1 month