mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-23 05:04:56 +09:00
B # 4132: Rename vars and fix charter (#4281)
Signed-off-by: Jorge Lobo <jlobo@opennebula.systems>
This commit is contained in:
1 parent
e0f99c3ca8
commit
c05b9588e8
7 files changed
+21
-33
No files matched your search
@@ -97,11 +97,14 @@ define(function(require) {
|
||||
|
||||
function _setup(context) {
|
||||
var that = this;
|
||||
|
||||
var leasesThat = {};
|
||||
var objLeases = Object.assign(leasesThat, that);
|
||||
objLeases.resource = "template";
|
||||
objLeases.__proto__ = FormPanel.prototype;
|
||||
Leases.actions(objLeases);
|
||||
if(Config.isFeatureEnabled("instantiate_persistent")){
|
||||
$("input.instantiate_pers", context).on("change", function(){
|
||||
var persistent = $(this).prop("checked");
|
||||
|
||||
if(persistent){
|
||||
$("#vm_n_times_disabled", context).show();
|
||||
$("#vm_n_times", context).hide();
|
||||
@@ -109,7 +112,6 @@ define(function(require) {
|
||||
$("#vm_n_times_disabled", context).hide();
|
||||
$("#vm_n_times", context).show();
|
||||
}
|
||||
|
||||
$.each(that.template_objects, function(index, template_json) {
|
||||
DisksResize.insert({
|
||||
template_json: template_json,
|
||||
@@ -124,18 +126,14 @@ define(function(require) {
|
||||
$("#vm_n_times_disabled", context).hide();
|
||||
$("#vm_n_times", context).show();
|
||||
}
|
||||
|
||||
context.off("click", "#add_scheduling_inst_action");
|
||||
context.on("click", "#add_scheduling_inst_action", function() {
|
||||
var actions = ["terminate", "terminate-hard", "hold", "release", "stop", "suspend", "resume", "reboot", "reboot-hard", "poweroff", "poweroff-hard", "undeploy", "undeploy-hard", "snapshot-create"];
|
||||
$("#add_scheduling_inst_action", context).attr("disabled", "disabled");
|
||||
|
||||
ScheduleActions.htmlNewAction(actions, context, "inst");
|
||||
ScheduleActions.setup(context);
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
context.off("click", "#add_inst_action_json");
|
||||
context.on("click" , "#add_inst_action_json", function(){
|
||||
var sched_action = ScheduleActions.retrieveNewAction(context);
|
||||
@@ -145,12 +143,10 @@ define(function(require) {
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
context.on("focusout" , "#time_input", function(){
|
||||
$("#time_input").removeAttr("data-invalid");
|
||||
$("#time_input").removeAttr("class");
|
||||
});
|
||||
|
||||
context.off("click", ".remove_action_x");
|
||||
context.on("click", ".remove_action_x", function(){
|
||||
$(this).parents("tr").remove();
|
||||
|
||||
@@ -191,8 +191,8 @@ define(function(require) {
|
||||
(propUpperCase === "USERNAME" || propUpperCase === "PASSWORD")
|
||||
&& (credentials[propUpperCase] = context[prop]);
|
||||
}
|
||||
var pblc = vm.TEMPLATE.CONTEXT.MAP_PUBLIC;
|
||||
var prvt = vm.TEMPLATE.CONTEXT.MAP_PRIVATE;
|
||||
var pblc = vm.TEMPLATE.CONTEXT.MAP_EXTERNAL;
|
||||
var prvt = vm.TEMPLATE.CONTEXT.MAP_INTERNAL;
|
||||
var mapp = new mapips(pblc, prvt);
|
||||
var foundip = mapp.renderPublicIp(ip);
|
||||
ip = foundip || ip
|
||||
|
||||
@@ -67,16 +67,12 @@ define(function(require) {
|
||||
function _setup(context) {
|
||||
var that = this;
|
||||
InstantiateTemplateFormPanel.prototype.setup.call(this, context);
|
||||
|
||||
$(".selectTemplateTable", context).html(
|
||||
'<br/>' + this.templatesTable.dataTableHTML + '<br/>');
|
||||
|
||||
$(".selectTemplateTable", context).html('<br/>' + this.templatesTable.dataTableHTML + '<br/>');
|
||||
this.templatesTable.initialize();
|
||||
|
||||
this.templatesTable.idInput().on("change", function(){
|
||||
$(".nameContainer", context).show();
|
||||
$(".persistentContainer", context).show();
|
||||
|
||||
|
||||
var templatesContext = $(".list_of_templates", context);
|
||||
templatesContext.html("");
|
||||
templatesContext.show();
|
||||
@@ -85,15 +81,12 @@ define(function(require) {
|
||||
if(template_id){
|
||||
that.setTemplateIds(context, [template_id]);
|
||||
var leasesThat = {};
|
||||
|
||||
function FormPanel() {
|
||||
this.name = this.name;
|
||||
}
|
||||
|
||||
Object.assign(leasesThat, that);
|
||||
leasesThat.resource = "vm";
|
||||
leasesThat.resourceId = template_id;
|
||||
|
||||
if(
|
||||
OpenNebulaAction &&
|
||||
OpenNebulaAction.cache &&
|
||||
@@ -105,12 +98,10 @@ define(function(require) {
|
||||
){
|
||||
leasesThat.jsonTemplate = OpenNebulaAction.cache("VMTEMPLATE").data[template_id].VMTEMPLATE.TEMPLATE;
|
||||
}
|
||||
|
||||
leasesThat.__proto__ = FormPanel.prototype;
|
||||
Leases.actions(leasesThat);
|
||||
}
|
||||
});
|
||||
|
||||
Tips.setup(context);
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ define(function(require) {
|
||||
Locale.tr("Hidden Template"),
|
||||
Locale.tr("Labels"),
|
||||
"search_data",
|
||||
Locale.tr("Leases") //clock leases
|
||||
Locale.tr("Charter") //clock leases
|
||||
];
|
||||
|
||||
return {
|
||||
@@ -103,8 +103,8 @@ define(function(require) {
|
||||
element.NAME &&
|
||||
element.TEMPLATE &&
|
||||
element.TEMPLATE.CONTEXT &&
|
||||
element.TEMPLATE.CONTEXT.MAP_PRIVATE &&
|
||||
element.TEMPLATE.CONTEXT.MAP_PUBLIC &&
|
||||
element.TEMPLATE.CONTEXT.MAP_EXTERNAL &&
|
||||
element.TEMPLATE.CONTEXT.MAP_INTERNAL &&
|
||||
element.TEMPLATE.NIC &&
|
||||
config &&
|
||||
config.system_config &&
|
||||
@@ -116,8 +116,8 @@ define(function(require) {
|
||||
var nics = element.TEMPLATE.NIC;
|
||||
var credentials = {};
|
||||
var context = element.TEMPLATE.CONTEXT;
|
||||
var pblc = element.TEMPLATE.CONTEXT.MAP_PUBLIC; //"10.0.0.0/8";
|
||||
var prvt = element.TEMPLATE.CONTEXT.MAP_PRIVATE; //"192.168.0.0/16";
|
||||
var pblc = element.TEMPLATE.CONTEXT.MAP_EXTERNAL; //"10.0.0.0/8";
|
||||
var prvt = element.TEMPLATE.CONTEXT.MAP_INTERNAL; //"192.168.0.0/16";
|
||||
var renderTitle = true;
|
||||
if (!$.isArray(nics)){
|
||||
nics = [nics];
|
||||
|
||||
@@ -50,7 +50,7 @@ define(function(require) {
|
||||
return TemplateHTML({
|
||||
'titleKey': Locale.tr("Name"),
|
||||
'titleMandatory': showMandatory ? Locale.tr("Type") : '',
|
||||
'titleValue': Locale.tr("Description"),
|
||||
'titleValue': Locale.tr("Value"),
|
||||
'titleDefault': showDefault? Locale.tr("Default Value"): '',
|
||||
'classTable': classTableName,
|
||||
'classButton': classButtonName
|
||||
@@ -61,7 +61,6 @@ define(function(require) {
|
||||
if (!hide_vector_button) {
|
||||
hide_vector_button = false;
|
||||
}
|
||||
console.log("VALIDATE: ",showMandatory? 'M' : '');
|
||||
context.off("click", ".add_custom_tag");
|
||||
context.on("click", ".add_custom_tag", function(){
|
||||
$("tbody.custom_tags", context).append(
|
||||
|
||||
@@ -29,7 +29,7 @@ define(function(require) {
|
||||
CONSTANTS
|
||||
*/
|
||||
|
||||
var classButton = 'button warning leases';
|
||||
var classButton = 'button leases';
|
||||
var idElementSchedActions = '#sched_temp_actions_body, #sched_inst_actions_body';
|
||||
|
||||
/*
|
||||
@@ -52,7 +52,9 @@ define(function(require) {
|
||||
config.system_config.leases &&
|
||||
(config.system_config.leases.suspense || config.system_config.leases.terminate)
|
||||
){
|
||||
return $("<button />", {class: classButton}).text(Locale.tr("Add lease")).prop('outerHTML');
|
||||
return $("<button />", {class: classButton}).append(
|
||||
$("<i/>", {class: 'fa fa-clock'})
|
||||
).prop('outerHTML');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": "opennebula-sunstone",
|
||||
"dependencies": {
|
||||
"flot": "0.8.3",
|
||||
"ip": "https://github.com/jloboescalona2/ip.git#2c25465",
|
||||
"ip": "https://github.com/OpenNebula/sunstone-deps.git#50b7927",
|
||||
"buffer": "https://github.com/anodynos/node2web_buffer.git#91433d2",
|
||||
"jgrowl": "1.4.2",
|
||||
"fontawesome": "5.0.7",
|
||||
@@ -20,7 +20,7 @@
|
||||
"navigo": "2.1.1",
|
||||
"sprintf": "1.0.3",
|
||||
"jquery-ui": "^1.12.1",
|
||||
"wickedpicker": "https://github.com/ericjgagnon/wickedpicker.git#dd2cce3"
|
||||
"wickedpicker": "https://github.com/OpenNebula/sunstone-deps.git#9398b3f"
|
||||
},
|
||||
"authors": [
|
||||
"Daniel Molina <dmolina@opennebula.org>",
|
||||
|
||||
Reference in new issue
Block a user