Commit 694f61c4 authored by Leigh B Stoller's avatar Leigh B Stoller

Bug fix; we were not creating a new profile version for single node

snapshot.
parent f3274985
...@@ -1357,7 +1357,6 @@ function (_, sup, moment, marked, UriTemplate, ShowImagingModal, ...@@ -1357,7 +1357,6 @@ function (_, sup, moment, marked, UriTemplate, ShowImagingModal,
if (node_id) { if (node_id) {
// Default to checked any time we show the modal. // Default to checked any time we show the modal.
$('#snapshot_update_profile').prop("checked", true); $('#snapshot_update_profile').prop("checked", true);
$('#snapshot_update_profile_div').removeClass("hidden"); $('#snapshot_update_profile_div').removeClass("hidden");
} }
else { else {
...@@ -1369,8 +1368,9 @@ function (_, sup, moment, marked, UriTemplate, ShowImagingModal, ...@@ -1369,8 +1368,9 @@ function (_, sup, moment, marked, UriTemplate, ShowImagingModal,
$('button#snapshot_confirm').bind("click.snapshot", function (event) { $('button#snapshot_confirm').bind("click.snapshot", function (event) {
event.preventDefault(); event.preventDefault();
$('button#snapshot_confirm').unbind("click.snapshot"); $('button#snapshot_confirm').unbind("click.snapshot");
if (node_id && $('#snapshot_update_profile').is(':checked')) { if (node_id) {
update_profile = 1; update_profile =
$('#snapshot_update_profile').is(':checked') ? 1 : 0;
} }
if ($('#snapshot_update_prepare').is(':checked')) { if ($('#snapshot_update_prepare').is(':checked')) {
update_prepare = 1; update_prepare = 1;
......
...@@ -706,6 +706,12 @@ function Do_Snapshot() ...@@ -706,6 +706,12 @@ function Do_Snapshot()
$optargs .= " -u all "; $optargs .= " -u all ";
} }
} }
else {
#
# Single node profile snapshot, we always update the profile.
#
$optargs .= " -u node ";
}
if (isset($ajax_args["update_prepare"]) && if (isset($ajax_args["update_prepare"]) &&
$ajax_args["update_prepare"]) { $ajax_args["update_prepare"]) {
$optargs .= " -U "; $optargs .= " -U ";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment