16 changed files with 196 additions and 187 deletions
@ -1,46 +0,0 @@ |
|||
<!-- |
|||
|
|||
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. |
|||
|
|||
--> |
|||
<button mat-stroked-button |
|||
*ngIf="!minifyMode else minifiedButton" |
|||
class="tb-rounded-btn flex-1 w-36" |
|||
color="primary" |
|||
#matButton |
|||
[class.active]="((isDebugAllActive$ | async) || debugFailures) && !disabled" |
|||
[disabled]="disabled" |
|||
(click)="openDebugStrategyPanel($event, matButton)"> |
|||
<mat-icon [color]="disabled ? 'inherit' : 'primary'">bug_report</mat-icon> |
|||
<span *ngIf="!debugFailures && !(isDebugAllActive$ | async)" translate>common.disabled</span> |
|||
<span *ngIf="(isDebugAllActive$ | async) && debugFailures" translate>debug-config.all</span> |
|||
<span *ngIf="(isDebugAllActive$ | async) && !debugFailures"> |
|||
{{ !debugAll ? (debugAllUntil | durationLeft) : ('debug-config.min' | translate: { number: maxDebugModeDurationMinutes }) }} |
|||
</span> |
|||
<span *ngIf="!(isDebugAllActive$ | async) && debugFailures" translate>debug-config.failures</span> |
|||
</button> |
|||
<ng-template #minifiedButton> |
|||
<button mat-icon-button |
|||
class="mini-debug-btn" |
|||
[disabled]="disabled" |
|||
#matButton |
|||
[matTooltip]="(isDebugAllActive$ | async) ? (debugAllUntil | durationLeft) : null" |
|||
matTooltipPosition="above" |
|||
(click)="openDebugStrategyPanel($event, matButton)"> |
|||
<mat-icon class="material-icons" [color]="((isDebugAllActive$ | async) || debugFailures) && !disabled ? 'primary' : 'inherit'"> |
|||
bug_report |
|||
</mat-icon> |
|||
</button> |
|||
</ng-template> |
|||
@ -1,20 +0,0 @@ |
|||
/** |
|||
* 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. |
|||
*/ |
|||
:host { |
|||
.mini-debug-btn { |
|||
color: rgba(0, 0, 0, 0.6); |
|||
} |
|||
} |
|||
@ -0,0 +1,39 @@ |
|||
<!-- |
|||
|
|||
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. |
|||
|
|||
--> |
|||
<button mat-stroked-button |
|||
class="tb-rounded-btn flex-1 w-36" |
|||
color="primary" |
|||
#matButton |
|||
[class.active]="((isDebugAllActive$ | async) || failuresEnabled) && !disabled" |
|||
[disabled]="disabled" |
|||
(click)="openDebugStrategyPanel($event, matButton)"> |
|||
<mat-icon [color]="debugSettingsFormGroup.disabled ? 'inherit' : 'primary'">bug_report</mat-icon> |
|||
@if (failuresEnabled) { |
|||
@if (isDebugAllActive$ | async) { |
|||
{{ 'debug-config.all' | translate }} |
|||
} @else { |
|||
{{ 'debug-config.failures' | translate }} |
|||
} |
|||
} @else { |
|||
@if (isDebugAllActive$ | async) { |
|||
{{ !allEnabled ? (allEnabledUntil | durationLeft) : ('debug-config.min' | translate: { number: maxDebugModeDurationMinutes }) }} |
|||
} @else { |
|||
{{ 'common.disabled' | translate }} |
|||
} |
|||
} |
|||
</button> |
|||
Loading…
Reference in new issue