This is an automated email from the ASF dual-hosted git repository. vernedeng pushed a commit to branch branch-1.10 in repository https://gitbox.apache.org/repos/asf/inlong.git
commit 3e8e0e01bf217114c59f5e71fdc9a37fbc5d0e67 Author: Lizhen <88174078+bluew...@users.noreply.github.com> AuthorDate: Fri Dec 8 14:04:01 2023 +0800 [INLONG-9437][Dashboard] Data access audit supports audit item query (#9438) (cherry picked from commit 7630cd47c61c24a22cee8c78e8b4bf157345f171) --- 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 c35005a163..540c485122 100644 --- a/inlong-dashboard/src/ui/locales/cn.json +++ b/inlong-dashboard/src/ui/locales/cn.json @@ -614,6 +614,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 9853526fe1..4203413bc5 100644 --- a/inlong-dashboard/src/ui/locales/en.json +++ b/inlong-dashboard/src/ui/locales/en.json @@ -617,6 +617,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, }));