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
9df58328
Commit
9df58328
authored
Nov 09, 2005
by
Leigh B. Stoller
Browse files
Reformat the free pcs table slightly, as per Mike's suggestion.
parent
38463b50
Changes
2
Hide whitespace changes
Inline
Side-by-side
www/currentusage.php3
View file @
9df58328
...
...
@@ -123,10 +123,12 @@ function SHOWFREENODES()
}
PAGEBEGINNING
(
"Free Node Summary"
,
1
,
1
);
$freepcs
=
TBFreePCs
();
$reloading
=
TBReloadingPCs
();
echo
"<table valign=top align=center width=100% height=100% border=1>
<tr><td nowrap colspan=4 class=contentheader
bgcolor='#E1EAEA' align=center>
<font size=-1>Free PCs</font></td></tr>
\n
"
;
<tr><td nowrap colspan=4 class=menuoptusage align=center>
<b>
$freepcs
Free PCs</b></td></tr>
\n
"
;
$pccount
=
count
(
$freecounts
);
$newrow
=
1
;
...
...
@@ -156,10 +158,10 @@ function SHOWFREENODES()
<td class=menuoptusage> </td></tr>
\n
"
;
}
}
$freepcs
=
TBFreePCs
();
echo
"<tr>
<td class=menuoptusage colspan=4 align=center>
<b>
$
f
re
epc
s
F
re
e PCs
</b></td>
<b>
$re
loading
PC
s re
loading
</b></td>
</tr>
\n
"
;
echo
"</table>"
;
}
...
...
www/dbdefs.php3.in
View file @
9df58328
...
...
@@ -9,6 +9,9 @@ $TBOPSPID = "emulab-ops";
$NODEDEAD_PID
=
$TBOPSPID
;
$NODEDEAD_EID
=
"hwdown"
;
$FIRSTUSER
=
"elabman"
;
$NODERELOADING_PID
=
$TBOPSPID
;
$NODERELOADING_EID
=
"reloading"
;
$NODERELOADPENDING_EID
=
"reloadpending"
;
# All these constants need to go at some point, replaced by data from
# the regex table.
...
...
@@ -1501,6 +1504,26 @@ function TBUserPCs($uid)
return
mysql_num_rows
(
$query_result
);
}
#
# Number of PCs reloading.
#
function
TBReloadingPCs
()
{
global
$NODERELOADING_PID
,
$NODERELOADING_EID
,
$NODERELOADPENDING_EID
;
$query_result
=
DBQueryFatal
(
"select count(*) from reserved "
.
"where pid='
$NODERELOADING_PID
' and "
.
" (eid='
$NODERELOADING_EID
' or "
.
" eid='
$NODERELOADPENDING_EID
')"
);
if
(
mysql_num_rows
(
$query_result
)
==
0
)
{
return
0
;
}
$row
=
mysql_fetch_row
(
$query_result
);
return
$row
[
0
];
}
function
TBExptLogFile
(
$pid
,
$eid
)
{
$query_result
=
...
...
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