Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add asustor, vaultwarden, shellinabox, rustdesk #690

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions Asustor/Asustor.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php namespace App\SupportedApps\Asustor;

class Asustor 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;
}
}
10 changes: 10 additions & 0 deletions Asustor/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"appid": "80ae543b72401945334f11915bf93263ce206986",
"name": "Asustor",
"website": "https://www.asustor.com/",
"license": "GNU General Public License v1.0 or later",
"description": "https://www.asustor.com/",
"enhanced": true,
"tile_background": "dark",
"icon": "asustor.png"
}
19 changes: 19 additions & 0 deletions Asustor/config.blade.php
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::input('password', 'config[password]', '', ['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>

10 changes: 10 additions & 0 deletions Asustor/livestats.blade.php
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>
35 changes: 35 additions & 0 deletions Rustdesk/Rustdesk.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php namespace App\SupportedApps\Rustdesk;

class Rustdesk 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;
}
}
10 changes: 10 additions & 0 deletions Rustdesk/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"appid": "407dbd5343e971eb76054f9f81d04791cec937ff",
"name": "Rustdesk",
"website": "https://rustdesk.com/",
"license": "GNU Affero General Public License v3.0 only",
"description": "A remote desktop software, the open source TeamViewer alternative, works out of the box, no configuration required. You have full control of your data, with no concerns about security. You can use our public rendezvous/relay server, or self-hosting, or write your own server.",
"enhanced": true,
"tile_background": "light",
"icon": "rustdesk.png"
}
19 changes: 19 additions & 0 deletions Rustdesk/config.blade.php
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::input('password', 'config[password]', '', ['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>

10 changes: 10 additions & 0 deletions Rustdesk/livestats.blade.php
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>
35 changes: 35 additions & 0 deletions ShellinaBox/ShellinaBox.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php namespace App\SupportedApps\ShellinaBox;

class ShellinaBox 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;
}
}
10 changes: 10 additions & 0 deletions ShellinaBox/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"appid": "e86ecd660f4e9dc4b3b7515318dbd8de6a836ef8",
"name": "Shell in a Box",
"website": "https://github.com/shellinabox/shellinabox",
"license": "GNU General Public License v1.0 or later",
"description": "Shell In A Box implements a web server that can export arbitrary command line tools to a web based terminal emulator. This emulator is accessible to any JavaScript and CSS enabled web browser and does not require any additional browser plugins.",
"enhanced": true,
"tile_background": "light",
"icon": "shellinabox.png"
}
19 changes: 19 additions & 0 deletions ShellinaBox/config.blade.php
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::input('password', 'config[password]', '', ['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>

10 changes: 10 additions & 0 deletions ShellinaBox/livestats.blade.php
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>
35 changes: 35 additions & 0 deletions Vaultwarden/Vaultwarden.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?php namespace App\SupportedApps\Vaultwarden;

class Vaultwarden 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;
}
}
10 changes: 10 additions & 0 deletions Vaultwarden/app.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"appid": "ddf4f264320af1347ef54d424c60fae3b4fcc448",
"name": "Vaultwarden",
"website": "https://github.com/dani-garcia/vaultwarden",
"license": "GNU General Public License v3.0 only",
"description": "Alternative implementation of the Bitwarden server API written in Rust and compatible with upstream Bitwarden clients*, perfect for self-hosted deployment where running the official resource-heavy service might not be ideal.",
"enhanced": true,
"tile_background": "light",
"icon": "vaultwarden.png"
}
19 changes: 19 additions & 0 deletions Vaultwarden/config.blade.php
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::input('password', 'config[password]', '', ['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>

10 changes: 10 additions & 0 deletions Vaultwarden/livestats.blade.php
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>