forked from linuxserver/Heimdall-Apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added files for oVirt Enhanced (linuxserver#517)
* Added files for oVirt Enhanced * add svg Co-authored-by: Daniel Gibbs <[email protected]>
- Loading branch information
1 parent
6cdd809
commit 50482de
Showing
5 changed files
with
75 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"appid": "c8a6ea616b768fefc48e461390de52d11d36cfb4", | ||
"name": "oVirt", | ||
"website": "https://ovirt.org", | ||
"license": "Apache License 2.0", | ||
"description": "oVirt is an open-source distributed virtualization solution, designed to manage your entire enterprise infrastructure. oVirt uses the trusted KVM hypervisor and is built upon several other community projects, including libvirt, Gluster, PatternFly, and Ansible.", | ||
"enhanced": true, | ||
"tile_background": "dark", | ||
"icon": "ovirt.svg" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<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"> | ||
<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> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<ul class="livestats"> | ||
<li> | ||
<span class="title">Queue</span> | ||
<strong>{!! $queue_size !!}</strong> | ||
</li> | ||
<li> | ||
<span class="title">Speed</span> | ||
<strong>{!! $current_speed !!}</strong> | ||
</li> | ||
</ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<?php namespace App\SupportedApps\oVirt; | ||
|
||
class oVirt 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('status')); | ||
echo $test->status; | ||
} | ||
|
||
public function livestats() | ||
{ | ||
$status = 'inactive'; | ||
$res = parent::execute($this->url('status')); | ||
$details = json_decode($res->getBody()); | ||
|
||
$data = []; | ||
return parent::getLiveStats($status, $data); | ||
|
||
} | ||
public function url($endpoint) | ||
{ | ||
$api_url = parent::normaliseurl($this->config->url).$endpoint; | ||
return $api_url; | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.