diff --git a/src/oca/ruby/opennebula/virtual_machine_pool.rb b/src/oca/ruby/opennebula/virtual_machine_pool.rb index 74861aab9e..f1ca0dec63 100644 --- a/src/oca/ruby/opennebula/virtual_machine_pool.rb +++ b/src/oca/ruby/opennebula/virtual_machine_pool.rb @@ -312,11 +312,11 @@ module OpenNebula # part of the Pool. Possible values: INFO_ALL, INFO_GROUP, INFO_MINE # or user_id # @param [Hash] options - # @option params [Integer] :start_month First month (+year) to take + # @option params [Integer] :start_year First month (+year) to take # into account, if no start time is required use -1 # @option params [Integer] :start_month First year (+month) to take # into account, if no start time is required use -1 - # @option params [Integer] :end_month Last month (+year) to take + # @option params [Integer] :end_year Last month (+year) to take # into account, if no end time is required use -1 # @option params [Integer] :end_month Last year (+month) to take # into account, if no end time is required use -1 @@ -366,11 +366,11 @@ module OpenNebula # part of the Pool. Possible values: INFO_ALL, INFO_GROUP, INFO_MINE # or user_id # @param [Hash] options - # @option params [Integer] :start_month First month (+year) to take + # @option params [Integer] :start_year First month (+year) to take # into account, if no start time is required use -1 # @option params [Integer] :start_month First year (+month) to take # into account, if no start time is required use -1 - # @option params [Integer] :end_month Last month (+year) to take + # @option params [Integer] :end_year Last month (+year) to take # into account, if no end time is required use -1 # @option params [Integer] :end_month Last year (+month) to take # into account, if no end time is required use -1 diff --git a/src/sunstone/etc/sunstone-views/admin.yaml b/src/sunstone/etc/sunstone-views/admin.yaml index 3a7e1698aa..67295541d1 100644 --- a/src/sunstone/etc/sunstone-views/admin.yaml +++ b/src/sunstone/etc/sunstone-views/admin.yaml @@ -51,6 +51,8 @@ tabs: panel_tabs: user_info_tab: true user_quotas_tab: true + user_accounting_tab: true + user_showback_tab: true table_columns: - 0 # Checkbox - 1 # ID @@ -74,7 +76,11 @@ tabs: User.delete: true groups-tab: panel_tabs: + group_info_tab: true group_quotas_tab: true + group_providers_tab: true + group_accounting_tab: true + group_shoback_tab: true table_columns: - 0 # Checkbox - 1 # ID diff --git a/src/sunstone/etc/sunstone-views/user.yaml b/src/sunstone/etc/sunstone-views/user.yaml index e10cb96ea1..bd5e5edcdd 100644 --- a/src/sunstone/etc/sunstone-views/user.yaml +++ b/src/sunstone/etc/sunstone-views/user.yaml @@ -51,6 +51,8 @@ tabs: panel_tabs: user_info_tab: true user_quotas_tab: true + user_accounting_tab: true + user_showback_tab: true table_columns: - 0 # Checkbox - 1 # ID @@ -73,7 +75,11 @@ tabs: User.delete: true groups-tab: panel_tabs: + group_info_tab: true group_quotas_tab: true + group_providers_tab: true + group_accounting_tab: true + group_shoback_tab: true table_columns: - 0 # Checkbox - 1 # ID diff --git a/src/sunstone/etc/sunstone-views/vcenter.yaml b/src/sunstone/etc/sunstone-views/vcenter.yaml index 207bdb1ef6..87d8b2b560 100644 --- a/src/sunstone/etc/sunstone-views/vcenter.yaml +++ b/src/sunstone/etc/sunstone-views/vcenter.yaml @@ -51,6 +51,8 @@ tabs: panel_tabs: user_info_tab: true user_quotas_tab: true + user_accounting_tab: true + user_showback_tab: true table_columns: - 0 # Checkbox - 1 # ID @@ -74,7 +76,11 @@ tabs: User.delete: true groups-tab: panel_tabs: + group_info_tab: true group_quotas_tab: true + group_providers_tab: true + group_accounting_tab: true + group_shoback_tab: true table_columns: - 0 # Checkbox - 1 # ID diff --git a/src/sunstone/models/SunstoneServer.rb b/src/sunstone/models/SunstoneServer.rb index 9cc1e705c7..19c1e1a9c8 100644 --- a/src/sunstone/models/SunstoneServer.rb +++ b/src/sunstone/models/SunstoneServer.rb @@ -395,12 +395,16 @@ class SunstoneServer < CloudServer pool = VirtualMachinePool.new(@client) filter_flag = options[:userfilter] ? options[:userfilter].to_i : VirtualMachinePool::INFO_ALL - start_time = options[:start_time] ? options[:start_time].to_i : -1 - end_time = options[:end_time] ? options[:end_time].to_i : -1 + start_month = options[:start_month] ? options[:start_month].to_i : -1 + start_year = options[:start_year] ? options[:start_year].to_i : -1 + end_month = options[:end_month] ? options[:end_month].to_i : -1 + end_year = options[:end_year] ? options[:end_year].to_i : -1 acct_options = { - :start_time => start_time, - :end_time => end_time, + :start_month => start_month, + :start_year => start_year, + :end_month => end_month, + :end_year => end_year, :group => options[:group] } diff --git a/src/sunstone/public/js/plugins/config-tab.js b/src/sunstone/public/js/plugins/config-tab.js index bb6e08ba9a..fed96b8b45 100644 --- a/src/sunstone/public/js/plugins/config-tab.js +++ b/src/sunstone/public/js/plugins/config-tab.js @@ -361,15 +361,6 @@ function setupConfigDialog() { }); } -function tr(str){ - var tmp = locale[str]; - if ( tmp == null || tmp == "" ) { - //console.debug("Missing translation: "+str); - tmp = str; - } - return tmp; -}; - function updateUserConfigInfo(request,user_json) { var info = user_json.USER; diff --git a/src/sunstone/public/js/plugins/groups-tab.js b/src/sunstone/public/js/plugins/groups-tab.js index 5bcc2f1fc2..4712b05bd9 100644 --- a/src/sunstone/public/js/plugins/groups-tab.js +++ b/src/sunstone/public/js/plugins/groups-tab.js @@ -734,10 +734,17 @@ function updateGroupInfo(request,group){ content: '
' }; + var showback_tab = { + title: tr("Showback"), + icon: "fa-money", + content: '' + }; + Sunstone.updateInfoPanelTab("group_info_panel","group_info_tab",info_tab); Sunstone.updateInfoPanelTab("group_info_panel","group_quotas_tab",quotas_tab); Sunstone.updateInfoPanelTab("group_info_panel","group_providers_tab",providers_tab); - Sunstone.updateInfoPanelTab("group_info_panel","group_accouning_tab",accounting_tab); + Sunstone.updateInfoPanelTab("group_info_panel","group_accounting_tab",accounting_tab); + Sunstone.updateInfoPanelTab("group_info_panel","group_showback_tab",showback_tab); Sunstone.popUpInfoPanel("group_info_panel", 'groups-tab'); $("#add_rp_button", $("#group_info_panel")).click(function(){ @@ -753,6 +760,10 @@ function updateGroupInfo(request,group){ { fixed_group: info.ID, init_group_by: "user" }); + showbackGraphs( + $("#group_showback","#group_info_panel"), + { fixed_group: info.ID }); + setupQuotasPanel(info, "#group_info_panel", Config.isTabActionEnabled("groups-tab", "Group.quotas_dialog"), diff --git a/src/sunstone/public/js/plugins/provision-tab.js b/src/sunstone/public/js/plugins/provision-tab.js index 45002107a9..6019023be3 100644 --- a/src/sunstone/public/js/plugins/provision-tab.js +++ b/src/sunstone/public/js/plugins/provision-tab.js @@ -1206,6 +1206,21 @@ var provision_manage_vdc = '