|
1 | 1 | <mat-card fxFlex="1 1 auto">
|
2 |
| - <mat-card-header> |
| 2 | + <mat-card-header style="padding-bottom: 16px;"> |
3 | 3 | <mat-card-subtitle><b>TRIGGER DETAILS</b></mat-card-subtitle>
|
4 | 4 | </mat-card-header>
|
5 | 5 | <mat-divider></mat-divider>
|
6 | 6 | <mat-card-content *ngIf="shouldShowTheTriggerCardContent()" style="position: relative; height: 100%">
|
7 | 7 | <div fxLayout="column" style="overflow-y: auto; position: absolute; left: 0; right: 0; top: 0; bottom: 0;
|
8 |
| - overflow: auto;height: calc(100% - 3em); padding-top: 1em;"> |
| 8 | + overflow: auto;padding: 1em;"> |
9 | 9 | <mat-card id="noEligibleJobsAlert" *ngIf="jobs?.length === 0" style="background-color: #ff6385">
|
10 | 10 | <mat-card-content>
|
11 | 11 | <i class="fas fa-exclamation-circle" style="color: #fff"></i> <strong>WARNING</strong>
|
|
18 | 18 | [formGroup]="simpleTriggerReactiveForm" (ngSubmit)="onSubmitTriggerConfig()">
|
19 | 19 | <div>
|
20 | 20 | <mat-form-field
|
21 |
| - [appearance]="enabledTriggerForm && !trigger ? 'outline': 'fill'" |
22 | 21 | class="full-size-input">
|
23 | 22 | <mat-label>Trigger Name</mat-label>
|
24 | 23 | <input id="triggerName"
|
25 |
| - [readonly]="!enabledTriggerForm || trigger" |
26 | 24 | matInput placeholder="name of the trigger (unique)"
|
27 | 25 | formControlName="triggerName" name="triggerName">
|
28 | 26 | <mat-error *ngIf="simpleTriggerReactiveForm.controls.triggerName.errors?.required">
|
|
33 | 31 |
|
34 | 32 | <div>
|
35 | 33 | <mat-form-field
|
36 |
| - [appearance]="enabledTriggerForm ? 'outline': 'fill'" |
37 | 34 | class="full-size-input"
|
38 | 35 | >
|
39 | 36 | <mat-label>Job Class</mat-label>
|
40 |
| - <mat-select id="jobClass" name="jobClass" formControlName="jobClass" [disabled]="!enabledTriggerForm"> |
| 37 | + <mat-select id="jobClass" name="jobClass" formControlName="jobClass"> |
41 | 38 | <mat-option *ngFor="let job of jobs" [value]="job" style="font-size: 0.8em">
|
42 | 39 | {{job}}
|
43 | 40 | </mat-option>
|
|
50 | 47 |
|
51 | 48 | <div>
|
52 | 49 | <mat-form-field
|
53 |
| - [appearance]="enabledTriggerForm ? 'outline': 'fill'" |
54 | 50 | class="full-size-input"
|
55 | 51 | >
|
56 | 52 | <mat-label>Misfire Instruction</mat-label>
|
57 | 53 | <mat-select id="misfireInstruction" name="misfireInstruction" formControlName="misfireInstruction"
|
58 |
| - [disabled]="!enabledTriggerForm" style="font-size: 0.8em"> |
| 54 | + style="font-size: 0.8em"> |
59 | 55 | <mat-option value="MISFIRE_INSTRUCTION_FIRE_NOW">FIRE NOW</mat-option>
|
60 | 56 | <mat-option value="MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT">RESCHEDULE NOW WITH
|
61 | 57 | EXISTING REPEAT COUNT
|
|
82 | 78 | <div formGroupName="triggerPeriod">
|
83 | 79 | <div>
|
84 | 80 | <mat-form-field
|
85 |
| - [appearance]="enabledTriggerForm ? 'outline': 'fill'" |
86 | 81 | class="full-size-input"
|
87 | 82 | >
|
88 | 83 | <mat-label>Start Date (optional)</mat-label>
|
89 | 84 | <input id="startDate"
|
90 |
| - [readonly]="!enabledTriggerForm" |
91 | 85 | matInput
|
92 | 86 | [ngxMatDatetimePicker]="startDatePicker" placeholder="Choose a start date"
|
93 | 87 | formControlName="startDate" name="startDate">
|
|
99 | 93 |
|
100 | 94 | <div>
|
101 | 95 | <mat-form-field
|
102 |
| - [appearance]="enabledTriggerForm ? 'outline': 'fill'" |
103 | 96 | class="full-size-input"
|
104 | 97 | >
|
105 | 98 | <mat-label>End Date (optional)</mat-label>
|
106 | 99 | <input id="endDate"
|
107 |
| - [readonly]="!enabledTriggerForm" |
108 | 100 | matInput
|
109 | 101 | [ngxMatDatetimePicker]="endDatePicker" placeholder="Choose a end date"
|
110 | 102 | formControlName="endDate" name="endDate"
|
|
122 | 114 | <div formGroupName="triggerRecurrence">
|
123 | 115 | <div>
|
124 | 116 | <mat-form-field
|
125 |
| - [appearance]="enabledTriggerForm ? 'outline': 'fill'" |
126 | 117 | class="full-size-input"
|
127 | 118 | >
|
128 | 119 | <mat-label>Repeat Interval [in mills]</mat-label>
|
129 | 120 | <input id="repeatInterval"
|
130 |
| - [readonly]="!enabledTriggerForm" |
131 | 121 | matInput placeholder="Repeat Interval [in mills]" type="number"
|
132 | 122 | formControlName="repeatInterval" name="repeatInterval"
|
133 | 123 | >
|
|
138 | 128 | </div>
|
139 | 129 | <div>
|
140 | 130 | <mat-form-field
|
141 |
| - [appearance]="enabledTriggerForm ? 'outline': 'fill'" |
142 | 131 | class="full-size-input"
|
143 | 132 | >
|
144 | 133 | <mat-label>Repeat Count</mat-label>
|
145 | 134 | <input id="repeatCount"
|
146 |
| - [readonly]="!enabledTriggerForm" |
147 | 135 | matInput placeholder="Repeat Count (-1 REPEAT INDEFINITELY)" type="number"
|
148 | 136 | formControlName="repeatCount" name="repeatCount"
|
149 | 137 | >
|
|
158 | 146 | <br/>
|
159 | 147 |
|
160 | 148 | <div fxLayout="row" fxFlexAlign="space-evenly center" style="padding-bottom: 1em;">
|
161 |
| - <div fxFlex="1 1 auto" style="text-align: center" *ngIf="enabledTriggerForm"> |
| 149 | + <div fxFlex="1 1 auto" style="text-align: center" *ngIf="simpleTriggerReactiveForm.enabled"> |
162 | 150 | <button mat-raised-button
|
163 | 151 | type="button"
|
164 |
| - *ngIf="enabledTriggerForm" |
165 | 152 | (click)="onResetReactiveForm()">
|
166 | 153 | Cancel
|
167 | 154 | </button>
|
168 | 155 | </div>
|
169 |
| - <div fxFlex="1 1 auto" style="text-align: center" *ngIf="enabledTriggerForm"> |
| 156 | + <div fxFlex="1 1 auto" style="text-align: center" *ngIf="simpleTriggerReactiveForm.enabled"> |
170 | 157 | <button mat-raised-button
|
171 | 158 | type="submit" color="primary"
|
172 |
| - [disabled]="simpleTriggerReactiveForm.invalid" |
173 |
| - *ngIf="enabledTriggerForm"> |
| 159 | + [disabled]="simpleTriggerReactiveForm.invalid"> |
174 | 160 | Submit
|
175 | 161 | </button>
|
176 | 162 | </div>
|
177 |
| - <div fxFlex="1 1 auto" style="text-align: center" *ngIf="!enabledTriggerForm"> |
| 163 | + <div fxFlex="1 1 auto" style="text-align: center" *ngIf="!simpleTriggerReactiveForm.enabled"> |
178 | 164 | <button mat-raised-button type="button"
|
179 |
| - *ngIf="!enabledTriggerForm" |
180 |
| - (click)="enabledTriggerForm = true"> |
| 165 | + |
| 166 | + (click)="simpleTriggerReactiveForm.enable()"> |
181 | 167 | Reschedule
|
182 | 168 | </button>
|
183 | 169 | </div>
|
|
0 commit comments