Skip to content
This repository was archived by the owner on Sep 12, 2024. It is now read-only.

added paginate param for data sources dropdown in event alert and add… #953

Merged
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions frontend/src/components/EventAlertForm/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ const EventAlertForm = ({
useEffect(() => {
if (path[2] === 'edit') {
dispatch(getKpiAlertById(kpiId));
dispatch(getAllKpiExplorerForm());
dispatch(getAllKpiExplorerForm({ paginate: false }));
} else {
dispatch(getAllKpiExplorerForm());
dispatch(getAllKpiExplorerForm({ paginate: false }));
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/KpiExplorerForm/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ const KpiExplorerForm = ({ onboarding, setModal, setText }) => {
}, [kpiEditData]);

const dispatchGetAllKpiExplorerForm = () => {
dispatch(getAllKpiExplorerForm());
dispatch(getAllKpiExplorerForm({ paginate: false }));
};

useEffect(() => {
Expand Down
5 changes: 3 additions & 2 deletions frontend/src/redux/actions/KpiEplorer.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,12 @@ export const getTableInfoDataFailure = () => {
};
};

export const getAllKpiExplorerForm = () => {
export const getAllKpiExplorerForm = (pgInfo) => {
return async (dispatch) => {
dispatch(getAllKpiExplorerFormRequested());
const url = attachParams(CONNECTION_URL, pgInfo);
const { data, error, status } = await getRequest({
url: CONNECTION_URL
url: url
});
if (error) {
dispatch(getAllKpiExplorerFormFailure());
Expand Down