IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 23, 2010, 4:07:26 PM (16 years ago)
Author:
rhenders
Message:

Added links to show pantasks server status

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/raw/czartool_labels.php

    r28706 r28708  
    2929
    3030$userSelection = $_GET[selection];
     31$selectedServer = $_GET[server];
     32
    3133if ($userSelection == "") {$userSelection = $_POST['state'];}
    3234if ($userSelection == "") {$userSelection = "new";}
     
    9799echo "</table>\n";
    98100
     101if ($selectedServer) showServerStatus($selectedServer);
     102
    99103menu_end();
    100104
     
    352356    foreach ($servers as &$server) {
    353357
    354         //$link = "czartool_servers.php?pass=" . $pass . "&proj=" . $proj . "&server=" . $server;
    355         $link = "";
     358        $link = "czartool_labels.php?pass=" . $pass . "&proj=" . $proj . "&server=" . $server;
     359  //      $link = "";
    356360
    357361        getServerStatus($db, $server, $alive, $running);
     
    403407}
    404408
     409###########################################################################
     410#
     411# Shows the status of the provided pantasks server
     412#
     413###########################################################################
     414function showServerStatus($server) {
     415
     416    echo "<p> Status for $server server </p>";
     417
     418    $results=array();
     419    exec("czartool_getServerStatus.pl -s $server", $results, $status);
     420
     421    foreach ($results as &$line) {
     422        echo "<pre>\n";
     423        echo "$line\n";
     424        echo "</pre>\n";
     425
     426    }
     427
     428}
    405429
    406430
Note: See TracChangeset for help on using the changeset viewer.