Skip to content

Commit

Permalink
F #2427: Fixed bug with SCHED_REQUERIMENTS filled in Sunstone (#2622)
Browse files Browse the repository at this point in the history
  • Loading branch information
juanmont authored and juanmont committed Nov 26, 2018
1 parent 2d3ebb9 commit eeda344
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ define(function(require) {
$(".auto", context).show();

if ( templateJSON["SCHED_REQUIREMENTS"] ) {
$("input#"+this.nicTabId+"_SCHED_REQUIREMENTS", context).val(templateJSON["SCHED_REQUIREMENTS"]);
$("input#"+this.nicTabId+"_SCHED_REQUIREMENTS", context).val(templateJSON["SCHED_REQUIREMENTS"].split('"').join("\\\""));
}

if ( templateJSON["SCHED_RANK"] ) {
Expand Down
8 changes: 6 additions & 2 deletions src/sunstone/public/app/utils/nics-section.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,10 @@ define(function(require) {
if ( rank && rank !== "" ){
nic["SCHED_RANK"] = rank;
}
} else {
delete nic["NETWORK_MODE"];
delete nic["SCHED_REQUIREMENTS"];
delete nic["SCHED_RANK"];
}

if ( !nic["NETWORK_MODE"] || ( nic["NETWORK_MODE"] && nic["NETWORK_MODE"] !== "auto" ) )
Expand Down Expand Up @@ -269,7 +273,7 @@ define(function(require) {
var selected_vnets = vnetsTableAuto.retrieveResourceTableSelect();

$.each(selected_vnets, function(index, netID) {
req_string.push('ID="'+netID+'"');
req_string.push('ID=\\"'+netID+'\\"');
});
$(".SCHED_REQUIREMENTS", dd_context).val(req_string.join(" | "));
}
Expand Down Expand Up @@ -320,7 +324,7 @@ define(function(require) {
$(".auto", dd_context).show();

if ( options.nic["SCHED_REQUIREMENTS"] ) {
$("input#provision_accordion_dd_"+provision_nic_accordion_dd_id+"_SCHED_REQUIREMENTS", dd_context).val(options.nic["SCHED_REQUIREMENTS"]);
$("input#provision_accordion_dd_"+provision_nic_accordion_dd_id+"_SCHED_REQUIREMENTS", dd_context).val(options.nic["SCHED_REQUIREMENTS"].split('"').join("\\\""));
}

if ( options.nic["SCHED_RANK"] ) {
Expand Down

0 comments on commit eeda344

Please sign in to comment.