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

mintsweet pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git


The following commit(s) were added to refs/heads/main by this push:
     new db7c38c25 fix(config-ui): missed collect data button in project detail 
(#5451)
db7c38c25 is described below

commit db7c38c25429e1bae3591f810edba51d7fa25399
Author: 青湛 <[email protected]>
AuthorDate: Tue Jun 13 20:40:04 2023 +0800

    fix(config-ui): missed collect data button in project detail (#5451)
---
 .../src/pages/blueprint/detail/configuration-panel.tsx     | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/config-ui/src/pages/blueprint/detail/configuration-panel.tsx 
b/config-ui/src/pages/blueprint/detail/configuration-panel.tsx
index ef84bcdc5..d29f5c7ad 100644
--- a/config-ui/src/pages/blueprint/detail/configuration-panel.tsx
+++ b/config-ui/src/pages/blueprint/detail/configuration-panel.tsx
@@ -106,6 +106,17 @@ export const ConfigurationPanel = ({ from, blueprint, 
onRefresh }: Props) => {
     }
   };
 
+  const handleRun = async () => {
+    const [success] = await operator(() => API.runBlueprint(blueprint.id, 
true), {
+      setOperating,
+      formatMessage: () => 'Trigger blueprint successful.',
+    });
+
+    if (success) {
+      onRefresh();
+    }
+  };
+
   return (
     <S.ConfigurationPanel>
       <div className="block">
@@ -210,6 +221,9 @@ export const ConfigurationPanel = ({ from, blueprint, 
onRefresh }: Props) => {
                   </S.ConnectionItem>
                 ))}
               </S.ConnectionList>
+              <Buttons position="bottom" align="center">
+                <Button intent={Intent.PRIMARY} text="Collect Data" 
onClick={handleRun} />
+              </Buttons>
             </>
           )}
         </div>

Reply via email to