From 01283e2066314aaa167a2b0b55952b2ae26e650a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Fri, 19 May 2023 14:05:14 +0200 Subject: Improve remote runner config UX --- .../edit-configuration.service.ts | 8 +++ .../edit-live-configuration.component.html | 74 ++++++++++++---------- .../edit-live-configuration.component.ts | 8 +++ .../edit-vod-transcoding.component.html | 36 +++++------ .../edit-vod-transcoding.component.ts | 8 +++ 5 files changed, 81 insertions(+), 53 deletions(-) (limited to 'client/src/app') diff --git a/client/src/app/+admin/config/edit-custom-config/edit-configuration.service.ts b/client/src/app/+admin/config/edit-custom-config/edit-configuration.service.ts index 6c431ce64..628c2d102 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-configuration.service.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-configuration.service.ts @@ -61,6 +61,14 @@ export class EditConfigurationService { return form.value['transcoding']['enabled'] === true } + isRemoteRunnerVODEnabled (form: FormGroup) { + return form.value['transcoding']['remoteRunners']['enabled'] === true + } + + isRemoteRunnerLiveEnabled (form: FormGroup) { + return form.value['live']['transcoding']['remoteRunners']['enabled'] === true + } + isStudioEnabled (form: FormGroup) { return form.value['videoStudio']['enabled'] === true } diff --git a/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.html b/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.html index 34ce8efa6..e9919741f 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.html @@ -110,10 +110,45 @@ -
+
+ + +
+ + +
+ + +
+ + +
+
+
+
+
+ +
+ + + Even if it's above your maximum enabled resolution + + +
+
+
+
+ +
@@ -124,38 +159,7 @@
-
- - -
- - -
- - -
-
-
-
-
- -
- - - Even if it's above your maximum enabled resolution - - -
-
-
- -
+
@@ -177,7 +181,7 @@
{{ formErrors.live.transcoding.threads }}
-
+
new live transcoding profiles can be added by PeerTube plugins diff --git a/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts index d4892a571..50b882cb8 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-live-configuration.component.ts @@ -71,6 +71,10 @@ export class EditLiveConfigurationComponent implements OnInit, OnChanges { return this.editConfigurationService.isLiveEnabled(this.form) } + isRemoteRunnerLiveEnabled () { + return this.editConfigurationService.isRemoteRunnerLiveEnabled(this.form) + } + getDisabledLiveClass () { return { 'disabled-checkbox-extra': !this.isLiveEnabled() } } @@ -79,6 +83,10 @@ export class EditLiveConfigurationComponent implements OnInit, OnChanges { return { 'disabled-checkbox-extra': !this.isLiveEnabled() || !this.isLiveTranscodingEnabled() } } + getDisabledLiveLocalTranscodingClass () { + return { 'disabled-checkbox-extra': !this.isLiveEnabled() || !this.isLiveTranscodingEnabled() || this.isRemoteRunnerLiveEnabled() } + } + isLiveTranscodingEnabled () { return this.editConfigurationService.isLiveTranscodingEnabled(this.form) } diff --git a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html index b17c51532..d3fc2e481 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html +++ b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html @@ -37,20 +37,6 @@ -
- - - - Use remote runners to process VOD transcoding. - Remote runners has to register on your instance first. - - - -
-
@@ -155,7 +141,21 @@
-
+
+ + + + Use remote runners to process VOD transcoding. + Remote runners has to register on your instance first. + + + +
+ +
@@ -178,7 +178,7 @@
{{ formErrors.transcoding.threads }}
-
+
allows to transcode multiple files in parallel. ⚠️ Requires a PeerTube restart @@ -190,7 +190,7 @@
{{ formErrors.transcoding.concurrency }}
-
+
new transcoding profiles can be added by PeerTube plugins @@ -234,7 +234,7 @@
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts index e960533f9..0a1ebe8e2 100644 --- a/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts +++ b/client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts @@ -58,6 +58,10 @@ export class EditVODTranscodingComponent implements OnInit, OnChanges { return 'transcoding.resolutions.' + resolution } + isRemoteRunnerVODEnabled () { + return this.editConfigurationService.isRemoteRunnerVODEnabled(this.form) + } + isTranscodingEnabled () { return this.editConfigurationService.isTranscodingEnabled(this.form) } @@ -70,6 +74,10 @@ export class EditVODTranscodingComponent implements OnInit, OnChanges { return { 'disabled-checkbox-extra': !this.isTranscodingEnabled() } } + getLocalTranscodingDisabledClass () { + return { 'disabled-checkbox-extra': !this.isTranscodingEnabled() || this.isRemoteRunnerVODEnabled() } + } + getStudioDisabledClass () { return { 'disabled-checkbox-extra': !this.isStudioEnabled() } } -- cgit v1.2.3