You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by zi...@apache.org on 2022/08/25 03:54:01 UTC

[inlong] branch release-1.3.0 updated (9e4d9296e -> 323d4a31d)

This is an automated email from the ASF dual-hosted git repository.

zirui pushed a change to branch release-1.3.0
in repository https://gitbox.apache.org/repos/asf/inlong.git


    from 9e4d9296e [INLONG-5675][Agent] Support custom fixed ip for Agent (#5677)
     new cd807f6db [INLONG-5678][Manager] Provide source info for group status (#5679)
     new 323d4a31d [INLONG-5685][Dashboard] Fix the error of setting approvers params (#5686)

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../src/pages/ProcessManagement/DetailModal.tsx    | 10 +++++++--
 .../manager/client/api/InlongGroupContext.java     | 24 ++++++++++++++++++++++
 2 files changed, 32 insertions(+), 2 deletions(-)


[inlong] 01/02: [INLONG-5678][Manager] Provide source info for group status (#5679)

Posted by zi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zirui pushed a commit to branch release-1.3.0
in repository https://gitbox.apache.org/repos/asf/inlong.git

commit cd807f6db6936aca32529ca27aa370bc5aa55ca2
Author: woofyzhao <49...@qq.com>
AuthorDate: Thu Aug 25 10:46:48 2022 +0800

    [INLONG-5678][Manager] Provide source info for group status (#5679)
    
    Co-authored-by: woofyzhao <wo...@tencent.com>
---
 .../manager/client/api/InlongGroupContext.java     | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/InlongGroupContext.java b/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/InlongGroupContext.java
index c930d4846..3ba3a0aec 100644
--- a/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/InlongGroupContext.java
+++ b/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/InlongGroupContext.java
@@ -28,6 +28,7 @@ import org.apache.inlong.manager.common.enums.SimpleSourceStatus;
 import org.apache.inlong.manager.client.api.inner.InnerGroupContext;
 import org.apache.inlong.manager.pojo.group.InlongGroupExtInfo;
 import org.apache.inlong.manager.pojo.group.InlongGroupInfo;
+import org.apache.inlong.manager.pojo.group.InlongGroupStatusInfo;
 import org.apache.inlong.manager.pojo.source.StreamSource;
 import org.apache.inlong.manager.common.util.Preconditions;
 
@@ -57,6 +58,8 @@ public class InlongGroupContext implements Serializable {
 
     private SimpleGroupStatus status;
 
+    private InlongGroupStatusInfo statusInfo;
+
     public InlongGroupContext(InnerGroupContext groupContext) {
         InlongGroupInfo groupInfo = groupContext.getGroupInfo();
         Preconditions.checkNotNull(groupInfo, "inlong group info cannot be null");
@@ -66,6 +69,11 @@ public class InlongGroupContext implements Serializable {
         this.inlongStreamMap = groupContext.getStreamMap();
         this.status = SimpleGroupStatus.parseStatusByCode(groupInfo.getStatus());
         recheckState();
+        this.statusInfo = InlongGroupStatusInfo.builder()
+                .inlongGroupId(groupInfo.getInlongGroupId())
+                .originalStatus(groupInfo.getStatus())
+                .simpleGroupStatus(this.status)
+                .streamSources(getGroupSources()).build();
         this.extensions = Maps.newHashMap();
         List<InlongGroupExtInfo> extInfos = groupInfo.getExtList();
         if (CollectionUtils.isNotEmpty(extInfos)) {
@@ -75,6 +83,22 @@ public class InlongGroupContext implements Serializable {
         }
     }
 
+    private List<StreamSource> getGroupSources() {
+        List<StreamSource> groupSources = Lists.newArrayList();
+        this.inlongStreamMap.values().forEach(inlongStream -> {
+            Map<String, StreamSource> sources = inlongStream.getSources();
+            if (MapUtils.isNotEmpty(sources)) {
+                for (Map.Entry<String, StreamSource> entry : sources.entrySet()) {
+                    StreamSource source = entry.getValue();
+                    if (source != null) {
+                        groupSources.add(source);
+                    }
+                }
+            }
+        });
+        return groupSources;
+    }
+
     private void recheckState() {
         if (MapUtils.isEmpty(this.inlongStreamMap)) {
             return;


[inlong] 02/02: [INLONG-5685][Dashboard] Fix the error of setting approvers params (#5686)

Posted by zi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

zirui pushed a commit to branch release-1.3.0
in repository https://gitbox.apache.org/repos/asf/inlong.git

commit 323d4a31d70a1ab5537335c37303dc0f81a1260a
Author: Daniel <le...@apache.org>
AuthorDate: Thu Aug 25 11:18:11 2022 +0800

    [INLONG-5685][Dashboard] Fix the error of setting approvers params (#5686)
---
 inlong-dashboard/src/pages/ProcessManagement/DetailModal.tsx | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/inlong-dashboard/src/pages/ProcessManagement/DetailModal.tsx b/inlong-dashboard/src/pages/ProcessManagement/DetailModal.tsx
index 757bcf3fd..0cc176f34 100644
--- a/inlong-dashboard/src/pages/ProcessManagement/DetailModal.tsx
+++ b/inlong-dashboard/src/pages/ProcessManagement/DetailModal.tsx
@@ -59,6 +59,10 @@ const Comp: React.FC<Props> = ({ id, ...modalProps }) => {
     }),
     {
       manual: true,
+      formatResult: result => ({
+        ...result,
+        approvers: result.approvers?.split(','),
+      }),
       onSuccess: result => {
         form.setFieldsValue(result);
       },
@@ -72,11 +76,13 @@ const Comp: React.FC<Props> = ({ id, ...modalProps }) => {
       values.id = id;
       values.version = savedData?.version;
     }
-    console.log(values, 'values');
     await request({
       url: isUpdate ? '/workflow/approver/update' : '/workflow/approver/save',
       method: 'POST',
-      data: values,
+      data: {
+        ...values,
+        approvers: values.approvers?.join(','),
+      },
     });
     await modalProps?.onOk(values);
     message.success(i18n.t('basic.OperatingSuccess'));