3 // this must occur before linetabs.php, or linetabs won't work. I have no idea why.
4 drupal_add_js("misc/popup.js");
7 require_once 'plc_login.php';
9 // Get session and API handles
10 require_once 'plc_session.php';
11 global $plc, $api, $adm;
14 require_once 'plc_functions.php';
15 require_once 'plc_peers.php';
16 require_once 'gacks_functions.php';
17 require_once 'gacksclient.php';
18 require_once 'linetabs.php';
19 require_once 'table.php';
20 require_once 'details.php';
21 require_once 'toggle.php';
22 require_once 'form.php';
23 require_once 'nifty.php';
26 $_person= $plc->person;
27 $_person_id = $plc->person['person_id'];
28 $_roles= $_person['role_ids'];
31 require_once 'plc_drupal.php';
32 drupal_set_title('Manage Nodes: Select Image');
33 include 'plc_header.php';
35 $tabs['Show Nodes'] = array('method'=>'GET',
36 'url'=>l_gacks_nodelist(),
37 'bubble'=>"Show nodes in your slice");
39 $tabs['Add Nodes'] = array('method'=>'GET',
40 'url'=>l_gacks_wizard(),
41 'bubble'=>"Add nodes to your slice");
43 $tabs['Select Image'] = array('method'=>'GET',
44 'url'=>l_gacks_image(),
45 'bubble'=>"Select image to use in this slice");
47 $_GET['active_line_tab'] = "Select Image";
48 plekit_linetabs($tabs);
50 $nifty=new PlekitNifty ('sliceimage','objects-list','big');
52 print '<div style="width: 640px; margin-left: auto; margin-right: auto;">';
55 $account_name = get_account_name($api, $_person_id);
57 if ($account_name != NULL) {
58 $gacksapi = new GACKSAPI();
60 $image = get_slice_image($api, $account_name);
65 $image_selectors = array();
66 $image_selectors []= array("display"=>"Default PlanetLab image", "value"=>"");
67 $image_selectors []= array("display"=>"Hadoop", "value"=>"hadoop");
68 $image_selectors []= array("display"=>"MPI", "value"=>"mpi");
69 if (!in_array($image, array("", "hadoop", "mpi"))) {
70 $image_selectors []= array("display"=> $image, "value"=> $image);
72 select_selector($image, $image_selectors);
74 $form = new PlekitForm(l_gacks_actions(), array("action"=>"set-image",
75 "account_name"=> $account_name));
78 print "<br><br>Select a preconfigured image for your slice:<br>";
79 print $form->select_html("image", $image_selectors);
81 print $form->submit_html("submit", "submit");
89 include 'plc_footer.php';