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
66fa5890
Commit
66fa5890
authored
Feb 16, 2007
by
Leigh B. Stoller
Browse files
Catch case when there are no nodes in the testbed, as when setting up
a new testbed.
parent
c5aec020
Changes
1
Hide whitespace changes
Inline
Side-by-side
www/currentusage.php3
View file @
66fa5890
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-200
6
University of Utah and the Flux Group.
# Copyright (c) 2000-200
7
University of Utah and the Flux Group.
# All rights reserved.
#
require
(
"defs.php3"
);
...
...
@@ -88,6 +88,8 @@ function SHOWSTATS()
#
function
SHOWFREENODES
()
{
$freecounts
=
array
();
# Get typelist and set freecounts to zero.
$query_result
=
DBQueryFatal
(
"select n.type from nodes as n "
.
...
...
@@ -97,7 +99,11 @@ function SHOWFREENODES()
$type
=
$row
[
0
];
$freecounts
[
$type
]
=
0
;
}
if
(
!
count
(
$freecounts
))
{
return
""
;
}
# Get free totals by type.
$query_result
=
DBQueryFatal
(
"select n.eventstate,n.type,count(*) from nodes as n "
.
...
...
@@ -119,7 +125,7 @@ function SHOWFREENODES()
}
}
$output
=
""
;
$freepcs
=
TBFreePCs
();
$reloading
=
TBReloadingPCs
();
...
...
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