diff --git a/src/sunstone/public/app/tabs/hosts-tab.js b/src/sunstone/public/app/tabs/hosts-tab.js index 6c7003b66e..236fa50e19 100644 --- a/src/sunstone/public/app/tabs/hosts-tab.js +++ b/src/sunstone/public/app/tabs/hosts-tab.js @@ -14,7 +14,8 @@ define(function(require) { var _panels = [ require('./hosts-tab/panels/info'), - require('./hosts-tab/panels/monitor') + require('./hosts-tab/panels/monitor'), + require('./hosts-tab/panels/vms') ]; var Tab = { diff --git a/src/sunstone/public/app/tabs/hosts-tab/panels/vms.js b/src/sunstone/public/app/tabs/hosts-tab/panels/vms.js new file mode 100644 index 0000000000..cf47909d76 --- /dev/null +++ b/src/sunstone/public/app/tabs/hosts-tab/panels/vms.js @@ -0,0 +1,52 @@ +define(function(require){ + /* + DEPENDENCIES + */ + + var Locale = require('utils/locale'); + // TODO var VMsTable = require('tabs/vms-tab/datatable'); + + /* + CONSTANTS + */ + + var PANEL_ID = require('./vms/panelId'); + var IMAGES_TABLE_ID = PANEL_ID + "VMsTable" + var RESOURCE = "Host" + + /* + CONSTRUCTOR + */ + + function Panel(info) { + this.title = Locale.tr("VMs"); + this.icon = "fa-cloud"; + + this.element = info[RESOURCE.toUpperCase()]; + // TODO this.vmsDataTable = new VMsTable(IMAGES_TABLE_ID, {info: true}); + + return this; + }; + + Panel.PANEL_ID = PANEL_ID; + Panel.prototype.html = _html; + Panel.prototype.setup = _setup; + + return Panel; + + /* + FUNCTION DEFINITIONS + */ + + function _html() { + return ''// TODO this.vmsDataTable.dataTableHTML; + } + + function _setup(context) { + // TODO this.vmsDataTable.initialize(); + // TODO this.vmsDataTable.filter(this.element.NAME, VMsTable.COLUMN_IDS.DATASTORE); + // TODO this.vmsDataTable.list(); + + return false; + } +}) \ No newline at end of file diff --git a/src/sunstone/public/app/tabs/hosts-tab/panels/vms/panelId.js b/src/sunstone/public/app/tabs/hosts-tab/panels/vms/panelId.js new file mode 100644 index 0000000000..e24fa99d16 --- /dev/null +++ b/src/sunstone/public/app/tabs/hosts-tab/panels/vms/panelId.js @@ -0,0 +1,3 @@ +define(function(require){ + return 'host_vms_tab'; +}) \ No newline at end of file