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,48 @@
<?php namespace App\SupportedApps\Artifactory;
class Artifactory 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()
{
$attrs = [
'headers' => ['X-JFrog-Art-Api' => $this->config->apiKey]
];
echo $this->config->apiKey;
$test = parent::appTest($this->url('api/storageinfo'), $attrs);
echo $test->status;
}
public function livestats()
{
$status = 'inactive';
$attrs = [
'headers' => ['X-JFrog-Art-Api' => $this->config->apiKey]
];
$res = parent::execute($this->url('api/storageinfo'), $attrs);
$details = json_decode($res->getBody());
$data = [];
if($details) {
$data['artifacts_size'] = $details->binariesSummary->artifactsSize;
$data['artifacts_count'] = $details->binariesSummary->artifactsCount;
$status = 'active';
}
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": "4950589b19623304e3adb649d9eee6a3bf70c35b",
"name": "Artifactory",
"website": "https://jfrog.com/open-source/",
"license": "MIT License",
"description": "Universal Repository Manager, OSS version",
"enhanced": true,
"tile_background": "light",
"icon": "artifactory.png"
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@@ -0,0 +1,14 @@
<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]', (isset($item) ? $item->getconfig()->override_url : null), array('placeholder' => __('app.apps.override'), 'id' => 'override_url', 'class' => 'form-control')) !!}
</div>
<div class="input">
<label>Api Key</label>
{!! Form::input('password', 'config[apiKey]', (isset($item) ? $item->getconfig()->apiKey : null), array('placeholder' => "Api Key", 'data-config' => 'apiKey', 'class' => 'form-control config-item')) !!}
</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">Artifacts<br/>Size</span>
<strong>{!! $artifacts_size !!}</strong>
</li>
<li>
<span class="title">Artifacts<br/>Count</span>
<strong>{!! $artifacts_count !!}</strong>
</li>
</ul>