Skip to content

Commit c6f10e0

Browse files
authored
Merge pull request #114 from ChistaDATA/feature/#101_angular15_update
feat: update padding & styles
2 parents 1421c52 + c751905 commit c6f10e0

File tree

5 files changed

+22
-37
lines changed

5 files changed

+22
-37
lines changed

quartz-manager-frontend/src/app/components/logs-panel/logs-panel.component.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@
88
<img src="assets/image/logs.svg" alt="no logs" width="320" style="margin-top: 6em;" />
99
</div>
1010
</div>
11-
<div id="logs" style="overflow-y: auto; position: absolute; left: 0; right: 0; top: 0; bottom: 0; overflow: auto;">
11+
<div id="logs" style="overflow-y: auto; overflow: auto;">
1212
<div
1313
*ngFor = "let log of logs; let first = first" fxLayout="row" fxLayout.xs="column" fxLayoutAlign="start" fxLayoutGap="10px">
14-
<div fxFlex="0 1 300px">
14+
<div style="flex:1; max-width: 300px" >
1515
<span [ngClass]="{'animate__animated animate__zoomIn zoomIn firstLog': first}"> [{{log.time|date:'medium'}}]</span>
1616
</div>
17-
<div fxFlex="1 1 16px">
17+
<div style="flex:1; max-width: 16px">
1818
<span [ngClass]="{'animated zoomIn firstLog': first}">
1919
<i class = "fas" [ngClass]="{'fa-check-circle green': log.type == 'INFO',
2020
'fa-exclamation-triangle yellow': log.type == 'WARN',
2121
'fa-times-circle red': log.type == 'ERROR'}"></i>
2222
</span>
2323
</div>
24-
<div fxFlex="0 1 250px">
24+
<div style="flex:1; max-width: 250px">
2525
<span [ngClass]="{'animate__animated animate__zoomIn zoomIn firstLog': first}">
2626
{{log.threadName}}
2727
</span>
2828
</div>
29-
<div fxFlex="1 1">
29+
<div style="flex:1">
3030
<span [ngClass]="{'animate__animated animate__zoomIn zoomIn firstLog': first}"> {{log.msg}}</span>
3131
</div>
3232
</div>

quartz-manager-frontend/src/app/components/progress-panel/progress-panel.component.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</div> -->
88

99
<mat-card style="padding-bottom: 0">
10-
<mat-card-header>
10+
<mat-card-header style="padding-bottom: 16px;">
1111
<mat-card-subtitle><b>JOB PROGRESS</b></mat-card-subtitle>
1212
</mat-card-header>
1313
<mat-card-content>

quartz-manager-frontend/src/app/components/simple-trigger-config/simple-trigger-config.component.html

+10-24
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<mat-card fxFlex="1 1 auto">
2-
<mat-card-header>
2+
<mat-card-header style="padding-bottom: 16px;">
33
<mat-card-subtitle><b>TRIGGER DETAILS</b></mat-card-subtitle>
44
</mat-card-header>
55
<mat-divider></mat-divider>
66
<mat-card-content *ngIf="shouldShowTheTriggerCardContent()" style="position: relative; height: 100%">
77
<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;">
99
<mat-card id="noEligibleJobsAlert" *ngIf="jobs?.length === 0" style="background-color: #ff6385">
1010
<mat-card-content>
1111
<i class="fas fa-exclamation-circle" style="color: #fff"></i>&nbsp;<strong>WARNING</strong>
@@ -18,11 +18,9 @@
1818
[formGroup]="simpleTriggerReactiveForm" (ngSubmit)="onSubmitTriggerConfig()">
1919
<div>
2020
<mat-form-field
21-
[appearance]="enabledTriggerForm && !trigger ? 'outline': 'fill'"
2221
class="full-size-input">
2322
<mat-label>Trigger Name</mat-label>
2423
<input id="triggerName"
25-
[readonly]="!enabledTriggerForm || trigger"
2624
matInput placeholder="name of the trigger (unique)"
2725
formControlName="triggerName" name="triggerName">
2826
<mat-error *ngIf="simpleTriggerReactiveForm.controls.triggerName.errors?.required">
@@ -33,11 +31,10 @@
3331

3432
<div>
3533
<mat-form-field
36-
[appearance]="enabledTriggerForm ? 'outline': 'fill'"
3734
class="full-size-input"
3835
>
3936
<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">
4138
<mat-option *ngFor="let job of jobs" [value]="job" style="font-size: 0.8em">
4239
{{job}}
4340
</mat-option>
@@ -50,12 +47,11 @@
5047

5148
<div>
5249
<mat-form-field
53-
[appearance]="enabledTriggerForm ? 'outline': 'fill'"
5450
class="full-size-input"
5551
>
5652
<mat-label>Misfire Instruction</mat-label>
5753
<mat-select id="misfireInstruction" name="misfireInstruction" formControlName="misfireInstruction"
58-
[disabled]="!enabledTriggerForm" style="font-size: 0.8em">
54+
style="font-size: 0.8em">
5955
<mat-option value="MISFIRE_INSTRUCTION_FIRE_NOW">FIRE NOW</mat-option>
6056
<mat-option value="MISFIRE_INSTRUCTION_RESCHEDULE_NOW_WITH_EXISTING_REPEAT_COUNT">RESCHEDULE NOW WITH
6157
EXISTING REPEAT COUNT
@@ -82,12 +78,10 @@
8278
<div formGroupName="triggerPeriod">
8379
<div>
8480
<mat-form-field
85-
[appearance]="enabledTriggerForm ? 'outline': 'fill'"
8681
class="full-size-input"
8782
>
8883
<mat-label>Start Date (optional)</mat-label>
8984
<input id="startDate"
90-
[readonly]="!enabledTriggerForm"
9185
matInput
9286
[ngxMatDatetimePicker]="startDatePicker" placeholder="Choose a start date"
9387
formControlName="startDate" name="startDate">
@@ -99,12 +93,10 @@
9993

10094
<div>
10195
<mat-form-field
102-
[appearance]="enabledTriggerForm ? 'outline': 'fill'"
10396
class="full-size-input"
10497
>
10598
<mat-label>End Date (optional)</mat-label>
10699
<input id="endDate"
107-
[readonly]="!enabledTriggerForm"
108100
matInput
109101
[ngxMatDatetimePicker]="endDatePicker" placeholder="Choose a end date"
110102
formControlName="endDate" name="endDate"
@@ -122,12 +114,10 @@
122114
<div formGroupName="triggerRecurrence">
123115
<div>
124116
<mat-form-field
125-
[appearance]="enabledTriggerForm ? 'outline': 'fill'"
126117
class="full-size-input"
127118
>
128119
<mat-label>Repeat Interval [in mills]</mat-label>
129120
<input id="repeatInterval"
130-
[readonly]="!enabledTriggerForm"
131121
matInput placeholder="Repeat Interval [in mills]" type="number"
132122
formControlName="repeatInterval" name="repeatInterval"
133123
>
@@ -138,12 +128,10 @@
138128
</div>
139129
<div>
140130
<mat-form-field
141-
[appearance]="enabledTriggerForm ? 'outline': 'fill'"
142131
class="full-size-input"
143132
>
144133
<mat-label>Repeat Count</mat-label>
145134
<input id="repeatCount"
146-
[readonly]="!enabledTriggerForm"
147135
matInput placeholder="Repeat Count (-1 REPEAT INDEFINITELY)" type="number"
148136
formControlName="repeatCount" name="repeatCount"
149137
>
@@ -158,26 +146,24 @@
158146
<br/>
159147

160148
<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">
162150
<button mat-raised-button
163151
type="button"
164-
*ngIf="enabledTriggerForm"
165152
(click)="onResetReactiveForm()">
166153
Cancel
167154
</button>
168155
</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">
170157
<button mat-raised-button
171158
type="submit" color="primary"
172-
[disabled]="simpleTriggerReactiveForm.invalid"
173-
*ngIf="enabledTriggerForm">
159+
[disabled]="simpleTriggerReactiveForm.invalid">
174160
Submit
175161
</button>
176162
</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">
178164
<button mat-raised-button type="button"
179-
*ngIf="!enabledTriggerForm"
180-
(click)="enabledTriggerForm = true">
165+
166+
(click)="simpleTriggerReactiveForm.enable()">
181167
Reschedule
182168
</button>
183169
</div>

quartz-manager-frontend/src/app/components/simple-trigger-config/simple-trigger-config.component.spec.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -202,14 +202,14 @@ describe('SimpleTriggerConfig', () => {
202202
component.trigger = new SimpleTrigger();
203203
component.trigger.triggerKeyDTO = mockTriggerKey;
204204

205-
fixture.detectChanges();
206-
207205
const mockTrigger = new Trigger();
208206
mockTrigger.triggerKeyDTO = mockTriggerKey;
209207
mockTrigger.jobDetailDTO = <JobDetail>{jobClassName: 'TestJob', description: null};
210208
const getSimpleTriggerReq = httpTestingController.expectOne(`${CONTEXT_PATH}/simple-triggers/my-simple-trigger`);
211209
getSimpleTriggerReq.flush(mockTrigger);
212210

211+
fixture.detectChanges();
212+
213213
const componentDe: DebugElement = fixture.debugElement;
214214
const submitButton = componentDe.query(By.css('form button'));
215215
expect(submitButton.nativeElement.textContent.trim()).toEqual('Reschedule');

quartz-manager-frontend/src/app/components/simple-trigger-config/simple-trigger-config.component.ts

+4-5
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,6 @@ export class SimpleTriggerConfigComponent implements OnInit {
4343

4444
private jobs: Array<String>;
4545

46-
enabledTriggerForm = false;
47-
4846
@Output()
4947
onNewTrigger = new EventEmitter<SimpleTrigger>();
5048

@@ -64,11 +62,11 @@ export class SimpleTriggerConfigComponent implements OnInit {
6462
}
6563

6664
openTriggerForm() {
67-
this.enabledTriggerForm = true;
65+
this.simpleTriggerReactiveForm.enable();
6866
}
6967

7068
private closeTriggerForm() {
71-
this.enabledTriggerForm = false;
69+
this.simpleTriggerReactiveForm.disable();
7270
}
7371

7472
@Input()
@@ -86,10 +84,11 @@ export class SimpleTriggerConfigComponent implements OnInit {
8684
this.simpleTriggerReactiveForm.setValue(this._fromTriggerToReactiveForm(retTrigger))
8785
this.triggerLoading = false;
8886
this.triggerInProgress = this.trigger.mayFireAgain;
87+
this.simpleTriggerReactiveForm.disable();
8988
})
9089
}
9190

92-
shouldShowTheTriggerCardContent = (): boolean => this.trigger !== null || this.enabledTriggerForm;
91+
shouldShowTheTriggerCardContent = (): boolean => this.trigger !== null || this.simpleTriggerReactiveForm.enabled;
9392

9493
existsATriggerInProgress = (): boolean => this.trigger && this.triggerInProgress;
9594

0 commit comments

Comments
 (0)