Revision cfeba570
Added by Scott Dale about 18 years ago
usr/local/www/widgets/widgets/system_information.widget.php | ||
---|---|---|
1 | 1 |
<table width="100%" border="0" cellspacing="0" cellpadding="0"> |
2 | 2 |
<tbody> |
3 |
<tr> |
|
4 |
<td width="15%" class="vncellt"><?=gettext("Current User");?></td> |
|
5 |
<td width="75%" class="listr"><?= $HTTP_SERVER_VARS['AUTH_USER']; ?></td> |
|
6 |
</tr> |
|
3 | 7 |
<tr> |
4 |
<td width="25%" class="vncellt">Name</td>
|
|
8 |
<td width="15%" class="vncellt"><?=gettext("Name");?></td>
|
|
5 | 9 |
<td width="75%" class="listr"><?php echo $config['system']['hostname'] . "." . $config['system']['domain']; ?></td> |
6 | 10 |
</tr> |
7 | 11 |
<tr> |
8 |
<td width="25%" valign="top" class="vncellt">Version</td>
|
|
12 |
<td width="15%" valign="top" class="vncellt"><?=gettext("Version");?></td>
|
|
9 | 13 |
<td width="75%" class="listr"> |
10 | 14 |
<strong><?php readfile("/etc/version"); ?></strong> |
11 | 15 |
<br /> |
... | ... | |
13 | 17 |
</td> |
14 | 18 |
</tr> |
15 | 19 |
<tr> |
16 |
<td width="25%" class="vncellt">Platform</td>
|
|
20 |
<td width="15%" class="vncellt"><?=gettext("Platform");?></td>
|
|
17 | 21 |
<td width="75%" class="listr"><?=htmlspecialchars($g['platform']);?></td> |
18 | 22 |
</tr> |
19 | 23 |
<tr> |
20 |
<td width="25%" class="vncellt">CPU Type</td>
|
|
24 |
<td width="15%" class="vncellt"><?=gettext("CPU Type");?></td>
|
|
21 | 25 |
<td width="75%" class="listr"> |
22 | 26 |
<?php |
23 | 27 |
$cpumodel = ""; |
... | ... | |
28 | 32 |
</tr> |
29 | 33 |
<?php if ($hwcrypto): ?> |
30 | 34 |
<tr> |
31 |
<td width="25%" class="vncellt">Hardware crypto</td>
|
|
35 |
<td width="15%" class="vncellt"><?=gettext("Hardware crypto");?></td>
|
|
32 | 36 |
<td width="75%" class="listr"><?=htmlspecialchars($hwcrypto);?></td> |
33 | 37 |
</tr> |
34 | 38 |
<?php endif; ?> |
35 |
<tr> |
|
36 |
<td width="25%" class="vncellt">Uptime</td> |
|
37 |
<td width="75%" class="listr"><input style="border: 0px solid white;" size="30" name="uptime" id="uptime" value="<?= htmlspecialchars(get_uptime()); ?>" /></td> |
|
38 |
</tr> |
|
39 |
<tr> |
|
40 |
<td width="15%" class="vncellt"><?=gettext("Uptime");?></td> |
|
41 |
<td width="75%" class="listr"> |
|
42 |
<div id="uptime"><?= htmlspecialchars(get_uptime()); ?></div> |
|
43 |
</td> |
|
44 |
</tr> |
|
39 | 45 |
<tr> |
40 |
<td width="30%" class="vncellt">DNS server(s)</td>
|
|
46 |
<td width="30%" class="vncellt"><?=gettext("DNS server(s)");?></td>
|
|
41 | 47 |
<td width="70%" class="listr"> |
42 | 48 |
<?php |
43 | 49 |
$dns_servers = get_dns_servers(); |
... | ... | |
49 | 55 |
</tr> |
50 | 56 |
<?php if ($config['revision']): ?> |
51 | 57 |
<tr> |
52 |
<td width="25%" class="vncellt">Last config change</td>
|
|
58 |
<td width="15%" class="vncellt"><?=gettext("Last config change");?></td>
|
|
53 | 59 |
<td width="75%" class="listr"><?= htmlspecialchars(date("D M j G:i:s T Y", $config['revision']['time']));?></td> |
54 | 60 |
</tr> |
55 | 61 |
<?php endif; ?> |
62 |
<tr> |
|
63 |
<td width="15%" class="vncellt"><?=gettext("State table size");?></td> |
|
64 |
<td width="75%" class="listr"> |
|
65 |
<div id="pfstate"><?= htmlspecialchars(get_pfstate()); ?></div> |
|
66 |
<a href="diag_dump_states.php"><?=gettext("Show states");?></a> |
|
67 |
</td> |
|
68 |
</tr> |
|
56 | 69 |
<tr> |
57 |
<td width="25%" class="vncellt">State table size</td> |
|
58 |
<td width="75%" class="listr"> |
|
59 |
<input style="border: 0px solid white;" size="30" name="pfstate" id="pfstate" value="<?= htmlspecialchars(get_pfstate()); ?>" /> |
|
60 |
<br /> |
|
61 |
<a href="diag_dump_states.php">Show states</a> |
|
62 |
</td> |
|
63 |
</tr> |
|
64 |
<tr> |
|
65 |
<td width="25%" class="vncellt">CPU usage</td> |
|
66 |
<td width="75%" class="listr"> |
|
67 |
<?php $cpuUsage = "0"; ?> |
|
68 |
<img src="./themes/<?= $g['theme']; ?>/images/misc/bar_left.gif" height="15" width="4" border="0" align="middle" alt="left bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_blue.gif" height="15" name="cpuwidtha" id="cpuwidtha" width="<?= $cpuUsage; ?>" border="0" align="middle" alt="red bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_gray.gif" height="15" name="cpuwidthb" id="cpuwidthb" width="<?= (100 - $cpuUsage); ?>" border="0" align="middle" alt="gray bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_right.gif" height="15" width="5" border="0" align="middle" alt="right bar" /> |
|
69 |
|
|
70 |
<input style="border: 0px solid white;" size="30" name="cpumeter" id="cpumeter" value="(Updating in 5 seconds)" /> |
|
71 |
</td> |
|
72 |
</tr> |
|
73 |
<tr> |
|
74 |
<td width="25%" class="vncellt">Memory usage</td> |
|
75 |
<td width="75%" class="listr"> |
|
76 |
<?php $memUsage = mem_usage(); ?> |
|
77 |
<img src="./themes/<?= $g['theme']; ?>/images/misc/bar_left.gif" height="15" width="4" border="0" align="middle" alt="left bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_blue.gif" height="15" name="memwidtha" id="memwidtha" width="<?= $memUsage; ?>" border="0" align="middle" alt="red bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_gray.gif" height="15" name="memwidthb" id="memwidthb" width="<?= (100 - $memUsage); ?>" border="0" align="middle" alt="gray bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_right.gif" height="15" width="5" border="0" align="middle" alt="right bar" /> |
|
78 |
|
|
79 |
<input style="border: 0px solid white;" size="30" name="memusagemeter" id="memusagemeter" value="<?= $memUsage.'%'; ?>" /> |
|
80 |
</td> |
|
81 |
</tr> |
|
70 |
<td width="15%" class="vncellt"><?=gettext("CPU usage history");?></td> |
|
71 |
<td width="75%" class="listr"> |
|
72 |
<div class="GraphLink" id="GraphOutput"></div> |
|
73 |
</td> |
|
74 |
</tr> |
|
75 |
<tr> |
|
76 |
<td width="15%" class="vncellt"><?=gettext("CPU usage");?></td> |
|
77 |
<td width="75%" class="listr"> |
|
78 |
<?php $cpuUsage = "0"; ?> |
|
79 |
<img src="./themes/<?= $g['theme']; ?>/images/misc/bar_left.gif" height="15" width="4" border="0" align="middle" alt="left bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_blue.gif" height="15" name="cpuwidtha" id="cpuwidtha" width="<?= $cpuUsage; ?>" border="0" align="middle" alt="red bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_gray.gif" height="15" name="cpuwidthb" id="cpuwidthb" width="<?= (100 - $cpuUsage); ?>" border="0" align="middle" alt="gray bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_right.gif" height="15" width="5" border="0" align="middle" alt="right bar" /> |
|
80 |
|
|
81 |
<div id="cpumeter">(<?=gettext("Updating in 5 seconds");?>)</div> |
|
82 |
</td> |
|
83 |
</tr> |
|
84 |
<tr> |
|
85 |
<td width="15%" class="vncellt"><?=gettext("Memory usage");?></td> |
|
86 |
<td width="75%" class="listr"> |
|
87 |
<?php $memUsage = mem_usage(); ?> |
|
88 |
<img src="./themes/<?= $g['theme']; ?>/images/misc/bar_left.gif" height="15" width="4" border="0" align="middle" alt="left bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_blue.gif" height="15" name="memwidtha" id="memwidtha" width="<?= $memUsage; ?>" border="0" align="middle" alt="red bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_gray.gif" height="15" name="memwidthb" id="memwidthb" width="<?= (100 - $memUsage); ?>" border="0" align="middle" alt="gray bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_right.gif" height="15" width="5" border="0" align="middle" alt="right bar" /> |
|
89 |
|
|
90 |
<div id="memusagemeter"><?= $memUsage.'%'; ?></div> |
|
91 |
</td> |
|
92 |
</tr> |
|
82 | 93 |
<?php if($showswap == true): ?> |
83 | 94 |
<tr> |
84 |
<td width="25%" class="vncellt">SWAP usage</td>
|
|
95 |
<td width="15%" class="vncellt"><?=gettext("SWAP usage");?></td>
|
|
85 | 96 |
<td width="75%" class="listr"> |
86 | 97 |
<?php $swapusage = swap_usage(); ?> |
87 | 98 |
<img src="./themes/<?= $g['theme']; ?>/images/misc/bar_left.gif" height="15" width="4" border="0" align="middle" alt="left bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_blue.gif" height="15" width="<?= $swapUsage; ?>" border="0" align="middle" alt="red bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_gray.gif" height="15" width="<?= (100 - $swapUsage); ?>" border="0" align="middle" alt="gray bar" /><img src="./themes/<?= $g['theme']; ?>/images/misc/bar_right.gif" height="15" width="5" border="0" align="middle" alt="right bar" /> |
... | ... | |
94 | 105 |
if(has_temp()): |
95 | 106 |
?> |
96 | 107 |
<tr> |
97 |
<td width='25%' class='vncellt'>Temperature</td>
|
|
108 |
<td width='15%' class='vncellt'><?=gettext("Temperature");?></td>
|
|
98 | 109 |
<td width='75%' class='listr'> |
99 | 110 |
<?php $temp = get_temp(); ?> |
100 | 111 |
<img src="./themes/<?= $g["theme"]; ?>/images/misc/bar_left.gif" height="15" width="4" border="0" align="middle" alt="left bar" /><img src="./themes/<?= $g["theme"]; ?>/images/misc/bar_blue.gif" height="15" name="tempwidtha" id="tempwidtha" width="<?= $temp; ?>" border="0" align="middle" alt="red bar" /><img src="./themes/<?= $g["theme"]; ?>/images/misc/bar_gray.gif" height="15" name="tempwidthb" id="tempwidthb" width="<?= (100 - $temp); ?>" border="0" align="middle" alt="gray bar" /><img src="./themes/<?= $g["theme"]; ?>/images/misc/bar_right.gif" height="15" width="5" border="0" align="middle" alt="right bar" /> |
... | ... | |
103 | 114 |
</td> |
104 | 115 |
</tr> |
105 | 116 |
<?php endif; ?> |
117 |
<tr> |
|
118 |
<td width="15%" class="vncellt"><?=gettext("Disk usage");?></td> |
|
119 |
<td width="75%" class="listr"> |
|
120 |
<?php $diskusage = disk_usage(); ?> |
|
121 |
<img src="./themes/<?= $g["theme"]; ?>/images/misc/bar_left.gif" height="15" width="4" border="0" align="middle" alt="left bar" /><img src="./themes/<?= $g["theme"]; ?>/images/misc/bar_blue.gif" height="15" name="diskwidtha" id="diskwidtha" width="<?= $diskusage; ?>" border="0" align="middle" alt="red bar" /><img src="./themes/<?= $g["theme"]; ?>/images/misc/bar_gray.gif" height="15" name="diskwidthb" id="diskwidthb" width="<?= (100 - $diskusage); ?>" border="0" align="middle" alt="gray bar" /><img src="./themes/<?= $g["theme"]; ?>/images/misc/bar_right.gif" height="15" width="5" border="0" align="middle" alt="right bar" /> |
|
122 |
|
|
123 |
<div id="diskusagemeter"><?= $diskusage.'%'; ?></div> |
|
124 |
</td> |
|
125 |
</tr> |
|
106 | 126 |
<tr> |
107 |
<td width="25%" class="vncellt">Disk usage</td> |
|
108 |
<td width="75%" class="listr"> |
|
109 |
<?php $diskusage = disk_usage(); ?> |
|
110 |
<img src="./themes/<?= $g["theme"]; ?>/images/misc/bar_left.gif" height="15" width="4" border="0" align="middle" alt="left bar" /><img src="./themes/<?= $g["theme"]; ?>/images/misc/bar_blue.gif" height="15" width="<?= $diskusage; ?>" border="0" align="middle" alt="red bar" /><img src="./themes/<?= $g["theme"]; ?>/images/misc/bar_gray.gif" height="15" width="<?= (100 - $diskusage); ?>" border="0" align="middle" alt="gray bar" /><img src="./themes/<?= $g["theme"]; ?>/images/misc/bar_right.gif" height="15" width="5" border="0" align="middle" alt="right bar" /> |
|
111 |
|
|
112 |
<input style="border: 0px solid white;" size="30" name="diskusagemeter" id="diskusagemeter" value="<?= $diskusage.'%'; ?>" /> |
|
113 |
</td> |
|
114 |
</tr> |
|
127 |
<td width="15%" class="vncellt"><?=gettext("webConfigurator lock");?></td> |
|
128 |
<td width="75%" class="listr"> |
|
129 |
<?php |
|
130 |
file_exists("{$g['tmp_path']}/webconfigurator.lock") ? $lock = "{$g['tmp_path']}/webconfigurator.lock" : $lock = "none"; |
|
131 |
?> |
|
132 |
<?= $lock ?> |
|
133 |
<?php if(hasLockAbility($HTTP_SERVER_VARS['AUTH_USER']) && $lock <> "none"): ?> |
|
134 |
<input type="button" title="Delete" name="delete_lock" id="delete_lock" class="formbtn" value="Delete" onclick="deleteLock();" /> |
|
135 |
<?php else: ?> |
|
136 |
<input type="button" title="Creat Lock" name="create_lock" id="create_lock" class="formbtn" value="Create" onclick="createLock();" /> |
|
137 |
<?php endif; ?> |
|
138 |
</td> |
|
139 |
</tr> |
|
115 | 140 |
</tbody> |
116 | 141 |
</table> |
Also available in: Unified diff
preparing for widgets