The AC data schema specifies keys like blocking_rate,
but the form was sending keys like blockingRate
Change-Id: I4ab923be48b67f69319b5bec44bc6c1c7b2e9feb
Issue-Id: RICPLT-1994
Signed-off-by: Lott, Christopher (cl778h) <cl778h@att.com>
* Repair app manager undeploy-app method
* Display AC xAPP metrics data via Kibana source (metrics.url.ac) on dashboard
* Pass AC policy parameter without parsing as JSON
* Repair app manager undeploy-app method
* Display AC xAPP metrics data via Kibana source (metrics.url.ac) on dashboard
* Pass AC policy parameter without parsing as JSON
+* Use snake_case (not camelCase) names in AC policy front end
Version 1.0.5, 5 July 2019
--------------------------
Version 1.0.5, 5 July 2019
--------------------------
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
"dev": true
},
"integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==",
"dev": true
},
+ "lodash-es": {
+ "version": "4.17.15",
+ "resolved": "https://registry.npmjs.org/lodash-es/-/lodash-es-4.17.15.tgz",
+ "integrity": "sha512-rlrc3yU3+JNOpZ9zj5pQtxnx2THmvRykwL4Xlxoa8I9lHBlVbbyPhgyPMioxVZ4NqyxaVVtaJnzsyOidQIhyyQ=="
+ },
"lodash.assign": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz",
"lodash.assign": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/lodash.assign/-/lodash.assign-4.2.0.tgz",
<mat-checkbox formControlName="enforce">Enforce</mat-checkbox>
</div>
<mat-form-field class="input-display-block">
<mat-checkbox formControlName="enforce">Enforce</mat-checkbox>
</div>
<mat-form-field class="input-display-block">
- <input matInput type="text" placeholder="Window length" formControlName="windowLength">
+ <input matInput type="text" placeholder="Window length" formControlName="window_length">
<mat-hint align="end">Sliding window length in minutes for measurement, range 1..60.</mat-hint>
<mat-hint align="end">Sliding window length in minutes for measurement, range 1..60.</mat-hint>
- <mat-error *ngIf="validateControl('windowLength') && hasError('windowLength', 'required')">Number is required
+ <mat-error *ngIf="validateControl('window_length') && hasError('window_length', 'required')">Number is required
- <mat-error *ngIf="hasError('windowLength', 'pattern')">Valid number is required</mat-error>
+ <mat-error *ngIf="hasError('window_length', 'pattern')">Valid number is required</mat-error>
</mat-form-field>
<mat-form-field class="input-display-block">
</mat-form-field>
<mat-form-field class="input-display-block">
- <input matInput type="text" placeholder="Blocking rate" formControlName="blockingRate">
+ <input matInput type="text" placeholder="Blocking rate" formControlName="blocking_rate">
<mat-hint align="end">Connections to block if above trigger threshold, range 1..100.</mat-hint>
<mat-hint align="end">Connections to block if above trigger threshold, range 1..100.</mat-hint>
- <mat-error *ngIf="validateControl('blockingRate') && hasError('blockingRate', 'required')">Number is required
+ <mat-error *ngIf="validateControl('blocking_rate') && hasError('blocking_rate', 'required')">Number is required
- <mat-error *ngIf="hasError('blockingRate', 'pattern')">Valid number is required</mat-error>
+ <mat-error *ngIf="hasError('blocking_rate', 'pattern')">Valid number is required</mat-error>
</mat-form-field>
<mat-form-field class="input-display-block">
</mat-form-field>
<mat-form-field class="input-display-block">
- <input matInput type="text" placeholder="Trigger threshold" formControlName="triggerThreshold">
+ <input matInput type="text" placeholder="Trigger threshold" formControlName="trigger_threshold">
<mat-hint align="end">Number of events in window to trigger blocking, minimum 1.</mat-hint>
<mat-hint align="end">Number of events in window to trigger blocking, minimum 1.</mat-hint>
- <mat-error *ngIf="validateControl('triggerThreshold') && hasError('triggerThreshold', 'required')">Number is
+ <mat-error *ngIf="validateControl('trigger_threshold') && hasError('trigger_threshold', 'required')">Number is
- <mat-error *ngIf="hasError('triggerThreshold', 'pattern')">Valid number is required</mat-error>
+ <mat-error *ngIf="hasError('trigger_threshold', 'pattern')">Valid number is required</mat-error>
</mat-form-field>
<div class="input-display-block">
<button class="mat-raised-button mat-primary update-button" [disabled]="!acForm.valid">Update</button>
</mat-form-field>
<div class="input-display-block">
<button class="mat-raised-button mat-primary update-button" [disabled]="!acForm.valid">Update</button>
const triggerPattern = /^([0-9]+)$/;
// No way to fetch current settings via A1 at present
this.acForm = new FormGroup({
const triggerPattern = /^([0-9]+)$/;
// No way to fetch current settings via A1 at present
this.acForm = new FormGroup({
+ // Names must match the ACAdmissionIntervalControl interface
enforce: new FormControl(true, [Validators.required]),
enforce: new FormControl(true, [Validators.required]),
- windowLength: new FormControl('', [Validators.required, Validators.pattern(windowLengthPattern)]),
- blockingRate: new FormControl('', [Validators.required, Validators.pattern(blockingRatePattern)]),
- triggerThreshold: new FormControl('', [Validators.required, Validators.pattern(triggerPattern)])
+ window_length: new FormControl('', [Validators.required, Validators.pattern(windowLengthPattern)]),
+ blocking_rate: new FormControl('', [Validators.required, Validators.pattern(blockingRatePattern)]),
+ trigger_threshold: new FormControl('', [Validators.required, Validators.pattern(triggerPattern)])
});
this.acXappService.getVersion().subscribe((res: string) => this.acVersion = res);
}
});
this.acXappService.getVersion().subscribe((res: string) => this.acVersion = res);
}