diff --git a/src/sunstone/etc/sunstone-views/admin.yaml b/src/sunstone/etc/sunstone-views/admin.yaml index bc9c7a983b..a72ef24739 100644 --- a/src/sunstone/etc/sunstone-views/admin.yaml +++ b/src/sunstone/etc/sunstone-views/admin.yaml @@ -1,30 +1,30 @@ small_logo: images/opennebula-sunstone-v4.14-small.png provision_logo: images/one_small_logo.png enabled_tabs: - dashboard-tab: true - system-tab: true - users-tab: true - groups-tab: true - vdcs-tab: true - acls-tab: true - vresources-tab: true - vms-tab: true - templates-tab: true - images-tab: true - files-tab: true - infra-tab: true - clusters-tab: true - hosts-tab: true - datastores-tab: true - vnets-tab: true - secgroups-tab: true - zones-tab: true - marketplace-tab: true - oneflow-dashboard: true - oneflow-services-tab: true - oneflow-templates-tab: true - settings-tab: true - support-tab: true + - dashboard-tab + - system-tab + - users-tab + - groups-tab + - vdcs-tab + - acls-tab + - vresources-tab + - vms-tab + - templates-tab + - images-tab + - files-tab + - infra-tab + - clusters-tab + - hosts-tab + - datastores-tab + - vnets-tab + - secgroups-tab + - zones-tab + - marketplace-tab + - oneflow-dashboard + - oneflow-services-tab + - oneflow-templates-tab + - settings-tab + - support-tab autorefresh: true features: showback: true diff --git a/src/sunstone/etc/sunstone-views/admin_vcenter.yaml b/src/sunstone/etc/sunstone-views/admin_vcenter.yaml index 83610c5f8d..e198a6c33e 100644 --- a/src/sunstone/etc/sunstone-views/admin_vcenter.yaml +++ b/src/sunstone/etc/sunstone-views/admin_vcenter.yaml @@ -1,30 +1,30 @@ small_logo: images/opennebula-sunstone-v4.14-small.png provision_logo: images/one_small_logo.png enabled_tabs: - dashboard-tab: true - system-tab: true - users-tab: true - groups-tab: true - vdcs-tab: true - acls-tab: true - vresources-tab: true - vms-tab: true - templates-tab: true - images-tab: false - files-tab: false - infra-tab: true - clusters-tab: true - hosts-tab: true - datastores-tab: false - vnets-tab: true - secgroups-tab: false - zones-tab: true - marketplace-tab: false - oneflow-dashboard: true - oneflow-services-tab: true - oneflow-templates-tab: true - settings-tab: true - support-tab: true + - dashboard-tab + - system-tab + - users-tab + - groups-tab + - vdcs-tab + - acls-tab + - vresources-tab + - vms-tab + - templates-tab + #- images-tab + #- files-tab + - infra-tab + - clusters-tab + - hosts-tab + #- datastores-tab + - vnets-tab + #- secgroups-tab + - zones-tab + #- marketplace-tab + - oneflow-dashboard + - oneflow-services-tab + - oneflow-templates-tab + - settings-tab + - support-tab autorefresh: true features: showback: true diff --git a/src/sunstone/etc/sunstone-views/cloud.yaml b/src/sunstone/etc/sunstone-views/cloud.yaml index 3698e34fc2..e63ae24135 100644 --- a/src/sunstone/etc/sunstone-views/cloud.yaml +++ b/src/sunstone/etc/sunstone-views/cloud.yaml @@ -1,8 +1,8 @@ provision_logo: images/one_small_logo.png enabled_tabs: - provision-tab: true - users-tab: true - settings-tab: true + - provision-tab + - users-tab + - settings-tab features: showback: true tabs: diff --git a/src/sunstone/etc/sunstone-views/cloud_vcenter.yaml b/src/sunstone/etc/sunstone-views/cloud_vcenter.yaml index 690b9247a1..f995deea4f 100644 --- a/src/sunstone/etc/sunstone-views/cloud_vcenter.yaml +++ b/src/sunstone/etc/sunstone-views/cloud_vcenter.yaml @@ -1,8 +1,8 @@ provision_logo: images/one_small_logo.png enabled_tabs: - provision-tab: true - users-tab: true - settings-tab: true + - provision-tab + - users-tab + - settings-tab features: showback: true tabs: diff --git a/src/sunstone/etc/sunstone-views/groupadmin.yaml b/src/sunstone/etc/sunstone-views/groupadmin.yaml index e70fdbddc6..8f58047a27 100644 --- a/src/sunstone/etc/sunstone-views/groupadmin.yaml +++ b/src/sunstone/etc/sunstone-views/groupadmin.yaml @@ -1,8 +1,8 @@ provision_logo: images/one_small_logo.png enabled_tabs: - provision-tab: true - users-tab: true - settings-tab: true + - provision-tab + - users-tab + - settings-tab features: showback: true tabs: diff --git a/src/sunstone/etc/sunstone-views/groupadmin_vcenter.yaml b/src/sunstone/etc/sunstone-views/groupadmin_vcenter.yaml index c2522770a4..04627e18fe 100644 --- a/src/sunstone/etc/sunstone-views/groupadmin_vcenter.yaml +++ b/src/sunstone/etc/sunstone-views/groupadmin_vcenter.yaml @@ -1,8 +1,8 @@ provision_logo: images/one_small_logo.png enabled_tabs: - provision-tab: true - users-tab: true - settings-tab: true + - provision-tab + - users-tab + - settings-tab features: showback: true tabs: diff --git a/src/sunstone/etc/sunstone-views/user.yaml b/src/sunstone/etc/sunstone-views/user.yaml index 437b5c21e4..0a2f6b38c1 100644 --- a/src/sunstone/etc/sunstone-views/user.yaml +++ b/src/sunstone/etc/sunstone-views/user.yaml @@ -1,30 +1,30 @@ small_logo: images/opennebula-sunstone-v4.14-small.png provision_logo: images/one_small_logo.png enabled_tabs: - dashboard-tab: true - system-tab: false - users-tab: false - groups-tab: false - vdcs-tab: false - acls-tab: false - vresources-tab: true - vms-tab: true - templates-tab: true - images-tab: true - files-tab: true - infra-tab: true - clusters-tab: false - hosts-tab: false - datastores-tab: true - vnets-tab: true - secgroups-tab: true - zones-tab: false - marketplace-tab: true - oneflow-dashboard: true - oneflow-services-tab: true - oneflow-templates-tab: true - settings-tab: true - support-tab: false + - dashboard-tab + #- system-tab + #- users-tab + #- groups-tab + #- vdcs-tab + #- acls-tab + - vresources-tab + - vms-tab + - templates-tab + - images-tab + - files-tab + - infra-tab + #- clusters-tab + #- hosts-tab + - datastores-tab + - vnets-tab + - secgroups-tab + #- zones-tab + - marketplace-tab + - oneflow-dashboard + - oneflow-services-tab + - oneflow-templates-tab + - settings-tab + #- support-tab autorefresh: true features: showback: true diff --git a/src/sunstone/public/app/sunstone-config.js b/src/sunstone/public/app/sunstone-config.js index d6de774484..64c39bbf13 100644 --- a/src/sunstone/public/app/sunstone-config.js +++ b/src/sunstone/public/app/sunstone-config.js @@ -29,7 +29,7 @@ define(function(require) { var Config = { 'isTabEnabled': function(tabName) { - var enabled = _config['view']['enabled_tabs'][tabName]; + var enabled = _config['view']['enabled_tabs'].indexOf(tabName) != -1; return enabled; }, diff --git a/src/sunstone/public/app/sunstone.js b/src/sunstone/public/app/sunstone.js index 1264caa7ab..e5b8fd7f59 100644 --- a/src/sunstone/public/app/sunstone.js +++ b/src/sunstone/public/app/sunstone.js @@ -37,37 +37,35 @@ define(function(require) { }; var _addMainTabs = function() { - $.each(Config.enabledTabs, function(tabName, enabled){ - if (enabled) { - var name = './tabs/' + tabName; - var tabObj = require(name); - var _tabId = tabObj.tabId; - SunstoneCfg["tabs"][_tabId] = tabObj; + $.each(Config.enabledTabs, function(i, tabName){ + var name = './tabs/' + tabName; + var tabObj = require(name); + var _tabId = tabObj.tabId; + SunstoneCfg["tabs"][_tabId] = tabObj; - var actions = tabObj.actions; - if (actions) { - _addActions(actions) - } + var actions = tabObj.actions; + if (actions) { + _addActions(actions) + } - var panels = tabObj.panels; - if (panels) { - _addPanels(_tabId, panels) - } + var panels = tabObj.panels; + if (panels) { + _addPanels(_tabId, panels) + } - var panelsHooks = tabObj.panelsHooks; - if (panelsHooks) { - _addPanelsHooks(_tabId, panelsHooks); - } + var panelsHooks = tabObj.panelsHooks; + if (panelsHooks) { + _addPanelsHooks(_tabId, panelsHooks); + } - var dialogs = tabObj.dialogs; - if (dialogs) { - _addDialogs(dialogs) - } + var dialogs = tabObj.dialogs; + if (dialogs) { + _addDialogs(dialogs) + } - var formPanels = tabObj.formPanels; - if (formPanels) { - _addFormPanels(_tabId, formPanels) - } + var formPanels = tabObj.formPanels; + if (formPanels) { + _addFormPanels(_tabId, formPanels) } }); }