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

release-22.2: ui: fix jobs page error state #97723

Merged
merged 1 commit into from
Mar 6, 2023
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
12 changes: 9 additions & 3 deletions pkg/ui/workspaces/cluster-ui/src/jobs/jobsPage/jobsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ export class JobsPage extends React.Component<JobsPageProps, PageState> {
onColumnsChange,
} = this.props;
const isLoading = reqInFlight && (!isDataValid || !jobs);
const error = jobs && jobsError;
const { pagination } = this.state;
const filteredJobs = jobs?.jobs ?? [];
const columns = makeJobsColumns();
Expand Down Expand Up @@ -300,7 +299,14 @@ export class JobsPage extends React.Component<JobsPageProps, PageState> {
</PageConfig>
</div>
<div className={cx("table-area")}>
<Loading loading={isLoading} page={"jobs"} error={error}>
{jobsError && jobs && (
<InlineAlert intent="danger" title={jobsError.message} />
)}
<Loading
loading={isLoading}
page={"jobs"}
error={!jobs ? jobsError : null}
>
<div>
<section className={sortableTableCx("cl-table-container")}>
<div className={sortableTableCx("cl-table-statistic")}>
Expand Down Expand Up @@ -350,7 +356,7 @@ export class JobsPage extends React.Component<JobsPageProps, PageState> {
/>
</div>
</Loading>
{isLoading && !error && (
{isLoading && !jobsError && (
<Delayed delay={moment.duration(2, "s")}>
<InlineAlert
intent="info"
Expand Down