From 07bcd7839089e08d64cca9855517915567d15320 Mon Sep 17 00:00:00 2001 From: Daniel Molina Date: Mon, 18 May 2015 16:59:00 +0200 Subject: [PATCH] feature #3748: Add hosts tab --- src/sunstone/public/app/app.js | 1 + src/sunstone/public/app/tabs/hosts-tab.js | 41 +++++++++++++++++++ .../public/app/tabs/hosts-tab/tabId.js | 3 ++ 3 files changed, 45 insertions(+) create mode 100644 src/sunstone/public/app/tabs/hosts-tab.js create mode 100644 src/sunstone/public/app/tabs/hosts-tab/tabId.js diff --git a/src/sunstone/public/app/app.js b/src/sunstone/public/app/app.js index ef90eea20b..8a5ab270f7 100644 --- a/src/sunstone/public/app/app.js +++ b/src/sunstone/public/app/app.js @@ -7,6 +7,7 @@ define(function(require) { require('tabs/infra-tab'), require('tabs/zones-tab'), require('tabs/datastores-tab'), + require('tabs/hosts-tab'), require('tabs/vresources-tab'), require('tabs/images-tab') ]; diff --git a/src/sunstone/public/app/tabs/hosts-tab.js b/src/sunstone/public/app/tabs/hosts-tab.js new file mode 100644 index 0000000000..10cc901ba3 --- /dev/null +++ b/src/sunstone/public/app/tabs/hosts-tab.js @@ -0,0 +1,41 @@ +define(function(require) { + var Locale = require('utils/locale'); + var Buttons = require('./hosts-tab/buttons'); + var Actions = require('./hosts-tab/actions'); + var Table = require('./hosts-tab/datatable'); + + var TAB_ID = require('./hosts-tab/tabId'); + var DATATABLE_ID = "dataTableHosts"; + + //var _dialogs = [ + // require('./hosts-tab/dialogs/create'), + // require('./hosts-tab/dialogs/clone') + //]; + + //var _panels = [ + // require('./hosts-tab/panels/info'), + // require('./hosts-tab/panels/vms') + //]; + + var Tab = { + tabId: TAB_ID, + title: Locale.tr("Hosts"), + tabClass: "subTab", + parentTab: "infra-tab", + listHeader: ' ' + Locale.tr("Hosts"), + infoHeader: ' ' + Locale.tr("Host"), + subheader: ' ' + Locale.tr("TOTAL") + ' \ + ' + Locale.tr("ON") + ' \ + ' + Locale.tr("OFF") + ' \ + ' + Locale.tr("ERROR") + '', + resource: 'Host', + content: '', + buttons: Buttons, + actions: Actions, + dataTable: new Table(DATATABLE_ID, {actions: true, info: true}), + //panels: _panels, + //dialogs: _dialogs + }; + + return Tab; +}); diff --git a/src/sunstone/public/app/tabs/hosts-tab/tabId.js b/src/sunstone/public/app/tabs/hosts-tab/tabId.js new file mode 100644 index 0000000000..fb0224589c --- /dev/null +++ b/src/sunstone/public/app/tabs/hosts-tab/tabId.js @@ -0,0 +1,3 @@ +define(function(require){ + return 'hosts-tab'; +}) \ No newline at end of file