X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=planetlab%2Fnodes%2Fslivers.php;h=62e46de7247e1f18c6f7613ba56ede1a753355f4;hb=f20e546535306a5fe875d2b8c5585cec0e22db46;hp=9ab5c61d38ca1f4fc38bc142257790c9829cb1f6;hpb=8f165fbbfab8f33f5b92fbf015fabf9afc80c872;p=plewww.git diff --git a/planetlab/nodes/slivers.php b/planetlab/nodes/slivers.php index 9ab5c61..62e46de 100644 --- a/planetlab/nodes/slivers.php +++ b/planetlab/nodes/slivers.php @@ -9,134 +9,90 @@ global $plc, $api; // Print header require_once 'plc_drupal.php'; -drupal_set_title('Slivers'); +drupal_set_title('Sliver Tags'); include 'plc_header.php'; // Common functions require_once 'plc_functions.php'; - -// find person roles -$_person= $plc->person; -$_roles= $_person['role_ids']; - -//print_r( $_person ); - - -// if add is set, diplay add sliver form -if( $_GET['add'] ) { - $node_id= $_GET['add']; - $slice_id= $_GET['slice']; - - // slice info - $slice_info= $api->GetSlices( array( intval( $slice_id ) ), array( "name" ) ); - - // node info - $node_info= $api->GetNodes( array( intval( $node_id ) ), array( "hostname" ) ); - - // get tag types - $type_info= $api->GetTagTypes( NULL, array( "tag_type_id", "tagname" ) ); - - // get the slivers for this node - $sliver_info= $api->GetSliceTags( array( "node_id"=>intval( $node_id ), "slice_id"=>intval( $slice_id ) ), array( "tag_type_id", "name" ) ); - - $types_left= $type_info; - - - // start form - echo "
\n"; - -} +require_once 'table.php'; +require_once 'toggle.php'; +require_once 'form.php'; // if slice and node ids are passed display slivers and tags -if( $_GET['slice'] && $_GET['node'] ) { - $slice_id= $_GET['slice']; - $node_id= $_GET['node']; - - // slice info - $slice_info= $api->GetSlices( array( intval( $slice_id ) ), array( "name" ) ); - - // node info - $node_info= $api->GetNodes( array( intval( $node_id ) ), array( "hostname" ) ); - - // get the slivers for this node - $sliver_info= $api->GetSliceTags( array( "node_id"=>intval( $node_id ), "slice_id"=>intval( $slice_id ) ), array( "slice_tag_id", "name", "value", "min_role_id", "description" ) ); - - // get the attrbibutes for this slice - $tag_info= $api->GetSliceTags( array( intval( $slice_id ) ), array( "slice_tag_id", "name", "value", "min_role_id", "description" ) ); - - - // start form - echo "\n"; - + $form->end(); + $table->end(); + $toggle->end(); } - // Print footer include 'plc_footer.php';