Permalink
Browse files

Mobile + Offloaded CSS and JS

Added better mobile support by hiding unimportant columns as the screen
gets smaller (Type, Host and Location)

Switched to loading Bootstrap CSS and JS from bootstrapcdn and jquery
from jquery cdn.
  • Loading branch information...
mojeda committed Mar 5, 2013
1 parent abc5dfa commit 6df7a051331d6ee384a1eaf313a88f95bcc29932
View
@@ -8,5 +8,5 @@
mysql_connect($host, $user, $pass) or die(mysql_error());
mysql_select_db($data) or die(mysql_error());
$templates = "./templates/default/";
$template = "./templates/default/";
?>
View
@@ -17,15 +17,15 @@ function uptime() {
<tr>
<td id="online'.$result["id"].'">
<div class="progress">
<div class="bar bar-danger" style="width: 100%;"><small>Offline</small></div>
<div class="bar bar-danger" style="width: 100%;"><small>Down</small></div>
</div>
</td>
<td class="center">'.$result["name"].'</td>
<td class="center">'.$result["type"].'</td>
<td class="center">'.$result["host"].'</td>
<td class="center">'.$result["location"].'</td>
<td id="uptime'.$result["id"].'" class="center">n/a</td>
<td id="load'.$result["id"].'" class="center">n/a</td>
<td>'.$result["name"].'</td>
<td>'.$result["type"].'</td>
<td>'.$result["host"].'</td>
<td>'.$result["location"].'</td>
<td id="uptime'.$result["id"].'">n/a</td>
<td id="load'.$result["id"].'">n/a</td>
<td id="memory'.$result["id"].'">
<div class="progress progress-striped active">
<div class="bar bar-danger" style="width: 100%;"><small>n/a</small></div>
View
@@ -20,17 +20,17 @@ function get_data($url) {
$array = array();
$array['uptime'] = '
<div class="progress">
<div class="bar bar-danger" style="width: 100%;"><small>Offline</small></div>
<div class="bar bar-danger" style="width: 100%;"><small>Down</small></div>
</div>
';
$array['load'] = '
<div class="progress">
<div class="bar bar-danger" style="width: 100%;"><small>Offline</small></div>
<div class="bar bar-danger" style="width: 100%;"><small>Down</small></div>
</div>
';
$array['online'] = '
<div class="progress">
<div class="bar bar-danger" style="width: 100%;"><small>Offline</small></div>
<div class="bar bar-danger" style="width: 100%;"><small>Down</small></div>
</div>
';
echo json_encode($array);
@@ -39,4 +39,4 @@ function get_data($url) {
$data["load"] = number_format($data["load"], 2);
echo json_encode($data);
}
}
}
Oops, something went wrong.

0 comments on commit 6df7a05

Please sign in to comment.