'+tr("No quotas defined")+'
\ +diff --git a/install.sh b/install.sh index 76eef29516..f209897042 100755 --- a/install.sh +++ b/install.sh @@ -1462,6 +1462,7 @@ SUNSTONE_PUBLIC_JS_FILES="src/sunstone/public/js/login.js \ SUNSTONE_PUBLIC_JS_PLUGINS_FILES="\ src/sunstone/public/js/plugins/dashboard-tab.js \ + src/sunstone/public/js/plugins/quotas-tab.js \ src/sunstone/public/js/plugins/hosts-tab.js \ src/sunstone/public/js/plugins/clusters-tab.js \ src/sunstone/public/js/plugins/datastores-tab.js \ diff --git a/src/sunstone/etc/sunstone-views.yaml b/src/sunstone/etc/sunstone-views.yaml index 073f197223..766b4c9e19 100644 --- a/src/sunstone/etc/sunstone-views.yaml +++ b/src/sunstone/etc/sunstone-views.yaml @@ -2,6 +2,7 @@ logo: images/opennebula-sunstone-v4.0.png available_tabs: - dashboard-tab + - quotas-tab - system-tab - users-tab - groups-tab diff --git a/src/sunstone/etc/sunstone-views/admin.yaml b/src/sunstone/etc/sunstone-views/admin.yaml index 3d1f0a66f9..da89e3b371 100644 --- a/src/sunstone/etc/sunstone-views/admin.yaml +++ b/src/sunstone/etc/sunstone-views/admin.yaml @@ -1,6 +1,7 @@ small_logo: images/opennebula-sunstone-v4.0-small.png enabled_tabs: dashboard-tab: true + quotas-tab: false system-tab: true users-tab: true groups-tab: true @@ -32,6 +33,10 @@ tabs: widgets_one_per_row: - vms - hosts + quotas-tab: + panel_tabs: + actions: + Quotas.refresh: true system-tab: panel_tabs: actions: diff --git a/src/sunstone/etc/sunstone-views/user.yaml b/src/sunstone/etc/sunstone-views/user.yaml index 3904fecc6f..7bce3710b5 100644 --- a/src/sunstone/etc/sunstone-views/user.yaml +++ b/src/sunstone/etc/sunstone-views/user.yaml @@ -1,6 +1,7 @@ small_logo: images/opennebula-sunstone-v4.0-small.png enabled_tabs: dashboard-tab: true + quotas-tab: true system-tab: false users-tab: false groups-tab: false @@ -32,6 +33,10 @@ tabs: #- vms widgets_one_per_row: - vms + quotas-tab: + panel_tabs: + actions: + Quotas.refresh: true system-tab: panel_tabs: actions: diff --git a/src/sunstone/etc/sunstone-views/vdcadmin.yaml b/src/sunstone/etc/sunstone-views/vdcadmin.yaml index cb45269593..fa1be87803 100644 --- a/src/sunstone/etc/sunstone-views/vdcadmin.yaml +++ b/src/sunstone/etc/sunstone-views/vdcadmin.yaml @@ -1,6 +1,7 @@ small_logo: images/opennebula-sunstone-v4.0-small.png enabled_tabs: dashboard-tab: true + quotas-tab: true system-tab: true users-tab: true groups-tab: false @@ -32,6 +33,10 @@ tabs: #- vms widgets_one_per_row: - vms + quotas-tab: + panel_tabs: + actions: + Quotas.refresh: true system-tab: panel_tabs: actions: diff --git a/src/sunstone/public/js/plugins/quotas-tab.js b/src/sunstone/public/js/plugins/quotas-tab.js new file mode 100644 index 0000000000..30d33726b5 --- /dev/null +++ b/src/sunstone/public/js/plugins/quotas-tab.js @@ -0,0 +1,185 @@ +/* -------------------------------------------------------------------------- */ +/* Copyright 2002-2014, OpenNebula Project (OpenNebula.org), C12G Labs */ +/* */ +/* 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. */ +/* -------------------------------------------------------------------------- */ + +var quotas_tab_actions = { + "Quotas.refresh" : { + type: "custom", + call: refreshQuotasTab + } +} + +var quotas_tab_buttons = { + "Quotas.refresh" : { + type: "action", + layout: "refresh", + alwaysActive: true + }, + "Sunstone.toggle_top" : { + type: "custom", + layout: "top", + alwaysActive: true + } +} + +var quotas_tab_content = +'
'+tr("No quotas defined")+'
\ +'+tr("No quotas defined")+'
\ +'+tr("No quotas defined")+'
\ +'+tr("No quotas defined")+'
\ +