Changeset 738 for branches/0.4/web/addons
- Timestamp:
- 03/24/13 19:45:18 (11 years ago)
- Location:
- branches/0.4/web/addons/job_monarch
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/0.4/web/addons/job_monarch/graph.php
r736 r738 179 179 180 180 $sorted_hosts = array(); 181 $sorted_hosts[] 181 $sorted_hosts[] = $rjqj_host; 182 182 183 183 $rj_str = ":'Running Jobs'"; -
branches/0.4/web/addons/job_monarch/index.php
r736 r738 26 26 set_time_limit(0); 27 27 28 29 28 $my_dir = getcwd(); 30 29 31 global $r, $range;32 33 30 include_once "./libtoga.php"; 34 31 32 $r = escapeshellcmd( rawurldecode( $_GET["r"] )); 33 $range = $r; 34 if( !isset($range) or $range == '') $range= "job"; 35 35 36 if ( !empty( $_GET ) ) 36 37 { 37 38 extract( $_GET ); 38 39 } 39 40 40 41 41 global $GANGLIA_PATH; … … 52 52 if( !isset($sortorder) ) $sortorder = "desc"; 53 53 if( !isset($sortby) ) $sortby = "id"; 54 if( !isset($range) or $range == '') $range= "job";55 54 56 55 if( isset( $filterorder ) && ($filterorder!='') ) … … 311 310 { 312 311 313 $range = "job";312 #$range = "job"; 314 313 315 314 if( $page_call != "host_view" ) -
branches/0.4/web/addons/job_monarch/libtoga.php
r726 r738 130 130 // 131 131 global $metrics, $hosts_up; 132 global $ range, $start;132 global $start; 133 133 134 134 global $DATETIME_FORMAT; -
branches/0.4/web/addons/job_monarch/overview.php
r735 r738 34 34 } 35 35 36 $rjqj_start = null; 36 37 $ds = new DataSource(); 37 38 $myxml_data = $ds->getData(); … … 604 605 } 605 606 606 // Running / queued amount jobs graph607 //608 if( $rjqj_host != null )609 {610 611 $rjqj_str = "<A HREF=\"./graph.php?z=large&c=$clustername&g=job_report&r=$range&st=$cluster[LOCALTIME]\">";612 $rjqj_str .= "<IMG BORDER=0 SRC=\"./graph.php?z=small&c=$clustername&g=job_report&r=$range&st=$cluster[LOCALTIME]\">";613 $rjqj_str .= "</A>";614 615 $tpl->gotoBlock( "_ROOT" );616 617 $tpl->assign( "rjqj_graph", $rjqj_str );618 }619 607 620 608 foreach( $sorted_jobs as $jobid => $sortdec ) … … 812 800 $job_start = $start_time; 813 801 802 814 803 $view_cpus += $cpus; 815 804 … … 818 807 if( $jobs[$jobid]['status'] == 'R' ) 819 808 { 809 if( $rjqj_start == null ) 810 { 811 $rjqj_start = $start_time; 812 } 813 else if( $start_time < $rjqj_start ) 814 { 815 $rjqj_start = $start_time; 816 } 817 820 818 foreach( $jobs[$jobid]['nodes'] as $tempnode ) 821 819 { … … 873 871 } 874 872 } 873 } 874 // Running / queued amount jobs graph 875 // 876 if( $rjqj_host != null ) 877 { 878 $rjqj_graphargs = "?z=medium&c=$clustername&g=job_report&r=$range"; 879 if( $range == 'job' ) 880 { 881 $rjqj_end = time(); 882 $rjqj_graphargs .= "&period_start=$rjqj_start&period_stop=$rjqj_end"; 883 } 884 else 885 { 886 $rjqj_graphargs .= "&st=$cluster[LOCALTIME]"; 887 } 888 889 $rjqj_str = "<A HREF=\"./graph.php$rjqj_graphargs\">"; 890 $rjqj_str .= "<IMG BORDER=0 SRC=\"./graph.php$rjqj_graphargs\">"; 891 $rjqj_str .= "</A>"; 892 893 $tpl->gotoBlock( "_ROOT" ); 894 895 $tpl->assign( "rjqj_graph", $rjqj_str ); 875 896 } 876 897
Note: See TracChangeset
for help on using the changeset viewer.