|
|
@ -53,7 +53,7 @@ export class EntityDebugSettingsPanelComponent extends PageComponent implements |
|
|
|
|
|
|
|
|
@Input({ transform: booleanAttribute }) failuresEnabled = false; |
|
|
@Input({ transform: booleanAttribute }) failuresEnabled = false; |
|
|
@Input({ transform: booleanAttribute }) allEnabled = false; |
|
|
@Input({ transform: booleanAttribute }) allEnabled = false; |
|
|
@Input({ transform: booleanAttribute }) isAlarmRule = false; |
|
|
@Input() entityLabel = ''; |
|
|
@Input() entityType: EntityType; |
|
|
@Input() entityType: EntityType; |
|
|
@Input() allEnabledUntil = 0; |
|
|
@Input() allEnabledUntil = 0; |
|
|
@Input() maxDebugModeDuration = getCurrentAuthState(this.store).maxDebugModeDurationMinutes * MINUTE; |
|
|
@Input() maxDebugModeDuration = getCurrentAuthState(this.store).maxDebugModeDurationMinutes * MINUTE; |
|
|
@ -65,7 +65,6 @@ export class EntityDebugSettingsPanelComponent extends PageComponent implements |
|
|
maxMessagesCount: string; |
|
|
maxMessagesCount: string; |
|
|
maxTimeFrameDuration: number; |
|
|
maxTimeFrameDuration: number; |
|
|
initialAllEnabled: boolean; |
|
|
initialAllEnabled: boolean; |
|
|
entityLabel: string; |
|
|
|
|
|
|
|
|
|
|
|
isDebugAllActive$ = this.debugAllControl.valueChanges.pipe( |
|
|
isDebugAllActive$ = this.debugAllControl.valueChanges.pipe( |
|
|
startWith(this.debugAllControl.value), |
|
|
startWith(this.debugAllControl.value), |
|
|
@ -110,9 +109,7 @@ export class EntityDebugSettingsPanelComponent extends PageComponent implements |
|
|
this.onFailuresControl.patchValue(this.failuresEnabled); |
|
|
this.onFailuresControl.patchValue(this.failuresEnabled); |
|
|
this.debugAllControl.patchValue(this.allEnabled); |
|
|
this.debugAllControl.patchValue(this.allEnabled); |
|
|
this.initialAllEnabled = this.allEnabled || this.allEnabledUntil > new Date().getTime(); |
|
|
this.initialAllEnabled = this.allEnabled || this.allEnabledUntil > new Date().getTime(); |
|
|
if (this.isAlarmRule) { |
|
|
if (!this.entityLabel) { |
|
|
this.entityLabel = 'alarm-rule.alarm-rule'; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.entityLabel = entityTypeTranslations.has(this.entityType) ? entityTypeTranslations.get(this.entityType).type : 'debug-settings.entity'; |
|
|
this.entityLabel = entityTypeTranslations.has(this.entityType) ? entityTypeTranslations.get(this.entityType).type : 'debug-settings.entity'; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|