diff --git a/frontend/src/actions/homeActions.js b/frontend/src/actions/homeActions.js
index 55d3907a..45ccad65 100644
--- a/frontend/src/actions/homeActions.js
+++ b/frontend/src/actions/homeActions.js
@@ -47,7 +47,7 @@ export const fetchOCPJobsData = () => async (dispatch, getState) => {
dispatch(getCPTSummary());
dispatch(setPageOptions(START_PAGE, DEFAULT_PER_PAGE));
dispatch(sliceTableRows(0, DEFAULT_PER_PAGE));
- dispatch(buildFilterData());
+ // dispatch(buildFilterData());
}
} catch (error) {
dispatch(showFailureToast());
@@ -75,7 +75,7 @@ export const sliceTableRows = (startIdx, endIdx) => (dispatch, getState) => {
};
export const buildFilterData = () => (dispatch, getState) => {
- const results = [...getState().cpt.results];
+ const results = [...getState().cpt.filteredResults];
const tableFilters = [...getState().cpt.tableFilters];
@@ -89,6 +89,7 @@ export const buildFilterData = () => (dispatch, getState) => {
};
filterData.push(obj);
}
+
dispatch({
type: TYPES.SET_CPT_FILTER_DATA,
payload: filterData,
@@ -216,6 +217,7 @@ export const applyFilters = () => (dispatch, getState) => {
dispatch(getCPTSummary());
dispatch(setPageOptions(START_PAGE, DEFAULT_PER_PAGE));
dispatch(sliceTableRows(0, DEFAULT_PER_PAGE));
+ dispatch(buildFilterData());
};
export const setFilterFromURL = (searchParams) => ({
diff --git a/frontend/src/components/molecules/MultiSelectBox/index.jsx b/frontend/src/components/molecules/MultiSelectBox/index.jsx
index 8ce1a876..7acbf263 100644
--- a/frontend/src/components/molecules/MultiSelectBox/index.jsx
+++ b/frontend/src/components/molecules/MultiSelectBox/index.jsx
@@ -42,26 +42,30 @@ const MultiSelectBox = (props) => {
innerRef={toggleRef}
isExpanded={isOpen}
style={{
- width: "300px",
+ width: props.width,
height: "36px",
}}
>
{Array.isArray(props.selected.value) &&
props.selected.value.length > 0 ? (
-
- {props.selected.value.map((selection, index) => (
- {
- // ev.stopPropagation();
- // onSelect(selection);
- // }}
- >
- {selection}
-
- ))}
-
+
+
+
+ {props.selected.value.map((selection, index) => (
+ {
+ // ev.stopPropagation();
+ // onSelect(selection);
+ // }}
+ >
+ {selection}
+
+ ))}
+
+
+
) : (
@@ -94,7 +98,7 @@ const MultiSelectBox = (props) => {
{...option}
ref={null}
>
- {option.name}
+ {option.value}
))}
@@ -109,5 +113,6 @@ MultiSelectBox.propTypes = {
selected: PropTypes.array,
applyMethod: PropTypes.func,
currCategory: PropTypes.string,
+ width: PropTypes.string,
};
export default MultiSelectBox;
diff --git a/frontend/src/reducers/ocpReducer.js b/frontend/src/reducers/ocpReducer.js
index bacfddb9..c96c9aac 100644
--- a/frontend/src/reducers/ocpReducer.js
+++ b/frontend/src/reducers/ocpReducer.js
@@ -79,6 +79,27 @@ const initialState = {
{ name: "Infra", value: "infraNodesCount" },
{ name: "Total", value: "totalNodesCount" },
],
+ selectedFilters: [
+ { name: "ciSystem", value: [] },
+ { name: "platform", value: [] },
+ { name: "benchmark", value: [] },
+ { name: "releaseStream", value: [] },
+ { name: "build", value: [] },
+ { name: "workerNodesCount", value: [] },
+ { name: "networkType", value: [] },
+ { name: "shortVersion", value: [] },
+ { name: "jobType", value: [] },
+ { name: "isRehearse", value: [] },
+ { name: "ipsec", value: [] },
+ { name: "fips", value: [] },
+ { name: "encrypted", value: [] },
+ { name: "publish", value: [] },
+ { name: "computeArch", value: [] },
+ { name: "controlPlaneArch", value: [] },
+ { name: "jobStatus", value: [] },
+ { name: "startDate", value: [] },
+ { name: "endDate", value: [] },
+ ],
};
const OCPReducer = (state = initialState, action = {}) => {
@@ -122,6 +143,8 @@ const OCPReducer = (state = initialState, action = {}) => {
return { ...state, graphData: [...state.graphData, payload] };
case TYPES.SET_OCP_COLUMNS:
return { ...state, tableColumns: payload };
+ case TYPES.SET_SELECTED_FILTERS:
+ return { ...state, selectedFilters: payload };
default:
return state;
}