-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: switch to mantine table with paging
* feat: add support for pagination for configs list * feat: enable grouping and fix issue around expanded fix: fix expand initial state issues * fix: improve mrt by disabling dragging and dropping columns and hiding the column menu button fix: prevent mrt from dragging and drop columns chore: improve table * refactor: switch to MRT for Config Insights Table Fixes #2285 * refactor: use mantime react table for config changes Fixes #2285 fix: fix issue with config changes table * refactor: for playbooks, use mantime react table Fixes #2285 fix: fix props issue for playbooks fix: fix issues with playbook runs * refactor: use MRT for config relationships Fixes #2285 fix: typescript error refactor: move to MRT for tables for configs Fixes #2285 fix: fix empty text for default grouping value * fix: fix issue affecting sorting in MRT tables * fix: fix issue with config tables --------- Co-authored-by: Moshe Immerman <[email protected]>
- Loading branch information
1 parent
8bfce8d
commit c6f1c9c
Showing
35 changed files
with
774 additions
and
732 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
import { useSearchParams } from "react-router-dom"; | ||
import { useConfigInsightsQuery } from "./useConfigAnalysisQuery"; | ||
|
||
export default function useFetchConfigInsights( | ||
setIsLoading: (isLoading: boolean) => void, | ||
configId?: string | ||
) { | ||
const [params] = useSearchParams(); | ||
|
||
const status = params.get("status") ?? undefined; | ||
const severity = params.get("severity") ?? undefined; | ||
const type = params.get("type") ?? undefined; | ||
const configType = params.get("configType") ?? undefined; | ||
const analyzer = params.get("analyzer") ?? undefined; | ||
const component = params.get("component") ?? undefined; | ||
const pageSize = +(params.get("pageSize") ?? 50); | ||
const pageIndex = +(params.get("pageIndex") ?? 0); | ||
|
||
return useConfigInsightsQuery( | ||
{ | ||
status, | ||
severity: severity?.toLowerCase(), | ||
type, | ||
analyzer, | ||
component, | ||
configId, | ||
configType | ||
}, | ||
{ | ||
sortBy: params.get("sortBy") ?? undefined, | ||
sortOrder: params.get("sortOrder") as "asc" | "desc" | undefined | ||
}, | ||
{ | ||
pageIndex, | ||
pageSize | ||
}, | ||
{ | ||
keepPreviousData: true, | ||
onSuccess: () => setIsLoading(false) | ||
} | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.