Commit 253ae345 authored by Leigh Stoller's avatar Leigh Stoller

A couple of fixes and remove debugging stuff.

parent d0a467ca
......@@ -670,8 +670,14 @@ if (!defined($instance)) {
fatal(defined($errmsg) ? $errmsg :
"Could not create instance record for $quickvm_uuid");
}
# To keep stuff happy until finished.
$instance->Update({'aggregate_urn' => $default_aggregate_urn});
# To keep stuff happy until multisite support finished.
if (keys(%{$sitemap})) {
my ($temp_aggregate_urn) = values(%{$sitemap});
$instance->Update({'aggregate_urn' => $temp_aggregate_urn});
}
else {
$instance->Update({'aggregate_urn' => $default_aggregate_urn});
}
# We use this list of references for ParRun below.
my @aggregate_list = ();
......
......@@ -335,8 +335,10 @@ if ($snap) {
UserError();
}
my $sliver_urn = GeniXML::GetSliverId($nodes[0]);
my $manager_urn= GeniXML::GetManagerId($nodes[0]);
$node_id = GeniXML::GetVirtualId($nodes[0]);
if (! (defined($sliver_urn) && $sliver_urn eq $aggregate->aggregate_urn())){
if (! (defined($sliver_urn) &&
$manager_urn eq $aggregate->aggregate_urn())) {
$errors{"error"} = "$node_id is not at " . $aggregate->aggregate_urn();
UserError();
}
......
......@@ -70,8 +70,6 @@ function (_, editModalString, editInlineString)
function JacksEditor (root, isViewer, isInline,
withoutSelection, withoutMenu, withoutMultiSite)
{
console.info("foo");
console.info(withoutMultiSite);
this.root = root;
this.instance = null;
this.input = null;
......
......@@ -41,9 +41,7 @@ function (_, Constraints, sup, ppstart, JacksEditor, aboutaptString, aboutcloudS
window.APT_OPTIONS.initialize(ppstart);
registered = window.REGISTERED;
webonly = window.WEBONLY;
console.info("bar");
isadmin = window.ISADMIN;
console.info(isadmin);
portal = window.PORTAL;
ajaxurl = window.AJAXURL;
......@@ -531,7 +529,7 @@ function (_, Constraints, sup, ppstart, JacksEditor, aboutaptString, aboutcloudS
" </select>" +
"</div></div></div>";
}
console.info(html);
//console.info(html);
$("#nosite_selector").addClass("hidden");
$("#site_selector").removeClass("hidden");
$("#site_selector").html(html);
......
......@@ -62,6 +62,7 @@ function (_, sup, moment, marked, UriTemplate, ShowImagingModal,
// Generate the templates.
var template_args = {
uuid: uuid,
name: window.APT_OPTIONS.name,
profileName: window.APT_OPTIONS.profileName,
profileUUID: window.APT_OPTIONS.profileUUID,
sliceURN: window.APT_OPTIONS.sliceURN,
......@@ -1180,8 +1181,8 @@ function (_, sup, moment, marked, UriTemplate, ShowImagingModal,
// Bind a function to start up ssh for one node topologies.
if (nodecount == 1 && !oneonly && dossh) {
startOneSSH = function () {
var nodename = hostportlist.keys()[0];
var hostport = hostportlist[nodename];
var nodename = hostportList.keys()[0];
var hostport = hostportList[nodename];
NewSSHTab(hostport, nodename);
};
}
......
......@@ -137,6 +137,11 @@ else {
}
if ($slice) {
$slice_urn = $slice->urn();
$instance_name = $instance->name();
# Until old instances are gone.
if (!$instance_name) {
$instance_name = $slice_urn;
}
$slice_expires = DateStringGMT($slice->expires());
$slice_expires_text = gmdate("m-d\TH:i\Z", strtotime($slice->expires()));
$slice_created = DateStringGMT($instance->created());
......@@ -146,6 +151,7 @@ else {
$slice_expires = "";
$slice_expires_text = "";
$slice_created = "";
$instance_name = "";
}
$registered = (isset($this_user) ? "true" : "false");
$snapping = 0;
......@@ -192,6 +198,7 @@ echo "<div id='status-body'></div>\n";
echo "<script type='text/javascript'>\n";
echo " window.APT_OPTIONS.uuid = '" . $uuid . "';\n";
echo " window.APT_OPTIONS.name = '" . $instance_name . "';\n";
echo " window.APT_OPTIONS.instanceStatus = '" . $instance_status . "';\n";
echo " window.APT_OPTIONS.profileName = '" . $profile_name . "';\n";
echo " window.APT_OPTIONS.profileUUID = '" . $profile_uuid . "';\n";
......
......@@ -32,8 +32,8 @@
</td>
</tr>
<tr>
<td class='border-none'>URN:</td>
<td class='border-none'><%- sliceURN %></td>
<td class='border-none'>Name:</td>
<td class='border-none'><%- name %></td>
</tr>
<tr>
<td class='border-none'>State:</td>
......
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