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
3db43b50
Commit
3db43b50
authored
Apr 28, 2003
by
Leigh B. Stoller
Browse files
Add explicit free node subtotals to info box in left corner.
parent
27558935
Changes
1
Hide whitespace changes
Inline
Side-by-side
www/nodecontrol_list.php3
View file @
3db43b50
...
...
@@ -117,16 +117,23 @@ $num_up = 0;
$num_pd
=
0
;
$num_down
=
0
;
$num_unk
=
0
;
$freetypes
=
array
();
while
(
$row
=
mysql_fetch_array
(
$query_result
))
{
$pid
=
$row
[
pid
];
$status
=
$row
[
status
];
$type
=
$row
[
type
];
switch
(
$status
)
{
case
"up"
:
$num_up
++
;
if
(
!
$pid
)
{
$num_free
++
;
if
(
!
isset
(
$freetypes
[
$type
]))
{
$freetypes
[
$type
]
=
0
;
}
$freetypes
[
$type
]
++
;
}
break
;
case
"possibly down"
:
...
...
@@ -176,7 +183,16 @@ echo "<table>
<tr><td align=right><b>Free</b></td>
<td align=left>
$num_free
</td>
</tr>
</table>
\n
"
;
<tr><td colspan=2 nowrap align=center>
<b>Free Subtotals</b></td></tr>
\n
"
;
foreach
(
$freetypes
as
$key
=>
$value
)
{
echo
"<tr>
<td align=right><b><font color=green>
$key
</font></b></td>
<td align=left>
$value
</td>
</tr>
\n
"
;
}
echo
"</table>
\n
"
;
SUBMENUEND_2B
();
echo
"<table border=2 cellpadding=2 cellspacing=2>
\n
"
;
...
...
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