Migracia a male opravy

- csrf ocharana, vypnutie pre /log
- oprava loggovania pamate
- pridanie vue skriptov
This commit is contained in:
Jaroslav Drzik
2020-03-26 07:52:02 +01:00
parent 575b55bdc2
commit a4b7483048
50 changed files with 23176 additions and 4 deletions

View File

@@ -8,7 +8,7 @@ use Illuminate\Support\Facades\DB;
class Logging extends Controller
{
public static $_items = [ 'netstat_sent' => 'i', 'netstat_recv' => 'i', 'memory_free' => 'f', 'memory_total' => 'f', 'memory_used' => 'f', 'disk_free' => 'B', 'disk_percent' => 'f', 'disk_used' => 'B', 'disk_total' => 'B', 'processes' => 'i', 'temp' => 'i', 'load' => 'f', 'username' =>'s', 'computer' => 's'];
public static $_items = [ 'netstat_sent' => 'i', 'netstat_recv' => 'i', 'memory_free' => 'B', 'memory_total' => 'B', 'memory_used' => 'B', 'disk_free' => 'B', 'disk_percent' => 'f', 'disk_used' => 'B', 'disk_total' => 'B', 'processes' => 'i', 'temp' => 'i', 'load' => 'f', 'username' =>'s', 'computer' => 's'];
private $_values = [];
private $_ucache = [];
@@ -32,7 +32,7 @@ class Logging extends Controller
if ($ret == false ) {
$q = DB::table('computers')->select('id', 'computer')->get();
foreach ($q as $v) {
$this->_ucache[$v->computer] = $v->id;
$this->_ccache[$v->computer] = $v->id;
}
\apcu_store('computers',$this->_ccache);
}
@@ -67,9 +67,9 @@ class Logging extends Controller
$units = explode(' ', ' K M G T P E Z Y');
preg_match('/([0-9]+)([GKMTgkmT])?B/',$v,$vu);
preg_match('/([0-9\.]+)([GKMTgkmT])?B/',$v,$vu);
$v1 = $vu[1];
$v1 = $vu[1];
if (count($vu) == 3)
$v2 = $vu[2];
else