1
0
mirror of https://github.com/OpenNebula/one.git synced 2024-12-24 21:34:01 +03:00

Bug #4188: Change sunstone yaml view files to use an array of enabled tabs

(cherry picked from commit 18afdeccd1)
This commit is contained in:
Carlos Martín 2015-11-23 18:17:45 +01:00
parent fc6b452e8c
commit 337d2cb9a8
9 changed files with 109 additions and 111 deletions

View File

@ -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

View File

@ -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

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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:

View File

@ -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

View File

@ -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;
},

View File

@ -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)
}
});
}