Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refresh button now reloads logs and artifacts as well on RunDetails page #47

Merged
merged 1 commit into from
Nov 6, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions frontend/src/pages/RunDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,11 @@ class RunDetails extends Page<RunDetailsProps, RunDetailsState> {
await this.showPageError(`Error: failed to retrieve run: ${runId}.`, err);
logger.error('Error loading run:', runId);
}

// These are called here to ensure that logs and artifacts in the side panel are refreshed when
// the user hits "Refresh", either in the top toolbar or in an error banner.
this._loadSelectedNodeLogs();
this._loadSelectedNodeOutputs();
}

private _selectNode(id: string) {
Expand Down Expand Up @@ -354,8 +359,6 @@ class RunDetails extends Page<RunDetailsProps, RunDetailsState> {
private async _loadSelectedNodeOutputs() {
const selectedNodeDetails = this.state.selectedNodeDetails;
if (!selectedNodeDetails) {
// This should never happen
logger.error('Tried to load outputs for a node that is not selected');
return;
}
this.setState({ sidepanelBusy: true });
Expand All @@ -379,8 +382,6 @@ class RunDetails extends Page<RunDetailsProps, RunDetailsState> {
private async _loadSelectedNodeLogs() {
const selectedNodeDetails = this.state.selectedNodeDetails;
if (!selectedNodeDetails) {
// This should never happen
logger.error('Tried to load outputs for a node that is not selected');
return;
}
this.setState({ sidepanelBusy: true });
Expand Down