All new accounts created on Gitlab now require administrator approval. If you invite any collaborators, please let Flux staff know so they can approve the accounts.

Commit cc3ffb0b authored by Leigh B Stoller's avatar Leigh B Stoller

Kill the old currentusage box in the upper right, and add a link to the

Portal resource availability page. Mothership only.
parent eed69bb0
......@@ -28,7 +28,7 @@ $drewheader = 0;
$noheaders = 0;
$autorefresh = 0;
$javascript_debug = 0;
$currentusage = 1;
$currentusage = ($TBMAINSITE ? 0 : 1);
$currently_busy = 0;
$sortedtables = array();
$bodyclosestring = "";
......@@ -149,13 +149,13 @@ function NavMenuButton($text, $link = null, $extratext = null,
}
# Ditto, but with a new icon.
function NavMenuButtonNew($text, $link = null, $divider = FALSE)
function NavMenuButtonNew($text, $link = null, $divider = FALSE, $target = null)
{
global $navmenu, $login_user;
if ($login_user)
NavMenuButton($text, $link, "&nbsp;<img src=\"/new.gif\">",
null, $divider);
$target, $divider);
else
WRITESIDEBARBUTTON($text, $link, "&nbsp;<img src=\"/new.gif\" />");
}
......@@ -512,7 +512,7 @@ function WRITELOGINBOX($loginbox_content) {
function WRITEEXPERIMENTMENU($firstinitstate) {
global $TBBASE, $TBDOCBASE, $TBMAINSITE;
global $WIKISUPPORT, $CHECKLOGIN_WIKINAME, $EXPOSETEMPLATES, $FLAVOR;
global $login_status, $login_user;
global $login_status, $login_user, $currentusage;
# Start Interaction section if going to spit out interaction options.
if ($login_status & (CHECKLOGIN_LOGGEDIN|CHECKLOGIN_MAYBEVALID)) {
......@@ -571,6 +571,12 @@ function WRITEEXPERIMENTMENU($firstinitstate) {
NavMenuButtonDivider("Node Status",
"$TBBASE/nodecontrol_list.php3");
if (!$currentusage) {
NavMenuButtonNew("Resource Availability",
"$TBBASE/portal/resinfo.php",
false, "_blank");
}
NavMenuButton("List ImageIDs",
"$TBBASE/showimageid_list.php3");
......@@ -1027,18 +1033,6 @@ function PAGEBEGINNING( $title, $nobanner = 0, $nocontent = 0,
}
}
# NOTE: This has to come before any images in the div for the float to
# work correctly.
if ($currentusage && !$login_user) {
if ($FANCYBANNER) {
$class = "transparentusageframe";
}
else {
$class = "usageframe";
}
echo "<iframe src='$BASEPATH/currentusage.php3' class='$class'
scrolling='no' frameborder='0'></iframe>\n";
}
if ($login_user) {
#
# It is a violation of Emulab licensing restrictions to remove
......@@ -1155,8 +1149,9 @@ function FINISHSIDEBAR($nocontent = 0)
"id=usagefreenodes>\n";
echo "</div>\n";
}
echo "</td></tr></table>\n";
echo "</td>\n";
}
echo "</tr></table>\n";
echo "<!-- sidebar ends -->
</div>";
}
......@@ -1354,7 +1349,7 @@ function PAGEHEADER($title, $view = NULL, $extra_headers = NULL,
$PAGEFOOTER_FUNCTION = function($view = NULL) {
global $TBDOCBASE, $TBMAILADDR, $THISHOMEBASE, $BASEPATH, $TBBASE;
global $TBMAINSITE, $bodyclosestring, $currently_busy;
global $login_user, $javascript_debug, $sortedtables;
global $login_user, $javascript_debug, $sortedtables, $currentusage;
global $FORUMURL;
if ($currently_busy) {
......@@ -1427,7 +1422,7 @@ $PAGEFOOTER_FUNCTION = function($view = NULL) {
# Plug the home site from all others.
echo "\n<a href=\"www.emulab.net/netemu.php3\"></a>\n";
if ($login_user) {
if ($currentusage && $login_user) {
echo "<script>\n";
sajax_show_javascript();
?>
......@@ -1778,12 +1773,18 @@ class menuBar
echo "$text\n";
else {
$mouseover = "";
$target = "";
if ($item['#mouseover']) {
$string = htmlentities($item['#mouseover']);
$mouseover =
"onmouseover=\"return escape('$string')\"";
}
echo "<ul><li class=toplevel><a $mouseover href=\"$link\">$text</a></li></ul>\n";
if ($item['#target']) {
$target = "target=" . $item['#target'];
}
echo "<ul><li class=toplevel>";
echo "<a $mouseover $target href=\"$link\">$text</a>";
echo "</li></ul>\n";
}
}
else {
......@@ -1800,12 +1801,15 @@ class menuBar
$text = $item['#text'];
$extra = $item['#extratext'];
$div = "";
$target= "";
# The divider comes before the item.
if ($item['#divider'])
$div = "class=divider";
if ($item['#target'])
$target = "target=" . $item['#target'];
echo "<li $div><a href=\"$link\">$text $extra</a></li>\n";
echo "<li $div><a $target href=\"$link\">$text $extra</a></li>\n";
}
echo "</ul>";
# echo "</td></tr></table></a>";
......
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