Ignore:
Timestamp:
03/29/13 22:05:27 (11 years ago)
Author:
ramonb
Message:
  • another change to search
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/0.4/web/addons/job_monarch/search.php

    r779 r780  
    304304            $node_list["req_cpu"]= makeTime( TimeToEpoch( $job['requested_time'] ) );
    305305
    306             if( $COLUMN_REQUESTED_MEMORY ) {
     306            if( $COLUMN_REQUESTED_MEMORY )
     307            {
    307308                $node_list["column_req_mem"] = "yes";
    308309                $node_list["req_memory"]= $job['requested_memory'];
    309310            }
    310             if( $COLUMN_NODES) {
     311            if( $COLUMN_NODES)
     312            {
    311313
    312314                $job_nodes    = array();
    313315
    314316                foreach( $nodes[$foundid] as $mynode )
    315                     $job_nodes[] = $mynode['hostname'];
    316 
    317                 $node_list["column_nodes"] = "yes";
     317                {
     318                    if( strpos( $mynode['hostname'], "." ) !== false )
     319                    {
     320                        $shorthost = explode( '.', $mynode['hostname'] );
     321                        $job_nodes[] = $shorthost[0];
     322                    }
     323                    else
     324                    {
     325                        $job_nodes[] = $mynode['hostname'];
     326                    }
     327                }
     328
     329                $node_list["column_nodes_hostnames"] = "yes";
    318330                $nodes_hostnames = implode( " ", $job_nodes );
    319331                $node_list["nodes_hostnames"]= $nodes_hostnames;
     
    357369            $tpl_data->assign("checked$showhosts", "checked");
    358370
    359             # Present a width list
    360             $cols_menu = "<SELECT NAME=\"hc\" OnChange=\"archive_search_form.submit();\">\n";
    361 
    362             $hostcols = ($hc) ? $hc : 4;
    363 
    364             foreach(range(1,25) as $cols) {
    365                 $cols_menu .= "<OPTION VALUE=$cols ";
    366                 if ($cols == $hostcols)
    367                     $cols_menu .= "SELECTED";
    368                 $cols_menu .= ">$cols\n";
    369             }
    370             $cols_menu .= "</SELECT>\n";
    371 
    372             $tpl_data->assign("metric","$metricname $units");
    373             $tpl_data->assign("id", $id);
    374             # Host columns menu defined in header.php
    375             $tpl_data->assign("cols_menu", $cols_menu);
    376 
    377371            if( $showhosts ) {
    378372
     
    387381                    $period_stop = datetimeToEpoch( $period_stop );
    388382
    389                 #        $tpl_data->gotoBlock( "timeperiod" );
    390 
    391                 #$tpl_data->assign("period_start", epochToDatetime( $period_start ) );
    392                 #$tpl_data->assign("period_stop", epochToDatetime( $period_stop ) );
     383                $tpl_data->assign( "timeperiod", "yes" );
     384
     385                $tpl_data->assign("period_start", epochToDatetime( $period_start ) );
     386                $tpl_data->assign("period_stop", epochToDatetime( $period_stop ) );
    393387
    394388                $hosts_up = array();
     
    447441                        $textval = $val['VAL']." ".$val['UNITS'];
    448442                    } else {
    449                         $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";
     443                        $graphargs = "z=medium&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";
    450444                    }
    451445                    if ($textval) {
Note: See TracChangeset for help on using the changeset viewer.