Skip to content

Commit

Permalink
table filter source data
Browse files Browse the repository at this point in the history
  • Loading branch information
xinbinyan committed Oct 30, 2023
1 parent 8d3f304 commit faf932e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import { BasicTag, EditText } from '@actiontech/shared';
import { tooltipsCommonProps } from '@actiontech/shared/lib/components/BasicToolTips';
import { Space } from 'antd5';

// project_name
export type SqlManagementTableFilterParamType = PageInfoWithoutIndexAndSize<
IGetSqlManageListParams,
'fuzzy_search_sql_fingerprint' | 'filter_status' | 'project_name'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ import SqlManagementColumn, {
SqlManagementRowAction,
type SqlManagementTableFilterParamType
} from './column';
import useStaticStatus from '../../../../hooks/useStaticStatus';
import useStaticStatus from './hooks/useStaticStatus';
import {
initSqleManagementModalStatus,
updateSqleManagement,
Expand Down Expand Up @@ -186,7 +186,8 @@ const SQLEEIndex = () => {
SqlManagementColumn(projectID, actionPermission, updateRemark, openModal),
[projectID, actionPermission, updateRemark, openModal]
);
const { getAuditLevelStatusSelectOption } = useStaticStatus();
const { generateAuditLevelSelectOptions, generateSourceSelectOptions } =
useStaticStatus();
const tableSetting = useMemo<ColumnsSettingProps>(
() => ({
tableName: 'sql_management_list',
Expand All @@ -207,11 +208,15 @@ const SQLEEIndex = () => {
}),
FilterCustomProps
>([
['filter_source', { options: [{ label: 'source11', value: 11 }] }],
['filter_source', { options: generateSourceSelectOptions }],
['filter_instance_name', { options: instanceOptions }],
['filter_audit_level', { options: [{ label: 'level11', value: 11 }] }]
['filter_audit_level', { options: generateAuditLevelSelectOptions }]
]);
}, [instanceOptions]);
}, [
instanceOptions,
generateSourceSelectOptions,
generateAuditLevelSelectOptions
]);

const onSearch = (value: string) => {
setSearchKeyword(value);
Expand Down

0 comments on commit faf932e

Please sign in to comment.