Commit 2793a7ef authored by Leigh B Stoller's avatar Leigh B Stoller

Move the health status call used by the frontpage to its own

ajax entrypoint, since we need guest access enabled for that.
parent 321526ab
<?php
#
# Copyright (c) 2000-2017 University of Utah and the Flux Group.
#
# {{{EMULAB-LICENSE
#
# This file is part of the Emulab network testbed software.
#
# This file is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or (at
# your option) any later version.
#
# This file is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this file. If not, see <http://www.gnu.org/licenses/>.
#
# }}}
#
chdir("..");
include_once("geni_defs.php");
chdir("apt");
include_once("instance_defs.php");
# Fetch overall cluster aggregate health status.
# Can be done without logging in (for front page status).
function Do_GetHealthStatus()
{
global $ajax_args, $PORTAL_HEALTH;
$amlist = array();
$fedlist = array();
$status = array();
$PORTAL_HEALTH = 1;
CalculateAggregateStatus($amlist, $fedlist, $status);
SPITAJAX_RESPONSE($status);
}
# Local Variables:
# mode:php
# End:
?>
......@@ -198,9 +198,7 @@ $routing = array("myprofiles" =>
"MaxExtension" =>
"Do_MaxExtension",
"dismissExtensionDenied" =>
"Do_DismissExtensionDenied",
"GetHealthStatus" =>
"Do_GetHealthStatus")),
"Do_DismissExtensionDenied")),
"approveuser" =>
array("file" => "approveuser.ajax",
"guest" => false,
......@@ -404,6 +402,12 @@ $routing = array("myprofiles" =>
"Do_Deny",
"Approve" =>
"Do_Approve")),
"frontpage" =>
array("file" => "frontpage.ajax",
"guest" => true,
"methods" => array("GetHealthStatus" =>
"Do_GetHealthStatus")),
);
#
......
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