Skip to content

Commit

Permalink
Add bug fix for 404 page in cluster details view
Browse files Browse the repository at this point in the history
  • Loading branch information
EMaksy committed May 16, 2023
1 parent 6753c90 commit f0c5e28
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
5 changes: 5 additions & 0 deletions assets/js/components/ExecutionResults/ExecutionResults.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import HealthIcon from '@components/Health';
import Modal from '@components/Modal';
import PremiumPill from '@components/PremiumPill';
import Table from '@components/Table';
import LoadingBox from '@components/LoadingBox';
import {
getCatalogCategoryList,
getCheckResults,
Expand Down Expand Up @@ -117,6 +118,10 @@ function ExecutionResults({
}
};

if (catalogLoading) {
return <LoadingBox text="Loading checks catalog" />;
}

const checksResults = getCheckResults(executionData);
const catalogCategoryList = getCatalogCategoryList(catalog, checksResults);
const tableData = checksResults
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
REQUESTED_EXECUTION_STATE,
RUNNING_STATES,
} from '@state/lastExecutions';
import LoadingBox from '@components/LoadingBox';
import ExecutionResults from './ExecutionResults';

function ExecutionResultsPage() {
Expand Down Expand Up @@ -40,7 +41,7 @@ function ExecutionResultsPage() {
}, [cloudProvider]);

if (!cluster) {
return <div>Loading...</div>;
return <LoadingBox text="Loading ..." />;
}

return (
Expand Down
7 changes: 4 additions & 3 deletions assets/js/components/ExecutionResults/checksUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,10 @@ export const getCatalogCategoryList = (catalog, checksResults = []) => {
}
return [
...new Set(
checksResults.map(
({ check_id }) => catalog.find((check) => check.id === check_id).group
)
checksResults.map(({ check_id }) => {
const result = catalog.find((check) => check.id === check_id);
return !result ? '' : result.group;
})
),
].sort();
};
Expand Down

0 comments on commit f0c5e28

Please sign in to comment.