Commit 253ae345 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

A couple of fixes and remove debugging stuff.

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