Show IP next to hostname

This commit is contained in:
Jamie Cameron
2011-10-12 11:27:09 -07:00
parent 508a92d31c
commit 0e6d5df683

View File

@@ -33,9 +33,16 @@ if ($level == 0) {
# Show general system information
print "<table width=70%>\n";
# Ask status module for collected info
&foreign_require("system-status");
$info = &system_status::get_collected_info();
# Hostname
$ip = $info && $info->{'ips'} ? $info->{'ips'}->[0]->[0] :
&to_ipaddress(get_system_hostname());
$ip = " ($ip)" if ($ip);
print "<tr> <td><b>$text{'right_host'}</b></td>\n";
print "<td>",&get_system_hostname(),"</td> </tr>\n";
print "<td>",&get_system_hostname(),$ip,"</td> </tr>\n";
# Operating system
print "<tr> <td><b>$text{'right_os'}</b></td>\n";
@@ -58,10 +65,6 @@ if ($level == 0) {
}
print "<td>$tm</td> </tr>\n";
# Ask status module for more
&foreign_require("system-status");
$info = &system_status::get_collected_info();
# Kernel and CPU
if ($info->{'kernel'}) {
print "<tr> <td><b>$text{'right_kernel'}</b></td>\n";