$max_slices= $site['max_slices'];
$enabled = $site['enabled'];
+$ext_consortium_id = $site ['ext_consortium_id'];
// get peer
$peer_id= $site['peer_id'];
$techs = array();
$pis = array();
$disabled_persons = array();
-foreach( $persons as $person ) {
+if ($persons) foreach( $persons as $person ) {
$role_ids= $person['role_ids'];
if ( in_array( '20', $role_ids )) $pis[] = $person;
$tabs=array();
+$tabs []= tab_mysite();
+
// available actions
if ( $is_site_admin)
$tabs['Expire slices'] = array('url'=>l_actions(),
// show gray background on foreign objects : start a <div> with proper class
$peers->block_start ($peer_id);
-if ( $local_peer && ( ! $enabled ) )
- plc_warning ("This site is not enabled - Please visit " .
- href (l_sites_pending(),"this page") .
- " to review pending applications.");
+// sanity checks
+if ( $local_peer ) {
+ // pending site
+ global $PENDING_CONSORTIUM_ID;
+ if ( $ext_consortium_id === $PENDING_CONSORTIUM_ID) {
+ if ( ! $enabled )
+ plc_warning ("This site is under pending registration - Please visit " .
+ href (l_sites_pending(),"this page") .
+ " to review pending applications.");
+ else
+ plc_warning ("This site is pending but is also enabled - something is wrong. You should fix the issue with plcsh");
+ } else {
+ if ( ! $enabled)
+ plc_warning ("This site is disabled.");
+ }
+}
$can_update=(plc_is_admin () && $local_peer) || ( plc_in_site($site_id) && plc_is_pi());
$toggle = new PlekitToggle ('site',"Details",
- array('visible'=>get_arg('show_details',true),
+ array('visible'=>get_arg('show_details'),
'bubble'=>'Display and modify details for that site'));
$toggle->start();
$nodes_title .= href(l_nodes_site($site_id)," (See as nodes)");
$toggle=new PlekitToggle ('nodes',$nodes_title,
- array('visible'=>get_arg('show_nodes',false)));
+ array('visible'=>get_arg('show_nodes')));
$toggle->start();
$headers=array();
if (empty($ports)) return plc_error_html('???');
$port=$ports[0];
$pcu=$pcu_hash[$pcu_id];
- $display= $pcu['hostname'] . ' : ' . $port;
+ $display= l_pcu_href($pcu_id, $pcu['hostname'] . ' : ' . $port);
$pcu_hash[$pcu_id]['displayed']=true;
return $display;
}
$persons_title .= href(l_persons_site($site_id)," (See as users)");
$toggle=new PlekitToggle ('persons',$persons_title,
- array('visible'=>get_arg('show_persons',false)));
+ array('visible'=>get_arg('show_persons')));
$toggle->start();
$headers = array ();
$headers['User']='string';
$headers["Tech"]='string';
if ($has_disabled_persons) $headers["Disabled"]='string';
+ $notes=array('S = slices');
$table=new PlekitTable('persons',$headers,'1r-3r-0',array('search_area'=>false,
- 'notes_area'=>false,
+ 'notes'=>$notes,
'pagesize_area'=>false));
$table->start();
if ($persons) foreach ($persons as $person) {
$slices_title .= href(l_slices_site($site_id)," (See as slices)");
$toggle=new PlekitToggle ('slices',$slices_title,
- array('visible'=>get_arg('show_slices',false)));
+ array('visible'=>get_arg('show_slices')));
$toggle->start();
$headers = array ();
$headers ['I'] = 'string';
$headers ['N']='int';
$headers ['U']='int';
- $notes=array('I column shows instantiation type',
- 'N column shows number of nodes',
- 'U column shows number of users');
+ $notes=array('I = instantiation type',
+ 'N = number of nodes',
+ 'U = number of users');
$table=new PlekitTable ('slices',$headers,0,array('search_area'=>false,
'pagesize_area'=>false,
'notes'=>$notes));
//////////////////// Addresses
$toggle=new PlekitToggle ('addresses',"Addresses",
- array('visible'=>get_arg('show_addresses',false)));
+ array('visible'=>get_arg('show_addresses')));
$toggle->start();
if ( ! $addresses) {
print "<p class='addresses'>No known address for this site</p>";