more consistency
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 6 Apr 2009 15:13:46 +0000 (15:13 +0000)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Mon, 6 Apr 2009 15:13:46 +0000 (15:13 +0000)
planetlab/css/plc_style.css
planetlab/includes/plc_functions.php
planetlab/persons/person.php
planetlab/sites/site.php
planetlab/sites/sites.php

index 1e4cdbd..a3a1b02 100644 (file)
@@ -73,9 +73,3 @@ p.node_add {
     font-size: larger;
 }
 
-/* some air around the list tables */
-table#sites, table#persons, table#nodes, table#slices {
-    margin-left: 10px;
-    margin-right: 10px;
-}
-    
index 34f9f3e..50370d6 100644 (file)
@@ -129,7 +129,7 @@ function l_sites_pending()          { return "/db/sites/join_request.php"; }
 function tab_nodes ()          { return array ('label'=>'All nodes','url'=>l_nodes(), 
                                                'bubble'=>'Display nodes from all peers'); }
 function tab_nodes_local ()    { return array ('label'=>'Local nodes', 'url'=>l_nodes_peer('local'), 
-                                               'bubble'=>'Display local nodes only'); }
+                                               'bubble'=>'Display all nodes local to this peer'); }
 function tab_nodes_site($site_id){ return array ('label'=>'Site nodes', 'url'=>l_nodes_site($site_id), 
                                                 'bubble'=>'Display nodes on that site'); }
 function tab_nodes_slice($slice_id){ return array ('label'=>'Slice nodes', 'url'=>l_nodes_slice($slice_id), 
@@ -145,7 +145,7 @@ function tab_mysite()               { return array ('label'=>'My site', 'url'=>l_site(plc_my_
                                                'bubble'=>'Details for site ' . plc_my_site_id()); }
 function tab_sites ()          { return array ('label'=>'All sites' , 'url'=>l_sites(), 'bubble'=> 'Display all sites'); }
 function tab_sites_local ()    { return array ('label'=>'Local sites' , 'url'=>l_sites_peer('local'), 
-                                               'bubble'=> 'Display local sites'); }
+                                               'bubble'=> 'Display all siteslocal to this peer'); }
 //////////
 function tab_slices()          { return array ('label'=>'All slices', 'url'=>l_slices(),
                                                'bubble' => 'Display all slices'); }
@@ -154,14 +154,14 @@ function tab_slices_mysite ()     { return array ('label'=>'My site slices', 'url'=>
 function tab_slices_mine ()    { return array ('label'=>'My site slices', 'url'=>l_slices_site(plc_my_site_id()), 
                                                'bubble'=>'Display all slices on my site'); }
 function tab_slices_local ()   { return array ('label'=>'Local slices', 'url'=>l_slices_local(), 
-                                               'bubble'=>'Display all slices on my site'); }
+                                               'bubble'=>'Display all slices local to this peer'); }
 function tab_slice($slice)     { return array ('label'=>'Slice '.$slice['name'], 'url'=>l_slice($slice['slice_id']),
                                                'bubble' => 'Details for ' . $slice['name']); }
 //////////
 function tab_persons()         { return array ('label'=>'All accounts', 'url'=>l_persons(),
                                                'bubble'=>'Display users from all peers'); }
 function tab_persons_local()   { return array ('label'=>'Local accounts', 'url'=>l_persons_peer('local'),
-                                               'bubble'=>'Display local users'); }
+                                               'bubble'=>'Display all users local to this peer'); }
 function tab_persons_mysite()  { return array ('label'=>'My accounts' , 'url'=>l_persons_site(plc_my_site_id()),
                                                'bubble'=>'Display accounts on site ' . plc_my_site_id()); }
 function tab_person($person)   { return array ('label'=>'Account '.$person['email'], 'url'=>l_person($person['person_id']),
index ab6351b..dac8028 100644 (file)
@@ -73,9 +73,17 @@ $is_my_account = plc_my_person_id() == $person_id;
 $privileges = plc_is_admin () || ( plc_in_site($site_id) && plc_is_pi());
 
 $tabs=array();
-$tabs []= tab_persons();
 
 // enable / disable
+// become
+if (plc_is_admin() && ! $is_my_account && $local_peer) 
+  $tabs['Become'] = array('method'=>'POST',
+                         'url'=>l_actions(),
+                         'values'=>array('action'=>'become-person',
+                                         'person_id'=>$person_id),
+                         'bubble'=>"Become $first_name $last_name",
+                         'confirm'=>"Are you sure you want to su $first_name $last_name");
+    
 if ($local_peer && $privileges) 
   if ($enabled) 
     $tabs['Disable'] = array ('method'=>'POST',
@@ -92,15 +100,6 @@ if ($local_peer && $privileges)
                             'bubble'=>"Enable $first_name $last_name",
                             'confirm'=>"Are you sure you want to enable $first_name $last_name");
 
-// become
-if (plc_is_admin() && ! $is_my_account && $local_peer) 
-  $tabs['Become'] = array('method'=>'POST',
-                         'url'=>l_actions(),
-                         'values'=>array('action'=>'become-person',
-                                         'person_id'=>$person_id),
-                         'bubble'=>"Become $first_name $last_name",
-                         'confirm'=>"Are you sure you want to su $first_name $last_name");
-    
 // delete
 if ($local_peer && $privileges && $local_peer) 
   $tabs['Delete'] = array ('method'=>'POST',
index ba3273c..0398f08 100644 (file)
@@ -77,7 +77,7 @@ $api->GetAddresses( $address_ids );
 $api->GetNodes( $node_ids, array( "node_id", "hostname", "boot_state" ) );
 
 // gets person info
-$api->GetPersons( $person_ids, array( "role_ids", "person_id", "first_name", "last_name", "email", "enabled" ) );
+$api->GetPersons( $person_ids, array( "role_ids", "person_id", "first_name", "last_name", "email", "enabled" , "slice_ids") );
 
 $api->GetSlices ( $slice_ids, array ("slice_id", "name", "instantiation", "node_ids", "person_ids" ) );
 
@@ -107,8 +107,6 @@ drupal_set_title("Details for site " . $sitename);
   
 $tabs=array();
 
-$tabs []= tab_sites_local();
-
 // available actions
 if ( $is_site_admin)
   $tabs['Expire slices'] = array('url'=>l_actions(),
@@ -126,15 +124,15 @@ if ( $is_site_admin)
                        'confirm'=>"Are you sure you want to delete site $login_base");
 
 if ( $is_site_pi ) 
-  $tabs ['Add site'] = array ('url'=>l_slice_add(),
+  $tabs ['Add slice'] = array ('url'=>l_slice_add(),
                              'method'=>'post',
                              'bubble'=>'Create new slice in site');
 
-if (plc_in_site($site_id))
+if (plc_is_admin() || plc_in_site($site_id))
   $tabs["Events"]=array_merge (tablook_event(),
                               array('url'=>l_event("Site","site",$site_id),
                                     'bubble'=>"Events for site $sitename"));
-if (plc_in_site($site_id))
+if (plc_is_admin() || plc_in_site($site_id))
   $tabs["Comon"]=array_merge(tablook_comon(),
                             array('url'=>l_comon("site_id",$site_id),
                                   'bubble'=>"Comon page for $sitename"));
@@ -250,6 +248,7 @@ if ( $local_peer ) {
 
   $headers = array ();
   $headers["email"]='string';
+  $headers["S"]='int';
   $headers["PI"]='string';
   $headers['User']='string';
   $headers["Tech"]='string';
@@ -261,6 +260,7 @@ if ( $local_peer ) {
   if ($persons) foreach ($persons as $person) {
     $table->row_start();
     $table->cell(l_person_obj($person));
+    $table->cell(count($person['slice_ids']));
     $table->cell( in_array ('20',$person['role_ids']) ? "yes" : "no");
     $table->cell( in_array ('30',$person['role_ids']) ? "yes" : "no");
     $table->cell( in_array ('40',$person['role_ids']) ? "yes" : "no");
index 3009824..3ae1e97 100644 (file)
@@ -99,7 +99,7 @@ if (! plc_is_admin()) {
  }
 
 if (plc_is_admin()) 
-  $tabs['Pending'] = array ('url'=>l_sites_pending(),
+  $tabs['Joining Sites'] = array ('url'=>l_sites_pending(),
                            'bubble'=>'Review pending join requests');
 
 drupal_set_title($title);