Skip to content

Commit

Permalink
Fix 404 page when wrong filtered catalog is being used in execution r…
Browse files Browse the repository at this point in the history
…esults page (#1414)

* Add bug fix for 404 page in cluster details view
  • Loading branch information
EMaksy authored May 16, 2023
1 parent 6753c90 commit dff15cd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion 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 {
getCatalogCategoryList,
getCheckResults,
Expand Down Expand Up @@ -116,7 +117,6 @@ function ExecutionResults({
onLastExecutionUpdate();
}
};

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
3 changes: 2 additions & 1 deletion assets/js/components/ExecutionResults/checksUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ export const getCatalogCategoryList = (catalog, checksResults = []) => {
return [
...new Set(
checksResults.map(
({ check_id }) => catalog.find((check) => check.id === check_id).group
({ check_id }) =>
catalog.find((check) => check.id === check_id)?.group || ''
)
),
].sort();
Expand Down

0 comments on commit dff15cd

Please sign in to comment.