X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=planetlab%2Fnodes%2Fnode_add.php;h=cbcb3d097e9bfd4f6485ef438e4c76f022729496;hb=1ce86fd37ce8da9b475847a59394c0241a8dbbff;hp=5bb47968ac07dfa3492434bba6528e33b17eb810;hpb=9a2cf6f561de3a8be79e2d6ada5c73f3a7a42b56;p=plewww.git diff --git a/planetlab/nodes/node_add.php b/planetlab/nodes/node_add.php index 5bb4796..cbcb3d0 100644 --- a/planetlab/nodes/node_add.php +++ b/planetlab/nodes/node_add.php @@ -1,7 +1,5 @@ $hostname, "model"=>$model ); + $node_fields= array( "hostname"=>$hostname, "model"=>$model , "node_type" => $node_type); $node_id= $api->AddNode( intval( $site_id ), $node_fields ); if ( empty($node_id) || ($node_id < 0) ) { @@ -145,12 +144,15 @@ drupal_set_html_head (' drupal_set_title('Add a new node to site'); // defaults -$method = $_POST['method']; -if( ! $method ) $method= "static"; - $model = $_POST['model']; if( ! $model ) $model= "Custom"; +$node_type = $_POST['node_type']; +if ( ! $node_type ) $node_type= "regular"; + +$method = $_POST['method']; +if( ! $method ) $method= "static"; + print <<< EOF

This page lets you declare a new machine to a site. @@ -166,7 +168,7 @@ EOF; $toggle = new PlekitToggle ('add-node',"Add Node", array('bubble'=>'Add a node - does not enforce PCU - for admins only !', - 'visible'=>get_arg('show_details',true))); + 'visible'=>get_arg('show_details'))); $toggle->start(); $details=new PlekitDetails($has_privileges); @@ -191,6 +193,11 @@ $details->th_td("Site", $details->th_td("Hostname",$hostname,"hostname"); $details->th_td("Model",$model,"model"); +$node_type_select = $form->select_html ("node_type", + node_type_selectors($api,$node_type), + array('id'=>'node_type')); +$details->th_td("Reservation",$node_type_select,"node_type", + array('input_type'=>'select','value'=>$node_type)); $method_select = $form->select_html ("method", interface_method_selectors($api,$method,true), array('id'=>'method',