mirror of
https://github.com/OpenNebula/one.git
synced 2025-03-21 14:50:08 +03:00
Signed-off-by: Jorge Lobo <jlobo@opennebula.io>
This commit is contained in:
parent
a91b0a72ca
commit
cf68d2f2f0
@ -120,8 +120,8 @@ require.config({
|
||||
/* Tabs */
|
||||
"app": {
|
||||
deps: [
|
||||
"foundation",
|
||||
"jquery",
|
||||
"foundation",
|
||||
"tabs/provision-tab",
|
||||
"tabs/dashboard-tab",
|
||||
"tabs/system-top-tab",
|
||||
@ -173,7 +173,7 @@ require.config({
|
||||
|
||||
/* Foundation */
|
||||
"foundation": {
|
||||
deps: ["jquery"]
|
||||
deps: ["jquery"]
|
||||
},
|
||||
//'foundation.core': {
|
||||
// deps: ['jquery', 'modernizr'],
|
||||
@ -246,6 +246,12 @@ require.config({
|
||||
"flot": {
|
||||
deps: ["jquery"]
|
||||
},
|
||||
"flot.navigate": {
|
||||
deps: ["flot"]
|
||||
},
|
||||
"flot.canvas": {
|
||||
deps: ["flot"]
|
||||
},
|
||||
"flot.stack": {
|
||||
deps: ["flot"]
|
||||
},
|
||||
|
@ -1301,27 +1301,34 @@ define(function(require) {
|
||||
|
||||
var _setupNavigoRoutes = function() {
|
||||
router = new Navigo(null, true);
|
||||
var routeForm = function(){
|
||||
if(_getTab() == undefined){
|
||||
window.sunstoneNoMultipleRedirects = true;
|
||||
// This will happen if the user opens sunstone directly in a /form url
|
||||
_showTab(this);
|
||||
}
|
||||
};
|
||||
var routeWithID = function(id){
|
||||
window.sunstoneNoMultipleRedirects = true;
|
||||
_routerShowElement(this, id);
|
||||
};
|
||||
var routeNormal = function(){
|
||||
window.sunstoneNoMultipleRedirects = true;
|
||||
_routerShowTab(this);
|
||||
};
|
||||
|
||||
for (var tabName in SunstoneCfg["tabs"]) {
|
||||
router.on(new RegExp("(?:#|/)"+tabName+"/form"), function(){
|
||||
if(_getTab() == undefined){
|
||||
window.sunstoneNoMultipleRedirects = true;
|
||||
// This will happen if the user opens sunstone directly in a /form url
|
||||
_showTab(this);
|
||||
}
|
||||
}.bind(tabName));
|
||||
router.on(new RegExp("(?:#|/)"+tabName+"/form"), routeForm.bind(tabName));
|
||||
router.on(new RegExp("^"+tabName+"/form"), routeForm.bind(tabName));
|
||||
|
||||
router.on(new RegExp("(?:#|/)"+tabName+"/(\\w+)"), function(id){
|
||||
window.sunstoneNoMultipleRedirects = true;
|
||||
_routerShowElement(this, id);
|
||||
}.bind(tabName));
|
||||
router.on(new RegExp("(?:#|/)"+tabName+"/(\\w+)"), routeWithID.bind(tabName));
|
||||
router.on(new RegExp("^"+tabName+"/(\\w+)"), routeWithID.bind(tabName));
|
||||
|
||||
router.on(new RegExp("(?:#|/)"+tabName), function(){
|
||||
window.sunstoneNoMultipleRedirects = true;
|
||||
_routerShowTab(this);
|
||||
}.bind(tabName));
|
||||
router.on(new RegExp("(?:#|/)"+tabName), routeNormal.bind(tabName));
|
||||
router.on(new RegExp("^"+tabName), routeNormal.bind(tabName));
|
||||
}
|
||||
|
||||
router.on(function(){
|
||||
router.on(function(params){
|
||||
_routerShowTab(DASHBOARD_TAB_ID);
|
||||
});
|
||||
|
||||
|
@ -184,10 +184,10 @@ define(function(require) {
|
||||
element.NAME,
|
||||
element.CLUSTER_ID.length ? element.CLUSTER_ID : "-",
|
||||
element.HOST_SHARE.RUNNING_VMS, //rvm
|
||||
cpuBars.real,
|
||||
cpuBars.allocated,
|
||||
memoryBars.real,
|
||||
memoryBars.allocated,
|
||||
cpuBars.real||"",
|
||||
cpuBars.allocated||"",
|
||||
memoryBars.real||"",
|
||||
memoryBars.allocated||"",
|
||||
state,
|
||||
element.IM_MAD,
|
||||
element.VM_MAD,
|
||||
|
@ -15,6 +15,7 @@
|
||||
/* -------------------------------------------------------------------------- */
|
||||
|
||||
define(function(require) {
|
||||
require("jquery");
|
||||
var TemplateHTML = require('hbs!./range-slider/html');
|
||||
|
||||
var sliderId = 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user