Commit 2ca3ce47f40256b56d15434bc6fc99823fa778a8

Authored by Vladyslav_Prykhodko
1 parent b4ae7e37

UI: Fixed show in Safari browser profile; Fixed show ui-rule-node

@@ -17,28 +17,28 @@ @@ -17,28 +17,28 @@
17 --> 17 -->
18 <div fxFlex fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px" [formGroup]="filterPredicateValueFormGroup"> 18 <div fxFlex fxLayout="row" fxLayoutAlign="start center" fxLayoutGap="8px" [formGroup]="filterPredicateValueFormGroup">
19 <div fxFlex fxLayout="column" [fxShow]="!dynamicMode"> 19 <div fxFlex fxLayout="column" [fxShow]="!dynamicMode">
20 - <div fxFlex fxLayout="column" [ngSwitch]="valueType"> 20 + <div fxLayout="column" [ngSwitch]="valueType">
21 <ng-template [ngSwitchCase]="valueTypeEnum.STRING"> 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 <mat-label></mat-label> 23 <mat-label></mat-label>
24 <input matInput formControlName="defaultValue" placeholder="{{'filter.value' | translate}}"> 24 <input matInput formControlName="defaultValue" placeholder="{{'filter.value' | translate}}">
25 </mat-form-field> 25 </mat-form-field>
26 </ng-template> 26 </ng-template>
27 <ng-template [ngSwitchCase]="valueTypeEnum.NUMERIC"> 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 <mat-label></mat-label> 29 <mat-label></mat-label>
30 <input required type="number" matInput formControlName="defaultValue" 30 <input required type="number" matInput formControlName="defaultValue"
31 placeholder="{{'filter.value' | translate}}"> 31 placeholder="{{'filter.value' | translate}}">
32 </mat-form-field> 32 </mat-form-field>
33 </ng-template> 33 </ng-template>
34 <ng-template [ngSwitchCase]="valueTypeEnum.DATE_TIME"> 34 <ng-template [ngSwitchCase]="valueTypeEnum.DATE_TIME">
35 - <tb-datetime fxFlex formControlName="defaultValue" 35 + <tb-datetime formControlName="defaultValue"
36 dateText="filter.date" 36 dateText="filter.date"
37 timeText="filter.time" 37 timeText="filter.time"
38 required [showLabel]="false"></tb-datetime> 38 required [showLabel]="false"></tb-datetime>
39 </ng-template> 39 </ng-template>
40 <ng-template [ngSwitchCase]="valueTypeEnum.BOOLEAN"> 40 <ng-template [ngSwitchCase]="valueTypeEnum.BOOLEAN">
41 - <mat-checkbox fxFlex formControlName="defaultValue"> 41 + <mat-checkbox formControlName="defaultValue">
42 {{ (filterPredicateValueFormGroup.get('defaultValue').value ? 'value.true' : 'value.false') | translate }} 42 {{ (filterPredicateValueFormGroup.get('defaultValue').value ? 'value.true' : 'value.false') | translate }}
43 </mat-checkbox> 43 </mat-checkbox>
44 </ng-template> 44 </ng-template>
@@ -46,9 +46,9 @@ @@ -46,9 +46,9 @@
46 <div class="tb-hint" translate>filter.default-value</div> 46 <div class="tb-hint" translate>filter.default-value</div>
47 </div> 47 </div>
48 <div fxFlex fxLayout="column" [fxShow]="dynamicMode"> 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 <div fxFlex fxLayout="column"> 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 <mat-label></mat-label> 52 <mat-label></mat-label>
53 <mat-select formControlName="sourceType" placeholder="{{'filter.dynamic-source-type' | translate}}"> 53 <mat-select formControlName="sourceType" placeholder="{{'filter.dynamic-source-type' | translate}}">
54 <mat-option [value]="null"> 54 <mat-option [value]="null">
@@ -62,7 +62,7 @@ @@ -62,7 +62,7 @@
62 <div class="tb-hint" translate>filter.dynamic-source-type</div> 62 <div class="tb-hint" translate>filter.dynamic-source-type</div>
63 </div> 63 </div>
64 <div fxFlex fxLayout="column"> 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 <mat-label></mat-label> 66 <mat-label></mat-label>
67 <input matInput formControlName="sourceAttribute" placeholder="{{'filter.source-attribute' | translate}}"> 67 <input matInput formControlName="sourceAttribute" placeholder="{{'filter.source-attribute' | translate}}">
68 </mat-form-field> 68 </mat-form-field>
@@ -41,7 +41,7 @@ @@ -41,7 +41,7 @@
41 <span *ngIf="$index > 0" translate>filter.operation.and</span> 41 <span *ngIf="$index > 0" translate>filter.operation.and</span>
42 </div> 42 </div>
43 <div fxLayout="column" fxFlex="92"> 43 <div fxLayout="column" fxFlex="92">
44 - <div fxLayout="row" fxLayoutAlign="start center" fxFlex> 44 + <div fxLayout="row" fxLayoutAlign="start center">
45 <div fxFlex>{{ keyFilterControl.value.key.key }}</div> 45 <div fxFlex>{{ keyFilterControl.value.key.key }}</div>
46 <div fxFlex translate>{{ entityKeyTypeTranslations.get(keyFilterControl.value.key.type) }}</div> 46 <div fxFlex translate>{{ entityKeyTypeTranslations.get(keyFilterControl.value.key.type) }}</div>
47 <button mat-icon-button color="primary" 47 <button mat-icon-button color="primary"
@@ -51,7 +51,7 @@ @@ -51,7 +51,7 @@
51 <span translate fxLayoutAlign="center center" style="margin: 16px 0" 51 <span translate fxLayoutAlign="center center" style="margin: 16px 0"
52 class="tb-prompt required">device-profile.add-create-alarm-rule-prompt</span> 52 class="tb-prompt required">device-profile.add-create-alarm-rule-prompt</span>
53 </div> 53 </div>
54 - <div fxLayout="row" *ngIf="!disabled"> 54 + <div *ngIf="!disabled">
55 <button mat-stroked-button color="primary" 55 <button mat-stroked-button color="primary"
56 type="button" 56 type="button"
57 (click)="addCreateAlarmRule()" 57 (click)="addCreateAlarmRule()"
@@ -83,9 +83,9 @@ @@ -83,9 +83,9 @@
83 <tb-create-alarm-rules formControlName="createRules" style="padding-bottom: 16px;"> 83 <tb-create-alarm-rules formControlName="createRules" style="padding-bottom: 16px;">
84 </tb-create-alarm-rules> 84 </tb-create-alarm-rules>
85 <div translate class="tb-small" style="padding-bottom: 8px;">device-profile.clear-alarm-rule</div> 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 [fxShow]="alarmFormGroup.get('clearRule').value" 87 [fxShow]="alarmFormGroup.get('clearRule').value"
88 - fxLayoutGap="8px;" fxLayoutAlign="start center" style="padding-bottom: 8px;"> 88 + style="padding-bottom: 8px;">
89 <div class="clear-alarm-rule" fxFlex fxLayout="row"> 89 <div class="clear-alarm-rule" fxFlex fxLayout="row">
90 <tb-alarm-rule formControlName="clearRule" fxFlex> 90 <tb-alarm-rule formControlName="clearRule" fxFlex>
91 </tb-alarm-rule> 91 </tb-alarm-rule>
@@ -103,8 +103,7 @@ @@ -103,8 +103,7 @@
103 <span translate fxLayoutAlign="center center" style="margin: 16px 0" 103 <span translate fxLayoutAlign="center center" style="margin: 16px 0"
104 class="tb-prompt">device-profile.no-clear-alarm-rule</span> 104 class="tb-prompt">device-profile.no-clear-alarm-rule</span>
105 </div> 105 </div>
106 - <div fxLayout="row" *ngIf="!disabled"  
107 - [fxShow]="!alarmFormGroup.get('clearRule').value"> 106 + <div *ngIf="!disabled" [fxShow]="!alarmFormGroup.get('clearRule').value">
108 <button mat-stroked-button color="primary" 107 <button mat-stroked-button color="primary"
109 type="button" 108 type="button"
110 (click)="addClearAlarmRule()" 109 (click)="addClearAlarmRule()"
@@ -30,8 +30,7 @@ @@ -30,8 +30,7 @@
30 <span translate fxLayoutAlign="center center" 30 <span translate fxLayoutAlign="center center"
31 class="tb-prompt">device-profile.no-alarm-rules</span> 31 class="tb-prompt">device-profile.no-alarm-rules</span>
32 </div> 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 <button mat-raised-button color="primary" 34 <button mat-raised-button color="primary"
36 type="button" 35 type="button"
37 (click)="addAlarm()" 36 (click)="addAlarm()"
@@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
39 </button> 39 </button>
40 </div> 40 </div>
41 </div> 41 </div>
42 -<div class="mat-padding" fxLayout="column"> 42 +<div [ngClass]="{'mat-padding': !standalone}" fxLayout="column">
43 <form [formGroup]="entityForm"> 43 <form [formGroup]="entityForm">
44 <fieldset [disabled]="(isLoading$ | async) || !isEdit" style="min-width: 0;"> 44 <fieldset [disabled]="(isLoading$ | async) || !isEdit" style="min-width: 0;">
45 <mat-form-field class="mat-block"> 45 <mat-form-field class="mat-block">
@@ -21,48 +21,46 @@ @@ -21,48 +21,46 @@
21 {{'rulechain.open-rulechain' | translate }} 21 {{'rulechain.open-rulechain' | translate }}
22 </button> 22 </button>
23 </div> 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 </section> 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>