Commit 5ff295a2 authored by Leigh B Stoller's avatar Leigh B Stoller
Browse files

Minor change to set the Jacks context to the generic one, when

it is the Emulab Portal but not the MotherShip.
parent 9534e44d
...@@ -48,7 +48,7 @@ $(function () { ...@@ -48,7 +48,7 @@ $(function () {
{ {
contextUrl = 'https://www.emulab.net/protogeni/jacks-context/cloudlab-utah.json'; contextUrl = 'https://www.emulab.net/protogeni/jacks-context/cloudlab-utah.json';
} }
else if (window.ISEMULAB) else if (window.ISEMULAB && window.MAINSITE)
{ {
contextUrl = 'https://www.emulab.net/protogeni/jacks-context/emulab.json'; contextUrl = 'https://www.emulab.net/protogeni/jacks-context/emulab.json';
} }
...@@ -57,7 +57,7 @@ $(function () { ...@@ -57,7 +57,7 @@ $(function () {
contextUrl = 'https://www.emulab.net/protogeni/jacks-context/phantomnet.json'; contextUrl = 'https://www.emulab.net/protogeni/jacks-context/phantomnet.json';
} }
if (window.ISCLOUD || window.ISPNET || window.ISEMULAB) if (window.ISCLOUD || window.ISPNET || (window.ISEMULAB && window.MAINSITE))
{ {
$('#edit_topo_modal_button').prop('disabled', true); $('#edit_topo_modal_button').prop('disabled', true);
$.get(contextUrl).then(contextReady, contextFail); $.get(contextUrl).then(contextReady, contextFail);
......
...@@ -51,7 +51,7 @@ if (isset($_SERVER['SERVER_NAME'])) { ...@@ -51,7 +51,7 @@ if (isset($_SERVER['SERVER_NAME'])) {
# #
$PAGEERROR_HANDLER = function($msg, $status_code = 0) { $PAGEERROR_HANDLER = function($msg, $status_code = 0) {
global $drewheader, $ISCLOUD, $ISPNET, $ISEMULAB, $ISAPT, $PORTAL_HELPFORUM; global $drewheader, $ISCLOUD, $ISPNET, $ISEMULAB, $ISAPT, $PORTAL_HELPFORUM;
global $spatrequired; global $spatrequired, $TBMAINSITE;
if (! $drewheader) { if (! $drewheader) {
SPITHEADER(); SPITHEADER();
...@@ -63,6 +63,7 @@ $PAGEERROR_HANDLER = function($msg, $status_code = 0) { ...@@ -63,6 +63,7 @@ $PAGEERROR_HANDLER = function($msg, $status_code = 0) {
echo " window.ISCLOUD = " . ($ISCLOUD ? "1" : "0") . ";\n"; echo " window.ISCLOUD = " . ($ISCLOUD ? "1" : "0") . ";\n";
echo " window.ISPNET = " . ($ISPNET ? "1" : "0") . ";\n"; echo " window.ISPNET = " . ($ISPNET ? "1" : "0") . ";\n";
echo " window.ISAPT = " . ($ISAPT ? "1" : "0") . ";\n"; echo " window.ISAPT = " . ($ISAPT ? "1" : "0") . ";\n";
echo " window.MAINSITE = " . ($TBMAINSITE ? "1" : "0") . ";\n";
echo " window.HELPFORUM = " . echo " window.HELPFORUM = " .
"'https://groups.google.com/d/forum/${PORTAL_HELPFORUM}';\n"; "'https://groups.google.com/d/forum/${PORTAL_HELPFORUM}';\n";
echo "</script>\n"; echo "</script>\n";
...@@ -128,6 +129,7 @@ $PAGEHEADER_FUNCTION = function($thinheader = 0, $ignore1 = NULL, ...@@ -128,6 +129,7 @@ $PAGEHEADER_FUNCTION = function($thinheader = 0, $ignore1 = NULL,
echo " window.ISCLOUD = " . ($ISCLOUD ? "1" : "0") . ";\n"; echo " window.ISCLOUD = " . ($ISCLOUD ? "1" : "0") . ";\n";
echo " window.ISPNET = " . ($ISPNET ? "1" : "0") . ";\n"; echo " window.ISPNET = " . ($ISPNET ? "1" : "0") . ";\n";
echo " window.ISAPT = " . ($ISAPT ? "1" : "0") . ";\n"; echo " window.ISAPT = " . ($ISAPT ? "1" : "0") . ";\n";
echo " window.MAINSITE = " . ($TBMAINSITE ? "1" : "0") . ";\n";
echo " window.MANUAL = '$PORTAL_MANUAL';\n"; echo " window.MANUAL = '$PORTAL_MANUAL';\n";
echo " window.HELPFORUM = " . echo " window.HELPFORUM = " .
"'https://groups.google.com/d/forum/${PORTAL_HELPFORUM}';\n"; "'https://groups.google.com/d/forum/${PORTAL_HELPFORUM}';\n";
......
Supports Markdown
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