ajout heimdall

This commit is contained in:
2025-01-01 11:24:01 +01:00
parent f8be42e486
commit c52f60fca9
1477 changed files with 15692 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
<?php namespace App\SupportedApps\Netdata;
class Netdata extends \App\SupportedApps implements \App\EnhancedApps {
private const ENDPOINT = 'api/v1/info';
public $config;
function __construct() {
}
public function test()
{
$test = parent::appTest($this->url(self::ENDPOINT));
echo $test->status;
}
public function livestats()
{
$status = 'inactive';
$res = parent::execute($this->url(self::ENDPOINT));
$res = parent::execute($this->url(self::ENDPOINT));
$details = json_decode($res->getBody());
$data = [
'count_warning' => $details->alarms->warning,
'count_critical' => $details->alarms->critical
];
return parent::getLiveStats($status, $data);
}
public function url($endpoint)
{
$api_url = parent::normaliseurl($this->config->url).$endpoint;
return $api_url;
}
}

View File

@@ -0,0 +1,10 @@
{
"appid": "810d3926feac8c1bd3957fdac48b6c9475b932d0",
"name": "Netdata",
"website": "https://my-netdata.io/",
"license": "GNU General Public License v3.0 only",
"description": "Unparalleled insights, in real-time, of everything happening on your systems and applications, with stunning, interactive web dashboards and powerful performance and health alarms.",
"enhanced": true,
"tile_background": "dark",
"icon": "netdata.png"
}

View File

@@ -0,0 +1,11 @@
<h2>{{ __('app.apps.config') }} ({{ __('app.optional') }}) @include('items.enable')</h2>
<div class="items">
<div class="input">
<label>{{ strtoupper(__('app.url')) }}</label>
{!! Form::text('config[override_url]', null, array('placeholder' => __('app.apps.override'), 'id' => 'override_url', 'class' => 'form-control')) !!}
</div>
<div class="input">
<button style="margin-top: 32px;" class="btn test" id="test_config">Test</button>
</div>
</div>

View File

@@ -0,0 +1,10 @@
<ul class="livestats">
<li>
<span class="title">Warning</span>
<strong>{!! $count_warning !!}</strong>
</li>
<li>
<span class="title">Critical</span>
<strong>{!! $count_critical !!}</strong>
</li>
</ul>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB