Skip to content

Commit

Permalink
ui: add reload button for Loading component
Browse files Browse the repository at this point in the history
Resolves cockroachdb#68602

Release note (ui change): when an error is encoutered in the statement/
transaction/session page, user can now click on reload button to reload
the page.
  • Loading branch information
Azhng committed Oct 21, 2021
1 parent 27f0d45 commit 8a19a09
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion pkg/ui/workspaces/cluster-ui/src/loading/loading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,20 @@ export const Loading: React.FC<LoadingProps> = props => {
} else {
return {
intent: "danger",
description: <span>{error.message}</span>,
description: (
<div>
<span>{error.message}</span>
{". "}
<a
className={cx("action")}
onClick={() => {
window.location.reload();
}}
>
Reload this page
</a>
</div>
),
};
}
})
Expand Down

0 comments on commit 8a19a09

Please sign in to comment.