From: Jamie Cameron Date: Wed, 12 Oct 2011 18:27:09 +0000 (-0700) Subject: Show IP next to hostname X-Git-Url: https://iam.tj/gitweb/gitweb.cgi?p=webmin.git;a=commitdiff_plain;h=0e6d5df6838175e2dc6a47b16540945f6b0d1154 Show IP next to hostname --- diff --git a/blue-theme/right.cgi b/blue-theme/right.cgi index f536b441..12221eb6 100755 --- a/blue-theme/right.cgi +++ b/blue-theme/right.cgi @@ -33,9 +33,16 @@ if ($level == 0) { # Show general system information print "\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 "\n"; - print "\n"; + print "\n"; # Operating system print "\n"; @@ -58,10 +65,6 @@ if ($level == 0) { } print "\n"; - # Ask status module for more - &foreign_require("system-status"); - $info = &system_status::get_collected_info(); - # Kernel and CPU if ($info->{'kernel'}) { print "\n";
$text{'right_host'}",&get_system_hostname(),"
",&get_system_hostname(),$ip,"
$text{'right_os'}$tm
$text{'right_kernel'}