diff --git a/hobbit-gui/gui-client/src/app/benchmark/benchmark.component.ts b/hobbit-gui/gui-client/src/app/benchmark/benchmark.component.ts index 3f3a32f6..232c6a9e 100644 --- a/hobbit-gui/gui-client/src/app/benchmark/benchmark.component.ts +++ b/hobbit-gui/gui-client/src/app/benchmark/benchmark.component.ts @@ -43,6 +43,14 @@ export class BenchmarkComponent implements OnInit { if (this.benchmarks.length === 0) this.messageService.add({ severity: 'warn', summary: 'No Benchmarks', detail: 'Did not find any benchmarks.' }); + + if (window['repeatExperiment']) { + const benchmark = this.benchmarks.find(b => b.id === window['repeatExperiment'].benchmark.id); + if (benchmark) { + this.configModel.benchmark = benchmark.id; + this.onChangeBenchmark(benchmark.id); + } + } }); } @@ -57,6 +65,22 @@ export class BenchmarkComponent implements OnInit { this.selectedBenchmark.systems.sort((a, b) => a.name.toLowerCase().localeCompare(b.name.toLowerCase())); this.selectedBenchmark.systems = this.filterInvalidSystems(this.selectedBenchmark.systems); + + if (window['repeatExperiment']) { + const system = this.selectedBenchmark.systems.find(s => s.id === window['repeatExperiment'].system.id); + if (system) { + this.selectedSystem = system; + } + + this.selectedBenchmark.configurationParams.forEach(param => { + const experimentParamValue = window['repeatExperiment'].benchmark.configurationParamValues.find(v => v.id === param.id); + if (experimentParamValue) { + param.defaultValue = experimentParamValue.value; + } + }); + + delete window['repeatExperiment']; + } }); } } diff --git a/hobbit-gui/gui-client/src/app/experiments/details/details.component.html b/hobbit-gui/gui-client/src/app/experiments/details/details.component.html index e789f9b8..488bb3c1 100644 --- a/hobbit-gui/gui-client/src/app/experiments/details/details.component.html +++ b/hobbit-gui/gui-client/src/app/experiments/details/details.component.html @@ -36,11 +36,21 @@ -
+
+ +
+ +
+
+ + + + +
diff --git a/hobbit-gui/gui-client/src/app/experiments/details/details.component.ts b/hobbit-gui/gui-client/src/app/experiments/details/details.component.ts index 570d3cef..28b6e096 100644 --- a/hobbit-gui/gui-client/src/app/experiments/details/details.component.ts +++ b/hobbit-gui/gui-client/src/app/experiments/details/details.component.ts @@ -162,6 +162,9 @@ export class DetailsComponent implements OnInit, OnChanges { this.rows.push(this.buildRow('Logs', 'System Log', '', t => [ t.systemLogAvailable ? [`system/query?id=${t.id}`, `${t.id} system log`] : null, 'Download' ])); + this.rows.push(this.buildRow('Controls', 'Repeat Experiment', '', t => [ + null, 'Repeat' + ])); this.rows.sort((a, b) => { if (a.group !== b.group) @@ -215,6 +218,11 @@ export class DetailsComponent implements OnInit, OnChanges { }); } + repeat(ex: Experiment) { + window['repeatExperiment'] = ex; + this.router.navigate(['benchmarks/']); + } + private getMimeType(format: string): string { if (format === 'JSON') return 'application/json';