diff --git a/src/sunstone/etc/sunstone-views/admin.yaml b/src/sunstone/etc/sunstone-views/admin.yaml index a9e0541373..a6e5aae4e9 100644 --- a/src/sunstone/etc/sunstone-views/admin.yaml +++ b/src/sunstone/etc/sunstone-views/admin.yaml @@ -1,4 +1,4 @@ -small_logo: images/opennebula-sunstone-v4.0-small.png +small_logo: images/opennebula-sunstone-v4.14-small.png provision_logo: images/one_small_logo.png enabled_tabs: dashboard-tab: true diff --git a/src/sunstone/etc/sunstone-views/admin_vcenter.yaml b/src/sunstone/etc/sunstone-views/admin_vcenter.yaml index 3586c21e0e..eaa81d8979 100644 --- a/src/sunstone/etc/sunstone-views/admin_vcenter.yaml +++ b/src/sunstone/etc/sunstone-views/admin_vcenter.yaml @@ -1,4 +1,4 @@ -small_logo: images/opennebula-sunstone-v4.0-small.png +small_logo: images/opennebula-sunstone-v4.14-small.png provision_logo: images/one_small_logo.png enabled_tabs: dashboard-tab: true diff --git a/src/sunstone/etc/sunstone-views/user.yaml b/src/sunstone/etc/sunstone-views/user.yaml index af022fb4ce..6aa5a7cc6c 100644 --- a/src/sunstone/etc/sunstone-views/user.yaml +++ b/src/sunstone/etc/sunstone-views/user.yaml @@ -1,4 +1,4 @@ -small_logo: images/opennebula-sunstone-v4.0-small.png +small_logo: images/opennebula-sunstone-v4.14-small.png provision_logo: images/one_small_logo.png enabled_tabs: dashboard-tab: true diff --git a/src/sunstone/public/app/app.js b/src/sunstone/public/app/app.js index 52671d6ddb..ab3680d63b 100644 --- a/src/sunstone/public/app/app.js +++ b/src/sunstone/public/app/app.js @@ -9,6 +9,7 @@ define(function(require) { var Config = require('sunstone-config'); var OpenNebula = require('opennebula'); var Notifier = require('utils/notifier'); + var Menu = require('utils/menu'); var _tabs; if (Config.isTabEnabled(PROVISION_TAB_ID)) { @@ -65,6 +66,12 @@ define(function(require) { $(document).ready(function() { Sunstone.insertTabs(); + if (Config.isTabEnabled(PROVISION_TAB_ID)){ + Menu.insertProvision(); + }else{ + Menu.insert(); + } + _setupAccordion(); _setupCloseDropdownsOnClick(); _insertUserAndZoneSelector(); diff --git a/src/sunstone/public/app/sunstone-config.js b/src/sunstone/public/app/sunstone-config.js index 3105bd4076..c75c5d2384 100644 --- a/src/sunstone/public/app/sunstone-config.js +++ b/src/sunstone/public/app/sunstone-config.js @@ -109,7 +109,8 @@ define(function(require) { 'autoRefresh' : _config['view']['autorefresh'], 'tableOrder': _config['user_config']['table_order'], 'vncProxyPort': _config['system_config']['vnc_proxy_port'], - 'vncWSS': _config['user_config']['vnc_wss'] + 'vncWSS': _config['user_config']['vnc_wss'], + 'logo': (_config['view']["small_logo"] || "images/one_small_logo.png") } return Config; diff --git a/src/sunstone/public/app/sunstone.js b/src/sunstone/public/app/sunstone.js index e1422eafe5..a876b82de6 100644 --- a/src/sunstone/public/app/sunstone.js +++ b/src/sunstone/public/app/sunstone.js @@ -7,6 +7,7 @@ define(function(require) { var Config = require('sunstone-config'); var Locale = require('utils/locale'); var Notifier = require('utils/notifier'); + var Menu = require('utils/menu'); var TOP_INTERVAL = 10000; //ms var CONFIRM_DIALOG_ID = require('utils/dialogs/confirm/dialogId'); @@ -485,6 +486,9 @@ define(function(require) { return false; } + // Hide the menu in small windows + Menu.entryClick(); + // TODO check if necessary // last_selected_row = null; diff --git a/src/sunstone/public/app/tabs/provision-tab.js b/src/sunstone/public/app/tabs/provision-tab.js index 2c91d3fd95..0d38985bcf 100644 --- a/src/sunstone/public/app/tabs/provision-tab.js +++ b/src/sunstone/public/app/tabs/provision-tab.js @@ -969,25 +969,12 @@ define(function(require) { var tab = $("#"+tab_name); if (Config.isTabEnabled(tab_name)) { - $('.right-header').prepend(TemplateHeader({'logo': Config.provision.logo})); + $('.right-header').prepend(TemplateHeader()); - $(".left-content").remove(); $(".right-content").addClass("large-centered small-centered"); $("#footer").removeClass("right"); $("#footer").addClass("large-centered small-centered"); - //$(".user-zone-info").remove(); - - $("#provision_logout").click(function(){ - OpenNebula.Auth.logout({ - success: function(){ - window.location.href = "login"; - } - }); - - return false; - }); - ProvisionVmsList.generate($(".provision_vms_list_section"), {active: true}); if (Config.isTabPanelEnabled("provision-tab", "templates")) { diff --git a/src/sunstone/public/app/tabs/provision-tab/header.hbs b/src/sunstone/public/app/tabs/provision-tab/header.hbs index bc08375551..d6f7c15b58 100644 --- a/src/sunstone/public/app/tabs/provision-tab/header.hbs +++ b/src/sunstone/public/app/tabs/provision-tab/header.hbs @@ -1,10 +1,6 @@