Commit d311c588 authored by cfoe's avatar cfoe
Browse files

changed server_list display to usage of sprite images + reduction of hardcoded...

changed server_list display to usage of sprite images + reduction of hardcoded <br>-elements + additional support for distro icons in server_list
parent daf1488c
......@@ -222,45 +222,53 @@ function _getServerState($serverId, $serverName) {
/*
* Info of a VE inside a OpenVz-Host
*/
$html_ve = '<div class="systemmonitor-state state-' . $serverState . '-ve">';
$html_ve .= '<div class="systemmonitor-device device-ve">';
$html_ve .= '<div class="systemmonitor-content icons32 ico-' . $serverState . '">';
$html_ve .= $serverName . '<br>';
$html_ve = '<div class="systemmonitor-ve state-' . $serverState . '-ve">';
if ($osData != null) {
$html_ve .= '<div class="icoDevice os-' . $osData['name'] . '"><p class="status"></p></div>';
}
else {
$html_ve .= '<div class="icoDevice"><p class="status"></p></div>';
}
$html_ve .= '<div class="statusDevice"><p>' . $serverName;
if ($osData != null) {
$html_ve .= $osData['name'] . ' ' . $osData['version'] . '<br>';
$html_ve .= ' (' . $osData['name'] . ' ' . $osData['version'] . ') ';
}
if ($ispcData != null) {
$html_ve .= $ispcData['name'] . ' ' . $ispcData['version'] . '<br>';
$html_ve .= $ispcData['name'] . ' ' . $ispcData['version'] . '</p>';
}
$html_ve .= $app->lng("monitor_serverstate_state_txt") . ': ' . $serverState . '<br>';
else {
$html_ve .= '</p>';
}
$html_ve .= '<p>' . $app->lng("monitor_serverstate_state_txt") . ': ' . $serverState . '</p>';
/*
* Info of a "normal" Server or a OpenVz-Host
*/
$html_server = '<div class="systemmonitor-state state-' . $serverState . '">';
$html_server .= '<div class="systemmonitor-device device-server">';
$html_server .= '<div class="systemmonitor-content icons32 ico-' . $serverState . '">';
$html_server .= $app->lng("monitor_serverstate_server_txt") . ': ' . $serverName;
$html_server = '<div class="systemmonitor-server state-' . $serverState . '">';
if ($osData != null) {
$html_server .= ' (' . $osData['name'] . ' ' . $osData['version'] . ')<br>';
}
else {
$html_server .= '<br />';
$html_server .= '<div class="icoDevice os-' . $osData['name'] . '"><p class="status"></p></div>';
}
else {
$html_server .= '<div class="icoDevice"><p class="status"></p></div>';
}
$html_server .= '<div class="statusDevice"><p>' . $app->lng("monitor_serverstate_server_txt") . ': ' . $serverName;
if ($osData != null) {
$html_server .= ' (' . $osData['name'] . ' ' . $osData['version'] . ') ';
}
if ($ispcData != null) {
$html_server .= $ispcData['name'] . ' ' . $ispcData['version'] . '<br>';
}
else {
$html_server .= '<br />';
$html_server .= $ispcData['name'] . ' ' . $ispcData['version'] . '</p>';
}
else {
$html_server .= '</p>';
}
$html_server .= $app->lng("monitor_serverstate_state_txt") . ': ' . $serverState . ' (';
$html_server .= '<p>' . $app->lng("monitor_serverstate_state_txt") . ': ' . $serverState . ' (';
$html_server .= sizeof((isset($messages[$app->lng("monitor_serverstate_listunknown_txt")]) ? $messages[$app->lng("monitor_serverstate_listunknown_txt")] : array())) . ' ' . $app->lng("monitor_serverstate_unknown_txt") . ', ';
$html_server .= sizeof((isset($messages[$app->lng("monitor_serverstate_listinfo_txt")]) ? $messages[$app->lng("monitor_serverstate_listinfo_txt")] : array())) . ' ' . $app->lng("monitor_serverstate_info_txt") . ', ';
$html_server .= sizeof((isset($messages[$app->lng("monitor_serverstate_listwarning_txt")]) ? $messages[$app->lng("monitor_serverstate_listwarning_txt")] : array())) . ' ' . $app->lng("monitor_serverstate_warning_txt") . ', ';
$html_server .= sizeof((isset($messages[$app->lng("monitor_serverstate_listcritical_txt")]) ? $messages[$app->lng("monitor_serverstate_listcritical_txt")] : array())) . ' ' . $app->lng("monitor_serverstate_critical_txt") . ', ';
$html_server .= sizeof((isset($messages[$app->lng("monitor_serverstate_listerror_txt")]) ? $messages[$app->lng("monitor_serverstate_listerror_txt")] : array())) . ' ' . $app->lng("monitor_serverstate_error_txt") . '';
$html_server .= ')<br />';
$html_server .= ')</p>';
/*
* Verbose - Info
......
......@@ -104,137 +104,107 @@
}
/* Systemmonitor */
.systemmonitor-state {
margin: 10px 5px;
font-family: Consolas, "Lucida Console", "Courier New", monospace;
font-size: 0.9em;
float: left;
width: 100%;
}
.systemmonitor-state.state-no_state {
border-top: 4px solid #95A19F;
background-color: #f8f8ff;
}
.systemmonitor-state.state-unknown {
border-top: 4px solid #30302e;
background-color: #cecfc5;
}
.systemmonitor-state.state-ok {
border-top: 4px solid #23fb00;
background-color: #adffa2;
}
.systemmonitor-state.state-info {
border-top: 4px solid #183e99;
background-color: #d4e2ff;
}
.systemmonitor-state.state-warning {
border-top: 4px solid #ffa800;
background-color: #ffda93;
}
.systemmonitor-state.state-critical {
border-top: 4px solid #ff0000;
background-color: #ffb9b9;
}
.systemmonitor-state.state-error {
border-top: 4px solid #ff0000;
background-color: #ff7f7f;
}
.systemmonitor-state.state-no_state-ve {
float: left;
width: 213px;
border-top: 4px solid #95A19F;
background-color: #f8f8ff;
}
.systemmonitor-state.state-unknown-ve {
float: left;
width: 213px;
border-top: 4px solid #30302e;
background-color: #cecfc5;
.systemmonitor-server,
.systemmonitor-ve {
margin: 10px 5px;
font-family: Consolas, "Lucida Console", "Courier New", monospace;
font-size: 0.9em;
float: left;
width: 100%;
}
.systemmonitor-state.state-ok-ve {
float: left;
width: 213px;
border-top: 4px solid #23fb00;
background-color: #adffa2;
.systemmonitor-server:hover,
.systemmonitor-vm:hover { background-color: #FFFACD; }
.state-no_state,
.state-no_state-ve {
border-top: 4px solid #95A19F;
background-color: #f8f8ff;
}
.systemmonitor-state.state-info-ve {
float: left;
width: 213px;
border-top: 4px solid #183e99;
background-color: #d4e2ff;
.state-unknown,
.state-unknown-ve {
border-top: 4px solid #30302e;
background-color: #cecfc5;
}
.systemmonitor-state.state-warning-ve {
float: left;
width: 213px;
border-top: 4px solid #ffa800;
background-color: #ffda93;
.state-ok,
.state-ok-ve {
border-top: 4px solid #23fb00;
background-color: #adffa2;
}
.systemmonitor-state.state-critical-ve {
float: left;
width: 213px;
border-top: 4px solid #ff0000;
background-color: #ffb9b9;
.state-info,
.state-info-ve {
border-top: 4px solid #183e99;
background-color: #d4e2ff;
}
.systemmonitor-state.state-error-ve {
float: left;
width: 213px;
border-top: 4px solid #ff0000;
background-color: #ff7f7f;
.state-warning,
.state-warning-ve {
border-top: 4px solid #ffa800;
background-color: #ffda93;
}
.systemmonitor-state:hover {
background-color: #FFFACD;
.state-critical,
.state-critical-ve {
border-top: 4px solid #ff0000;
background-color: #ffb9b9;
}
.systemmonitor-state p {
float:left;
.state-error,
.state-error-ve {
border-top: 4px solid #ff0000;
background-color: #ff7f7f;
}
div.icoDevice {
float: left;
width: 64px;
height: 64px;
margin: 5px;
background: url("../../icons/device_sprite.png") no-repeat transparent;
}
.systemmonitor-device {
background-position: -6px 4px;
background-repeat: no-repeat;
min-height: 80px;
}
.systemmonitor-device.device-system { background-image: url("../../icons/x64/network.png"); }
.systemmonitor-device.device-server {
background-image: url("../../icons/x64/server.png");
}
.systemmonitor-device.device-ve {
background-image: url("../../icons/x64/server.png");
width: 213px;
float: left;
border: 1px dashed #aaaaaa;
border-top: none;
}
.systemmonitor-content.icons32 {
padding:2px 10px 2px 56px;
background-repeat: no-repeat;
background-position: 12px 4px;
}
.systemmonitor-content.icons32.ico-no_state { /*background-image:url("../../icons/x32/state_no.png"); */ }
.systemmonitor-content.icons32.ico-unknown { background-image:url("../../icons/x32/state_unknown.png"); }
.systemmonitor-content.icons32.ico-ok { background-image:url("../../icons/x32/state_ok.png"); }
.systemmonitor-content.icons32.ico-info { background-image:url("../../icons/x32/state_info.png"); }
.systemmonitor-content.icons32.ico-warning { background-image:url("../../icons/x32/state_warning.png"); }
.systemmonitor-content.icons32.ico-critical { background-image:url("../../icons/x32/state_critical.png"); }
.systemmonitor-content.icons32.ico-error { background-image:url("../../icons/x32/state_error.png"); }
.systemmonitor-server div.icoDevice { background-position: 0 0; }
.systemmonitor-ve div.icoDevice { background-position: -64px 0; }
.systemmonitor-network div.icoDevice { background-position: -128px -0; }
div.statusDevice { float: left; }
p.status {
float: right;
width: 32px;
height: 32px;
background: url("../../icons/x32_sprite.png") no-repeat transparent;
}
.state-no_state p.status,
.state-no_state-ve p.status,
.state-unknown p.status,
.state-unknown-ve p.status { background-position: 0 -207px; }
.state-ok p.status,
.state-ok-ve p.status { background-position: 0 -270px; }
.state-info p.status,
.state-info-ve p.status { background-position: 0 -336px; }
.state-warning p.status,
.state-warning-ve p.status { background-position: 0 -143px; }
.state-critical p.status,
.state-critical-ve p.status { background-position: 0 -463px; }
.state-error p.status,
.state-error-ve p.status { background-position: 0 -400px; }
/* Usage unknown
.systemmonitor-content table {
border: none;
margin-top: 10px;
border: none;
margin-top: 10px;
}
.systemmonitor-content * .online {
border: 1px solid #ffffff;
background-color: #E3FFB8;
background-color: #E3FFB8;
color: #000000;
padding:0px 5px;
padding:0px 5px;
}
.systemmonitor-content * .offline {
border: 1px solid #ffffff;
background-color: #d12f19;
color:#ffffff;
padding:0px 5px;
}
border: 1px solid #ffffff;
background-color: #d12f19;
color:#ffffff;
padding:0px 5px;
}*/
/* Dashboard */
.dashboard-modules {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment