This is an automated email from the ASF dual-hosted git repository.
leezng 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 fb5f65bbe [INLONG-7493][Dashboard] Not use upper case for source,
sink, and audit labels (#7494)
fb5f65bbe is described below
commit fb5f65bbec7f6976f516b8c4c6077a324772cba6
Author: Lizhen <[email protected]>
AuthorDate: Fri Mar 3 09:32:40 2023 +0800
[INLONG-7493][Dashboard] Not use upper case for source, sink, and audit
labels (#7494)
---
inlong-dashboard/src/pages/GroupDetail/Audit/config.tsx | 4 +++-
inlong-dashboard/src/pages/GroupDetail/DataSources/index.tsx | 3 ++-
inlong-dashboard/src/pages/GroupDetail/DataStorage/index.tsx | 3 ++-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/inlong-dashboard/src/pages/GroupDetail/Audit/config.tsx
b/inlong-dashboard/src/pages/GroupDetail/Audit/config.tsx
index ac3f39ceb..6d1a5712d 100644
--- a/inlong-dashboard/src/pages/GroupDetail/Audit/config.tsx
+++ b/inlong-dashboard/src/pages/GroupDetail/Audit/config.tsx
@@ -21,6 +21,7 @@ import React from 'react';
import { Button } from 'antd';
import dayjs from 'dayjs';
import i18n from '@/i18n';
+import { sinks } from '@/metas/sinks';
export const timeStaticsDimList = [
{
@@ -62,7 +63,8 @@ function getAuditLabel(auditId: number, nodeType?: string) {
const id = +auditId;
const item = id >= 9 ? auditMap[id % 2 ? 7 : 8] : auditMap[id];
const label = item?.label || id;
- return nodeType ? `${label}(${nodeType})` : label;
+ const sinkLabel = sinks.find(c => c.value === nodeType)?.label;
+ return nodeType ? `${label}(${sinkLabel})` : label;
}
export const toChartData = (source, sourceDataMap) => {
diff --git a/inlong-dashboard/src/pages/GroupDetail/DataSources/index.tsx
b/inlong-dashboard/src/pages/GroupDetail/DataSources/index.tsx
index 7671ff012..1d3fae571 100644
--- a/inlong-dashboard/src/pages/GroupDetail/DataSources/index.tsx
+++ b/inlong-dashboard/src/pages/GroupDetail/DataSources/index.tsx
@@ -35,6 +35,7 @@ import i18n from '@/i18n';
import request from '@/utils/request';
import { pickObjectArray } from '@/utils';
import { CommonInterface } from '../common';
+import { sources } from '@/metas/sources';
interface Props extends CommonInterface {
inlongStreamId?: string;
@@ -231,7 +232,7 @@ const Comp = ({ inlongGroupId, inlongStreamId, readonly }:
Props, ref) => {
>
<span>
<span style={{ marginRight: 10 }}>{item.sourceName}</span>
- <Tag>{item.sourceType}</Tag>
+ <Tag>{sources.find(c => c.value ===
item.sourceType)?.label}</Tag>
</span>
</List.Item>
)}
diff --git a/inlong-dashboard/src/pages/GroupDetail/DataStorage/index.tsx
b/inlong-dashboard/src/pages/GroupDetail/DataStorage/index.tsx
index cf37faa53..07469d150 100644
--- a/inlong-dashboard/src/pages/GroupDetail/DataStorage/index.tsx
+++ b/inlong-dashboard/src/pages/GroupDetail/DataStorage/index.tsx
@@ -35,6 +35,7 @@ import { useDefaultMeta, useLoadMeta, SinkMetaType } from
'@/metas';
import request from '@/utils/request';
import { pickObjectArray } from '@/utils';
import { CommonInterface } from '../common';
+import { sinks } from '@/metas/sinks';
interface Props extends CommonInterface {
inlongStreamId?: string;
@@ -225,7 +226,7 @@ const Comp = ({ inlongGroupId, inlongStreamId, readonly }:
Props, ref) => {
>
<span>
<span style={{ marginRight: 10 }}>{item.sinkName}</span>
- <Tag>{item.sinkType}</Tag>
+ <Tag>{sinks.find(c => c.value ===
item.sinkType)?.label}</Tag>
</span>
</List.Item>
)}