Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
emulab-devel
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
112
Issues
112
List
Boards
Labels
Milestones
Merge Requests
4
Merge Requests
4
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
emulab
emulab-devel
Commits
85bc6655
Commit
85bc6655
authored
Sep 19, 2003
by
Robert Ricci
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Show the new widearea_nodeinfo.{hostname,site} columns on the web
and in reports.
parent
cd239a75
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
46 additions
and
1 deletion
+46
-1
tbsetup/tbreport.in
tbsetup/tbreport.in
+30
-0
www/nodecontrol_list.php3
www/nodecontrol_list.php3
+4
-1
www/showstuff.php3
www/showstuff.php3
+12
-0
No files found.
tbsetup/tbreport.in
View file @
85bc6655
...
...
@@ -56,6 +56,8 @@ my %v2pmap;
my
%
p2type
;
my
%
p2osid
;
my
%
vv2pmap
;
my
$hasremote
=
0
;
my
$hasplab
=
0
;
getopts
('
hnmdlevbr
',
\%
opt
);
...
...
@@ -157,6 +159,12 @@ if (($state eq EXPTSTATE_ACTIVE) ||
ISREMOTE
=>
$r
,
PLAB
=>
$d
,
};
if
(
$r
)
{
$hasremote
=
1
;
}
if
(
$d
)
{
$hasplab
=
1
;
}
}
}
...
...
@@ -226,6 +234,28 @@ if ($showmap &&
}
print
"
\n
";
if
(
$hasremote
||
$hasplab
)
{
my
$widearea_info_result
=
DBQueryFatal
("
select vname, hostname from reserved as r left join
"
.
"
nodes as n on r.node_id=n.node_id left join
"
.
"
widearea_nodeinfo as w on w.node_id=n.phys_nodeid
"
.
"
where pid='
$pid
' and eid='
$eid
'
");
print
"
Wide-Area Node Hostnames:
\n
";
printf
"
%-15s %-15s %-45s
\n
",
"
ID
",
"
Physical
",
"
Hostname
";
print
"
--------------- --------------- --------------------
\n
";
while
((
$vname
,
$hostname
)
=
$widearea_info_result
->
fetchrow_array
())
{
next
unless
(
$v2pmap
{
$vname
}
->
{
ISREMOTE
}
||
$v2pmap
{
$vname
}
->
{
PLAB
});
my
$pnode
=
$v2pmap
{
$vname
}
->
{
VVP
};
if
(
!
defined
(
$hostname
))
{
$hostname
=
"
--
";
}
printf
"
%-15s %-15s %-45s
\n
",
$vname
,
$pnode
,
$hostname
;
}
print
"
\n
";
}
my
$range_result
=
DBQueryFatal
("
select low,high from ipport_ranges
"
.
"
where pid='
$pid
' and eid='
$eid
'
");
...
...
www/nodecontrol_list.php3
View file @
85bc6655
...
...
@@ -81,7 +81,8 @@ elseif (! strcmp($showtype, "widearea")) {
"wani.city,wani.state,wani.country,wani.zip), "
.
"'USA, ','')"
.
"AS location, "
.
"wani.connect_type"
;
"wani.connect_type, "
.
"wani.hostname"
;
$additionalLeftJoin
=
"LEFT JOIN widearea_nodeinfo AS wani "
.
"ON n.node_id=wani.node_id"
;
...
...
@@ -243,12 +244,14 @@ while ($row = mysql_fetch_array($query_result)) {
$pid
=
$row
[
pid
];
$eid
=
$row
[
eid
];
$vname
=
$row
[
vname
];
$hostname
=
$row
[
hostname
];
$status
=
$row
[
status
];
if
(
!
strcmp
(
$showtype
,
"widearea"
))
{
$machine_type
=
$row
[
machine_type
];
$location
=
$row
[
location
];
$connect_type
=
$row
[
connect_type
];
$vname
=
$row
[
hostname
];
}
echo
"<tr>"
;
...
...
www/showstuff.php3
View file @
85bc6655
...
...
@@ -2017,6 +2017,8 @@ function SHOWWIDEAREANODE($node_id, $embedded = 0) {
$state
=
$row
[
state
];
$zip
=
$row
[
zip
];
$country
=
$row
[
country
];
$hostname
=
$row
[
hostname
];
$site
=
$row
[
site
];
if
(
!
$embedded
)
{
echo
"<table border=2 cellpadding=0 cellspacing=2
...
...
@@ -2067,6 +2069,16 @@ function SHOWWIDEAREANODE($node_id, $embedded = 0) {
<td class=left>
$country
</td>
</tr>
\n
"
;
echo
"<tr>
<td>Hostname:</td>
<td class=left>
$hostname
</td>
</tr>
\n
"
;
echo
"<tr>
<td>Site:</td>
<td class=left>
$site
</td>
</tr>
\n
"
;
if
(
!
$embedded
)
{
echo
"</table>
\n
"
;
}
...
...
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