Commit 74e3d7c0 authored by Leigh Stoller's avatar Leigh Stoller

Fixes to previous revision.

parent bde6c94d
......@@ -1741,7 +1741,7 @@ $(function ()
json.value.repohash = hash;
if (pythonRe.test(source)) {
ConvertScript(source, function(rspec, paramdefs) {
ConvertScript(source, profile, function(rspec, paramdefs){
// Need to pass these along at submit.
$('#rspec_textarea').val(rspec);
$('#script_textarea').val(source);
......@@ -1780,7 +1780,7 @@ $(function ()
// We use this on repo-based profiles, where we have to get the
// source code from the repo, and convert to an rspec.
//
function ConvertScript(script, continuation)
function ConvertScript(script, profile_uuid, continuation)
{
var callback = function(json) {
sup.HideWaitWait();
......@@ -1801,8 +1801,9 @@ $(function ()
var xmlthing = sup.CallServerMethod(null,
"manage_profile",
"CheckScript",
{"script" : script,
"getparams" : true});
{"script" : script,
"profile_uuid" : profile_uuid,
"getparams" : true});
xmlthing.done(callback);
}
......
......@@ -1399,6 +1399,9 @@ $(function ()
// Pass along uuid as a flag to update repo.
args["repoupdate"] = version_uuid;
}
if (profile_uuid) {
args["profile_uuid"] = profile_uuid;
}
WaitWait("We are converting your geni-lib script to XML");
var xmlthing = sup.CallServerMethod(ajaxurl,
"manage_profile",
......
......@@ -365,7 +365,8 @@ $(function ()
var xmlthing = sup.CallServerMethod(ajaxurl,
"manage_profile",
"CheckScript",
{"script" : script});
{"script" : script,
"profile_uuid" : profile_uuid});
xmlthing.done(callback);
}
......
......@@ -739,8 +739,12 @@ function Do_CheckScript()
$command .= " -P $pfname";
}
if ($profile->UseNewGeniLib($this_user)) {
$command .= " -N ";
if (isset($ajax_args["profile_uuid"])) {
$profile = Profile::Lookup($ajax_args["profile_uuid"]);
if ($profile && $profile->UseNewGeniLib($this_user)) {
$command .= " -N ";
}
}
}
elseif (preg_match("/^source tb_compat/m", $ajax_args["script"])) {
......
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