Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ exports[`base/Nav/SideMenu/UserMenu/BasicVersionModal render snap when open is t
class="ant-typography css-dev-only-do-not-override-txh9fw"
>
UI:
dev-zjrc-scan-collect-audit-lb-v3 0da534e4f
dev-zjrc-sql-fingerprint-id-filter 93c9fa7e2
</article>
</div>
<div
Expand Down Expand Up @@ -345,7 +345,7 @@ exports[`base/Nav/SideMenu/UserMenu/BasicVersionModal render snap when open is t
class="ant-typography css-dev-only-do-not-override-txh9fw"
>
UI:
dev-zjrc-scan-collect-audit-lb-v3 0da534e4f
dev-zjrc-sql-fingerprint-id-filter 93c9fa7e2
</article>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ exports[`base/Nav/SideMenu/UserMenu/VersionModal-ce render snap when open is tru
class="ant-typography css-dev-only-do-not-override-txh9fw"
>
UI:
dev-zjrc-scan-collect-audit-lb-v3 0da534e4f
dev-zjrc-sql-fingerprint-id-filter 93c9fa7e2
</article>
</div>
<div
Expand Down Expand Up @@ -1312,7 +1312,7 @@ exports[`base/Nav/SideMenu/UserMenu/VersionModal-ce render snap when open is tru
class="ant-typography css-dev-only-do-not-override-txh9fw"
>
UI:
dev-zjrc-scan-collect-audit-lb-v3 0da534e4f
dev-zjrc-sql-fingerprint-id-filter 93c9fa7e2
</article>
</div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ exports[`base/Nav/SideMenu/UserMenu/VersionModal-ee render snap when open is tru
class="ant-typography css-dev-only-do-not-override-txh9fw"
>
UI:
dev-zjrc-scan-collect-audit-lb-v3 0da534e4f
dev-zjrc-sql-fingerprint-id-filter 93c9fa7e2
</article>
</div>
<div
Expand Down Expand Up @@ -352,7 +352,7 @@ exports[`base/Nav/SideMenu/UserMenu/VersionModal-ee render snap when open is tru
class="ant-typography css-dev-only-do-not-override-txh9fw"
>
UI:
dev-zjrc-scan-collect-audit-lb-v3 0da534e4f
dev-zjrc-sql-fingerprint-id-filter 93c9fa7e2
</article>
</div>
<div
Expand Down
2 changes: 1 addition & 1 deletion packages/base/src/scripts/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const UI_VERSION = 'dev-zjrc-scan-collect-audit-lb-v3 0da534e4f';
export const UI_VERSION = 'dev-zjrc-sql-fingerprint-id-filter 93c9fa7e2';
4 changes: 4 additions & 0 deletions packages/shared/lib/api/sqle/service/SqlManage/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ export interface IGetSqlManageListV2Params {

fuzzy_search_sql_fingerprint?: string;

fuzzy_search_id?: string;

filter_assignee?: string;

filter_instance_id?: string;
Expand Down Expand Up @@ -243,6 +245,8 @@ export interface IGetSqlManageStatisticsV2Params {

fuzzy_search_sql_fingerprint?: string;

fuzzy_search_id?: string;

filter_assignee?: string;

filter_instance_id?: string;
Expand Down
1 change: 1 addition & 0 deletions packages/sqle/src/locale/en-US/sqlManagement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export default {
},
column: {
SQLFingerprint: 'SQL fingerprint',
sqlId: 'SQL ID',
source: 'Source',
instanceName: 'DB instance',
priority: 'Priority',
Expand Down
1 change: 1 addition & 0 deletions packages/sqle/src/locale/zh-CN/sqlManagement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export default {
},
column: {
SQLFingerprint: 'SQL指纹',
sqlId: 'SQL ID',
source: '来源',
instanceName: '数据源',
priority: '优先级',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ exports[`page/SqlManagement/SQLEEIndex filter data with rule name 1`] = `
</div>
<div
class="ant-space-item"
style="padding-bottom: 12px;"
style="margin-right: 12px; padding-bottom: 12px;"
>
<div
class="ant-select ant-select-sm ant-select-borderless basic-select-wrapper custom-select-namespace css-pti5z8 css-dev-only-do-not-override-jx040l ant-select-focused ant-select-single ant-select-allow-clear ant-select-show-arrow ant-select-open"
Expand Down Expand Up @@ -883,6 +883,26 @@ exports[`page/SqlManagement/SQLEEIndex filter data with rule name 1`] = `
/>
</div>
</div>
<div
class="ant-space-item"
style="padding-bottom: 12px;"
>
<span
class="ant-input-affix-wrapper basic-input-wrapper custom-input-namespace css-1v8xzxw ant-input-affix-wrapper-sm css-dev-only-do-not-override-mlhibv"
>
<span
class="ant-input-prefix"
>
SQL ID
</span>
<input
class="ant-input ant-input-sm css-dev-only-do-not-override-mlhibv"
placeholder="请输入{{name}}"
type="text"
value=""
/>
</span>
</div>
</div>
<div>
<div
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
filter_schema_name?: string;
filter_audit_level?: string;
filter_rule_name?: string;
fuzzy_search_id?: string;
time?: string;
};

Expand Down Expand Up @@ -121,6 +122,15 @@
filterLabel: t('sqlManagement.table.filter.rule'),
checked: false
}
],
[
'fuzzy_search_id',
{
filterCustomType: 'input',
filterKey: 'fuzzy_search_id',
filterLabel: t('sqlManagement.table.column.sqlId'),
checked: false
}
]
]);
};
Expand Down Expand Up @@ -231,6 +241,18 @@
);
}
},
{
className: 'ellipsis-column-width',
dataIndex: 'id',
key: 'id',
width: 200,
title: () => t('sqlManagement.table.column.sqlId'),
show: false,
render: (id) => {

Check warning on line 251 in packages/sqle/src/page/SqlManagement/component/SQLEEIndex/column.tsx

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🕹️ Function is not covered

Warning! Not covered function
if (id === undefined || id === null) return null;

Check warning on line 252 in packages/sqle/src/page/SqlManagement/component/SQLEEIndex/column.tsx

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

Check warning on line 252 in packages/sqle/src/page/SqlManagement/component/SQLEEIndex/column.tsx

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement

Check warning on line 252 in packages/sqle/src/page/SqlManagement/component/SQLEEIndex/column.tsx

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch

Check warning on line 252 in packages/sqle/src/page/SqlManagement/component/SQLEEIndex/column.tsx

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch

Check warning on line 252 in packages/sqle/src/page/SqlManagement/component/SQLEEIndex/column.tsx

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
return <BasicTypographyEllipsis textCont={String(id)} />;

Check warning on line 253 in packages/sqle/src/page/SqlManagement/component/SQLEEIndex/column.tsx

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🧾 Statement is not covered

Warning! Not covered statement
}
},
{
dataIndex: 'sql',
className: 'ellipsis-column-width',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ const OBJECT_NAME_EXPORT_KEY = 'object_name';

const SQL_MANAGEMENT_EXPORT_COLUMN_KEYS = [
'sql_fingerprint',
'id',
'sql',
'source',
AUDIT_LEVEL_EXPORT_KEY,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,12 @@ const SQLEEIndex = () => {
) {
delete staticFilters.filter_schema_name;
}
if (
staticFilters.fuzzy_search_id === '' ||
staticFilters.fuzzy_search_id === undefined
) {
delete staticFilters.fuzzy_search_id;
}

const isParseFailedRuleSelected =
filter_rule_name === PARSE_FAILED_RULE_SELECT_VALUE;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export const SQL_MANAGE_STATIC_FILTER_KEYS = [
'filter_status',
'filter_db_type',
'fuzzy_search_sql_fingerprint',
'fuzzy_search_id',
'fuzzy_search_endpoint',
'fuzzy_search_schema_name'
] as const;
Original file line number Diff line number Diff line change
Expand Up @@ -653,9 +653,11 @@
? 320
: DEFAULT_SCAN_SQL_COLUMN_WIDTH);

// SQL ID(主键 id):与管控页同口径,默认不勾选(清本地设置后 cur.show ?? true 不会误展示)
return {
...column,
width
width,
...(fieldName === 'id' ? { show: false as const } : {})

Check warning on line 660 in packages/sqle/src/page/SqlManagementConf/Detail/ScanTypeSqlCollection/index.tsx

View workflow job for this annotation

GitHub Actions / Coverage annotations (🧪 jest-coverage-report-action)

🌿 Branch is not covered

Warning! Not covered branch
};
});
}, [
Expand Down
Loading