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
@@ -0,0 +1,41 @@
<?php namespace App\SupportedApps\TarTenNinety;
class TarTenNinety extends \App\SupportedApps implements \App\EnhancedApps {
public $config;
//protected $login_first = true; // Uncomment if api requests need to be authed first
//protected $method = 'POST'; // Uncomment if requests to the API should be set by POST
function __construct() {
//$this->jar = new \GuzzleHttp\Cookie\CookieJar; // Uncomment if cookies need to be set
}
public function test()
{
$test = parent::appTest($this->url('data/stats.json'));
echo $test->status;
}
public function livestats()
{
$status = 'inactive';
$res = parent::execute($this->url('data/stats.json'));
$details = json_decode($res->getBody());
$data = [];
if($details) {
$data['aircaft_with_pos'] = number_format($details->aircaft_with_pos);
$data['aircraft_without_pos'] = number_format($details->aircraft_without_pos);
}
return parent::getLiveStats($status, $data);
}
public function url($endpoint)
{
$api_url = parent::normaliseurl($this->config->url).$endpoint;
return $api_url;
}
}
+10
View File
@@ -0,0 +1,10 @@
{
"appid": "44fb3ee60816316d3c253e7454f5e0ab5f46680a",
"name": "Tar1090",
"website": "https://github.com/wiedehopf/tar1090",
"license": "GNU General Public License v2.0 only",
"description": "Provides an improved webinterface for use with ADS-B decoders readsb / dump1090-fa",
"enhanced": true,
"tile_background": "dark",
"icon": "tar1090.png"
}
@@ -0,0 +1,22 @@
<h2>{{ __('app.apps.config') }} ({{ __('app.optional') }}) @include('items.enable')</h2>
<div class="items">
<input type="hidden" data-config="dataonly" class="config-item" name="config[dataonly]" value="1" />
<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">
<label>{{ __('app.apps.username') }}</label>
{!! Form::text('config[username]', null, array('placeholder' => __('app.apps.username'), 'data-config' => 'username', 'class' => 'form-control config-item')) !!}
</div>
<div class="input">
<label>{{ __('app.apps.password') }}</label>
{!! Form::text('config[password]', null, array('placeholder' => __('app.apps.password'), 'data-config' => 'password', 'class' => 'form-control config-item')) !!}
</div>
-->
<div class="input">
<button style="margin-top: 32px;" class="btn test" id="test_config">Test</button>
</div>
</div>
@@ -0,0 +1,10 @@
<ul class="livestats">
<li>
<span class="title">Aircraft<br />with Pos</span>
<strong>{!! $aircaft_with_pos !!}</strong>
</li>
<li>
<span class="title">Aircraft<br />w/o Pos</span>
<strong>{!! $aircraft_without_pos !!}</strong>
</li>
</ul>
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB