On 06/23/2011 11:43 AM, tsedovic@redhat.com wrote:
From: Tomas Sedovictsedovic@redhat.com
https://bugzilla.redhat.com/show_bug.cgi?id=693669
When a provider account had an account number associated with it (ec2 for example), that number wasn't displayed in that account's Properties page. Now it is.
.../controllers/provider_accounts_controller.rb | 1 + src/app/views/provider_accounts/_properties.haml | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/app/controllers/provider_accounts_controller.rb b/src/app/controllers/provider_accounts_controller.rb index fc706bb..c279996 100644 --- a/src/app/controllers/provider_accounts_controller.rb +++ b/src/app/controllers/provider_accounts_controller.rb @@ -29,6 +29,7 @@ class ProviderAccountsController< ApplicationController def show @tab_captions = ['Properties', 'Credentials', 'History', 'Permissions'] @account = ProviderAccount.find(params[:id])
- @account_id = @account.credentials_hash['account_id'] require_privilege(Privilege::VIEW, @account) @details_tab = params[:details_tab].blank? ? 'properties' : params[:details_tab]
diff --git a/src/app/views/provider_accounts/_properties.haml b/src/app/views/provider_accounts/_properties.haml index 6cc1cc4..559bdf1 100644 --- a/src/app/views/provider_accounts/_properties.haml +++ b/src/app/views/provider_accounts/_properties.haml @@ -11,8 +11,9 @@ %label Running instances quota: %td = @account.quota.maximum_running_instances or 'unlimited'
- %tr
%td
%label Account ID:
%td
= @account.credentials_hash['account_number']
- if @account_id
%tr
%td
= label_tag "Account number:"
%td
= @account_id
ACK.