Commit 9df22cb8 authored by Leigh Stoller's avatar Leigh Stoller

Small UI tweaks.

parent c971be7d
......@@ -1315,6 +1315,8 @@ sub pid($) { return ((!ref($_[0])) ? -1 : $_[0]->{'DB'}->{'pid'}); }
sub eid($) { return ((!ref($_[0])) ? -1 : $_[0]->{'DB'}->{'eid'}); }
sub uid($) { return ((!ref($_[0])) ? -1 : $_[0]->{'DB'}->{'uid'}); }
sub runidx($) { return ((!ref($_[0])) ? -1 : $_[0]->{'DB'}->{'runidx'}); }
sub start_time { return ((!ref($_[0])) ? -1 : $_[0]->{'DB'}->{'start_time'}); }
sub stop_time { return ((!ref($_[0])) ? -1 : $_[0]->{'DB'}->{'stop_time'}); }
sub template($){ return ((!ref($_[0])) ? -1 : $_[0]->{'TEMPLATE'}); }
#
......
......@@ -176,6 +176,8 @@ $root->{"guid"} = $instance->guid() . "/" . $instance->vers();
$root->{"pid"} = $instance->pid();
$root->{"eid"} = $instance->eid();
$root->{"uid"} = $instance->uid();
$root->{"start_time"} = $instance->start_time();
$root->{"stop_time"} = $instance->stop_time();
# Fill in the bindings
$instance->BindingList(\%bindings) == 0
......
......@@ -80,10 +80,10 @@ if ($current) {
echo "<input type=hidden name=exptidx value='$exptidx'>";
echo "</form>";
}
echo "</center><br>\n";
echo "<iframe width=100% height=800 scrolling=yes src='$url' border=2>".
"</iframe>\n";
echo "</center><br>\n";
#
# Standard Testbed Footer
......
......@@ -47,7 +47,7 @@ var ttFontSize = "12px";
var ttFontWeight = "normal"; // alternative: "bold";
var ttLeft = false; // tooltip on the left of the mouse? Alternative: true
var ttOffsetX = -200; // horizontal offset of left-top corner from mousepointer
var ttOffsetY = 100; // vertical offset "
var ttOffsetY = 15; // vertical offset "
var ttOpacity = 100; // opacity of tooltip in percent (must be integer between 0 and 100)
var ttPadding = 3; // spacing between border and content
var ttShadowColor = "";
......
......@@ -212,6 +212,14 @@ function SPITFORM($formfields, $errors)
</tr>
</form>
</table>\n";
echo "<blockquote><blockquote>
<ol>
<li> Please read this
<a href=kb-show.php3?xref_tag=template_parameters>KB entry</a>
to see what NS extensions are available for templates.
</ol>
</blockquote></blockquote>\n";
}
#
......
......@@ -616,6 +616,20 @@ class Template
</script>\n";
}
#
# Dump the NS file into its own iframe.
#
function ShowNS() {
$guid = $this->guid();
$vers = $this->vers();
echo "<center>";
echo "<iframe width=700 height=400 scrolling=auto
src='spitnsdata.php3?guid=$guid&version=$vers'
border=2></iframe>\n";
echo "</center>";
}
#
# Grab array of input files for a template, indexed by input_idx.
#
......
......@@ -30,7 +30,8 @@ function SPITFORM($action, $formfields, $errors)
if ($action == "add") {
echo "<center>";
echo "<h3>Attach metadata to your template.</h3>";
echo "<font size=+1>
Attach metadata[<b>1</b>] to your template.</font>";
echo "</center><br>\n";
}
elseif ($action == "delete") {
......@@ -136,6 +137,16 @@ function SPITFORM($action, $formfields, $errors)
</tr>
</form>
</table>\n";
echo "<blockquote><blockquote>
<ol>
<li> Metadata can be any arbitrary name/value pair that you want
to associate with your template. The name can include
any printable ascii character including spaces, but
not newlines. The value can include any printable ascii
character and my be multiline.
</ol>
</blockquote></blockquote>\n";
}
# Objects
......
......@@ -106,8 +106,16 @@ SUBPAGESTART();
SUBMENUSTART("Template Options");
WRITESUBMENUBUTTON("Show NS File &nbsp &nbsp",
"spitnsdata.php3?guid=$guid&version=$version");
if (!isset($show) || $show == "graph") {
WRITESUBMENUBUTTON("Show NS File &nbsp &nbsp",
"template_show.php?guid=$guid".
"&version=$version&show=nsfile");
}
else {
WRITESUBMENUBUTTON("Show Graph &nbsp &nbsp",
"template_show.php?guid=$guid".
"&version=$version&show=graph");
}
WRITESUBMENUBUTTON("Modify Template",
"template_modify.php?guid=$guid&version=$version");
......@@ -155,22 +163,27 @@ if ($template->InstanceCount()) {
SUBMENUEND_2B();
$template->ShowGraph();
if (!isset($show) || $show == "graph") {
$template->ShowGraph();
#
# Define the zoom buttons. This should go elsewhere.
#
echo "<center>\n";
echo "<form action='template_show.php?guid=$guid&version=$version'
method=post>\n";
echo "<button name=action type=submit value=showall>";
echo " Show All Templates</button></a>&nbsp &nbsp ";
echo "<button name=zoomout type=submit value=zoomout>";
echo " Zoom Out</button>\n";
echo "<button name=zoomin type=submit value=zoomin>";
echo "Zoom In</button>\n";
echo "</form>\n";
echo "</center>\n";
#
# Define the zoom buttons. This should go elsewhere.
#
echo "<center>\n";
echo "<form action='template_show.php?guid=$guid&version=$version'
method=post>\n";
echo "<button name=action type=submit value=showall>";
echo " Show All Templates</button></a>&nbsp &nbsp ";
echo "<button name=zoomout type=submit value=zoomout>";
echo " Zoom Out</button>\n";
echo "<button name=zoomin type=submit value=zoomin>";
echo "Zoom In</button>\n";
echo "</form>\n";
echo "</center>\n";
}
else {
$template->ShowNS();
}
SUBPAGEEND();
......
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