aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+admin
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-05-04 15:29:34 +0200
committerChocobozzz <chocobozzz@cpy.re>2023-05-09 08:57:34 +0200
commit5e47f6ab984a7d00782e4c7030afffa1ba480add (patch)
tree1ce586b591a8d71acbc301eba29b9a5e6490439e /client/src/app/+admin
parent6a4905602636afd6650c9e6f4d0fcc2105d91100 (diff)
downloadPeerTube-5e47f6ab984a7d00782e4c7030afffa1ba480add.tar.gz
PeerTube-5e47f6ab984a7d00782e4c7030afffa1ba480add.tar.zst
PeerTube-5e47f6ab984a7d00782e4c7030afffa1ba480add.zip
Support studio transcoding in peertube runner
Diffstat (limited to 'client/src/app/+admin')
-rw-r--r--client/src/app/+admin/admin.component.ts4
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-configuration.service.ts4
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts5
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.html14
-rw-r--r--client/src/app/+admin/config/edit-custom-config/edit-vod-transcoding.component.ts8
5 files changed, 33 insertions, 2 deletions
diff --git a/client/src/app/+admin/admin.component.ts b/client/src/app/+admin/admin.component.ts
index d4d912c40..49092ea2a 100644
--- a/client/src/app/+admin/admin.component.ts
+++ b/client/src/app/+admin/admin.component.ts
@@ -272,6 +272,8 @@ export class AdminComponent implements OnInit {
272 private isRemoteRunnersEnabled () { 272 private isRemoteRunnersEnabled () {
273 const config = this.server.getHTMLConfig() 273 const config = this.server.getHTMLConfig()
274 274
275 return config.transcoding.remoteRunners.enabled || config.live.transcoding.remoteRunners.enabled 275 return config.transcoding.remoteRunners.enabled ||
276 config.live.transcoding.remoteRunners.enabled ||
277 config.videoStudio.remoteRunners.enabled
276 } 278 }
277} 279}
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 96f5b830e..6c431ce64 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,10 @@ export class EditConfigurationService {
61 return form.value['transcoding']['enabled'] === true 61 return form.value['transcoding']['enabled'] === true
62 } 62 }
63 63
64 isStudioEnabled (form: FormGroup) {
65 return form.value['videoStudio']['enabled'] === true
66 }
67
64 isLiveEnabled (form: FormGroup) { 68 isLiveEnabled (form: FormGroup) {
65 return form.value['live']['enabled'] === true 69 return form.value['live']['enabled'] === true
66 } 70 }
diff --git a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
index 335aedb67..30e4aa5d5 100644
--- a/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
+++ b/client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts
@@ -218,7 +218,10 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit {
218 } 218 }
219 }, 219 },
220 videoStudio: { 220 videoStudio: {
221 enabled: null 221 enabled: null,
222 remoteRunners: {
223 enabled: null
224 }
222 }, 225 },
223 autoBlacklist: { 226 autoBlacklist: {
224 videos: { 227 videos: {
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 c11f560dd..b17c51532 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
@@ -230,6 +230,20 @@
230 </ng-container> 230 </ng-container>
231 </my-peertube-checkbox> 231 </my-peertube-checkbox>
232 </div> 232 </div>
233
234 <div class="form-group" formGroupName="remoteRunners" [ngClass]="getStudioDisabledClass()">
235 <my-peertube-checkbox
236 inputName="videoStudioRemoteRunnersEnabled" formControlName="enabled"
237 i18n-labelText labelText="Enable remote runners"
238 >
239 <ng-container ngProjectAs="description">
240 <span i18n>
241 Use <a routerLink="/admin/system/runners/runners-list">remote runners</a> to process studio transcoding tasks.
242 Remote runners has to register on your instance first.
243 </span>
244 </ng-container>
245 </my-peertube-checkbox>
246 </div>
233 </ng-container> 247 </ng-container>
234 </div> 248 </div>
235 </div> 249 </div>
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 184dfd921..e960533f9 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
@@ -62,10 +62,18 @@ export class EditVODTranscodingComponent implements OnInit, OnChanges {
62 return this.editConfigurationService.isTranscodingEnabled(this.form) 62 return this.editConfigurationService.isTranscodingEnabled(this.form)
63 } 63 }
64 64
65 isStudioEnabled () {
66 return this.editConfigurationService.isStudioEnabled(this.form)
67 }
68
65 getTranscodingDisabledClass () { 69 getTranscodingDisabledClass () {
66 return { 'disabled-checkbox-extra': !this.isTranscodingEnabled() } 70 return { 'disabled-checkbox-extra': !this.isTranscodingEnabled() }
67 } 71 }
68 72
73 getStudioDisabledClass () {
74 return { 'disabled-checkbox-extra': !this.isStudioEnabled() }
75 }
76
69 getTotalTranscodingThreads () { 77 getTotalTranscodingThreads () {
70 return this.editConfigurationService.getTotalTranscodingThreads(this.form) 78 return this.editConfigurationService.getTotalTranscodingThreads(this.form)
71 } 79 }