2024-11-12 17:13:58 +02:00
|
|
|
<!--
|
|
|
|
|
|
|
|
|
|
Copyright © 2016-2024 The Thingsboard Authors
|
|
|
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
|
limitations under the License.
|
|
|
|
|
|
|
|
|
|
-->
|
|
|
|
|
<div class="flex flex-col gap-3 p-2 max-w-sm">
|
|
|
|
|
<div class="tb-form-panel-title" translate>debug-config.label</div>
|
|
|
|
|
<div class="hint-container">
|
|
|
|
|
<div class="tb-form-hint tb-primary-fill tb-flex center">
|
|
|
|
|
<span *ngIf="ruleChainDebugPerTenantLimitsConfiguration else noLimitHint">
|
|
|
|
|
{{ 'debug-config.hint.main-limited' | translate: { msg: maxMessagesCount, sec: maxTimeFrameSec } }}
|
|
|
|
|
</span>
|
|
|
|
|
<ng-template #noLimitHint>{{ 'debug-config.hint.main' | translate }}</ng-template>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flex flex-col gap-3">
|
|
|
|
|
<mat-slide-toggle class="mat-slide" [formControl]="onFailuresControl">
|
2024-11-13 14:50:23 +02:00
|
|
|
<div tb-hint-tooltip-icon="{{ 'debug-config.hint.on-failure' | translate }}">
|
2024-11-12 17:13:58 +02:00
|
|
|
{{ 'debug-config.on-failure' | translate }}
|
2024-11-13 14:50:23 +02:00
|
|
|
</div>
|
2024-11-12 17:13:58 +02:00
|
|
|
</mat-slide-toggle>
|
|
|
|
|
<div class="flex justify-between align-center">
|
|
|
|
|
<mat-slide-toggle class="mat-slide" [formControl]="debugAllControl">
|
2024-11-13 14:50:23 +02:00
|
|
|
<div tb-hint-tooltip-icon="{{ 'debug-config.hint.all-messages' | translate }}">
|
|
|
|
|
{{ 'debug-config.all-messages' | translate: { time: (isDebugAllActive$ | async) ? (debugAllUntil | durationLeft) : ('debug-config.min' | translate: { number: maxRuleNodeDebugDurationMinutes }) } }}
|
|
|
|
|
</div>
|
2024-11-12 17:13:58 +02:00
|
|
|
</mat-slide-toggle>
|
2024-11-13 14:50:23 +02:00
|
|
|
<button mat-icon-button *ngIf="(isDebugAllActive$ | async)"
|
|
|
|
|
class="tb-mat-20"
|
2024-11-12 17:13:58 +02:00
|
|
|
matTooltip="{{ 'action.reset' | translate }}"
|
|
|
|
|
matTooltipPosition="above"
|
|
|
|
|
color="primary"
|
|
|
|
|
(click)="onReset()">
|
|
|
|
|
<mat-icon class="material-icons">refresh</mat-icon>
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="flex justify-end">
|
|
|
|
|
<button mat-button
|
|
|
|
|
color="primary"
|
|
|
|
|
type="button"
|
|
|
|
|
(click)="onCancel()">
|
|
|
|
|
{{ 'action.cancel' | translate }}
|
|
|
|
|
</button>
|
|
|
|
|
<button mat-raised-button
|
|
|
|
|
color="primary"
|
|
|
|
|
type="button"
|
|
|
|
|
(click)="onApply()">
|
|
|
|
|
{{ 'action.apply' | translate }}
|
|
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|