Display the system load and free disk space in the nav bar

This commit is contained in:
Kyle Johnson 2013-09-11 09:23:55 -04:00
parent dbba80fcbf
commit 6a65bef736
2 changed files with 5 additions and 0 deletions

View File

@ -64,6 +64,9 @@ class AppController extends Controller {
} else { } else {
$this->set('daemonStatus', ('Stopped')); $this->set('daemonStatus', ('Stopped'));
} }
$this->set('systemLoad', $this->AppModel->getSystemLoad());
$this->set('diskSpace', $this->AppModel->getDiskSpace());
} }
function extractNamedParams($mandatory, $optional = array()) { function extractNamedParams($mandatory, $optional = array()) {

View File

@ -45,6 +45,8 @@ $cakeDescription = __d('cake_dev', 'CakePHP: the rapid development php framework
</head> </head>
<body> <body>
<div class="navbar navbar-default" role="navigation"> <div class="navbar navbar-default" role="navigation">
<p class="navbar-text navbar-right">Used Event Storage: <?php echo $diskSpace; ?>%</p>
<p class="navbar-text navbar-right">CPU Load: <?php echo $systemLoad; ?></p>
<div class="container"> <div class="container">
<div id="loadingDiv"><img src="/img/loading.gif" alt="Loading..." /></div> <div id="loadingDiv"><img src="/img/loading.gif" alt="Loading..." /></div>
<div class="navbar-header"> <div class="navbar-header">