Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
143
Issues
143
List
Boards
Labels
Service Desk
Milestones
Merge Requests
6
Merge Requests
6
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
32beb94b
Commit
32beb94b
authored
Jan 14, 2005
by
Mike Hibler
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dinks. I'm done dinkin now. Really.
parent
dee46d59
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
83 additions
and
16 deletions
+83
-16
www/shownodehistory.php3
www/shownodehistory.php3
+44
-4
www/showstuff.php3
www/showstuff.php3
+39
-12
No files found.
www/shownodehistory.php3
View file @
32beb94b
...
...
@@ -29,6 +29,12 @@ if (!$isadmin) {
if
(
!
isset
(
$showall
))
{
$showall
=
0
;
}
if
(
!
isset
(
$count
))
{
$count
=
20
;
}
if
(
!
isset
(
$reverse
))
{
$reverse
=
1
;
}
if
(
!
isset
(
$node_id
)
||
strcmp
(
$node_id
,
""
)
==
0
)
{
$node_id
=
""
;
...
...
@@ -41,11 +47,45 @@ if (!isset($node_id) || strcmp($node_id, "") == 0) {
}
}
echo
"<b>Show:
<a href='shownodehistory.php3?node_id=
$node_id
'>allocated only</a>,
<a href='shownodehistory.php3?node_id=
$node_id
&showall=1'>all</a>"
;
$opts
=
"node_id=
$node_id
&count=
$count
&reverse=
$reverse
"
;
echo
"<b>Show records: "
;
if
(
$showall
)
{
echo
"<a href='shownodehistory.php3?
$opts
'>allocated only</a>,
all"
;
}
else
{
echo
"allocated only,
<a href='shownodehistory.php3?
$opts
&showall=1'>all</a>"
;
}
$opts
=
"node_id=
$node_id
&count=
$count
&showall=
$showall
"
;
echo
"<br><b>Order by: "
;
if
(
$reverse
==
0
)
{
echo
"<a href='shownodehistory.php3?
$opts
&reverse=1'>lastest first</a>,
earliest first"
;
}
else
{
echo
"lastest first,
<a href='shownodehistory.php3?
$opts
&reverse=0'>earliest first</a>"
;
}
$opts
=
"node_id=
$node_id
&showall=
$showall
&reverse=
$reverse
"
;
echo
"<br><b>Show number: "
;
if
(
$count
!=
20
)
{
echo
"<a href='shownodehistory.php3?
$opts
&count=20'>first 20</a>, "
;
}
else
{
echo
"first 20, "
;
}
if
(
$count
!=
-
20
)
{
echo
"<a href='shownodehistory.php3?
$opts
&count=-20'>last 20</a>, "
;
}
else
{
echo
"last 20, "
;
}
if
(
$count
!=
0
)
{
echo
"<a href='shownodehistory.php3?
$opts
&count=0'>all</a>"
;
}
else
{
echo
"all"
;
}
SHOWNODEHISTORY
(
$node_id
,
$showall
);
SHOWNODEHISTORY
(
$node_id
,
$showall
,
$count
,
$reverse
);
#
# Standard Testbed Footer
...
...
www/showstuff.php3
View file @
32beb94b
...
...
@@ -2216,13 +2216,14 @@ function SHOWNODE($node_id, $flags = 0) {
#
# Show history.
#
function
SHOWNODEHISTORY
(
$node_id
,
$showall
=
0
)
function
SHOWNODEHISTORY
(
$node_id
,
$showall
=
0
,
$count
=
20
,
$reverse
=
1
)
{
global
$TBSUEXEC_PATH
;
$atime
=
0
;
$ftime
=
0
;
$rtime
=
0
;
$dtime
=
0
;
$nodestr
=
""
;
$opt
=
"-ls"
;
if
(
!
$showall
)
{
...
...
@@ -2230,6 +2231,13 @@ function SHOWNODEHISTORY($node_id, $showall = 0)
}
if
(
$node_id
==
""
)
{
$opt
.
=
"A"
;
$nodestr
=
"<th>Node</th>"
;
}
if
(
$reverse
)
{
$opt
.
=
"r"
;
}
if
(
$count
)
{
$opt
.
=
" -n
$count
"
;
}
if
(
$fp
=
popen
(
"
$TBSUEXEC_PATH
nobody nobody webnodehistory
$opt
$node_id
"
,
"r"
))
{
if
(
!
$showall
)
{
...
...
@@ -2237,14 +2245,22 @@ function SHOWNODEHISTORY($node_id, $showall = 0)
}
else
{
$str
=
""
;
}
if
(
$node_id
==
""
)
{
echo
"<br>
<center>
$str
History for All Nodes.
</center><br>
\n
"
;
}
else
{
echo
"<br>
<center>
$str
History for Node
$node_id
.
</center><br>
\n
"
;
}
echo
"<table border=1 cellpadding=2 cellspacing=2 align='center'>
\n
"
;
echo
"<tr>
$nodestr
<th>Pid</th>
<th>Eid</th>
<th>Allocated By</th>
...
...
@@ -2295,13 +2311,24 @@ function SHOWNODEHISTORY($node_id, $showall = 0)
}
else
{
$eid
=
$results
[
6
];
}
if
(
$node_id
==
""
)
{
echo
"<tr>
<td>
$nodeid
</td>
<td>
$pid
</td>
<td>
$eid
</td>
<td>
$uid
</td>
<td>
$datestr
</td>
<td>
$durstr
</td>
</tr>
\n
"
;
}
else
{
echo
"<tr>
<td>
$pid
</td>
<td>
$eid
</td>
<td>
$uid
</td>
<td>
$datestr
</td>
<td>
$durstr
</td>
</tr>
\n
"
;
}
}
$line
=
fgets
(
$fp
,
1024
);
}
...
...
Write
Preview
Markdown
is supported
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