1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-14 01:57:24 +03:00

B #5237: Fix onegate context attributes in sunstone (#707)

This commit is contained in:
Sergio Betanzos 2021-01-28 19:06:03 +01:00 committed by GitHub
parent 9d469cb8f0
commit b03be57ca8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -299,9 +299,8 @@ define(function(require) {
var token_regexp = /^TOKEN$/;
var report_ready_regexp = /^REPORT_READY$/;
var publickey_regexp = /\$USER\[SSH_PUBLIC_KEY\]/;
var net_flag = false;
var files = [];
var publickey_regexp = /\$USER\[SSH_PUBLIC_KEY\]/;
var yes_value = /^(yes|YES)$/;
var customTagsJSON = {};
$.each(contextJSON, function(key, value) {
@ -311,11 +310,11 @@ define(function(require) {
if (!publickey_regexp.test(value)) {
WizardFields.fillInput($("#ssh_public_key", context), value);
}
} else if (token_regexp.test(key)) {
} else if (token_regexp.test(key) && yes_value.test(value)) {
$(".token_context", context).prop('checked', 'checked');
} else if (report_ready_regexp.test(key)) {
} else if (report_ready_regexp.test(key) && yes_value.test(value)) {
$(".report_ready_context", context).prop('checked', 'checked');
} else if (net_regexp.test(key)) {
} else if (net_regexp.test(key) && yes_value.test(value)) {
$(".network_context", context).prop('checked', 'checked');
} else if ("INIT_SCRIPTS" == key) {
WizardFields.fillInput($("input.INIT_SCRIPTS", context), value);