X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetlab%2Fsites%2Fsites.php;h=d4ab6b9eac254522e1c67f85417a435e284ab314;hb=589a8865c3cc774f2456d460008a45b09cc60cf9;hp=3ae1e978cbacc85cfec919f4b755c12558b9fbdc;hpb=cc980b8224b32832478303f446ba1200203a410e;p=plewww.git diff --git a/planetlab/sites/sites.php b/planetlab/sites/sites.php index 3ae1e97..d4ab6b9 100644 --- a/planetlab/sites/sites.php +++ b/planetlab/sites/sites.php @@ -28,8 +28,9 @@ $pattern=$_GET['pattern']; // --- decoration $title="Sites"; $tabs=array(); -$tabs []= tab_mysite(); +$tabs []= tab_sites(); $tabs []= tab_sites_local(); +$tabs []= tab_mysite(); // -------------------- $site_filter=array(); @@ -49,6 +50,9 @@ function site_status ($site) { // check that site is enabled if ( ! $site['enabled']) $messages [] = "Not enabled"; + global $PENDING_CONSORTIUM_ID; + if ( $site['ext_consortium_id'] === $PENDING_CONSORTIUM_ID ) + $messages [] = "Pending registration"; // check that site has at least a PI and a tech global $api; @@ -95,12 +99,13 @@ if (! plc_is_admin()) { $site_filter = array_merge ($site_filter, array ("enabled" => TRUE)); } else { $site_columns = array("site_id", "name", "abbreviated_name", "login_base" , "peer_id" , - "enabled", "person_ids", "max_slices", "slice_ids", "node_ids"); + "is_public", "enabled", "ext_consortium_id", + "person_ids", "max_slices", "slice_ids", "node_ids"); } if (plc_is_admin()) $tabs['Joining Sites'] = array ('url'=>l_sites_pending(), - 'bubble'=>'Review pending join requests'); + 'bubble'=>'Review pending join requests'); drupal_set_title($title); plekit_linetabs($tabs); @@ -112,6 +117,11 @@ $peers=new Peers($api); $nifty=new PlekitNifty ('','objects-list','big'); $nifty->start(); + +$headers=array(); +if (plc_is_admin()) { + $headers['I']='int'; +} $headers['Peer']="string"; $headers['Full Name']="string"; $headers['Login']="string"; @@ -120,11 +130,14 @@ if (plc_is_admin()) { $headers['N']="int"; $headers['U']="int"; $headers['S']="int"; - $headers['I']='int'; $headers['?']="string"; } -$table=new PlekitTable("sites",$headers,2); +if (plc_is_admin()) { + $table=new PlekitTable("sites",$headers,3); +} else { + $table=new PlekitTable("sites",$headers,2); +} $table->start(); if ($sites) foreach ($sites as $site) { @@ -132,22 +145,24 @@ if ($sites) foreach ($sites as $site) { $site_id=$site['site_id']; $login_base=$site['login_base']; $table->row_start(); + if (plc_is_admin()) { + $table->cell(l_site_t($site_id,$site_id)); + } $peers->cell($table,$peer_id); - $table->cell (l_site_t($site_id,htmlentities($site['name']))); + $table->cell (l_site_t($site_id,htmlentities(utf8_decode($site['name'])))); $table->cell (l_site_t($site_id,$login_base)); $table->cell (htmlentities($site['abbreviated_name'])); if (plc_is_admin()) { $table->cell(href(l_nodes_site($site_id),count($site['node_ids']))); $table->cell(href(l_persons_site($site_id),count($site['person_ids']))); $table->cell(href(l_slices_site($site_id),count($site['slice_ids']))); - $table->cell(l_site_t($site_id,$site_id)); $table->cell(site_status($site)); } $table->row_end(); } $notes=array(); if (plc_is_admin()) { - $notes []= "N = number of sites"; + $notes []= "N = number of nodes"; $notes []= "U = number of users"; $notes []= "S = number of slices"; $notes []= "I = site_id";