Skip to content

Commit

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

* Show the successful trials in the experiment graph.

Signed-off-by: Elena Zioga <elena@arrikto.com>
  • Loading branch information
elenzio9 committed Nov 22, 2022
1 parent b3c3807 commit 1b55064
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 1b55064

Please sign in to comment.