- $table = new PlekitTable ('nodes',$headers,'0',array('search_area'=>false,
- 'notes_area'=>false,
- 'pagesize_area'=>false));
+ $table = new PlekitTable ('nodes',$headers,$sort_column,array('search_area'=>false,
+ 'notes_area'=>false,
+ 'pagesize_area'=>false));
+ // hash pcus on pcu_id
+ if ($display_pcus) {
+ global $pcu_hash;
+ $pcu_hash= array();
+ if ($pcus) foreach ($pcus as $pcu) $pcu_hash[$pcu['pcu_id']]=$pcu;
+ }
+ // search the pcu, return the string to display and mark the pcu as displayed
+ // function display_and_mark ($pcu_hash,$pcu_ids,$ports) {
+ function display_and_mark ($pcu_ids,$ports) {
+ global $pcu_hash;
+ if (empty($pcu_ids)) return plc_warning_html('None');
+ $pcu_id=$pcu_ids[0];
+ if (empty($ports)) return plc_error_html('???');
+ $port=$ports[0];
+ $pcu=$pcu_hash[$pcu_id];
+ $display= $pcu['hostname'] . ' : ' . $port;
+ $pcu_hash[$pcu_id]['displayed']=true;
+ return $display;
+ }
+