From f20e546535306a5fe875d2b8c5585cec0e22db46 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Fri, 9 Sep 2011 16:48:17 +0200 Subject: [PATCH] fill the 'interface' tab in the node view even if no interface; otherwise there's no mean to add one --- planetlab/nodes/node.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/planetlab/nodes/node.php b/planetlab/nodes/node.php index f976f50..4d8ccb5 100644 --- a/planetlab/nodes/node.php +++ b/planetlab/nodes/node.php @@ -1,7 +1,5 @@ '; plc_warning_html("This node has no interface"); echo "Please add an interface to make this a usable PLC node.

\n"; - } else { + } // else { // show this unconditionnally as otherwise there's no mean to create one.. // display a hostname column iff at least one interface has a hostname $need_hostname=false; @@ -488,7 +486,7 @@ if ( $local_peer ) { $table=new PlekitTable("node_interfaces",$headers,$sort_column,$table_options); $table->start(); - foreach ( $interfaces as $interface ) { + if ($interfaces) foreach ( $interfaces as $interface ) { $interface_id= $interface['interface_id']; $interface_ip= $interface['ip']; @@ -524,7 +522,7 @@ if ( $local_peer ) { $table->row_end(); } $table->end(); - } + // } $toggle->end(); } -- 2.43.0