Commit 250a91ca authored by Leigh Stoller's avatar Leigh Stoller

For the emulab portal, we use the old freenodes graph since that is more

appropriate for external sites. At the moment, the Mothership exposes
just the local cluster, so showing the fancy all clusters version would
just be confusing. Revisit later.
parent 4c82d7ab
......@@ -27,12 +27,24 @@ chdir("apt");
include("quickvm_sup.php");
$page_title = "Cluster Graphs";
#
# The Emulab portal does not use the fancy statsus stuff, we fall
# back to the simple bar graphs
#
if ($PORTAL_GENESIS == "emulab") {
$usefancy = 0;
}
else {
$usefancy = 1;
}
SPITHEADER(1);
echo "<script type='text/javascript' src='js/lib/d3.v3.js'></script>";
echo "<script type='text/javascript' src='js/lib/d3.tip.v0.6.3.js'></script>";
echo "<script type='text/javascript'>\n";
echo " window.JACKS_LOADER = { params: { source: 'devel' } };\n";
echo " window.MAINSITE = $TBMAINSITE;\n";
echo " window.USEFANCY = $usefancy;\n";
echo "</script>\n";
# Place to hang the toplevel template.
......
......@@ -5,18 +5,18 @@ require(window.APT_OPTIONS.configObject,
function (_, sup, clusterString)
{
'use strict';
var mainsite = false;
var usefancy = false;
var template = _.template(clusterString);
function initialize()
{
window.APT_OPTIONS.initialize(sup);
mainsite = window.MAINSITE;
usefancy = window.USEFANCY;
$('#cluster-graphs')
.html(template({"mainsite" : mainsite}));
.html(template({"usefancy" : usefancy}));
if (mainsite) {
if (usefancy) {
bilevelAsterGraph("/cloudlab-nofed.json",
"#status-nofed","auto","large");
bilevelAsterGraph("/cloudlab-fedonly.json",
......@@ -33,7 +33,7 @@ function (_, sup, clusterString)
*/
function Refresh()
{
if (mainsite) {
if (usefancy) {
$('#status-fedonly').html("");
$('#status-nofed').html("");
$("div").remove(".d3-tip");
......
<div>
<% if (mainsite) { %>
<% if (usefancy) { %>
<div style="font-family:'Fira Sans'">
<link href='https://fonts.googleapis.com/css?family=Fira+Sans'
rel='stylesheet' type='text/css'></link>
......
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