Commit 3ebe0e98b2767c092b9246671f5fb8786bdf29e5

Authored by Igor Kulikov
Committed by GitHub
2 parents 6f2f9c54 2ca3ce47

Merge pull request #3804 from vvlladd28/improvement/mac/profile

UI: Fixed show in Safari browser profile; Fixed show ui-rule-node
... ... @@ -17,28 +17,28 @@
17 17 -->
18 18 <div fxFlex fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px" [formGroup]="filterPredicateValueFormGroup">
19 19 <div fxFlex fxLayout="column" [fxShow]="!dynamicMode">
20   - <div fxFlex fxLayout="column" [ngSwitch]="valueType">
  20 + <div fxLayout="column" [ngSwitch]="valueType">
21 21 <ng-template [ngSwitchCase]="valueTypeEnum.STRING">
22   - <mat-form-field floatLabel="always" hideRequiredMarker fxFlex class="mat-block">
  22 + <mat-form-field floatLabel="always" hideRequiredMarker class="mat-block">
23 23 <mat-label></mat-label>
24 24 <input matInput formControlName="defaultValue" placeholder="{{'filter.value' | translate}}">
25 25 </mat-form-field>
26 26 </ng-template>
27 27 <ng-template [ngSwitchCase]="valueTypeEnum.NUMERIC">
28   - <mat-form-field floatLabel="always" hideRequiredMarker fxFlex class="mat-block">
  28 + <mat-form-field floatLabel="always" hideRequiredMarker class="mat-block">
29 29 <mat-label></mat-label>
30 30 <input required type="number" matInput formControlName="defaultValue"
31 31 placeholder="{{'filter.value' | translate}}">
32 32 </mat-form-field>
33 33 </ng-template>
34 34 <ng-template [ngSwitchCase]="valueTypeEnum.DATE_TIME">
35   - <tb-datetime fxFlex formControlName="defaultValue"
  35 + <tb-datetime formControlName="defaultValue"
36 36 dateText="filter.date"
37 37 timeText="filter.time"
38 38 required [showLabel]="false"></tb-datetime>
39 39 </ng-template>
40 40 <ng-template [ngSwitchCase]="valueTypeEnum.BOOLEAN">
41   - <mat-checkbox fxFlex formControlName="defaultValue">
  41 + <mat-checkbox formControlName="defaultValue">
42 42 {{ (filterPredicateValueFormGroup.get('defaultValue').value ? 'value.true' : 'value.false') | translate }}
43 43 </mat-checkbox>
44 44 </ng-template>
... ... @@ -46,9 +46,9 @@
46 46 <div class="tb-hint" translate>filter.default-value</div>
47 47 </div>
48 48 <div fxFlex fxLayout="column" [fxShow]="dynamicMode">
49   - <div fxFlex formGroupName="dynamicValue" fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
  49 + <div formGroupName="dynamicValue" fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px">
50 50 <div fxFlex fxLayout="column">
51   - <mat-form-field floatLabel="always" hideRequiredMarker fxFlex class="mat-block">
  51 + <mat-form-field floatLabel="always" hideRequiredMarker class="mat-block">
52 52 <mat-label></mat-label>
53 53 <mat-select formControlName="sourceType" placeholder="{{'filter.dynamic-source-type' | translate}}">
54 54 <mat-option [value]="null">
... ... @@ -62,7 +62,7 @@
62 62 <div class="tb-hint" translate>filter.dynamic-source-type</div>
63 63 </div>
64 64 <div fxFlex fxLayout="column">
65   - <mat-form-field floatLabel="always" hideRequiredMarker fxFlex class="mat-block">
  65 + <mat-form-field floatLabel="always" hideRequiredMarker class="mat-block">
66 66 <mat-label></mat-label>
67 67 <input matInput formControlName="sourceAttribute" placeholder="{{'filter.source-attribute' | translate}}">
68 68 </mat-form-field>
... ...
... ... @@ -41,7 +41,7 @@
41 41 <span *ngIf="$index > 0" translate>filter.operation.and</span>
42 42 </div>
43 43 <div fxLayout="column" fxFlex="92">
44   - <div fxLayout="row" fxLayoutAlign="start center" fxFlex>
  44 + <div fxLayout="row" fxLayoutAlign="start center">
45 45 <div fxFlex>{{ keyFilterControl.value.key.key }}</div>
46 46 <div fxFlex translate>{{ entityKeyTypeTranslations.get(keyFilterControl.value.key.type) }}</div>
47 47 <button mat-icon-button color="primary"
... ...
... ... @@ -51,7 +51,7 @@
51 51 <span translate fxLayoutAlign="center center" style="margin: 16px 0"
52 52 class="tb-prompt required">device-profile.add-create-alarm-rule-prompt</span>
53 53 </div>
54   - <div fxLayout="row" *ngIf="!disabled">
  54 + <div *ngIf="!disabled">
55 55 <button mat-stroked-button color="primary"
56 56 type="button"
57 57 (click)="addCreateAlarmRule()"
... ...
... ... @@ -83,9 +83,9 @@
83 83 <tb-create-alarm-rules formControlName="createRules" style="padding-bottom: 16px;">
84 84 </tb-create-alarm-rules>
85 85 <div translate class="tb-small" style="padding-bottom: 8px;">device-profile.clear-alarm-rule</div>
86   - <div fxFlex fxLayout="row"
  86 + <div fxLayout="row" fxLayoutGap="8px;" fxLayoutAlign="start center"
87 87 [fxShow]="alarmFormGroup.get('clearRule').value"
88   - fxLayoutGap="8px;" fxLayoutAlign="start center" style="padding-bottom: 8px;">
  88 + style="padding-bottom: 8px;">
89 89 <div class="clear-alarm-rule" fxFlex fxLayout="row">
90 90 <tb-alarm-rule formControlName="clearRule" fxFlex>
91 91 </tb-alarm-rule>
... ... @@ -103,8 +103,7 @@
103 103 <span translate fxLayoutAlign="center center" style="margin: 16px 0"
104 104 class="tb-prompt">device-profile.no-clear-alarm-rule</span>
105 105 </div>
106   - <div fxLayout="row" *ngIf="!disabled"
107   - [fxShow]="!alarmFormGroup.get('clearRule').value">
  106 + <div *ngIf="!disabled" [fxShow]="!alarmFormGroup.get('clearRule').value">
108 107 <button mat-stroked-button color="primary"
109 108 type="button"
110 109 (click)="addClearAlarmRule()"
... ...
... ... @@ -30,8 +30,7 @@
30 30 <span translate fxLayoutAlign="center center"
31 31 class="tb-prompt">device-profile.no-alarm-rules</span>
32 32 </div>
33   - <div *ngIf="!disabled" fxFlex fxLayout="row" fxLayoutAlign="start center"
34   - style="padding-top: 16px;">
  33 + <div *ngIf="!disabled" style="padding-top: 16px;">
35 34 <button mat-raised-button color="primary"
36 35 type="button"
37 36 (click)="addAlarm()"
... ...
... ... @@ -39,7 +39,7 @@
39 39 </button>
40 40 </div>
41 41 </div>
42   -<div class="mat-padding" fxLayout="column">
  42 +<div [ngClass]="{'mat-padding': !standalone}" fxLayout="column">
43 43 <form [formGroup]="entityForm">
44 44 <fieldset [disabled]="(isLoading$ | async) || !isEdit" style="min-width: 0;">
45 45 <mat-form-field class="mat-block">
... ...
... ... @@ -21,48 +21,46 @@
21 21 {{'rulechain.open-rulechain' | translate }}
22 22 </button>
23 23 </div>
24   -<div class="mat-padding" fxLayout="column">
25   - <form [formGroup]="ruleNodeFormGroup">
26   - <fieldset [disabled]="(isLoading$ | async) || !isEdit || isReadOnly">
27   - <section *ngIf="ruleNode.component.type !== ruleNodeType.RULE_CHAIN">
28   - <section fxLayout="column" fxLayout.gt-sm="row">
29   - <mat-form-field fxFlex class="mat-block">
30   - <mat-label translate>rulenode.name</mat-label>
31   - <input matInput formControlName="name" required>
32   - <mat-error *ngIf="ruleNodeFormGroup.get('name').hasError('required')
33   - || ruleNodeFormGroup.get('name').hasError('pattern')">
34   - {{ 'rulenode.name-required' | translate }}
35   - </mat-error>
36   - </mat-form-field>
37   - <mat-checkbox formControlName="debugMode">
38   - {{ 'rulenode.debug-mode' | translate }}
39   - </mat-checkbox>
40   - </section>
41   - <tb-rule-node-config #ruleNodeConfigComponent
42   - formControlName="configuration"
43   - [ruleNodeId]="ruleNode.ruleNodeId?.id"
44   - [nodeDefinition]="ruleNode.component.configurationDescriptor.nodeDefinition">
45   - </tb-rule-node-config>
46   - <div formGroupName="additionalInfo" fxLayout="column">
47   - <mat-form-field class="mat-block">
48   - <mat-label translate>rulenode.description</mat-label>
49   - <textarea matInput formControlName="description" rows="2"></textarea>
50   - </mat-form-field>
51   - </div>
  24 +<form [formGroup]="ruleNodeFormGroup" class="mat-padding">
  25 + <fieldset [disabled]="(isLoading$ | async) || !isEdit || isReadOnly">
  26 + <section *ngIf="ruleNode.component.type !== ruleNodeType.RULE_CHAIN">
  27 + <section fxLayout="column" fxLayout.gt-sm="row">
  28 + <mat-form-field fxFlex class="mat-block">
  29 + <mat-label translate>rulenode.name</mat-label>
  30 + <input matInput formControlName="name" required>
  31 + <mat-error *ngIf="ruleNodeFormGroup.get('name').hasError('required')
  32 + || ruleNodeFormGroup.get('name').hasError('pattern')">
  33 + {{ 'rulenode.name-required' | translate }}
  34 + </mat-error>
  35 + </mat-form-field>
  36 + <mat-checkbox formControlName="debugMode">
  37 + {{ 'rulenode.debug-mode' | translate }}
  38 + </mat-checkbox>
52 39 </section>
53   - <section *ngIf="ruleNode.component.type === ruleNodeType.RULE_CHAIN">
54   - <tb-entity-autocomplete required
55   - [excludeEntityIds]="[ruleChainId]"
56   - [entityType]="entityType.RULE_CHAIN"
57   - formControlName="targetRuleChainId">
58   - </tb-entity-autocomplete>
59   - <div formGroupName="additionalInfo" fxLayout="column">
60   - <mat-form-field class="mat-block">
61   - <mat-label translate>rulenode.description</mat-label>
62   - <textarea matInput formControlName="description" rows="2"></textarea>
63   - </mat-form-field>
64   - </div>
65   - </section>
66   - </fieldset>
67   - </form>
68   -</div>
  40 + <tb-rule-node-config #ruleNodeConfigComponent
  41 + formControlName="configuration"
  42 + [ruleNodeId]="ruleNode.ruleNodeId?.id"
  43 + [nodeDefinition]="ruleNode.component.configurationDescriptor.nodeDefinition">
  44 + </tb-rule-node-config>
  45 + <div formGroupName="additionalInfo" fxLayout="column">
  46 + <mat-form-field class="mat-block">
  47 + <mat-label translate>rulenode.description</mat-label>
  48 + <textarea matInput formControlName="description" rows="2"></textarea>
  49 + </mat-form-field>
  50 + </div>
  51 + </section>
  52 + <section *ngIf="ruleNode.component.type === ruleNodeType.RULE_CHAIN">
  53 + <tb-entity-autocomplete required
  54 + [excludeEntityIds]="[ruleChainId]"
  55 + [entityType]="entityType.RULE_CHAIN"
  56 + formControlName="targetRuleChainId">
  57 + </tb-entity-autocomplete>
  58 + <div formGroupName="additionalInfo" fxLayout="column">
  59 + <mat-form-field class="mat-block">
  60 + <mat-label translate>rulenode.description</mat-label>
  61 + <textarea matInput formControlName="description" rows="2"></textarea>
  62 + </mat-form-field>
  63 + </div>
  64 + </section>
  65 + </fieldset>
  66 +</form>
... ...