Ignore:
Timestamp:
04/21/07 16:22:47 (17 years ago)
Author:
bastiaans
Message:

web/addons/job_monarch/overview.php:

  • make our own datasource
  • store the XML data in a session for the clusterimage
  • assign a image map of clickable nodes for the clusterimage

web/addons/job_monarch/templates/overview.tpl:

  • add node_clustermap imagemap block

web/addons/job_monarch/libtoga.php:

web/addons/job_monarch/image.php:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/addons/job_monarch/image.php

    r305 r326  
    2929}
    3030
     31function checkSessionData() {
     32
     33        global $_SESSION;
     34
     35        session_start();
     36
     37        if( isset( $_SESSION["data"] ) ) {
     38                $myxml_data     = &$_SESSION["data"];
     39        } else {
     40                $myxml_data     = 0;
     41        }
     42
     43        if( !$myxml_data ) {
     44                $ds             = new DataSource();
     45                $myxml_data     = $ds->getData();
     46
     47                print_f( "%s\n", $myxml_data );
     48        }
     49        return $myxml_data;
     50}
     51
     52
    3153$httpvars = new HTTPVariables( $HTTP_GET_VARS, $_GET );
    3254$view = $httpvars->getHttpVar( "view" );
     
    4163function drawHostImage() {
    4264
    43         global $clustername, $hostname;
     65        global $clustername, $hostname, $data_gatherer;
    4466
    45         $data_gatherer = new DataGatherer( $clustername );
    46         $data_gatherer->parseXML();
     67        $ds             = new DataSource();
     68        $myxml_data     = $ds->getData();
     69
     70        $data_gatherer  = new DataGatherer( $clustername );
     71
     72        $data_gatherer->parseXML( $myxml_data );
    4773
    4874        if( $data_gatherer->isJobmonRunning() )
     
    5682function drawSmallClusterImage() {
    5783
    58         global $clustername;
     84        global $clustername, $data_gatherer;
    5985
    60         $data_gatherer = new DataGatherer( $clustername );
    61         $data_gatherer->parseXML();
     86        $ds             = new DataSource();
     87        $myxml_data     = $ds->getData();
     88
     89        $data_gatherer  = new DataGatherer( $clustername );
     90
     91        $data_gatherer->parseXML( $myxml_data );
    6292
    6393        if( $data_gatherer->isJobmonRunning() ) {
    64                 $ic = new ClusterImage( $clustername );
     94                $ic = new ClusterImage( $myxml_data, $clustername );
    6595                $ic->setSmall();
    6696        } else {
     
    75105        global $filter, $clustername;
    76106
    77         $ic = new ClusterImage( $clustername );
     107        $myxml_data     = checkSessionData();
     108
     109        $ic = new ClusterImage( $myxml_data, $clustername );
    78110        $ic->setBig();
    79111
Note: See TracChangeset for help on using the changeset viewer.