X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetlab%2Fsites%2Fsites.php;h=d4ab6b9eac254522e1c67f85417a435e284ab314;hb=589a8865c3cc774f2456d460008a45b09cc60cf9;hp=9a8487628c407ed111fc88e2667a5a079a1092c9;hpb=affa7b7ae6c08a5499398a6e11c3ca01708e93a4;p=plewww.git diff --git a/planetlab/sites/sites.php b/planetlab/sites/sites.php index 9a84876..d4ab6b9 100644 --- a/planetlab/sites/sites.php +++ b/planetlab/sites/sites.php @@ -1,5 +1,5 @@ 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"); } -$tabs['My site'] = array('url'=>l_site(plc_my_site_id())); -$tabs['Local sites'] = array('url'=>l_sites_peer('local')); if (plc_is_admin()) - $tabs['Pending'] = array ('url'=>l_sites_pending(), - 'bubble'=>'Review pending join requests'); + $tabs['Joining Sites'] = array ('url'=>l_sites_pending(), + 'bubble'=>'Review pending join requests'); drupal_set_title($title); -plc_tabs($tabs); +plekit_linetabs($tabs); // go $sites= $api->GetSites( $site_filter , $site_columns); $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"; @@ -118,26 +133,46 @@ if (plc_is_admin()) { $headers['?']="string"; } -plc_table_start("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) { - $shortname = $peers->shortname($site['peer_id']); - plc_table_row_start(); - plc_table_cell($shortname); - plc_table_cell (l_site_t($site['site_id'],$site['name'])); - plc_table_cell ($site['login_base']); - plc_table_cell ($site['abbreviated_name']); + $peer_id=$site['peer_id']; + $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(utf8_decode($site['name'])))); + $table->cell (l_site_t($site_id,$login_base)); + $table->cell (htmlentities($site['abbreviated_name'])); if (plc_is_admin()) { - plc_table_cell(count($site['node_ids'])); - plc_table_cell(count($site['person_ids'])); - plc_table_cell(count($site['slice_ids'])); - plc_table_cell(site_status($site)); + $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(site_status($site)); } - plc_table_row_end(); + $table->row_end(); } -$notes=array("N = number of sites / U = number of users / S = number of slices"); +$notes=array(); +if (plc_is_admin()) { + $notes []= "N = number of nodes"; + $notes []= "U = number of users"; + $notes []= "S = number of slices"; + $notes []= "I = site_id"; + $notes []= "? = status"; + } + +$table->end(array('notes'=>$notes)); +$nifty->end(); -plc_table_end("sites",array('notes'=>$notes)); +//plekit_linetabs ($tabs,"bottom"); // Print footer include 'plc_footer.php';