diff --git a/www/index.php3 b/www/index.php3 index 26707285506f3559917a2e2fe37efd880e8fcd13..0ec6a7dd5696fa6ee197ecc021ea44d6a97e4bf3 100755 --- a/www/index.php3 +++ b/www/index.php3 @@ -99,6 +99,8 @@ if (isset($uid)) { if ($admin) { echo " New Project Approval

\n"; + echo " + Node Control

\n"; } if ($trusted) { # Only group leaders can do these options diff --git a/www/nodecontrol.php3 b/www/nodecontrol.php3 new file mode 100644 index 0000000000000000000000000000000000000000..d00a2da25af1be36bd2c39816031a7a06925f2b7 --- /dev/null +++ b/www/nodecontrol.php3 @@ -0,0 +1,50 @@ + diff --git a/www/nodecontrol_form.php3 b/www/nodecontrol_form.php3 new file mode 100644 index 0000000000000000000000000000000000000000..9a2d7ba28538e51559f540ff2b1d20b8200d5f07 --- /dev/null +++ b/www/nodecontrol_form.php3 @@ -0,0 +1,110 @@ + + +Node Control + + + +

+ Node Control Center: $node_id +

"; + +# +# Check to make sure thats this is a valid nodeid +# +$query_result = mysql_db_query($TBDBNAME, + "SELECT * FROM nodes WHERE node_id=\"$node_id\""); +if (mysql_num_rows($query_result) == 0) { + USERERROR("The node $node_id is not a valid nodeid", 1); +} +$row = mysql_fetch_array($query_result); + +$node_id = $row[node_id]; +$type = $row[type]; +$def_boot_image_id = $row[def_boot_image_id]; +$def_boot_cmd_line = $row[def_boot_cmd_line]; +$next_boot_path = $row[next_boot_path]; +$next_boot_cmd_line = $row[next_boot_cmd_line]; + +echo "\n"; + +# +# Generate the form. +# +echo "\n"; + +echo " + + + \n"; + +echo " + + + \n"; + +# +# This should be a menu. +# +echo " + + + \n"; + +echo " + + + \n"; + + +echo " + + + \n"; + + +echo " + + + \n"; + + +echo " + + + +
Node ID: + +
Node Type: + +
Def Boot Image: +
Def Boot Command Line: +
Next Boot Path: +
Next Boot Command Line: +
+ +
\n"; +?> + + + diff --git a/www/nodecontrol_list.php3 b/www/nodecontrol_list.php3 new file mode 100644 index 0000000000000000000000000000000000000000..47bb2ea02c4b00d32b85d23ad33dd83e054f379d --- /dev/null +++ b/www/nodecontrol_list.php3 @@ -0,0 +1,82 @@ + + +Node Control + + + +

+ Node Control Center +

"; + +# +# Suck out info for all the nodes. +# +$query_result = mysql_db_query($TBDBNAME, + "SELECT * from nodes where type='pc' or type='shark'"); +if (! $query_result) { + TBERROR("Database Error retrieving node information", 1); +} + +echo "\n"; + +echo " + + + + + + + + \n"; + +while ($row = mysql_fetch_array($query_result)) { + $node_id = $row[node_id]; + $type = $row[type]; + $def_boot_image_id = $row[def_boot_image_id]; + $def_boot_cmd_line = $row[def_boot_cmd_line]; + $next_boot_path = $row[next_boot_path]; + $next_boot_cmd_line = $row[next_boot_cmd_line]; + + if (!$def_boot_cmd_line) + $def_boot_cmd_line = "NULL"; + if (!$next_boot_path) + $next_boot_path = "NULL"; + if (!$next_boot_cmd_line) + $next_boot_cmd_line = "NULL"; + + echo " + + + + + + + + \n"; +} + +echo "
ChangeIDTypeDef ImageDef CmdlineNext PathNext Cmdline
+ + \"o\"$node_id$type$def_boot_image_id$def_boot_cmd_line$next_boot_path$next_boot_cmd_line
\n"; +?> + + + +