Skip to content

Commit

Permalink
B OpenNebula#3195: remove OPENNEBULA_MANAGED attribute
Browse files Browse the repository at this point in the history
Signed-off-by: Jorge Lobo <jlobo@opennebula.systems>
  • Loading branch information
Jorge Lobo committed Jun 6, 2019
1 parent 22a31dc commit 64ffe59
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions src/sunstone/public/app/opennebula/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,21 @@
/* -------------------------------------------------------------------------- */

define(function(require) {
var OpenNebulaAction = require('./action');
var Config = require('sunstone-config');
var OpenNebulaAction = require("./action");
var Config = require("sunstone-config");

var RESOURCE = "VMTEMPLATE";
window.lastInfoVmTemplate = {};

var Template = {
"resource": RESOURCE,
"setLastResource": function(info={}){
var data = {};
if(info && info.data){
data.data = info.data;
window.lastInfoVmTemplate = data;
}
},
"create" : function(params) {
OpenNebulaAction.create(params, RESOURCE);
},
Expand All @@ -37,6 +45,7 @@ define(function(require) {
OpenNebulaAction.list(params, RESOURCE);
},
"show" : function(params) {
Template.setLastResource(params);
OpenNebulaAction.show(params, RESOURCE);
},
"chown" : function(params) {
Expand Down Expand Up @@ -91,7 +100,7 @@ define(function(require) {
},
"isNetworkChangeEnabled": function(template) {
if (template.VMTEMPLATE.TEMPLATE.SUNSTONE &&
template.VMTEMPLATE.TEMPLATE.SUNSTONE.NETWORK_SELECT == 'NO') {
template.VMTEMPLATE.TEMPLATE.SUNSTONE.NETWORK_SELECT == "NO") {
return false;
} else {
return true;
Expand Down Expand Up @@ -158,7 +167,7 @@ define(function(require) {

return cost;
}
}
};

return Template;
})
});

0 comments on commit 64ffe59

Please sign in to comment.