You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by "heyanlong (via GitHub)" <gi...@apache.org> on 2023/12/26 09:29:51 UTC

[PR] feat: default route [skywalking-booster-ui]

heyanlong opened a new pull request, #354:
URL: https://github.com/apache/skywalking-booster-ui/pull/354

   If all menus are not active, the marketplace is used


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: default route [skywalking-booster-ui]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on PR #354:
URL: https://github.com/apache/skywalking-booster-ui/pull/354#issuecomment-1869404917

   What do you mean the marketplace is used? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: default route [skywalking-booster-ui]

Posted by "heyanlong (via GitHub)" <gi...@apache.org>.
heyanlong commented on PR #354:
URL: https://github.com/apache/skywalking-booster-ui/pull/354#issuecomment-1869407374

   Because marketplace routing always exists in the left menu
   <img width="879" alt="image" src="https://github.com/apache/skywalking-booster-ui/assets/3367958/754de548-c67f-4dc5-ba1f-11589945fe8a">
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: default route [skywalking-booster-ui]

Posted by "Fine0830 (via GitHub)" <gi...@apache.org>.
Fine0830 merged PR #354:
URL: https://github.com/apache/skywalking-booster-ui/pull/354


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: default route [skywalking-booster-ui]

Posted by "Fine0830 (via GitHub)" <gi...@apache.org>.
Fine0830 commented on code in PR #354:
URL: https://github.com/apache/skywalking-booster-ui/pull/354#discussion_r1436415437


##########
src/router/index.ts:
##########
@@ -47,7 +47,23 @@ router.beforeEach((to, from, next) => {
   }
 
   if (to.path === "/") {
-    const defaultPath = (routesLayers[0] && routesLayers[0].children[0].path) || "";
+    let defaultPath = "";
+    for (const route of routesLayers) {
+      for (const child of route.children) {
+        if (child.meta.activate) {
+          defaultPath = child.path;
+          break;
+        }
+      }
+      if (defaultPath !== "") {

Review Comment:
   ```suggestion
         if (defaultPath) {
   ```



##########
src/router/index.ts:
##########
@@ -47,7 +47,23 @@ router.beforeEach((to, from, next) => {
   }
 
   if (to.path === "/") {
-    const defaultPath = (routesLayers[0] && routesLayers[0].children[0].path) || "";
+    let defaultPath = "";
+    for (const route of routesLayers) {
+      for (const child of route.children) {
+        if (child.meta.activate) {
+          defaultPath = child.path;
+          break;
+        }
+      }
+      if (defaultPath !== "") {
+        break;
+      }
+    }
+
+    if (defaultPath === "") {

Review Comment:
   ```suggestion
       if (!defaultPath) {
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: default route [skywalking-booster-ui]

Posted by "heyanlong (via GitHub)" <gi...@apache.org>.
heyanlong commented on PR #354:
URL: https://github.com/apache/skywalking-booster-ui/pull/354#issuecomment-1869412111

   > Oh, you mean if none service exists, no marketplace menu, right? This should be a bug.
   
   No, there is no service, and it jumps to the service menu by default. So if no service exists, jumps to marketplace.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: default route [skywalking-booster-ui]

Posted by "wu-sheng (via GitHub)" <gi...@apache.org>.
wu-sheng commented on PR #354:
URL: https://github.com/apache/skywalking-booster-ui/pull/354#issuecomment-1869409869

   Oh, you mean if none service exists, no marketplace menu, right?
   This should be a bug.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@skywalking.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org