This is an automated email from the ASF dual-hosted git repository.
dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 7630cd47c6 [INLONG-9437][Dashboard] Data access audit supports audit
item query (#9438)
7630cd47c6 is described below
commit 7630cd47c61c24a22cee8c78e8b4bf157345f171
Author: Lizhen <[email protected]>
AuthorDate: Fri Dec 8 14:04:01 2023 +0800
[INLONG-9437][Dashboard] Data access audit supports audit item query (#9438)
---
inlong-dashboard/src/ui/locales/cn.json | 1 +
inlong-dashboard/src/ui/locales/en.json | 1 +
.../src/ui/pages/GroupDetail/Audit/config.tsx | 31 +++++++++++++++++++---
3 files changed, 30 insertions(+), 3 deletions(-)
diff --git a/inlong-dashboard/src/ui/locales/cn.json
b/inlong-dashboard/src/ui/locales/cn.json
index eb1a426f47..20ef99b2da 100644
--- a/inlong-dashboard/src/ui/locales/cn.json
+++ b/inlong-dashboard/src/ui/locales/cn.json
@@ -618,6 +618,7 @@
"pages.GroupDetail.Audit.Receive": "接收成功",
"pages.GroupDetail.Audit.Send": "发送成功",
"pages.GroupDetail.Audit.TimeStaticsDim": "粒度",
+ "pages.GroupDetail.Audit.Item": "审计项",
"pages.GroupDetail.Audit.Min": "分钟",
"pages.GroupDetail.Audit.Hour": "小时",
"pages.GroupDetail.Audit.Day": "天",
diff --git a/inlong-dashboard/src/ui/locales/en.json
b/inlong-dashboard/src/ui/locales/en.json
index f32c06445b..478231fbfb 100644
--- a/inlong-dashboard/src/ui/locales/en.json
+++ b/inlong-dashboard/src/ui/locales/en.json
@@ -622,6 +622,7 @@
"pages.GroupDetail.Audit.Hour": "Hour",
"pages.GroupDetail.Audit.Day": "Day",
"pages.GroupDetail.Audit.Sink": "Sink",
+ "pages.GroupDetail.Audit.Item": "Audit item",
"pages.GroupDetail.Delay.QueryDate": "Query date",
"pages.GroupDetail.Delay.AverageTitle": "Average transmission delay (ms)",
"pages.GroupDetail.Delay.RealTimeTitle": "Transmission delay (ms)",
diff --git a/inlong-dashboard/src/ui/pages/GroupDetail/Audit/config.tsx
b/inlong-dashboard/src/ui/pages/GroupDetail/Audit/config.tsx
index f580bbd97c..4f2b9919cf 100644
--- a/inlong-dashboard/src/ui/pages/GroupDetail/Audit/config.tsx
+++ b/inlong-dashboard/src/ui/pages/GroupDetail/Audit/config.tsx
@@ -71,7 +71,7 @@ export const toChartData = (source, sourceDataMap) => {
const xAxisData = Object.keys(sourceDataMap);
return {
legend: {
- data: source.map(item => getAuditLabel(item.auditId, item.nodeType)),
+ data: source.map(item => item.auditName),
},
tooltip: {
trigger: 'axis',
@@ -84,7 +84,7 @@ export const toChartData = (source, sourceDataMap) => {
type: 'value',
},
series: source.map(item => ({
- name: getAuditLabel(item.auditId, item.nodeType),
+ name: item.auditName,
type: 'line',
data: xAxisData.map(logTs => sourceDataMap[logTs]?.[item.auditId] || 0),
})),
@@ -199,6 +199,31 @@ export const getFormContent = (inlongGroupId,
initialValues, onSearch, onDataStr
options: timeStaticsDimList,
},
},
+ {
+ type: 'select',
+ label: i18n.t('pages.GroupDetail.Audit.Item'),
+ name: 'auditIds',
+ props: {
+ mode: 'multiple',
+ maxTagCount: 3,
+ allowClear: true,
+ dropdownMatchSelectWidth: false,
+ options: {
+ requestAuto: true,
+ requestService: {
+ url: '/audit/getAuditBases',
+ method: 'GET',
+ },
+ requestParams: {
+ formatResult: result =>
+ result?.map(item => ({
+ label: item.name,
+ value: item.auditId,
+ })) || [],
+ },
+ },
+ },
+ },
{
type: (
<Button type="primary" onClick={onSearch}>
@@ -210,7 +235,7 @@ export const getFormContent = (inlongGroupId,
initialValues, onSearch, onDataStr
export const getTableColumns = source => {
const data = source.map(item => ({
- title: getAuditLabel(item.auditId, item.nodeType),
+ title: item.auditName,
dataIndex: item.auditId,
render: text => text || 0,
}));