Compare commits
14 Commits
v0.38.10
...
ed2f797ac2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ed2f797ac2 | ||
|
|
91f91c20fa | ||
| 2f7d276781 | |||
| e22306225b | |||
| 6a860a4d75 | |||
| 5ff89b905f | |||
| 49b017de3d | |||
| 937b673be6 | |||
| 3e04d0a82d | |||
| 706e8e9892 | |||
| 154292530a | |||
| 82c3f7bb78 | |||
| e7f8f278ee | |||
|
|
c4b3fb215c |
1
.env
1
.env
@@ -27,6 +27,7 @@ APP_SECRET=
|
|||||||
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4"
|
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=8.0.32&charset=utf8mb4"
|
||||||
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
|
# DATABASE_URL="mysql://app:!ChangeMe!@127.0.0.1:3306/app?serverVersion=10.11.2-MariaDB&charset=utf8mb4"
|
||||||
# DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8"
|
# DATABASE_URL="postgresql://app:!ChangeMe!@127.0.0.1:5432/app?serverVersion=16&charset=utf8"
|
||||||
|
DATABASE_URL=
|
||||||
|
|
||||||
###< doctrine/doctrine-bundle ###
|
###< doctrine/doctrine-bundle ###
|
||||||
MERCURE_JWT_SECRET="!ChangeThisMercureHubJWTSecretKey!"
|
MERCURE_JWT_SECRET="!ChangeThisMercureHubJWTSecretKey!"
|
||||||
|
|||||||
@@ -1,24 +1,29 @@
|
|||||||
on:
|
name: CI
|
||||||
push:
|
|
||||||
branches:
|
on: [push]
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
types: [opened, synchronize, reopened]
|
|
||||||
|
|
||||||
name: SonarQube Scan
|
|
||||||
jobs:
|
jobs:
|
||||||
sonarqube:
|
build-test:
|
||||||
name: SonarQube Trigger
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checking out
|
- name: Checkout repo
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v5
|
||||||
|
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
php-version: '8.4' # Specify your required PHP version
|
||||||
- name: SonarQube Scan
|
|
||||||
uses: https://code.caldwell.digital/tools/sonarqube-action@v0.0.3
|
- name: Install phing
|
||||||
with:
|
run: composer global require phing/phing
|
||||||
host: "https://qube.caldwell.digital"
|
|
||||||
login: ${{ secrets.SONARQUBE_TOKEN }}
|
- name: Run composer
|
||||||
projectName: "torsearch"
|
run: composer install --no-dev --no-scripts -o
|
||||||
projectBaseDir: "./src"
|
|
||||||
|
- name: Build tailwind
|
||||||
|
run: php bin/console tailwind:build
|
||||||
|
|
||||||
|
- name: Compile assets
|
||||||
|
run: php bin/console asset-map:compile
|
||||||
|
|
||||||
2
assets/bootstrap.js
vendored
2
assets/bootstrap.js
vendored
@@ -5,6 +5,7 @@ import DownloadOptionTr from './components/download-option-tr.js';
|
|||||||
import DownloadListRow from './components/download-list-row.js';
|
import DownloadListRow from './components/download-list-row.js';
|
||||||
import MonitorListRow from './components/monitor-list-row.js';
|
import MonitorListRow from './components/monitor-list-row.js';
|
||||||
import MovieContainer from "./components/movie-container.js";
|
import MovieContainer from "./components/movie-container.js";
|
||||||
|
import StatusCheckerSpan from "./components/status-checker-span.js";
|
||||||
|
|
||||||
import { startStimulusApp } from '@symfony/stimulus-bundle';
|
import { startStimulusApp } from '@symfony/stimulus-bundle';
|
||||||
import Popover from '@stimulus-components/popover';
|
import Popover from '@stimulus-components/popover';
|
||||||
@@ -24,3 +25,4 @@ customElements.define('movie-container', MovieContainer);
|
|||||||
customElements.define('dl-tr', DownloadOptionTr, {extends: 'tr'});
|
customElements.define('dl-tr', DownloadOptionTr, {extends: 'tr'});
|
||||||
customElements.define('download-list-row', DownloadListRow, {extends: 'tr'});
|
customElements.define('download-list-row', DownloadListRow, {extends: 'tr'});
|
||||||
customElements.define('monitor-list-row', MonitorListRow, {extends: 'tr'});
|
customElements.define('monitor-list-row', MonitorListRow, {extends: 'tr'});
|
||||||
|
customElements.define('status-checker-span', StatusCheckerSpan, {extends: 'span'});
|
||||||
|
|||||||
40
assets/components/status-checker-span.js
Normal file
40
assets/components/status-checker-span.js
Normal file
@@ -0,0 +1,40 @@
|
|||||||
|
export default class PreviewContentDialog extends HTMLSpanElement {
|
||||||
|
#url;
|
||||||
|
#service;
|
||||||
|
#status;
|
||||||
|
|
||||||
|
#statusTexts = {
|
||||||
|
200: 'up',
|
||||||
|
204: 'up'
|
||||||
|
}
|
||||||
|
|
||||||
|
#statusColors = {
|
||||||
|
200: 'bg-green-500',
|
||||||
|
204: 'bg-green-500'
|
||||||
|
}
|
||||||
|
|
||||||
|
constructor() {
|
||||||
|
super();
|
||||||
|
this.#url = this.getAttribute('url');
|
||||||
|
this.#service = this.getAttribute('service');
|
||||||
|
|
||||||
|
(async () => await this.checkStatus())();
|
||||||
|
setInterval(async () => await this.checkStatus(), 1000 * 60 * 10);
|
||||||
|
}
|
||||||
|
|
||||||
|
async checkStatus() {
|
||||||
|
const response = await fetch(this.#url);
|
||||||
|
this.#status = response.status;
|
||||||
|
this.setAttribute('title', this.getTitle());
|
||||||
|
this.classList.remove('bg-red-500', 'bg-green-500');
|
||||||
|
this.classList.add(this.getColor());
|
||||||
|
}
|
||||||
|
|
||||||
|
getTitle() {
|
||||||
|
return `${this.#service} is ${this.#statusTexts[this.#status] ?? 'down'}`
|
||||||
|
}
|
||||||
|
|
||||||
|
getColor() {
|
||||||
|
return this.#statusColors[this.#status] ?? 'bg-red-500';
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -11,7 +11,7 @@ return [
|
|||||||
OneToMany\RichBundle\RichBundle::class => ['all' => true],
|
OneToMany\RichBundle\RichBundle::class => ['all' => true],
|
||||||
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
|
Symfony\Bundle\SecurityBundle\SecurityBundle::class => ['all' => true],
|
||||||
Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true],
|
Symfony\UX\StimulusBundle\StimulusBundle::class => ['all' => true],
|
||||||
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['all' => true],
|
Doctrine\Bundle\DoctrineBundle\DoctrineBundle::class => ['prod' => true, 'dev' => true, 'test' => true],
|
||||||
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
|
Doctrine\Bundle\MigrationsBundle\DoctrineMigrationsBundle::class => ['all' => true],
|
||||||
Symfony\UX\LiveComponent\LiveComponentBundle::class => ['all' => true],
|
Symfony\UX\LiveComponent\LiveComponentBundle::class => ['all' => true],
|
||||||
Symfony\Bundle\MercureBundle\MercureBundle::class => ['all' => true],
|
Symfony\Bundle\MercureBundle\MercureBundle::class => ['all' => true],
|
||||||
|
|||||||
@@ -18,9 +18,13 @@ module.exports = {
|
|||||||
"bg-green-400",
|
"bg-green-400",
|
||||||
"bg-purple-400",
|
"bg-purple-400",
|
||||||
"bg-orange-400",
|
"bg-orange-400",
|
||||||
|
"bg-red-500",
|
||||||
|
"bg-green-500",
|
||||||
"bg-blue-600",
|
"bg-blue-600",
|
||||||
"bg-rose-600",
|
"bg-rose-600",
|
||||||
"bg-black/20",
|
"bg-black/20",
|
||||||
|
"text-red-500",
|
||||||
|
"text-green-500",
|
||||||
"alert-success",
|
"alert-success",
|
||||||
"alert-warning",
|
"alert-warning",
|
||||||
"font-bold",
|
"font-bold",
|
||||||
|
|||||||
@@ -6,6 +6,20 @@
|
|||||||
<div class="md:flex md:items-center md:gap-12">
|
<div class="md:flex md:items-center md:gap-12">
|
||||||
<nav aria-label="Global" class="md:block">
|
<nav aria-label="Global" class="md:block">
|
||||||
<ul class="ml-4 flex items-end md:items-center md:gap-6 text-sm">
|
<ul class="ml-4 flex items-end md:items-center md:gap-6 text-sm">
|
||||||
|
<li>
|
||||||
|
<div class="flex flex-row justify-center items-start gap-2 p-2 w-10 mt-1 h-6 rounded-lg border border-orange-500 text-orange-500">
|
||||||
|
<status-checker-span
|
||||||
|
class="h-2 w-2 rounded-full text-green-600 bg-green-600"
|
||||||
|
url="https://torrentio.strem.fun"
|
||||||
|
service="Torrentio">
|
||||||
|
</status-checker-span>
|
||||||
|
<status-checker-span
|
||||||
|
class="h-2 w-2 rounded-full text-green-600 bg-green-600"
|
||||||
|
url="https://api.themoviedb.org/3"
|
||||||
|
service="TMDB">
|
||||||
|
</status-checker-span>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<a href="{{ path('app.monitor.upcoming-episodes') }}" data-turbo="false" title="View upcoming episodes of the shows you're subscribed to.">
|
<a href="{{ path('app.monitor.upcoming-episodes') }}" data-turbo="false" title="View upcoming episodes of the shows you're subscribed to.">
|
||||||
<twig:ux:icon name="solar:calendar-linear" width="25px" class="text-orange-500" />
|
<twig:ux:icon name="solar:calendar-linear" width="25px" class="text-orange-500" />
|
||||||
|
|||||||
Reference in New Issue
Block a user