Ignore:
Timestamp:
06/21/05 15:01:45 (18 years ago)
Author:
bastiaans
Message:

toga/libtoga.php:

  • Only search jobs in 'F' state

toga/search.php:

  • Fixed form validation

web/addons/toga/graph.php:

  • Added x-grid determination for labels and such along x-axis
File:
1 edited

Legend:

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

    r150 r152  
    1111        $none_set = 0;
    1212
    13         if( $id == '' or $user == '' or $name == '' or $start_from_time == '' or $start_to_time == '' or $queue == '' or $end_from_time == '' or $end_to_time == '') $none_set = 1;
    14 
    15         if (!isset($id) and !isset($user) and !isset($start_from_time) and !isset($start_to_time) and !isset($end_from_time) and !isset($end_to_time) and !isset($queue) ) $none_set = 1;
    16 
    17         if( $none_set == 1 ) {
     13        if( $id == '' and $user == '' and $name == '' and $start_from_time == '' and $start_to_time == '' and $queue == '' and $end_from_time == '' and $end_to_time == '') {
    1814                $error = 1;
    1915                $error_msg = "<FONT COLOR=\"red\"><B>No search criteria set!</B></FONT>";
     16        }
     17
     18        if( !is_numeric($id) and !$error and $id != '') {
     19
     20                $error = 1;
     21                $error_msg = "<FONT COLOR=\"red\"><B>Id must be a number</B></FONT>";
    2022        }
    2123
     
    347349                                                $textval = "$val[VAL] $val[UNITS]";
    348350                                        } else {
    349                                                 $graphargs = "z=small&c=$cluster_url&m=$metricname&h=$host_url&v=$val[VAL]&x=$max&n=$min&job_start=$job_start&job_stop=$job_stop&period_start=$period_start&period_stop=$period_stop";
     351                                                $graphargs = "z=small&c=$cluster_url&m=$metricname&h=$host_url&v=$val[VAL]&x=$max&n=$min&job_start=$job_start&job_stop=$job_stop&period_start=$period_start&period_stop=$period_stop&min=$min&max=$max";
    350352                                        }
    351353                                        if ($textval) {
Note: See TracChangeset for help on using the changeset viewer.