shownodetype.php3 3.11 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<?php
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2003 University of Utah and the Flux Group.
# All rights reserved.
#
include("defs.php3");

#
# Standard Testbed Header
#
PAGEHEADER("Node Type Information");

#
# Anyone can access this info, its a PUBLIC PAGE!
#

#
# Verify form arguments.
# 
if (!isset($node_type) ||
    strcmp($node_type, "") == 0) {
    USERERROR("You must provide a node type.", 1);
}

#
# Check to make sure that this is a valid nodeid
#
if (! TBValidNodeType($node_type)) {
    USERERROR("$node_type is not a valid node type!", 1);
}

$query_result =
    DBQueryFatal("select * from node_types ".
		 "where type='$node_type'");

if (! mysql_num_rows($query_result) != 0) {
    TBERROR("No entry for node_type $node_type!", 1);
}
$noderow = mysql_fetch_assoc($query_result);

echo "<font size=+2>".
     "Node Type <b>$node_type</b>";

echo "<table border=2 cellpadding=0 cellspacing=2
             align=center>\n";

$class		= $noderow["class"];
$proc		= $noderow["proc"];
$speed		= $noderow["speed"];
$RAM		= $noderow["RAM"];
$HD		= $noderow["HD"];
$max_interfaces = $noderow["max_interfaces"];
$osid		= $noderow["osid"];
$imageid	= $noderow["imageid"];
$imageable	= $noderow["imageable"];
$delay_capacity = $noderow["delay_capacity"];
$virtnode_capacity = $noderow["virtnode_capacity"];
$delay_osid	= $noderow["delay_osid"];
$jail_osid	= $noderow["jail_osid"];
$isvirtnode	= $noderow["isvirtnode"];
$isremotenode	= $noderow["isremotenode"];

TBOSInfo($osid, $osname, $pid);
TBOSInfo($jail_osid, $jail_osname, $pid);
TBOSInfo($delay_osid, $delay_osname, $pid);
TBImageInfo($imageid, $imagename, $pid);

echo "<tr>
      <td>Type:</td>
      <td class=left>$node_type</td>
          </tr>\n";

echo "<tr>
      <td>Class:</td>
      <td class=left>$class</td>
          </tr>\n";

if ($isremotenode) {
    echo "<tr>
          <td>Remote:</td>
          <td class=left>Yes</td>
              </tr>\n";
}

if ($isvirtnode) {
    echo "<tr>
          <td>Virtual:</td>
          <td class=left>Yes</td>
              </tr>\n";
}

echo "<tr>
      <td>Processor:</td>
      <td class=left>$proc</td>
          </tr>\n";

echo "<tr>
      <td>Speed:</td>
      <td class=left>$speed MHZ</td>
          </tr>\n";

echo "<tr>
      <td>RAM:</td>
      <td class=left>$RAM MB</td>
          </tr>\n";

echo "<tr>
      <td>Disk Size:</td>
110
      <td class=left>$HD GB</td>
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
          </tr>\n";

echo "<tr>
      <td>Interfaces:</td>
      <td class=left>$max_interfaces</td>
          </tr>\n";

echo "<tr>
      <td>Delay Capacity:</td>
      <td class=left>$delay_capacity</td>
          </tr>\n";

echo "<tr>
      <td>Jail Capacity:</td>
      <td class=left>$virtnode_capacity</td>
          </tr>\n";

echo "<tr>
      <td>Default OSID:</td>
      <td class=left>$osname</td>
          </tr>\n";

echo "<tr>
      <td>Jail OSID:</td>
      <td class=left>$jail_osname</td>
          </tr>\n";

echo "<tr>
      <td>Delay OSID:</td>
      <td class=left>$delay_osname</td>
          </tr>\n";

echo "<tr>
      <td>Default ImageID:</td>
      <td class=left>$imagename</td>
          </tr>\n";

echo "</table>\n";

#
# Standard Testbed Footer
# 
PAGEFOOTER();
?>