[Oar-commits] OAR branch 2.5 updated. 2.5.3+rc4-10-g08edb32

Pierre Neyron neyron at ff-scm-v4-prod.irisa.fr
Mon Apr 8 23:58:44 CEST 2013


The branch, 2.5 has been updated
       via  08edb322e4ea61058a2f4fb6bc42445caf74cf2b (commit)
      from  69d24faab70712713cb60007f30bdc64eca7d92c (commit)


- Log -----------------------------------------------------------------
commit 08edb32
Author: Pierre Neyron <pierre.neyron at imag.fr>
Date:   Mon Apr 8 23:57:12 2013 +0200

    [drawgantt-svg] add padding for the cpuset label alignment
---
 .../DrawGantt-SVG/drawgantt-svg-config.inc.php     |    1 +
 .../DrawGantt-SVG/drawgantt-svg.php.in             |    4 +++-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/sources/visualization_interfaces/DrawGantt-SVG/drawgantt-svg-config.inc.php b/sources/visualization_interfaces/DrawGantt-SVG/drawgantt-svg-config.inc.php
index ec4164f..fb5dfcd 100644
--- a/sources/visualization_interfaces/DrawGantt-SVG/drawgantt-svg-config.inc.php
+++ b/sources/visualization_interfaces/DrawGantt-SVG/drawgantt-svg-config.inc.php
@@ -17,6 +17,7 @@ $CONF['resource_hierarchy'] = array( // properties to use to build the resource
 	'network_address','cpuset'); 
 $CONF['resource_labels'] = array(  // properties to use for resource labels on the left (any of the resource hierarchy or cpuset)
 	'network_address','cpuset');
+$CONF['cpuset_label_display_string'] = "%02d";
 $CONF['label_display_regex'] = array( // shortening regex for labels (e.g. to shorten node-1.mycluster to node-1
 	'network_address' => '/^([^.]+)\..*$/');
 $CONF['label_cmp_regex'] = array( // string selection regex for comparing and sorting labels (resources)
diff --git a/sources/visualization_interfaces/DrawGantt-SVG/drawgantt-svg.php.in b/sources/visualization_interfaces/DrawGantt-SVG/drawgantt-svg.php.in
index 764f032..c9c8ffe 100644
--- a/sources/visualization_interfaces/DrawGantt-SVG/drawgantt-svg.php.in
+++ b/sources/visualization_interfaces/DrawGantt-SVG/drawgantt-svg.php.in
@@ -15,6 +15,7 @@ $CONF['db_user']="oar";
 $CONF['db_passwd']="oar";
 $CONF['site'] = "My OAR resources"; // name for your infrastructure or site
 $CONF['resource_labels'] = array('network_address','cpuset'); // properties to use to describe resources (resource labels on the left)
+$CONF['cpuset_label_display_string'] = "%02d";
 $CONF['label_display_regex'] = array( // shortening regex for labels (e.g. to shorten node-1.mycluster to node-1
 	'network_address' => '/^([^.]+)\..*$/',
 	);
@@ -326,8 +327,9 @@ class ResourceId {
 		array_push($this->job_resource_id_groups, $job_resource_id_group);
 	}
 	function resource_label($type) {
+		global $CONF;
 		if ($type == 'cpuset') {
-			return $this->cpuset;
+			return sprintf($CONF['cpuset_label_display_string'],$this->cpuset);
 		} else {
 			return $this->resources[$type]->label();
 		}
-----------------------------------------------------------------------

Summary of changes:
 .../DrawGantt-SVG/drawgantt-svg-config.inc.php     |    1 +
 .../DrawGantt-SVG/drawgantt-svg.php.in             |    4 +++-
 2 files changed, 4 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
OAR



More information about the Oar-commits mailing list