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

abeizn pushed a commit to branch release-v1.0
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git

commit fe4340234dd833f9a7c67f036ef3a1d657883959
Author: 青湛 <[email protected]>
AuthorDate: Thu Mar 28 16:18:28 2024 +1300

    fix: missed dashboard link in onboard (#7232)
---
 config-ui/src/routes/onboard/step-4.tsx | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/config-ui/src/routes/onboard/step-4.tsx 
b/config-ui/src/routes/onboard/step-4.tsx
index 14a250b06..662f902d9 100644
--- a/config-ui/src/routes/onboard/step-4.tsx
+++ b/config-ui/src/routes/onboard/step-4.tsx
@@ -86,6 +86,14 @@ const LogsWrapper = styled.div`
   }
 `;
 
+const DashboardURLMap: Record<string, string> = {
+  github: 
'/grafana/d/KXWvOFQnz/github?orgId=1&var-repo_id=All&var-interval=WEEKDAY',
+  gitlab: 
'/grafana/d/msSjEq97z/gitlab?orgId=1&var-repo_id=All&var-interval=WEEKDAY',
+  bitbucket: 
'/grafana/d/4LzQHZa4k/bitbucket?orgId=1&var-repo_id=All&var-interval=WEEKDAY',
+  azuredevops:
+    
'/grafana/d/ba7e3a95-80ed-4067-a54b-2a82758eb3dd/azure-devops?orgId=1&var-repo_id=All&var-interval=WEEKDAY',
+};
+
 const getStatus = (data: any) => {
   if (!data) {
     return 'running';
@@ -194,7 +202,9 @@ export const Step4 = () => {
             <CheckCircleOutlined style={{ fontSize: 120, color: green5 }} />
             <div className="action">
               <Space direction="vertical">
-                <Button type="primary">Check Dashboard</Button>
+                <Button type="primary" onClick={() => 
window.open(DashboardURLMap[plugin])}>
+                  Check Dashboard
+                </Button>
                 <Button type="link">finish</Button>
               </Space>
             </div>
@@ -207,7 +217,9 @@ export const Step4 = () => {
             <div className="action">
               <Space>
                 <Button type="primary">Re-collect Data</Button>
-                <Button type="primary">Check Dashboard</Button>
+                <Button type="primary" onClick={() => 
window.open(DashboardURLMap[plugin])}>
+                  Check Dashboard
+                </Button>
               </Space>
             </div>
           </div>

Reply via email to