From 4e55c132a007aa5466e1ac95a998df3ca88f3fb7 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 10 Feb 2021 11:42:10 +0100 Subject: Add missing live config validators --- .../edit-custom-config/edit-custom-config.component.ts | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'client/src/app/+admin/config/edit-custom-config/edit-custom-config.component.ts') 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 a5eddf6c2..bbdf1bfbe 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 @@ -1,4 +1,6 @@ +import { forkJoin } from 'rxjs' +import { SelectOptionsItem } from 'src/types/select-options-item.model' import { Component, OnInit } from '@angular/core' import { ActivatedRoute, Router } from '@angular/router' import { ConfigService } from '@app/+admin/config/shared/config.service' @@ -12,6 +14,9 @@ import { INDEX_URL_VALIDATOR, INSTANCE_NAME_VALIDATOR, INSTANCE_SHORT_DESCRIPTION_VALIDATOR, + MAX_INSTANCE_LIVES_VALIDATOR, + MAX_LIVE_DURATION_VALIDATOR, + MAX_USER_LIVES_VALIDATOR, SEARCH_INDEX_URL_VALIDATOR, SERVICES_TWITTER_USERNAME_VALIDATOR, SIGNUP_LIMIT_VALIDATOR, @@ -20,8 +25,6 @@ import { import { USER_VIDEO_QUOTA_DAILY_VALIDATOR, USER_VIDEO_QUOTA_VALIDATOR } from '@app/shared/form-validators/user-validators' import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' import { CustomConfig, ServerConfig } from '@shared/models' -import { forkJoin } from 'rxjs' -import { SelectOptionsItem } from 'src/types/select-options-item.model' import { EditConfigurationService } from './edit-configuration.service' @Component({ @@ -156,9 +159,9 @@ export class EditCustomConfigComponent extends FormReactive implements OnInit { live: { enabled: null, - maxDuration: null, - maxInstanceLives: null, - maxUserLives: null, + maxDuration: MAX_LIVE_DURATION_VALIDATOR, + maxInstanceLives: MAX_INSTANCE_LIVES_VALIDATOR, + maxUserLives: MAX_USER_LIVES_VALIDATOR, allowReplay: null, transcoding: { -- cgit v1.2.3