Skip to content

Commit

Permalink
frontend: Show the successful trials in the experiment graph (#2013) (#…
Browse files Browse the repository at this point in the history
…2033)

* Show the successful trials in the experiment graph.

Signed-off-by: Elena Zioga <[email protected]>

Signed-off-by: Elena Zioga <[email protected]>
  • Loading branch information
elenzio9 authored Dec 5, 2022
1 parent 55bdcbb commit 9fe1bd6
Showing 1 changed file with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export class ExperimentDetailsComponent implements OnInit, OnDestroy {
const data = transformStringResponses(response);
this.columns = data.types;
this.details = this.parseTrialsDetails(data.details);
this.showGraph = this.showGraphFn(response);
this.showGraph = this.showGraphFn(this.details);
});
this.backendService
.getExperiment(this.name, this.namespace)
Expand Down Expand Up @@ -181,7 +181,7 @@ export class ExperimentDetailsComponent implements OnInit, OnDestroy {
const data = transformStringResponses(trials);
this.columns = data.types;
this.details = this.parseTrialsDetails(data.details);
this.showGraph = this.showGraphFn(trials);
this.showGraph = this.showGraphFn(this.details);
});
}),
);
Expand Down Expand Up @@ -251,8 +251,10 @@ export class ExperimentDetailsComponent implements OnInit, OnDestroy {
}
}

private showGraphFn(response: string): boolean {
if (!response.includes(',,') && response.includes('\n')) {
private showGraphFn(array: string[][]): boolean {
const found = array.find(a => a[0] === 'Succeeded');

if (found) {
return true;
}
}
Expand Down

0 comments on commit 9fe1bd6

Please sign in to comment.