function printStats($title, $stats_object, $green_limit, $yellow_limit, $critical) { $count = @$stats_object["count"]; $color = "#CCFFFF"; // start with blue for count 0 if ($count > 0) { $color = "#99FF66"; } if ($count > $green_limit) { $color = "#FFFF66"; } if ($count > $yellow_limit) { $color = "#FF9966"; } if ($count > $critical) { $color = "#CC3366"; } $log_color = $color; $log_warning = ""; if (@$stats_object["log_timestamp"]) { $delta = time() - @$stats_object["log_timestamp"]; if ($delta > 600) { $log_color = "#CC3366"; $log_warning = " log too old - (" . $delta . ") seconds from now"; } } $date_format = "%y-%m-%d %H:%M:%S"; $restart_div = $stats_object["service_name"] ? "<div style='position:relative; float:right; ' onClick='restartBatch (\"" . $stats_object["service_name"] . "\")'> </div>" : ""; $str = "<div style='padding:5px;background-color:{$color}'> " . $restart_div . "<b>{$title}</b> <br>" . "path : " . @$stats_object["path"] . "<br>" . "count: " . formatCount($stats_object) . "<br>"; if (@$stats_object["full_stats"]) { $str .= "<div style='padding: 0 0 0 10px '>"; // extra stats per status foreach ($stats_object["full_stats"] as $status => $stats_per_status) { if ($status == BatchJob::BATCHJOB_STATUS_FINISHED) { continue; } // don't include the BatchJob::BATCHJOB_STATUS_FINISHED in this loop $str .= "status " . formatStatus($status) . ": count: " . formatCount($stats_per_status) . "<br>"; } $str .= "</div>"; } if (@$stats_object["successful_stats"]) { $str .= "<div style='background-color:white;'>"; // extra stats per status $stats_per_status = $stats_object["successful_stats"]; $str .= "successful count: " . formatCount($stats_per_status) . "<br>"; $str .= "</div>"; } $str .= "log: " . @$stats_object["log_name"] . "<br> " . "<div style='background-color:{$log_color}'>time: " . @strftime($date_format, @$stats_object["log_timestamp"]) . "{$log_warning}</div>" . " size: " . @$stats_object["log_size"] . " b " . "</div>"; return $str; }
<div class="span6"> <div class="well"> <div style="text-align: center; margin-bottom: 5px;"> <span class="label label-info"><?php echo T_('Box Monitoring'); ?> </span> </div> <table class="table table-striped table-bordered table-condensed"> <tr> <td><?php echo T_('Network Status'); ?> </td> <td><?php echo formatStatus(getStatus($rows['ip'], $rows['sshport'])); ?> (<?php echo T_('Port'); ?> : <?php echo $rows['sshport']; ?> )</td> </tr> <tr> <td><?php echo T_('CPU Load'); ?> (<a href="#" id="cpu" rel="tooltip" title="<?php echo T_('Shows the percentage of CPU in use by the box (user mode).');
include_once "../libs/lgsl/lgsl_class.php"; $server = lgsl_query_live($type['querytype'], $serverIp['ip'], NULL, $rows['queryport'], NULL, 's'); // //---------------------------------------------------------+ } ?> <tr> <td><?php echo T_('Net Status'); ?> </td> <td><?php if (@$server['b']['status'] == '1') { echo formatStatus('Online'); } else { echo formatStatus('Offline'); } ?> </td> </tr> <tr> <td><?php echo T_('Map'); ?> </td> <td><?php echo @$server['s']['map']; ?> </td> </tr> <tr>
</td> <td><?php echo $serverIp['ip']; ?> :<?php echo $rowsServers['port']; ?> </td> <td><?php echo $rowsServers['queryport']; ?> </td> <td>Unknown</td> <td>0 / 0</td> <td><?php echo formatStatus($rowsServers['status']); ?> </td> <td><div style="text-align: center;"><a class="btn btn-small" href="serverprofile.php?id=<?php echo $rowsServers['serverid']; ?> "><i class="icon-edit <?php echo formatIcon(); ?> "></i></a></div></td> <td><div style="text-align: center;"><a class="btn btn-info btn-small" href="serversummary.php?id=<?php echo $rowsServers['serverid']; ?> "><i class="icon-search icon-white"></i></a></div></td> <td> <label class="checkbox inline">
<div class="span6"> <div class="well"> <div style="text-align: center; margin-bottom: 5px;"> <span class="label label-info"><?php echo T_('Script Monitoring'); ?> </span> </div> <table class="table table-bordered table-condensed"> <tr> <td style="text-align: center;"><?php echo T_('Panel Status'); ?> : <?php if (!empty($rows['panelstatus'])) { $pstatus = formatStatus($rows['panelstatus']); } else { $pstatus = "<span class=\"label\"><em>" . T_('None') . "</em></span>"; } echo $pstatus; ?> </td> </tr> </table> <div style="text-align: center; margin-bottom: 5px;"> <span class="label label-info"><?php echo T_('Script Configuration'); ?> </span> </div> <table class="table table-striped table-bordered table-condensed">
<div class="span6"> <div class="well"> <div style="text-align: center; margin-bottom: 5px;"> <span class="label label-info"><?php echo T_('Other Information'); ?> </span> </div> <table class="table table-striped table-bordered table-condensed"> <tr> <td><?php echo T_('Status'); ?> </td> <td><?php echo formatStatus($rows['status']); ?> </td> </tr> <tr> <td><?php echo T_('Client Since'); ?> </td> <td><?php echo formatDate($rows['created']); ?> </td> </tr> <tr> <td><?php
echo T_('Non-Interactive'); } else { echo T_('Interactive'); } ?> </td> <td><?php echo $pstatus; ?> </td> <td><?php echo htmlspecialchars($box['name'], ENT_QUOTES); ?> </td> <td><?php echo formatStatus($rowsScripts['status']); ?> </td> <td><div style="text-align: center;"><a class="btn btn-small" href="scriptprofile.php?id=<?php echo $rowsScripts['scriptid']; ?> "><i class="icon-edit <?php echo formatIcon(); ?> "></i></a></div></td> <td><div style="text-align: center;"><a class="btn btn-info btn-small" href="scriptsummary.php?id=<?php echo $rowsScripts['scriptid']; ?> "><i class="icon-search icon-white"></i></a></div></td> </tr> <?php
?> </td> <td><?php echo htmlspecialchars($rowsClients['lastname'], ENT_QUOTES); ?> </td> <td><?php echo htmlspecialchars($rowsClients['email'], ENT_QUOTES); ?> </td> <td><?php echo formatDate($rowsClients['lastlogin']); ?> </td> <td><?php echo formatStatus($rowsClients['status']); ?> </td> <td><div style="text-align: center;"><a class="btn btn-small" href="clientprofile.php?id=<?php echo $rowsClients['clientid']; ?> "><i class="icon-edit <?php echo formatIcon(); ?> "></i></a></div></td> <td><div style="text-align: center;"><a class="btn btn-info btn-small" href="clientsummary.php?id=<?php echo $rowsClients['clientid']; ?> "><i class="icon-search icon-white"></i></a></div></td> </tr> <?php
?> </td> <td><?php echo $ip['ip']; ?> </td> <td><?php echo $value['port']; ?> </td> <td><?php echo $value['slots']; ?> </td> <td><?php echo formatStatus($value['status']); ?> </td> <td><div style="text-align: center;"><a class="btn btn-info btn-small" href="serversummary.php?id=<?php echo $value['serverid']; ?> "><i class="icon-search icon-white"></i></a></div></td> </tr> <?php unset($ip); } } ?> </tbody> </table> <?php
?> </td> <td><?php echo htmlspecialchars($rowsAdmins['username'], ENT_QUOTES); ?> </td> <td><?php echo $rowsAdmins['access']; ?> </td> <td><?php echo formatDate($rowsAdmins['lastlogin']); ?> </td> <td><?php echo formatStatus($rowsAdmins['status']); ?> </td> <td><div style="text-align: center;"><a class="btn btn-small" href="configadminedit.php?id=<?php echo $rowsAdmins['adminid']; ?> "><i class="icon-edit <?php echo formatIcon(); ?> "></i></a></div></td> <td><div style="text-align: center;"><a class="btn btn-danger btn-small" href="#" onclick="doDelete('<?php echo $rowsAdmins['adminid']; ?> ', '<?php echo htmlspecialchars(addslashes($rowsAdmins['firstname']), ENT_QUOTES); ?>