(
- `/v1/projects/${project_name}/blacklist/${blacklist_id}`,
- paramsData,
- options
- );
- }
-
public deleteBlackList(
params: IDeleteBlackListParams,
options?: AxiosRequestConfig
diff --git a/packages/shared/lib/api/sqle/service/common.d.ts b/packages/shared/lib/api/sqle/service/common.d.ts
index 3d2edf02cf..dd3ae618f7 100644
--- a/packages/shared/lib/api/sqle/service/common.d.ts
+++ b/packages/shared/lib/api/sqle/service/common.d.ts
@@ -438,8 +438,6 @@ export interface IBlacklistResV1 {
content?: string;
- created_at?: string;
-
desc?: string;
last_match_time?: string;
@@ -553,10 +551,6 @@ export interface ICreateAuditWhitelistResV1 {
message?: string;
}
-export interface ICreateBlacklistDataV1 {
- blacklist_id?: number;
-}
-
export interface ICreateBlacklistReqV1 {
content?: string;
@@ -565,14 +559,6 @@ export interface ICreateBlacklistReqV1 {
type?: CreateBlacklistReqV1TypeEnum;
}
-export interface ICreateBlacklistResV1 {
- code?: number;
-
- data?: ICreateBlacklistDataV1;
-
- message?: string;
-}
-
export interface ICreateCustomRuleReqV1 {
annotation?: string;
@@ -995,14 +981,6 @@ export interface IGetAuditWhitelistResV1 {
total_nums?: number;
}
-export interface IGetBlacklistDetailResV1 {
- code?: number;
-
- data?: IBlacklistResV1;
-
- message?: string;
-}
-
export interface IGetBlacklistResV1 {
code?: number;
@@ -1460,6 +1438,8 @@ export interface IGetSqlManageListResp {
message?: string;
+ source_extra?: ISourceExtra;
+
sql_manage_bad_num?: number;
sql_manage_optimized_num?: number;
@@ -3527,6 +3507,38 @@ export interface IRuleTemplateV2 {
name?: string;
}
+export interface ISourceExtra {
+ enabled?: boolean;
+
+ filter_meta_list?: IFilterMeta[];
+
+ head?: ISourceExtraHead[];
+
+ rows?: ISourceExtraRow[];
+
+ source?: string;
+
+ source_desc?: string;
+}
+
+export interface ISourceExtraHead {
+ desc?: string;
+
+ name?: string;
+
+ sortable?: boolean;
+
+ type?: string;
+}
+
+export interface ISourceExtraRow {
+ id?: number;
+
+ values?: {
+ [key: string]: string;
+ };
+}
+
export interface ITaskAnalysisDataV2 {
performance_statistics?: IPerformanceStatistics;
diff --git a/packages/shared/lib/api/sqle/service/common.enum.ts b/packages/shared/lib/api/sqle/service/common.enum.ts
index 08431fe272..d73f93382e 100644
--- a/packages/shared/lib/api/sqle/service/common.enum.ts
+++ b/packages/shared/lib/api/sqle/service/common.enum.ts
@@ -119,9 +119,7 @@ export enum BlacklistResV1TypeEnum {
host = 'host',
- instance = 'instance',
-
- db_user = 'db_user'
+ instance = 'instance'
}
export enum CreateAuditTaskReqV1ExecModeEnum {
@@ -147,9 +145,7 @@ export enum CreateBlacklistReqV1TypeEnum {
host = 'host',
- instance = 'instance',
-
- db_user = 'db_user'
+ instance = 'instance'
}
export enum CreateCustomRuleReqV1LevelEnum {
@@ -365,9 +361,7 @@ export enum UpdateBlacklistReqV1TypeEnum {
host = 'host',
- instance = 'instance',
-
- db_user = 'db_user'
+ instance = 'instance'
}
export enum UpdateCustomRuleReqV1LevelEnum {
diff --git a/packages/shared/lib/components/ActiontechTable/Table.tsx b/packages/shared/lib/components/ActiontechTable/Table.tsx
index 5341c81ca9..94efc0d770 100644
--- a/packages/shared/lib/components/ActiontechTable/Table.tsx
+++ b/packages/shared/lib/components/ActiontechTable/Table.tsx
@@ -22,6 +22,7 @@ const ActiontechTable = <
filterContainerProps,
columns = [],
isPaginationFixed = true,
+ disableRowHover = false,
...props
}: ActiontechTableProps
) => {
const { t } = useTranslation();
@@ -47,11 +48,14 @@ const ActiontechTable = <
return mergerColumns;
}
return mergerColumns
- .filter((v) => localColumns?.[v.dataIndex]?.show)
- .map((v) => ({
+ .filter((v) => localColumns?.[v.dataIndex]?.show ?? true)
+ .map((v, index) => ({
...v,
- fixed: localColumns?.[v.dataIndex]?.fixed,
- order: localColumns?.[v.dataIndex]?.order
+ fixed: localColumns?.[v.dataIndex]
+ ? localColumns[v.dataIndex].fixed
+ : v.fixed,
+ // 尚未写入 localStorage 的动态列沿用 mergerColumns 下标,避免 order 为 0 被排到最前
+ order: localColumns?.[v.dataIndex]?.order ?? index + 1
}))
.sort((prev, current) => prev.order - current.order);
}, [localColumns, mergerColumns, props.setting]);
@@ -73,7 +77,9 @@ const ActiontechTable = <
>({
-
+
- {getColumnsLabel(data.title)}
+ {data.settingMarked ? (
+
+ {getColumnsLabel(data.title)}
+
+ ) : (
+ getColumnsLabel(data.title)
+ )}
diff --git a/packages/shared/lib/components/ActiontechTable/components/FilterButton.tsx b/packages/shared/lib/components/ActiontechTable/components/FilterButton.tsx
index ef25536833..bff78cc991 100644
--- a/packages/shared/lib/components/ActiontechTable/components/FilterButton.tsx
+++ b/packages/shared/lib/components/ActiontechTable/components/FilterButton.tsx
@@ -2,6 +2,7 @@ import { TableFilterButtonProps } from '../index.type';
import { useMemo } from 'react';
import { useTranslation } from 'react-i18next';
import BasicButton from '../../BasicButton';
+import BasicToolTips from '../../BasicToolTips';
import { DownOutlined, UpOutlined } from '@actiontech/icons';
import { ColumnsSettingStyleWrapper } from './style';
@@ -18,27 +19,35 @@ const FilterButton =
>({
);
return (
- updateAllSelectedFilterItem(!hasSelectedFilter)}
- style={{
- padding: '0 6px 0 10px'
- }}
+
-
- {hasSelectedFilter
- ? t('common.actiontechTable.filterButton.clearFilter')
- : t('common.actiontechTable.filterButton.filter')}
+ updateAllSelectedFilterItem(!hasSelectedFilter)}
+ style={{
+ padding: '0 6px 0 10px'
+ }}
+ >
+
+ {hasSelectedFilter
+ ? t('common.actiontechTable.filterButton.clearFilter')
+ : t('common.actiontechTable.filterButton.filter')}
- {hasSelectedFilter ? (
-
- ) : (
-
- )}
-
-
+ {hasSelectedFilter ? (
+
+ ) : (
+
+ )}
+
+
+
);
};
diff --git a/packages/shared/lib/components/ActiontechTable/components/style.ts b/packages/shared/lib/components/ActiontechTable/components/style.ts
index d5260d528e..1e48b70a23 100644
--- a/packages/shared/lib/components/ActiontechTable/components/style.ts
+++ b/packages/shared/lib/components/ActiontechTable/components/style.ts
@@ -30,7 +30,7 @@ export const SearchInputStyleWrapper = styled(BasicInput)`
`;
export const ColumnsSettingDropdownStyleWrapper = styled('div')`
- width: 220px;
+ width: 280px;
background-color: ${({ theme }) =>
theme.sharedTheme.components.columnsSetting.dropdown.backgroundColor};
border-radius: 8px;
@@ -93,6 +93,23 @@ export const ColumnsSettingDropdownStyleWrapper = styled('div')`
theme.sharedTheme.components.columnsSetting.dropdown.item.iconColor};
}
+ .actiontech-table-setting-extra-mark {
+ position: relative;
+ display: inline-block;
+ padding-right: 0.55em;
+ max-width: 100%;
+
+ &::after {
+ content: '*';
+ position: absolute;
+ top: 0.2em;
+ right: 0;
+ font-size: 12px;
+ line-height: 1;
+ color: ${({ theme }) => theme.sharedTheme.uiToken.colorPrimary};
+ }
+ }
+
&-label {
font-weight: 500;
font-size: 13px;
diff --git a/packages/shared/lib/components/ActiontechTable/components/test/__snapshots__/ColumnsItems.test.tsx.snap b/packages/shared/lib/components/ActiontechTable/components/test/__snapshots__/ColumnsItems.test.tsx.snap
index 67cb00f2d6..9e0d285487 100644
--- a/packages/shared/lib/components/ActiontechTable/components/test/__snapshots__/ColumnsItems.test.tsx.snap
+++ b/packages/shared/lib/components/ActiontechTable/components/test/__snapshots__/ColumnsItems.test.tsx.snap
@@ -42,7 +42,7 @@ exports[`lib/ActiontechTable-ColumnsItems render column item left | right 1`] =
-
-
+