Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
emulab
emulab-devel
Commits
4935776f
Commit
4935776f
authored
Jun 10, 2004
by
Robert Ricci
Browse files
Add appropriate links to edit location of new nodes.
parent
6643b096
Changes
2
Hide whitespace changes
Inline
Side-by-side
www/newnode_edit.php3
View file @
4935776f
...
...
@@ -65,7 +65,7 @@ foreach ($HTTP_GET_VARS as $key => $value) {
#
$query_result
=
DBQueryFatal
(
"SELECT new_node_id, node_id, type, IP, "
.
"DATE_FORMAT(created,'%M %e %H:%i:%s') as created, dmesg, "
.
"identifier "
.
"identifier
, building
"
.
"FROM new_nodes WHERE new_node_id='
$id
'"
);
if
(
mysql_num_rows
(
$query_result
)
!=
1
)
{
...
...
@@ -117,6 +117,17 @@ $row = mysql_fetch_array($query_result)
<th>
Created
</th>
<td>
<?=
$row
[
'created'
]
?>
</td>
</tr>
<tr>
<th>
Location
</th>
<td>
<?
if
(
$row
[
'building'
])
{
echo
"Set (<a href=setnodeloc.php3?node_id=
$id
&isnewid=1>Change</a>)
\n
"
;
}
else
{
echo
"Unset (<a href=setnodeloc.php3?node_id=
$id
&isnewid=1>Set</a>)
\n
"
;
}
?>
</td>
</tr>
<tr>
<th>
dmesg Output
</th>
<td>
<?=
$row
[
'dmesg'
]
?>
</td>
...
...
@@ -183,7 +194,6 @@ while ($row = mysql_fetch_array($query_result)) {
</center>
<?
echo
"<a href=setnodeloc.php3?node_id=
$id
&isnewid=1>Set Node Location</a>
\n
"
;
#
# Standard Testbed Footer
...
...
www/newnodes_list.php3
View file @
4935776f
...
...
@@ -252,7 +252,7 @@ if ($renumber) {
$query_result
=
DBQueryFatal
(
"SELECT n.new_node_id, node_id, n.type, IP, "
.
"DATE_FORMAT(created,'%M %e %H:%i:%s') as created, i.MAC, "
.
"i.switch_id, i.switch_card, i.switch_port, n.temporary_IP, n.dmesg, "
.
"n.identifier "
.
"n.identifier
, n.building
"
.
"FROM new_nodes AS n "
.
"LEFT JOIN node_types AS t on n.type=t.type "
.
"LEFT JOIN new_interfaces AS i ON n.new_node_id=i.new_node_id "
.
...
...
@@ -293,6 +293,7 @@ function deselectAll(form) {
<th>
Temporary IP
</th>
<th>
Created
</th>
<th>
Warnings
</th>
<th>
Location
</th>
</tr>
<?
...
...
@@ -307,6 +308,7 @@ while ($row = mysql_fetch_array($query_result)) {
$tempIP
=
$row
[
"temporary_IP"
];
$dmesg
=
$row
[
"dmesg"
];
$identifier
=
$row
[
"identifier"
];
$building
=
$row
[
"building"
];
if
(
$row
[
"switch_id"
])
{
$port
=
"
$row[switch_id].$row[switch_card]/$row[switch_port]
"
;
}
else
{
...
...
@@ -337,13 +339,20 @@ while ($row = mysql_fetch_array($query_result)) {
}
else
{
echo
" <td><img src=
\"
greenball.gif
\"
></td>
\n
"
;
}
echo
" <td><a href=setnodeloc.php3?node_id=
$id
&isnewid=1>"
;
if
(
$building
)
{
echo
" <img src=
\"
greenball.gif
\"
border=0>"
;
}
else
{
echo
" <img src=
\"
redball.gif
\"
border=0>"
;
}
echo
"</a></td>
\n
"
;
echo
" </tr>
\n
"
;
}
?>
<tr>
<td
align=
"center"
colspan=
1
2
>
<td
align=
"center"
colspan=
1
3
>
<input
type=
"button"
name=
"SelectAll"
value=
"Select All"
onClick=
"selectAll(document.nodeform.elements['selected[]'])"
>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment