Commit 6e1abd33 authored by Leigh Stoller's avatar Leigh Stoller

Minor bug fix.

parent dd50e01e
...@@ -1219,9 +1219,6 @@ function (_, sup, moment, marked, UriTemplate, ShowImagingModal, ...@@ -1219,9 +1219,6 @@ function (_, sup, moment, marked, UriTemplate, ShowImagingModal,
// //
function StartSnapshot(node_id, update_profile, update_prepare) function StartSnapshot(node_id, update_profile, update_prepare)
{ {
if (node_id === undefined) {
node_id = "";
}
sup.ShowModal('#waitwait-modal'); sup.ShowModal('#waitwait-modal');
var callback = function(json) { var callback = function(json) {
...@@ -1235,12 +1232,14 @@ function (_, sup, moment, marked, UriTemplate, ShowImagingModal, ...@@ -1235,12 +1232,14 @@ function (_, sup, moment, marked, UriTemplate, ShowImagingModal,
} }
ShowProgressModal(); ShowProgressModal();
} }
var args = {"uuid" : uuid,
"update_profile" : update_profile,
"update_prepare" : update_prepare};
if (node_id !== undefined) {
args["node_id"] = node_id;
}
var xmlthing = var xmlthing =
sup.CallServerMethod(ajaxurl, "status", "SnapShot", sup.CallServerMethod(ajaxurl, "status", "SnapShot", args);
{"uuid" : uuid,
"node_id" : node_id,
"update_profile" : update_profile,
"update_prepare" : update_prepare});
xmlthing.done(callback); xmlthing.done(callback);
} }
......
...@@ -565,7 +565,7 @@ function Do_Snapshot() ...@@ -565,7 +565,7 @@ function Do_Snapshot()
return; return;
} }
$optargs = ""; $optargs = "";
if (isset($ajax_args["node_id"])) { if (isset($ajax_args["node_id"]) && $ajax_args["node_id"] != "") {
$node_id = $ajax_args["node_id"]; $node_id = $ajax_args["node_id"];
if (!TBvalid_vnode_id($node_id)) { if (!TBvalid_vnode_id($node_id)) {
SPITAJAX_ERROR(1, "Bad node id"); SPITAJAX_ERROR(1, "Bad node id");
......
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