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 1ee9fbc6a1 [INLONG-8262][Dashboard] Optimize the group log component
(#8263)
1ee9fbc6a1 is described below
commit 1ee9fbc6a18b8a402f399a4883ba48a8020d1362
Author: Lizhen <[email protected]>
AuthorDate: Mon Jun 19 10:00:02 2023 +0800
[INLONG-8262][Dashboard] Optimize the group log component (#8263)
---
.../src/ui/components/GroupLogs/GroupLogs.tsx | 14 ++++++++++++--
.../src/ui/pages/GroupDashboard/index.tsx | 7 ++++---
.../src/ui/pages/GroupDetail/DataStream/index.tsx | 20 ++++++++++++++++++--
3 files changed, 34 insertions(+), 7 deletions(-)
diff --git a/inlong-dashboard/src/ui/components/GroupLogs/GroupLogs.tsx
b/inlong-dashboard/src/ui/components/GroupLogs/GroupLogs.tsx
index d667623236..ed170223ef 100644
--- a/inlong-dashboard/src/ui/components/GroupLogs/GroupLogs.tsx
+++ b/inlong-dashboard/src/ui/components/GroupLogs/GroupLogs.tsx
@@ -32,9 +32,15 @@ const { Panel } = Collapse;
export interface Props extends ModalProps {
inlongGroupId: string;
inlongStreamId?: string;
+ inlongGroupMode: boolean;
}
-const Comp: React.FC<Props> = ({ inlongGroupId, inlongStreamId, ...modalProps
}) => {
+const Comp: React.FC<Props> = ({
+ inlongGroupId,
+ inlongStreamId,
+ inlongGroupMode,
+ ...modalProps
+}) => {
const { t } = useTranslation();
const [options, setOptions] = useState({
@@ -194,7 +200,11 @@ const Comp: React.FC<Props> = ({ inlongGroupId,
inlongStreamId, ...modalProps })
columns,
rowKey: 'taskId',
size: 'small',
- dataSource: item.taskExecuteLogs,
+ dataSource: inlongGroupMode
+ ? item.taskExecuteLogs
+ : item.taskExecuteLogs.filter(
+ task => task.taskDisplayName !== 'Group-InitMQ',
+ ),
}}
/>
</Panel>
diff --git a/inlong-dashboard/src/ui/pages/GroupDashboard/index.tsx
b/inlong-dashboard/src/ui/pages/GroupDashboard/index.tsx
index 3a9291041a..373d63e1f8 100644
--- a/inlong-dashboard/src/ui/pages/GroupDashboard/index.tsx
+++ b/inlong-dashboard/src/ui/pages/GroupDashboard/index.tsx
@@ -47,6 +47,7 @@ const Comp: React.FC = () => {
const [groupLogs, setGroupLogs] = useState({
open: false,
inlongGroupId: '',
+ inlongGroupMode: true,
});
const { data: summary = {} } = useRequest({
@@ -86,7 +87,7 @@ const Comp: React.FC = () => {
};
const openModal = ({ inlongGroupId }) => {
- setGroupLogs({ open: true, inlongGroupId: inlongGroupId });
+ setGroupLogs({ open: true, inlongGroupId: inlongGroupId, inlongGroupMode:
true });
};
const onRestart = ({ inlongGroupId }) => {
@@ -220,8 +221,8 @@ const Comp: React.FC = () => {
<GroupLogs
{...groupLogs}
- onOk={() => setGroupLogs({ open: false, inlongGroupId: '' })}
- onCancel={() => setGroupLogs({ open: false, inlongGroupId: '' })}
+ onOk={() => setGroupLogs({ open: false, inlongGroupId: '',
inlongGroupMode: true })}
+ onCancel={() => setGroupLogs({ open: false, inlongGroupId: '',
inlongGroupMode: true })}
/>
</PageContainer>
);
diff --git a/inlong-dashboard/src/ui/pages/GroupDetail/DataStream/index.tsx
b/inlong-dashboard/src/ui/pages/GroupDetail/DataStream/index.tsx
index c1707bb9a2..f80d593fc1 100644
--- a/inlong-dashboard/src/ui/pages/GroupDetail/DataStream/index.tsx
+++ b/inlong-dashboard/src/ui/pages/GroupDetail/DataStream/index.tsx
@@ -54,6 +54,7 @@ const Comp = ({ inlongGroupId, readonly, mqType }: Props,
ref) => {
open: false,
inlongGroupId,
inlongStreamId: '',
+ inlongGroupMode: true,
});
const [groupStatus, setGroupStatus] = useState();
@@ -111,6 +112,7 @@ const Comp = ({ inlongGroupId, readonly, mqType }: Props,
ref) => {
open: true,
inlongGroupId: inlongGroupId,
inlongStreamId: record.inlongStreamId,
+ inlongGroupMode: true,
});
};
@@ -255,8 +257,22 @@ const Comp = ({ inlongGroupId, readonly, mqType }: Props,
ref) => {
<GroupLogs
{...groupLogs}
- onOk={() => setGroupLogs({ open: false, inlongGroupId: '',
inlongStreamId: '' })}
- onCancel={() => setGroupLogs({ open: false, inlongGroupId: '',
inlongStreamId: '' })}
+ onOk={() =>
+ setGroupLogs({
+ open: false,
+ inlongGroupId: '',
+ inlongStreamId: '',
+ inlongGroupMode: true,
+ })
+ }
+ onCancel={() =>
+ setGroupLogs({
+ open: false,
+ inlongGroupId: '',
+ inlongStreamId: '',
+ inlongGroupMode: true,
+ })
+ }
/>
</>
);