= Html::encode($this->title) ?>
EnableTimeRecords): ?>
Time Records Helper
timeRecords);
?>
= $systemInfo->hostname ?>
OS:
= $systemInfo->os ?>
CPU:
= $systemInfo->cpu ?>
RAM:
= $systemInfo->ram ?>
Server Time:
= $systemInfo->serverTime ?>
Server Up Time:
= $systemInfo->serverUpTime ?>
osType === 1): ?>
Load
Load Average: = $systemInfo->load ?> (Last 1 min)
CPU
CPU Usage: = $systemInfo->cpuUsage ?>%
Memory
Memory Usage: = $systemInfo->ramUsage ?>%
Swap Usage: = $systemInfo->swapUsage ?>%
Disk
Data
Mount:
= $systemInfo->dataMountPoint ?>
File System:
= $systemInfo->mp_fs ?>
Size:
= $systemInfo->mp_size ?>
Free:
= $systemInfo->mp_avail ?>
Used:
= $systemInfo->mp_used ?> (= $systemInfo->mp_usage ?>%)
Network
Hostname:
= $systemInfo->hostname ?>
DNS:
= $systemInfo->dns ?>
Gateway:
= $systemInfo->gateway ?>
= $systemInfo->nic['interfaceName'] ?>
MAC:
= $systemInfo->nic['mac'] ?>
Speed:
= $systemInfo->nic['speed'] ?>
IPv4:
= $systemInfo->nic['ipv4'] ?>
IPv6:
= $systemInfo->nic['ipv6'] ?>
Active Users
All:
= $systemInfo->users ?>
Active (within 24h):
= $systemInfo->activeUsers ?>
Share
Link:
= $systemInfo->shares ?>
Collection
Link:
= $systemInfo->collections ?>
PHP
Version:
= $systemInfo->phpVersion ?>
Memory Limit:
= $systemInfo->memoryLimit ?>
Max Execution Time:
= $systemInfo->maxExecutionTime ?>s
Upload Max Filesize:
= $systemInfo->uploadMaxFilesize ?>
Post Max Size:
= $systemInfo->postMaxSize ?>
Extension:
= $systemInfo->extensions ?>
Database
Type:
= $systemInfo->dbType ?>
Version:
= $systemInfo->dbVersion ?>
Size:
= $systemInfo->dbSize ?>
serverTime, 11, 8);
$mp_free = round(100 - $systemInfo->mp_usage, 2);
$script = <<< JS
var myChart = echarts.init(document.getElementById('cpu-graph'));
var myChart2 = echarts.init(document.getElementById('memory-graph'));
var myChart3 = echarts.init(document.getElementById('disk-chart'));
// check load-graph is exist
var needLoadGraph = document.getElementById('load-graph');
// var
var option = {
legend: {
data: ['CPU']
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ["$dataTime"]
},
yAxis: {
type: 'value',
min: 0,
max: 100
},
series: [
{
'name': 'CPU',
data: [$systemInfo->cpuUsage],
label: {
show: true,
position: 'top',
formatter: '{c}%'
},
emphasis: {
label: {
scale: 1.5
}
},
type: 'line',
smooth: true,
areaStyle: {}
}
]
};
if(needLoadGraph !== null){
var myChart1 = echarts.init(needLoadGraph);
var option1 = {
legend: {
data: ['Load']
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ["$dataTime"]
},
yAxis: {
type: 'value',
min: 0
// max: 100
},
series: [
{
'name': 'Load',
data: [$systemInfo->load],
label: {
show: true,
position: 'top',
formatter: '{c}'
},
emphasis: {
label: {
scale: 1.5
}
},
type: 'line',
smooth: true,
areaStyle: {}
}
]
};
myChart1.setOption(option1);
}
var option2 = {
legend: {
data: ['RAM', 'SWAP']
},
xAxis: {
type: 'category',
boundaryGap: false,
data: ["$dataTime"]
},
yAxis: {
type: 'value',
min: 0,
max: 100
},
series: [
{
name: 'RAM',
data: [$systemInfo->ramUsage],
type: 'line',
areaStyle: {},
smooth: true,
lineStyle: {
color: 'red'
},
label: {
show: true,
position: 'top',
formatter: '{c}%',
},
emphasis: {
label: {
scale: 1.5
}
}
},
{
name: 'SWAP',
data: [$systemInfo->swapUsage],
type: 'line',
areaStyle: {},
smooth: true,
lineStyle: {
color: 'blue'
},
label: {
show: true,
position: 'bottom',
formatter: '{c}%'
},
emphasis: {
label: {
scale: 1.5
}
},
}
]
};
var option3 = {
tooltip: {
trigger: 'item',
formatter: function(params) {
return params.name + ': ' + params.value + '%';
}
},
legend: {
top: '5%',
left: 'center'
},
series: [
{
name: 'Data',
type: 'pie',
radius: ['40%', '70%'],
avoidLabelOverlap: false,
padAngle: 5,
itemStyle: {
borderRadius: 10
},
label: {
show: false,
position: 'center'
},
labelLine: {
show: false
},
data: [
{ value: $systemInfo->mp_usage, name: 'Used Space' },
{ value: $mp_free, name: 'Free Space' }
]
}
]
};
myChart.setOption(option);
myChart2.setOption(option2);
myChart3.setOption(option3);
JS;
$this->registerJs($script, View::POS_END);
$this->registerJsFile('@web/js/sysinfo-core.js', ['depends' => [JqueryAsset::class, EChartsAsset::class], 'position' => View::POS_END]);
?>