Skip to content

Commit 11f6c8c

Browse files
authored
Merge branch 'linuxserver:master' into Introduce-bitShake
2 parents 0861985 + f1ccbd5 commit 11f6c8c

33 files changed

Lines changed: 358 additions & 63 deletions

.github/workflows/linter.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout
18-
uses: actions/checkout@v5
18+
uses: actions/checkout@v6
1919

2020
- name: PHP syntax checker 8.2
2121
uses: prestashop/github-action-php-lint/8.2@master
@@ -25,7 +25,7 @@
2525
# runs-on: ubuntu-latest
2626
# steps:
2727
# - name: Checkout
28-
# uses: actions/checkout@v5
28+
# uses: actions/checkout@v6
2929
#
3030
# - name: PHP Mess Detector
3131
# uses: php-actions/phpmd@v1
@@ -40,7 +40,7 @@
4040
runs-on: ubuntu-latest
4141
steps:
4242
- name: Checkout
43-
uses: actions/checkout@v5
43+
uses: actions/checkout@v6
4444

4545
- name: PHP Code Sniffer
4646
uses: php-actions/phpcs@v1
@@ -59,12 +59,12 @@
5959
# runs-on: ubuntu-latest
6060
# steps:
6161
# - name: Checkout
62-
# uses: actions/checkout@v5
62+
# uses: actions/checkout@v6
6363
# with:
6464
# path: src
6565
#
6666
# - name: Checkout Heimdall repo for dependencies
67-
# uses: actions/checkout@v5
67+
# uses: actions/checkout@v6
6868
# with:
6969
# repository: linuxserver/Heimdall
7070
# path: ./heimdall-src

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616

1717
steps:
1818
- name: Checkout
19-
uses: actions/checkout@v5
19+
uses: actions/checkout@v6
2020

2121
- name: Setup node env
2222
uses: actions/setup-node@v6

.github/workflows/prchecks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
steps:
1919
- name: Checkout
20-
uses: actions/checkout@v5
20+
uses: actions/checkout@v6
2121

2222
- name: Setup node env
2323
uses: actions/setup-node@v6

.github/workflows/svgo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: Checkout repository
18-
uses: actions/checkout@v5
18+
uses: actions/checkout@v6
1919
- name: Optimize SVGs
2020
uses: ericcornelissen/svgo-action@v4
2121
id: svgo

FreshRSS/livestats.blade.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<ul class="livestats">
22
@if ($unread > 0)
33
<li>
4-
<span class="title" style="color:orange;">{!! $unread !!} Unread</span>
4+
<span class="title">Unread</span><strong>{!! $unread !!}</strong>
55
</li>
66
@endif
77
</ul>

N8n/N8n.php

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,57 @@
22

33
namespace App\SupportedApps\N8n;
44

5-
class N8n extends \App\SupportedApps
5+
// use Barryvdh\Debugbar\Facades\Debugbar;
6+
// Debugbar::info($data);
7+
8+
class N8n extends \App\SupportedApps implements \App\EnhancedApps
69
{
10+
public $config;
11+
12+
public function __construct()
13+
{
14+
}
15+
16+
public function test()
17+
{
18+
$attrs = $this->getAttrs();
19+
$test = parent::appTest($this->url("workflows"), $attrs);
20+
echo $test->status;
21+
}
22+
23+
public function livestats()
24+
{
25+
$status = "active";
26+
$data = [];
27+
$attrs = $this->getAttrs();
28+
29+
// Fetch workflows
30+
$workflowsResponse = parent::execute($this->url("workflows"), $attrs);
31+
$workflows = json_decode($workflowsResponse->getBody());
32+
33+
$data["workflows"] = count($workflows->data);
34+
35+
// Fetch active workflows
36+
$activeResponse = parent::execute($this->url("workflows?active=true"), $attrs);
37+
$active = json_decode($activeResponse->getBody());
38+
39+
$data["active"] = count($active->data);
40+
41+
return parent::getLiveStats($status, $data);
42+
}
43+
44+
public function url($endpoint)
45+
{
46+
$api_url = parent::normaliseurl($this->config->url) . "api/v1/" . $endpoint;
47+
return $api_url;
48+
}
49+
private function getAttrs()
50+
{
51+
return [
52+
"headers" => [
53+
"Accept" => "application/json",
54+
"X-N8N-API-KEY" => $this->config->password
55+
],
56+
];
57+
}
758
}

N8n/app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"website": "https://n8n.io",
55
"license": "Apache License 2.0",
66
"description": "n8n is an extendable workflow automation tool. With a fair-code distribution model, n8n will always have visible source code, be available to self-host, and allow you to add your own custom functions, logic and apps. n8n's node-based approach makes it highly versatile, enabling you to connect anything to everything.",
7-
"enhanced": false,
7+
"enhanced": true,
88
"tile_background": "light",
99
"icon": "n8n.svg"
1010
}

N8n/config.blade.php

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<h2>{{ __('app.apps.config') }} ({{ __('app.optional') }}) @include('items.enable')</h2>
2+
<div class="items">
3+
<div class="input">
4+
<label>{{ strtoupper(__('app.url')) }}</label>
5+
{!! Form::text('config[override_url]',
6+
isset($item) ? $item->getconfig()->override_url : null,
7+
['placeholder' => __('app.apps.override'),
8+
'id' => 'override_url',
9+
'class' => 'form-control'
10+
]) !!}
11+
</div>
12+
13+
<div class="input">
14+
<label>{{ __('app.apps.apikey') }}(<a href="https://docs.n8n.io/api/authentication/#create-an-api-key" target="_blank">help?</a>)</label>
15+
{!! Form::input('password', 'config[password]', '',
16+
['placeholder' => __('app.apps.apikey'),
17+
'data-config' => 'password',
18+
'class' => 'form-control config-item'
19+
]) !!}
20+
</div>
21+
22+
<div class="input">
23+
<button style="margin-top: 32px;" class="btn test" id="test_config">Test</button>
24+
</div>
25+
</div>

N8n/livestats.blade.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<ul class="livestats">
2+
<li>
3+
<span class="title">Workflows</span>
4+
<strong>{!! $workflows !!}</strong>
5+
</li>
6+
<li>
7+
<span class="title">Active</span>
8+
<strong>{!! $active !!}</strong>
9+
</li>
10+
</ul>

OpenCCU/OpenCCU.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
namespace App\SupportedApps\OpenCCU;
4+
5+
class OpenCCU extends \App\SupportedApps
6+
{
7+
}

0 commit comments

Comments
 (0)