You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2022/11/17 10:36:33 UTC

[inlong] branch master updated: [INLONG-6565][Dashboard] The operation of refreshing the sink configuration needs to be executed when the group configuration is successful (#6566)

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 b64e7d8f4 [INLONG-6565][Dashboard] The operation of refreshing the sink configuration needs to be executed when the group configuration is successful (#6566)
b64e7d8f4 is described below

commit b64e7d8f4f84788889d33575e5842a46402c1a76
Author: Daniel <le...@apache.org>
AuthorDate: Thu Nov 17 18:36:28 2022 +0800

    [INLONG-6565][Dashboard] The operation of refreshing the sink configuration needs to be executed when the group configuration is successful (#6566)
---
 inlong-dashboard/src/locales/cn.json                      |  4 ++--
 inlong-dashboard/src/locales/en.json                      |  2 +-
 .../src/pages/GroupDetail/DataStorage/DetailModal.tsx     | 15 ++++++++++++---
 3 files changed, 15 insertions(+), 6 deletions(-)

diff --git a/inlong-dashboard/src/locales/cn.json b/inlong-dashboard/src/locales/cn.json
index 7be671dba..1c55c0e53 100644
--- a/inlong-dashboard/src/locales/cn.json
+++ b/inlong-dashboard/src/locales/cn.json
@@ -398,8 +398,8 @@
   "pages.GroupDetail.Sink.Status.Error": "配置失败",
   "pages.GroupDetail.Sink.Status.Success": "配置成功",
   "pages.GroupDetail.Sink.Cancel": "取消",
-  "pages.GroupDetail.Sink.Save": "仅保存",
-  "pages.GroupDetail.Sink.SaveAndRun": "保存并提交流程",
+  "pages.GroupDetail.Sink.Save": "保存",
+  "pages.GroupDetail.Sink.SaveAndRefresh": "保存并刷新配置",
   "pages.GroupDetail.Stream.StreamConfigTitle": "数据流配置",
   "pages.GroupDetail.Stream.CreateDataStream": "新建数据流",
   "pages.GroupDetail.PageTitle": "详情",
diff --git a/inlong-dashboard/src/locales/en.json b/inlong-dashboard/src/locales/en.json
index cc17fd9f9..322283961 100644
--- a/inlong-dashboard/src/locales/en.json
+++ b/inlong-dashboard/src/locales/en.json
@@ -399,7 +399,7 @@
   "pages.GroupDetail.Sink.Status.Success": "Success",
   "pages.GroupDetail.Sink.Cancel": "Cancel",
   "pages.GroupDetail.Sink.Save": "Save",
-  "pages.GroupDetail.Sink.SaveAndRun": "Save and submit the process",
+  "pages.GroupDetail.Sink.SaveAndRefresh": "Save and submit the process",
   "pages.GroupDetail.Stream.StreamConfigTitle": "Data stream configuration",
   "pages.GroupDetail.Stream.CreateDataStream": "Create",
   "pages.GroupDetail.PageTitle": "Detail",
diff --git a/inlong-dashboard/src/pages/GroupDetail/DataStorage/DetailModal.tsx b/inlong-dashboard/src/pages/GroupDetail/DataStorage/DetailModal.tsx
index 0e5489545..bdeac7d9b 100644
--- a/inlong-dashboard/src/pages/GroupDetail/DataStorage/DetailModal.tsx
+++ b/inlong-dashboard/src/pages/GroupDetail/DataStorage/DetailModal.tsx
@@ -47,6 +47,12 @@ const Comp: React.FC<DetailModalProps> = ({ inlongGroupId, id, ...modalProps })
 
   const { Entity } = useLoadMeta<SinkMetaType>('sink', sinkType);
 
+  const { data: groupData, run: getGroupData } = useRequest(`/group/get/${inlongGroupId}`, {
+    manual: true,
+    ready: Boolean(inlongGroupId),
+    refreshDeps: [inlongGroupId],
+  });
+
   const {
     data,
     loading,
@@ -68,6 +74,7 @@ const Comp: React.FC<DetailModalProps> = ({ inlongGroupId, id, ...modalProps })
   useUpdateEffect(() => {
     if (modalProps.visible) {
       // open
+      getGroupData();
       if (id) {
         getData(id);
       } else {
@@ -119,9 +126,11 @@ const Comp: React.FC<DetailModalProps> = ({ inlongGroupId, id, ...modalProps })
         <Button key="save" type="primary" onClick={() => onOk(false)}>
           {t('pages.GroupDetail.Sink.Save')}
         </Button>,
-        <Button key="run" type="primary" onClick={() => onOk(true)}>
-          {t('pages.GroupDetail.Sink.SaveAndRun')}
-        </Button>,
+        groupData?.status === 130 && (
+          <Button key="run" type="primary" onClick={() => onOk(true)}>
+            {t('pages.GroupDetail.Sink.SaveAndRefresh')}
+          </Button>
+        ),
       ]}
     >
       {loading ? (