diff --git a/src/app/scenario/scenario-settings/scenario-settings.component.css b/src/app/scenario/scenario-settings/scenario-settings.component.css index b03f3835..8a5233dd 100644 --- a/src/app/scenario/scenario-settings/scenario-settings.component.css +++ b/src/app/scenario/scenario-settings/scenario-settings.component.css @@ -7,5 +7,5 @@ } .desc { - padding-bottom: 20px; + padding-bottom: 10px; } diff --git a/src/app/scenario/scenario-settings/scenario-settings.component.html b/src/app/scenario/scenario-settings/scenario-settings.component.html index 66f6d567..3684985e 100644 --- a/src/app/scenario/scenario-settings/scenario-settings.component.html +++ b/src/app/scenario/scenario-settings/scenario-settings.component.html @@ -85,6 +85,18 @@
Delete sample data after processing
+
+
Generate share token automatically
+
+ When enabled the API will return share token upon new test report upload.
+
+
+ + +
+
+
+ diff --git a/src/app/scenario/scenario-settings/scenario-settings.component.ts b/src/app/scenario/scenario-settings/scenario-settings.component.ts index 945ed9ea..29b9a5da 100644 --- a/src/app/scenario/scenario-settings/scenario-settings.component.ts +++ b/src/app/scenario/scenario-settings/scenario-settings.component.ts @@ -28,6 +28,7 @@ export class SettingsScenarioComponent implements OnInit { zeroErrorToleranceEnabled: null, deleteSamples: null, keepTestRunsPeriod: null, + generateShareToken: null, }; params; @@ -111,6 +112,9 @@ export class SettingsScenarioComponent implements OnInit { this.formControls.keepTestRunsPeriod = new FormControl(settings.keepTestRunsPeriod, [ Validators.required ]); + this.formControls.generateShareToken = new FormControl(settings.generateShareToken, [ + Validators.required + ]) } createForm() { @@ -124,6 +128,7 @@ export class SettingsScenarioComponent implements OnInit { zeroErrorToleranceEnabled: this.formControls.zeroErrorToleranceEnabled, deleteSamples: this.formControls.deleteSamples, keepTestRunsPeriod: this.formControls.keepTestRunsPeriod, + generateShareToken: this.formControls.generateShareToken, }); } @@ -137,8 +142,9 @@ export class SettingsScenarioComponent implements OnInit { const { scenarioName, analysisEnabled, thresholdEnabled, thresholdErrorRate, - thresholdPercentile, thresholdThroughput, deleteSamples, zeroErrorToleranceEnabled, keepTestRunsPeriod + thresholdPercentile, thresholdThroughput, deleteSamples, zeroErrorToleranceEnabled, keepTestRunsPeriod, generateShareToken } = this.scenarioSettingsForm.value; + console.log(this.scenarioSettingsForm.value) const { projectName, scenarioName: currentScenarioName } = this.params; const body = { scenarioName, @@ -146,6 +152,7 @@ export class SettingsScenarioComponent implements OnInit { zeroErrorToleranceEnabled, keepTestRunsPeriod, deleteSamples, + generateShareToken, thresholds: { enabled: thresholdEnabled, errorRate: parseFloat(thresholdErrorRate),