Few Fixes
This commit is contained in:
parent
7df378d794
commit
ceca8fc057
@ -4,6 +4,10 @@ $router = new Router();
|
||||
|
||||
$router->setDefault(function(){
|
||||
echo $_GET['url'].': 404';
|
||||
$logManager = new LogManager();
|
||||
$logManager->setLevel(LOGLEVEL);
|
||||
$logManager->write("[ROUTER]" . $_GET['url'] . "not found", LogRecordTypes::WARNING);
|
||||
unset($logManager);
|
||||
});
|
||||
|
||||
//Pages
|
||||
|
@ -79,7 +79,7 @@ class EndpointsApi extends ApiController{
|
||||
foreach ($deviceLogs as $log) {
|
||||
$logManager = new LogManager('../logs/devices/'. date("Y-m-d").'.log');
|
||||
$logManager->setLevel(LOGLEVEL);
|
||||
$logManager->write("[Device Log Msg] Device_ID " . $deviceId . "->" . $log, LogRecordType::ERROR);
|
||||
$logManager->write("[Device Log Msg] Device_ID " . $deviceId . "->" . $log, LogRecordTypes::ERROR);
|
||||
unset($logManager);
|
||||
}
|
||||
}
|
||||
|
@ -30,6 +30,8 @@ class GoogleHomeApi{
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
unset($apiLogManager);
|
||||
}
|
||||
|
||||
static function autorize(){
|
||||
@ -38,12 +40,12 @@ class GoogleHomeApi{
|
||||
|
||||
$apiLogManager = new LogManager('../logs/google-home/'. date("Y-m-d").'.log');
|
||||
$apiLogManager->setLevel(LOGLEVEL);
|
||||
|
||||
$apiLogManager->write("[API] request body\n" . json_encode($obj, JSON_PRETTY_PRINT), LogRecordTypes::INFO);
|
||||
$apiLogManager->write("[API] GET body\n" . json_encode($_GET, JSON_PRETTY_PRINT), LogRecordTypes::INFO);
|
||||
unset($apiLogManager)
|
||||
|
||||
$get = [
|
||||
"access_token"=>"2222255888",
|
||||
"access_token"=>"2222255888", //TODO: FIX
|
||||
"token_type"=>"Bearer",
|
||||
"state"=>$_GET["state"],
|
||||
];
|
||||
|
@ -37,9 +37,6 @@ class Server extends Template
|
||||
$template->prepare('ip', $_SERVER['SERVER_ADDR']);
|
||||
$template->prepare('name', $_SERVER['SERVER_NAME']);
|
||||
|
||||
|
||||
|
||||
echo $_SERVER['SERVER_NAME'];
|
||||
$template->prepare('CPU', sys_getloadavg()[0]);
|
||||
$template->prepare('ramFree', $this->getSystemMemInfo()["MemFree"]);
|
||||
$template->prepare('ramTotal', $this->getSystemMemInfo()["MemTotal"]);
|
||||
|
@ -34,11 +34,11 @@
|
||||
<hr>
|
||||
<label>RAM TOTAL: <?php echo $RAMTOTAL;?></label></br>
|
||||
<label>RAM FREE: <?php echo $RAMFREE;?></label></br>
|
||||
<label>RAM Usage: </label><progress value="<?php echo explode(" ", $RAMFREE)[0];?>" max="<?php echo explode(" ", $RAMTOTAL)[0];?>"> <?php echo $RAMFREE;?> </progress></br>
|
||||
<label>RAM Usage: </label><progress value="<?php echo explode(" ", $RAMTOTAL)[0] - explode(" ", $RAMFREE)[0];?>" max="<?php echo explode(" ", $RAMTOTAL)[0];?>"> <?php echo $RAMFREE;?> </progress></br>
|
||||
<hr>
|
||||
<label>DISK TOTAL: <?php echo $DISKTOTAL;?> bytes</label></br>
|
||||
<label>DISK FREE: <?php echo $DISKFREE;?> bytes</label></br>
|
||||
<label>DISK Usage: </label><progress value="<?php echo explode(" ", $DISKFREE)[0];?>" max="<?php echo explode(" ", $DISKTOTAL)[0];?>"> <?php echo $DISKFREE;?> </progress></br>
|
||||
<label>DISK Usage: </label><progress value="<?php echo explode(" ", $DISKTOTAL)[0] - explode(" ", $DISKFREE)[0];?>" max="<?php echo explode(" ", $DISKTOTAL)[0];?>"> <?php echo $DISKFREE;?> </progress></br>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user