From e9be5a3a2630996178ea76fc878e927c42ea6677 Mon Sep 17 00:00:00 2001 From: Leigh B Stoller Date: Mon, 17 Sep 2018 07:06:28 -0600 Subject: [PATCH] The set of node type pruned from the list is now specific to the Portal and MAINSITE and if its the local cluster. Basically, try not to skip node types for some cases that they are wanted. --- www/aptui/instance_defs.php | 20 ++++++++++++++++---- www/aptui/instantiate.php | 4 ---- www/aptui/js/reserve.js | 4 +--- www/aptui/js/resinfo.js | 3 +-- www/aptui/reserve.ajax | 4 ++++ www/aptui/reserve.php | 4 ---- www/aptui/resinfo.php | 6 +----- 7 files changed, 23 insertions(+), 22 deletions(-) diff --git a/www/aptui/instance_defs.php b/www/aptui/instance_defs.php index 5a146d37a..30c502118 100644 --- a/www/aptui/instance_defs.php +++ b/www/aptui/instance_defs.php @@ -808,9 +808,14 @@ class Instance # # Return a list of types not to show user. # - function NodeTypePruneList() { + function NodeTypePruneList($aggregate = null) { global $ISEMULAB, $ISCLOUD, $ISAPT, $ISPNET, $ISPOWDER, $TBMAINSITE; - + global $DEFAULT_AGGREGATE_URN; + $aggregate_urn = ($aggregate ? $aggregate->urn() : ""); + + # + # We never want to show these. + # $skiptypes = array("dboxvm" => true, "d430k" => true, "d530" => true, @@ -819,8 +824,15 @@ class Instance "pc2400hp" => true, "d2100" => true, "pc2400w" => true); - - if (($ISEMULAB || $ISCLOUD || $ISAPT) && $TBMAINSITE) { + + # + # If showing nodes from another cluster, then we show them + # all (not sure how long this rule will last). Otherwise, + # only the Powder/Phantom portals get to see all these types. + # + if ($TBMAINSITE && + !($ISPOWDER || $ISPNET) && + $aggregate_urn == $DEFAULT_AGGREGATE_URN) { $skiptypes["sdr"] = true; $skiptypes["nuc5300"] = true; $skiptypes["enodeb"] = true; diff --git a/www/aptui/instantiate.php b/www/aptui/instantiate.php index 6d5df9cb6..c44869448 100644 --- a/www/aptui/instantiate.php +++ b/www/aptui/instantiate.php @@ -378,10 +378,6 @@ function SPITFORM($formfields, $newuser, $errors) } SpitAggregateStatus(true); - echo "\n"; - SpitOopsModal("oops"); echo "\n"; -echo "\n"; - $defaults = array(); $defaults["pid"] = ''; # Default project. diff --git a/www/aptui/resinfo.php b/www/aptui/resinfo.php index ae1d70ef8..2c57e8d13 100644 --- a/www/aptui/resinfo.php +++ b/www/aptui/resinfo.php @@ -1,6 +1,6 @@ \n"; echo " window.ISADMIN = $isadmin;\n"; echo "\n"; -echo "\n"; - REQUIRE_UNDERSCORE(); REQUIRE_SUP(); REQUIRE_MOMENT(); -- GitLab