font-size: larger;
}
-/* some air around the list tables */
-table#sites, table#persons, table#nodes, table#slices {
- margin-left: 10px;
- margin-right: 10px;
-}
-
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),
'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'); }
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']),
$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',
'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',
$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" ) );
$tabs=array();
-$tabs []= tab_sites_local();
-
// available actions
if ( $is_site_admin)
$tabs['Expire slices'] = array('url'=>l_actions(),
'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"));
$headers = array ();
$headers["email"]='string';
+ $headers["S"]='int';
$headers["PI"]='string';
$headers['User']='string';
$headers["Tech"]='string';
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");
}
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);