Fix styling
This commit is contained in:
parent
1d0a1ab16a
commit
dc4916dc19
4 changed files with 13 additions and 3 deletions
|
|
@ -37,9 +37,9 @@ public function handle(): void
|
||||||
try {
|
try {
|
||||||
$version = get_latest_sentinel_version();
|
$version = get_latest_sentinel_version();
|
||||||
if (isDev()) {
|
if (isDev()) {
|
||||||
$version = "0.0.5";
|
$version = '0.0.5';
|
||||||
}
|
}
|
||||||
if (!$version) {
|
if (! $version) {
|
||||||
ray('Failed to get latest Sentinel version');
|
ray('Failed to get latest Sentinel version');
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
|
@ -55,7 +55,7 @@ public function handle(): void
|
||||||
}
|
}
|
||||||
ray('Sentinel image is up to date');
|
ray('Sentinel image is up to date');
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
send_internal_notification('PullSentinelImageJob failed with: ' . $e->getMessage());
|
send_internal_notification('PullSentinelImageJob failed with: '.$e->getMessage());
|
||||||
ray($e->getMessage());
|
ray($e->getMessage());
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,18 +8,23 @@
|
||||||
class Server extends Component
|
class Server extends Component
|
||||||
{
|
{
|
||||||
public ModelsServer $server;
|
public ModelsServer $server;
|
||||||
|
|
||||||
public $chartId = 'server';
|
public $chartId = 'server';
|
||||||
|
|
||||||
public $data;
|
public $data;
|
||||||
|
|
||||||
public $categories;
|
public $categories;
|
||||||
|
|
||||||
public function render()
|
public function render()
|
||||||
{
|
{
|
||||||
return view('livewire.charts.server');
|
return view('livewire.charts.server');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function mount()
|
public function mount()
|
||||||
{
|
{
|
||||||
$this->loadData();
|
$this->loadData();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function loadData()
|
public function loadData()
|
||||||
{
|
{
|
||||||
$metrics = $this->server->getMetrics();
|
$metrics = $this->server->getMetrics();
|
||||||
|
|
|
||||||
|
|
@ -487,6 +487,7 @@ public function getMetrics()
|
||||||
$parsedCollection = collect($cpu)->flatMap(function ($item) {
|
$parsedCollection = collect($cpu)->flatMap(function ($item) {
|
||||||
return collect(explode("\n", trim($item)))->map(function ($line) {
|
return collect(explode("\n", trim($item)))->map(function ($line) {
|
||||||
[$time, $value] = explode(',', trim($line));
|
[$time, $value] = explode(',', trim($line));
|
||||||
|
|
||||||
return [(int) $time, (float) $value];
|
return [(int) $time, (float) $value];
|
||||||
});
|
});
|
||||||
})->toArray();
|
})->toArray();
|
||||||
|
|
|
||||||
|
|
@ -9,9 +9,13 @@
|
||||||
class ApexCharts extends Component
|
class ApexCharts extends Component
|
||||||
{
|
{
|
||||||
public string $chartId;
|
public string $chartId;
|
||||||
|
|
||||||
public $seriesData;
|
public $seriesData;
|
||||||
|
|
||||||
public $categories;
|
public $categories;
|
||||||
|
|
||||||
public $seriesName;
|
public $seriesName;
|
||||||
|
|
||||||
public function __construct($chartId, $seriesData, $categories, $seriesName = '')
|
public function __construct($chartId, $seriesData, $categories, $seriesName = '')
|
||||||
{
|
{
|
||||||
$this->chartId = $chartId;
|
$this->chartId = $chartId;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue