Merge branch 'master' of ssh://git.onelab.eu/git/plewww
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 3 Apr 2013 12:40:26 +0000 (14:40 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 3 Apr 2013 12:40:26 +0000 (14:40 +0200)
planetlab/nodes/node.php
planetlab/persons/person.php
plekit/php/details.php

index 52dfddc..f457121 100644 (file)
@@ -27,8 +27,11 @@ $node_id=intval($_GET['id']);
 if ( ! $node_id ) { plc_error('Malformed URL - id not set'); return; }
 
 ////////////////////
-// Get all columns as we focus on only one entry
-$nodes= $api->GetNodes( array($node_id));
+// Need to mention columns explicitly as we want hrn which is a tag
+$columns=array ('hostname','boot_state','run_level','site_id','model','node_type','version',
+               'slice_ids','conf_file_ids','interface_ids','nodegroup_ids','peer_id',
+               'pcu_ids','ports','hrn');
+$nodes= $api->GetNodes( array($node_id),$columns);
 
 if (empty($nodes)) {
   drupal_set_message ("Node " . $node_id . " not found");
@@ -38,6 +41,7 @@ if (empty($nodes)) {
 $node=$nodes[0];
 // node info
 $hostname= $node['hostname'];
+$hrn=$node['hrn'];
 $boot_state= $node['boot_state'];
 $run_level = $node['run_level'];
 $site_id= $node['site_id'];
@@ -146,6 +150,8 @@ $details->form_start(l_actions(),array("action"=>"update-node", "node_id"=>$node
 // xxx can hostname really be changed like this without breaking the rest, bootcd .. ?
 //$details->th_td("Hostname",$hostname,"hostname"); 
 $details->th_td("Hostname",$hostname); 
+if ($hrn) $details->th_td("SFA hrn",$hrn);
+else $details->tr("SFA hrn not set","center");
 $details->th_td("Model",$model,"model");
 // reservation ?
 if ( $admin_privileges) {
@@ -286,7 +292,7 @@ I've experienced a problem rebooting $hostname with the pcu_id $pcu_id;
 $details->space();
 
 //////////////////// type & version
-$details->th_td("Version",$version);
+$details->th_td("CD Version",$version);
 // let's use plc_objects
 $Node = new Node($node);
 $details->th_td("Date created",$Node->dateCreated());
index bd499ad..3d95265 100644 (file)
@@ -30,7 +30,10 @@ if ( ! $person_id ) {
 
 ////////////////////
 // Get all columns as we focus on only one entry
-$persons= $api->GetPersons( array($person_id));
+// we need to mention them explicitly because we want hrn that is a tag..
+$columns=array('enabled','first_name','last_name','email','url','phone','title','bio','peer_id',
+              'role_ids','roles','site_ids','slice_ids','key_ids','hrn');
+$persons= $api->GetPersons( array($person_id), $columns);
 
 if (empty($persons)) {
   drupal_set_message ("Person " . $person_id . " not found");
@@ -55,6 +58,7 @@ $roles= $person['roles'];
 $site_ids= $person['site_ids'];
 $slice_ids= $person['slice_ids'];
 $key_ids= $person['key_ids'];
+$hrn=$person['hrn'];
 
 // gets more data from API calls
 $site_columns=array( "site_id", "name", "login_base" );
@@ -143,6 +147,8 @@ $details->th_td("Title",$title,"title",array('width'=>10));
 $details->th_td("First Name",$first_name,"first_name");
 $details->th_td("Last Name",$last_name,"last_name");
 $details->th_td(href("mailto:$email","Email"),$email,"email",array("width"=>30));
+if ($hrn) $details->th_td("SFA hrn",$hrn);
+else $details->tr("SFA hrn not set","center");
 $details->th_td("Phone",$phone,"phone");
 $details->th_td("URL",$url,"url",array('width'=>40));
 $details->th_td("Bio",$bio,"bio",array('input_type'=>'textarea','height'=>4));
index bee9b5c..e9cbc39 100644 (file)
@@ -1,7 +1,5 @@
 <?php
 
-// $Id$
-
 require_once 'plc_functions.php';
 require_once 'form.php';