diff --git a/src/sunstone/etc/sunstone-views/kvm/admin.yaml b/src/sunstone/etc/sunstone-views/kvm/admin.yaml index 60fc9968ae..1d27582e08 100644 --- a/src/sunstone/etc/sunstone-views/kvm/admin.yaml +++ b/src/sunstone/etc/sunstone-views/kvm/admin.yaml @@ -529,6 +529,7 @@ tabs: panel_tabs: host_info_tab: true host_monitoring_tab: true + host_pool_tab: true host_vms_tab: true host_wilds_tab: true host_zombies_tab: true diff --git a/src/sunstone/etc/sunstone-views/mixed/admin.yaml b/src/sunstone/etc/sunstone-views/mixed/admin.yaml index bdeb1316b3..e6017f1e5c 100644 --- a/src/sunstone/etc/sunstone-views/mixed/admin.yaml +++ b/src/sunstone/etc/sunstone-views/mixed/admin.yaml @@ -531,6 +531,7 @@ tabs: panel_tabs: host_info_tab: true host_monitoring_tab: true + host_pool_tab: true host_vms_tab: true host_wilds_tab: true host_zombies_tab: true diff --git a/src/sunstone/etc/sunstone-views/mixed/groupadmin.yaml b/src/sunstone/etc/sunstone-views/mixed/groupadmin.yaml index 2eeca20446..240e4e68a1 100644 --- a/src/sunstone/etc/sunstone-views/mixed/groupadmin.yaml +++ b/src/sunstone/etc/sunstone-views/mixed/groupadmin.yaml @@ -530,6 +530,7 @@ tabs: panel_tabs: host_info_tab: true host_monitoring_tab: true + host_pool_tab: true host_vms_tab: true host_wilds_tab: true host_zombies_tab: true diff --git a/src/sunstone/etc/sunstone-views/mixed/user.yaml b/src/sunstone/etc/sunstone-views/mixed/user.yaml index 4ca828e27b..9590b980c7 100644 --- a/src/sunstone/etc/sunstone-views/mixed/user.yaml +++ b/src/sunstone/etc/sunstone-views/mixed/user.yaml @@ -523,6 +523,7 @@ tabs: panel_tabs: host_info_tab: true host_monitoring_tab: true + host_pool_tab: true host_vms_tab: true host_wilds_tab: true host_zombies_tab: true diff --git a/src/sunstone/etc/sunstone-views/vcenter/admin.yaml b/src/sunstone/etc/sunstone-views/vcenter/admin.yaml index ccab7d8222..95083c09a7 100644 --- a/src/sunstone/etc/sunstone-views/vcenter/admin.yaml +++ b/src/sunstone/etc/sunstone-views/vcenter/admin.yaml @@ -529,6 +529,7 @@ tabs: panel_tabs: host_info_tab: true host_monitoring_tab: true + host_pool_tab: true host_vms_tab: true host_wilds_tab: true host_zombies_tab: true diff --git a/src/sunstone/etc/sunstone-views/vcenter/groupadmin.yaml b/src/sunstone/etc/sunstone-views/vcenter/groupadmin.yaml index 50fde68195..c4eba7673f 100644 --- a/src/sunstone/etc/sunstone-views/vcenter/groupadmin.yaml +++ b/src/sunstone/etc/sunstone-views/vcenter/groupadmin.yaml @@ -530,6 +530,7 @@ tabs: panel_tabs: host_info_tab: true host_monitoring_tab: true + host_pool_tab: true host_vms_tab: true host_wilds_tab: true host_zombies_tab: true diff --git a/src/sunstone/etc/sunstone-views/vcenter/user.yaml b/src/sunstone/etc/sunstone-views/vcenter/user.yaml index 4ca828e27b..9590b980c7 100644 --- a/src/sunstone/etc/sunstone-views/vcenter/user.yaml +++ b/src/sunstone/etc/sunstone-views/vcenter/user.yaml @@ -523,6 +523,7 @@ tabs: panel_tabs: host_info_tab: true host_monitoring_tab: true + host_pool_tab: true host_vms_tab: true host_wilds_tab: true host_zombies_tab: true diff --git a/src/sunstone/public/app/tabs/hosts-tab.js b/src/sunstone/public/app/tabs/hosts-tab.js index 4e96840192..435c2b5357 100644 --- a/src/sunstone/public/app/tabs/hosts-tab.js +++ b/src/sunstone/public/app/tabs/hosts-tab.js @@ -37,6 +37,7 @@ define(function(require) { require('./hosts-tab/panels/esx'), require('./hosts-tab/panels/pci'), require('./hosts-tab/panels/numa'), + require('./hosts-tab/panels/pool'), require('./hosts-tab/panels/nsx') ]; var _panelsHooks = [ diff --git a/src/sunstone/public/app/tabs/hosts-tab/panels/pool.js b/src/sunstone/public/app/tabs/hosts-tab/panels/pool.js new file mode 100644 index 0000000000..e1dff96647 --- /dev/null +++ b/src/sunstone/public/app/tabs/hosts-tab/panels/pool.js @@ -0,0 +1,65 @@ +/* -------------------------------------------------------------------------- */ +/* Copyright 2002-2019, OpenNebula Project, OpenNebula Systems */ +/* */ +/* 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. */ +/* -------------------------------------------------------------------------- */ +define(function(require) { + /* + DEPENDENCIES + */ + var Locale = require('utils/locale'); + var ResourcePoolCards = require("../utils/cards"); + /* + TEMPLATES + */ + var TemplatePool = require('hbs!./pool/html'); + /* + CONSTANTS + */ + var PANEL_ID = require('./pool/panelId'); + var RESOURCE = "Host" + /* + CONSTRUCTOR + */ + function Panel(info) { + var self = this; + this.title = Locale.tr("POOL"); + this.icon = "fa-server"; + this.element = info[RESOURCE.toUpperCase()]; + // Do not create an instance of this panel if no vcenter hypervisor + // porque el hypervisor proviene de la monitorizacion de por si no esta en el template + if(this.element && this.element.TEMPLATE && this.element.TEMPLATE.HYPERVISOR){ + if(this.element.TEMPLATE.HYPERVISOR != "vcenter"){ + throw "Panel not available for this element"; + } + }else{ + throw "Panel not available for this element"; + } + + return this; + }; + Panel.PANEL_ID = PANEL_ID; + Panel.prototype.html = _html; + Panel.prototype.setup = _setup; + return Panel; + /* + FUNCTION DEFINITIONS + */ + function _html() { + return TemplatePool({ + "resourcePoolCards": ResourcePoolCards.html(this.element) + }); + } + function _setup(context) { + } +}) diff --git a/src/sunstone/public/app/tabs/hosts-tab/panels/pool/html.hbs b/src/sunstone/public/app/tabs/hosts-tab/panels/pool/html.hbs new file mode 100644 index 0000000000..fe0efe2e50 --- /dev/null +++ b/src/sunstone/public/app/tabs/hosts-tab/panels/pool/html.hbs @@ -0,0 +1,23 @@ +{{! -------------------------------------------------------------------------- }} +{{! Copyright 2002-2019, OpenNebula Project, OpenNebula Systems }} +{{! }} +{{! 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. }} +{{! -------------------------------------------------------------------------- }} + +
{{key}} | +{{{value}}} | +