-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
482 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
76 changes: 76 additions & 0 deletions
76
...scenario/scenario-trends/scenario-trends-settings/scenario-trends-settings.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<ng-template #content let-modal> | ||
<div class="modal-header"> | ||
<h5 class="modal-title" id="modal-basic-title">Scenario Trends Settings</h5> | ||
<button type="button" style="outline: none;" class="close" aria-label="Close" | ||
(click)="modal.dismiss('Cross click')"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
|
||
<div class="modal-body"> | ||
|
||
|
||
<form [formGroup]="scenarioTrendsSettingsForm" (ngSubmit)="onSubmit()" class="pl-3"> | ||
|
||
<div class="form-group pt-3"> | ||
<h6>Scenario Chart</h6> | ||
</div> | ||
|
||
<div class="custom-control custom-radio custom-control-inline"> | ||
<input type="radio" id="aggregatedTrends" value="true" name="aggregatedTrends" class="custom-control-input" | ||
formControlName="aggregatedTrends"> | ||
<label class="custom-control-label" for="aggregatedTrends">Aggregated Trends</label> | ||
</div> | ||
<div class="custom-control custom-radio custom-control-inline"> | ||
<input type="radio" id="labelTrends" value="false" name="aggregatedTrends" class="custom-control-input" | ||
formControlName="aggregatedTrends"> | ||
<label class="custom-control-label" for="labelTrends">Label Trends</label> | ||
</div> | ||
|
||
|
||
<hr class="mt-4"> | ||
|
||
|
||
<div class="form-sub pt-2"> | ||
<h6>Label Trend Metric</h6> | ||
<div class="text-secondary mb-2"><i class="fas fa-info-circle"> </i> | ||
<small> Please, choose up to 2 metric you would like to be displayed.</small></div> | ||
|
||
<div class="form-control-feedback" | ||
*ngIf="metricsEditable && (scenarioTrendsSettingsForm.dirty || scenarioTrendsSettingsForm.touched)"> | ||
<p class="form-validation-error" *ngIf="metricsEditable">Please, make sure max 2 metrics are selected.</p> | ||
</div> | ||
|
||
<div class="form-group"> | ||
<div class="custom-control custom-switch"> | ||
<input type="checkbox" class="custom-control-input" id="errorRate" | ||
formControlName="errorRate" (change)="onCheckboxChange()"> | ||
<label class="custom-control-label" for="errorRate">Error Rate</label> | ||
</div> | ||
|
||
<div class="custom-control custom-switch"> | ||
<input type="checkbox" class="custom-control-input" id="percentile" | ||
formControlName="percentile90" (change)="onCheckboxChange()"> | ||
<label class="custom-control-label" for="percentile">90% Percentile</label> | ||
</div> | ||
<div class="custom-control custom-switch"> | ||
<input type="checkbox" class="custom-control-input" id="throughput" | ||
formControlName="throughput" (change)="onCheckboxChange()"> | ||
<label class="custom-control-label" for="throughput">Throughput</label> | ||
</div> | ||
|
||
</div> | ||
</div> | ||
|
||
|
||
<div class="modal-footer"> | ||
<button type="submit" [disabled]="metricsEditable" class="btn btn-primary">Submit</button> | ||
</div> | ||
</form> | ||
</div> | ||
|
||
</ng-template> | ||
|
||
<button *userRole="'operator'" class="jtl-no-glow add-item jtl-btn-light btn btn-sm" (click)="open(content)" | ||
ngbDropdownItem>Settings | ||
</button> |
36 changes: 36 additions & 0 deletions
36
...nario/scenario-trends/scenario-trends-settings/scenario-trends-settings.component.spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import { ComponentFixture, TestBed } from "@angular/core/testing"; | ||
|
||
import { ScenarioTrendsSettingsComponent } from "./scenario-trends-settings.component"; | ||
import { HttpClientTestingModule } from "@angular/common/http/testing"; | ||
|
||
describe("ScenarioTrendsSettingsComponent", () => { | ||
let component: ScenarioTrendsSettingsComponent; | ||
let fixture: ComponentFixture<ScenarioTrendsSettingsComponent>; | ||
|
||
beforeEach(async () => { | ||
await TestBed.configureTestingModule({ | ||
declarations: [ScenarioTrendsSettingsComponent], | ||
imports: [HttpClientTestingModule] | ||
}) | ||
.compileComponents(); | ||
}); | ||
|
||
beforeEach(() => { | ||
fixture = TestBed.createComponent(ScenarioTrendsSettingsComponent); | ||
component = fixture.componentInstance; | ||
component.userSettings = { | ||
aggregatedTrends: true, | ||
labelMetrics: { | ||
percentile90: true, | ||
errorRate: true, | ||
throughput: false, | ||
} | ||
} | ||
component.params = { scenarioName: "test", projectName: "test" }; | ||
fixture.detectChanges(); | ||
}); | ||
|
||
it("should create", () => { | ||
expect(component).toBeTruthy(); | ||
}); | ||
}); |
Oops, something went wrong.