Ignore:
Timestamp:
05/31/05 16:13:43 (19 years ago)
Author:
bastiaans
Message:

eb/addons/toga/templates/header.tpl:

  • Added closing </FORM>

web/addons/toga/templates/index.tpl:

  • Skeleton template for base page

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

  • Added javascript and FORM to be able to sort joblist

web/addons/toga/index.php:

  • Changed to be basis for all
  • Will present a job/queue or overview based on arguments

web/addons/toga/overview.php:

  • Changed for new index skeleton
  • Will sort joblist now

web/addons/toga/libtoga.php, web/addons/toga/image.php:

  • Some fixes/cleanup for index skeleton
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/addons/toga/libtoga.php

    r115 r117  
    11<?php
     2// If php is compiled without globals
     3//
     4if ( !empty( $_GET ) ) {
     5        extract( $_GET );
     6}
     7
    28class HTTPVariables {
    39
     
    511        var $restvars, $httpvars;
    612
    7         function HTTPVariables( $vars ) {
     13        function HTTPVariables( $httpvars, $getvars ) {
    814
    915                $this->restvars = array();
    1016
    11                 $this->clustername = $vars["c"] ? $vars["c"] : null;
    12                 $this->metricname = $vars["m"] ? $vars["m"] : null;
    13 
    14                 foreach( $vars as $httpvar => $httpval ) {
     17                $this->clustername = $httpvars["c"] ? $httpvars["c"] : null;
     18                $this->metricname = $httpvars["m"] ? $httpvars["m"] : null;
     19
     20                foreach( $httpvars as $httpvar => $httpval ) {
    1521                       
    1622                        if( $httpval ) {
    1723                                $this->restvars[$httpvar] = $httpval;
     24                        }
     25                }
     26
     27                foreach( $getvars as $getvar => $getval ) {
     28
     29                        if( $getval ) {
     30                                $this->restvars[$getvar] = $getval;
    1831                        }
    1932                }
     
    4053include_once "./conf.php";
    4154
    42 global $GANGLIA_PATH, $SMALL_CLUSTERIMAGE_MAXWIDTH, $SMALL_CLUSTERIMAGE_NODEWIDTH, $DATA_SOURCE;
    43 
    44 include_once "$GANGLIA_PATH/conf.php";
    45 include_once "$GANGLIA_PATH/functions.php";
    46 include_once "$GANGLIA_PATH/ganglia.php";
    47 
    48 global $HTTP_GET_VARS;
    49 $httpvars = new HTTPVariables( $HTTP_GET_VARS );
     55global $GANGLIA_PATH;
     56
     57$my_dir = getcwd();
     58
     59// Load Ganglia's PHP
     60chdir( $GANGLIA_PATH );
     61
     62include_once "./conf.php";
     63include_once "./functions.php";
     64include_once "./ganglia.php";
     65include_once "./get_context.php";
     66include_once "./get_ganglia.php";
     67
     68// Back to our PHP
     69chdir( $my_dir );
     70
     71global $SMALL_CLUSTERIMAGE_MAXWIDTH, $SMALL_CLUSTERIMAGE_NODEWIDTH, $DATA_SOURCE, $HTTP_GET_VARS, $_GET;
     72$httpvars = new HTTPVariables( $HTTP_GET_VARS, $_GET );
    5073
    5174// Set cluster context so that Ganglia will
     
    5376//
    5477global $context, $clustername;
    55 $clustername = $httpvars->getClusterName();
    56 $context = 'cluster';
    57 
    58 include_once "$GANGLIA_PATH/get_ganglia.php";
     78//$clustername = $httpvars->getClusterName();
     79//$context = 'cluster';
    5980
    6081// Ganglia's array of host metrics
     
    6283global $metrics;
    6384
    64 // If php is compiled without globals
    65 //
    66 if ( !empty( $_GET ) ) {
    67         extract( $_GET );
    68 }
    6985
    7086class DataSource {
Note: See TracChangeset for help on using the changeset viewer.