diff --git a/src/app/scenario/scenario-settings/scenario-settings.component.css b/src/app/scenario/scenario-settings/scenario-settings.component.css index bfed51c7..1fff7496 100644 --- a/src/app/scenario/scenario-settings/scenario-settings.component.css +++ b/src/app/scenario/scenario-settings/scenario-settings.component.css @@ -2,16 +2,9 @@ margin-right: 15px; } -.form-sub { - padding-top: 20px; -} .desc { - padding-bottom: 10px; -} - -.form-settings { - padding-top: 30px; + padding-bottom: 1rem; } .table-help { @@ -20,4 +13,4 @@ table { margin-top: 10px; -} \ No newline at end of file +} diff --git a/src/app/scenario/scenario-settings/scenario-settings.component.html b/src/app/scenario/scenario-settings/scenario-settings.component.html index 7e463d59..0c999b13 100644 --- a/src/app/scenario/scenario-settings/scenario-settings.component.html +++ b/src/app/scenario/scenario-settings/scenario-settings.component.html @@ -13,12 +13,15 @@
  • General -
    -
    + +
    - + +
    + +
    Test runs retention
    @@ -30,7 +33,10 @@
    Test runs retention
    - + +
    + +
    Performance analysis
    @@ -40,7 +46,10 @@
    Performance analysis
    - + +
    + +
    Zero error tolerance
    @@ -51,7 +60,10 @@
    Zero error tolerance
    - + +
    + +
    Delete sample data after processing
    @@ -61,7 +73,10 @@
    Delete sample data after processing
    - + +
    + +
    Generate share token automatically
    @@ -74,6 +89,9 @@
    Generate share token automatically
    +
    + +
    Generate extra chart aggregations
    @@ -95,14 +113,14 @@
    Generate extra chart aggregations
  • Thresholds - + -
    +
    Scenario thresholds will raise an alert in a report detail in case the given metrics diverge from the previous reports average by more than specified threshold percentage.
    - +
    Generate extra chart aggregations
    - +
    @@ -135,13 +153,13 @@
    Generate extra chart aggregations
  • Label Filter Settings - + -
    +
    Enter search term(s) that you want to filter out. For a full match use "match" operator, for a partial match use "includes" operator
    - + @@ -194,8 +212,8 @@
    Generate extra chart aggregations
  • Label Trend Chart Settings - -
    + +
    The selected metrics will get pre-set in label trend chart.
    @@ -243,7 +261,7 @@
    Generate extra chart aggregations
    formControlName="avgResponseTime">
    - +
    diff --git a/src/app/shared/shared-project/project-settings/project-settings.component.html b/src/app/shared/shared-project/project-settings/project-settings.component.html index fbea9a47..faab9f71 100644 --- a/src/app/shared/shared-project/project-settings/project-settings.component.html +++ b/src/app/shared/shared-project/project-settings/project-settings.component.html @@ -6,11 +6,12 @@
    - + -
    +
    + + +
    Test Report Top Statistics Bar
    -
    - Please choose up to 5 test report top statistic you would like to be displayed.
    +
    + Please choose up to 5 test report top statistics you would like to be displayed.
    + +
    +
    +
    Upsert Scenario
    +
    + When pushing test report into scenario that does not exists, the application will create it on the fly.
    +
    +
    + + +
    +
    +
    + diff --git a/src/app/shared/shared-project/project-settings/project-settings.component.ts b/src/app/shared/shared-project/project-settings/project-settings.component.ts index 3379e734..61ee839d 100644 --- a/src/app/shared/shared-project/project-settings/project-settings.component.ts +++ b/src/app/shared/shared-project/project-settings/project-settings.component.ts @@ -29,6 +29,7 @@ export class ProjectSettingsComponent implements OnInit { errorCount: null, networkSent: null, networkReceived: null, + scenarioUpsert: null, }; @Input() projectName: string; @@ -49,6 +50,7 @@ export class ProjectSettingsComponent implements OnInit { } createFormControls(settings) { + console.log(settings) this.formControls.virtualUsers = new FormControl(settings.topMetricsSettings.virtualUsers, []); this.formControls.percentile = new FormControl(settings.topMetricsSettings.percentile, []); this.formControls.throughput = new FormControl(settings.topMetricsSettings.throughput, []); @@ -60,12 +62,12 @@ export class ProjectSettingsComponent implements OnInit { this.formControls.avgLatency = new FormControl(settings.topMetricsSettings.avgLatency, []); this.formControls.avgConnectionTime = new FormControl(settings.topMetricsSettings.avgConnectionTime, []); this.formControls.avgResponseTime = new FormControl(settings.topMetricsSettings.avgResponseTime, []); + this.formControls.scenarioUpsert = new FormControl(settings.upsertScenario, []) this.formControls.projectName = new FormControl(settings.projectName, [ Validators.required, Validators.maxLength(100), Validators.minLength(3), ]); - } createForm() { @@ -81,7 +83,9 @@ export class ProjectSettingsComponent implements OnInit { avgLatency: this.formControls.avgLatency, avgConnectionTime: this.formControls.avgConnectionTime, avgResponseTime: this.formControls.avgResponseTime, + projectName: this.formControls.projectName, + scenarioUpsert: this.formControls.scenarioUpsert, }); } @@ -92,6 +96,7 @@ export class ProjectSettingsComponent implements OnInit { onSubmit() { const payload = { projectName: this.formControls.projectName.value, + upsertScenario: this.formControls.scenarioUpsert.value, topMetricsSettings: { virtualUsers: this.formControls.virtualUsers.value, errorRate: this.formControls.errorRate.value, @@ -119,7 +124,10 @@ export class ProjectSettingsComponent implements OnInit { } isEditable() { - const enabledMetrics = Object.values(this.formControls).map(control => control.value).filter(value => value === true); + const enabledMetrics = Object.values([this.formControls.virtualUsers, this.formControls.errorRate, this.formControls.percentile, + this.formControls.throughput, this.formControls.network, this.formControls.avgLatency, this.formControls.avgResponseTime, + this.formControls.avgConnectionTime, this.formControls.errorRate, this.formControls.networkSent, this.formControls.networkReceived]) + .map(control => control.value).filter(value => value === true); this.metricsEditable = enabledMetrics.length > 5; }
  • Label