コード例 #1
0
#
echo "<div width=\"100%\" align=center>\n";
echo "<ul id=\"topnavbar\">\n";
echo "<li>\n          <a href=\"#A\" " . "class=topnavbar onfocus=\"this.hideFocus=true;\" " . "id=\"li_vis\" onclick=\"Show('vis');\">" . "Topology</a></li>\n";
echo "<li>\n          <a href=\"#B\" " . "class=topnavbar onfocus=\"this.hideFocus=true;\" " . "id=\"li_nsfile\" onclick=\"Show('nsfile');\">" . "NS File</a></li>\n";
echo "<li>\n          <a href=\"#C\" " . "class=topnavbar onfocus=\"this.hideFocus=true;\" " . "id=\"li_graph\" onclick=\"Show('graph');\">" . "History</a></li>\n";
echo "</ul>\n";
echo "</div>\n";
echo "<div align=center id=topnavbarbottom>&nbsp</div>\n";
#
# Start out with  ...
#
echo "<div align=center width=\"100%\" id=\"showexp_visarea\">\n";
echo $init_show;
echo "</div>\n";
SUBPAGEEND();
$paramcount = $template->ParameterCount();
$metacount = $template->MetadataCount();
$rowspan = $paramcount && $metacount ? 2 : 1;
echo "<center>\n";
echo "<table border=0 bgcolor=#000 color=#000 class=stealth " . " cellpadding=0 cellspacing=0>\n";
echo "<tr valign=top><td rowspan={$rowspan} class=stealth align=center>\n";
$template->Show();
echo "</td>\n";
if ($paramcount || $metacount) {
    echo "<td align=center class=stealth> &nbsp &nbsp &nbsp </td>\n";
    echo "<td align=center class=stealth> \n";
    if ($paramcount && $metacount) {
        $template->ShowParameters();
        echo "</td>\n";
        echo "</tr>\n";
コード例 #2
0
 function ShowRun($runidx)
 {
     $runidx = addslashes($runidx);
     $exptidx = $this->exptidx();
     $guid = $this->guid();
     $vers = $this->vers();
     $template = $this->template();
     $query_result = DBQueryFatal("select r.* from experiment_runs as r " . "left join experiment_template_instances as i on " . "     i.exptidx=r.exptidx " . "where r.exptidx='{$exptidx}' and r.idx='{$runidx}'");
     if (!mysql_num_rows($query_result)) {
         return;
     }
     $row = mysql_fetch_array($query_result);
     $start = $row['start_time'];
     $stop = $row['stop_time'];
     $runid = $row['runid'];
     $start_tag = $row['starting_archive_tag'];
     $end_tag = $row['ending_archive_tag'];
     $description = $row['description'];
     $hidden = $row['hidden'];
     # Run descriptions are metatdata that can be changed.
     # But use a naming convention.
     $desc_metaname = "__run_description_{$exptidx}_{$runidx}";
     $desc_metadata = $template->LookupMetadataByName($desc_metaname);
     if (!isset($stop)) {
         $stop = "&nbsp";
     }
     SUBPAGESTART();
     SUBMENUSTART("Run Options");
     WRITESUBMENUBUTTON("Export Record", CreateURL("template_export", $this, "runidx", $runidx));
     WRITESUBMENUBUTTON("Revise Record", CreateURL("record_revise", $this, "runidx", $runidx));
     if ($hidden) {
         WRITESUBMENUBUTTON("UnHide Record", CreateURL("toggle", $this, "runidx", $runidx, "type", "hiderun", "value", 0));
     } else {
         WRITESUBMENUBUTTON("Hide Record", CreateURL("toggle", $this, "runidx", $runidx, "type", "hiderun", "value", 1));
     }
     if (isset($end_tag) && $end_tag != "") {
         WRITESUBMENUBUTTON("View Archive", CreateURL("archive_view", $this, "tag", $end_tag));
     }
     SUBMENUEND();
     echo "<center>\n";
     echo "<table border=0 bgcolor=#000 color=#000 class=stealth " . " cellpadding=0 cellspacing=0>\n";
     echo "<tr valign=top>";
     echo "<td class=stealth align=center>\n";
     echo "<center>\n               <h3>Run Details</h3>\n             </center>\n";
     echo "<table align=center cellpadding=2 cellspacing=2 border=1>\n";
     ShowItem("Template", MakeLink("template", "guid={$guid}&version={$vers}", "{$guid}/{$vers}"));
     ShowItem("Instance", MakeLink("instance", "instance={$exptidx}", "{$exptidx}"));
     ShowItem("ID", $runidx);
     if ($hidden) {
         ShowItem("Hidden", "<font color=red>Yes</font>");
     }
     if ($description && $description != "") {
         $onmouseover = MakeMouseOver($description);
         if (strlen($description) > 40) {
             $description = substr($description, 0, 40) . " <b>... </b>";
         }
     } else {
         $onmouseover = "";
         $description = "Click to Add";
     }
     # If no metadata, assume its for an instance prior to modifiable
     # instance descriptions.
     if ($desc_metadata) {
         $desc_anchor = MakeAnchor(CreateURL("template_metadata", $template, $desc_metadata) . "&action=modify", $description, $onmouseover);
     } else {
         $desc_anchor = MakeAnchor(CreateURL("template_metadata", $template) . "&action=add" . "&metadata_type=run_description" . "&formfields[name]={$desc_metaname}", $description, $onmouseover);
     }
     ShowItem("Description", $desc_anchor);
     ShowItem("Started", $start);
     ShowItem("Stopped", $stop);
     ShowItem("Start Tag", $start_tag);
     ShowItem("End Tag", $end_tag);
     echo "</table>\n";
     echo "</td>\n";
     $query_result = DBQueryFatal("select * from experiment_run_bindings " . "where exptidx='{$exptidx}' and runidx='{$runidx}'");
     if (mysql_num_rows($query_result)) {
         $id = "{$exptidx}_{$runidx}_bindings";
         echo "<td align=center class=stealth> &nbsp &nbsp &nbsp </td>\n";
         echo "<td align=center class=stealth>\n";
         AddSortedTable($id);
         echo "<center>\n                   <h3>Run Bindings</h3>\n                  </center> \n                  <table id='{$id}'\n                         align=center border=1 cellpadding=5 cellspacing=2>\n";
         echo "<thead class='sort'>\n";
         echo "<tr>\n                    <th>Name</th>\n                    <th>Value</th>\n                  </tr>\n";
         echo "</thead>\n";
         while ($row = mysql_fetch_array($query_result)) {
             $name = $row['name'];
             $value = $row['value'];
             if (!isset($value)) {
                 $value = "&nbsp";
             }
             echo "<tr>\n                       <td>{$name}</td>\n                       <td>{$value}</td>\n                      </tr>\n";
         }
         echo "</table>\n";
         echo "</td>\n";
     }
     echo "</tr>\n";
     echo "</table>\n";
     $this->ShowRunAnnotation($runidx);
     echo "</center>\n";
     SUBPAGEEND();
 }