[GitHub] [apisix-dashboard] batman-ezio commented on a change in pull request #1558: feat:Support duplicate one existing Route
batman-ezio commented on a change in pull request #1558: URL: https://github.com/apache/apisix-dashboard/pull/1558#discussion_r598056887 ## File path: web/config/routes.ts ## @@ -39,6 +39,10 @@ const routes = [ path: '/routes/:rid/edit', component: './Route/Create', }, + { +path: '/routes/:rid/duplicate', Review comment: @guoqqqi I sync from master after your PR merged, but still failed -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] batman-ezio commented on a change in pull request #1558: feat:Support duplicate one existing Route
batman-ezio commented on a change in pull request #1558: URL: https://github.com/apache/apisix-dashboard/pull/1558#discussion_r596573541 ## File path: web/config/routes.ts ## @@ -39,6 +39,10 @@ const routes = [ path: '/routes/:rid/edit', component: './Route/Create', }, + { +path: '/routes/:rid/duplicate', Review comment: > hi @batman-ezio > pr #1606 has been merged. please sync codes from branch master. sync from master but frontend still fails 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] batman-ezio commented on a change in pull request #1558: feat:Support duplicate one existing Route
batman-ezio commented on a change in pull request #1558: URL: https://github.com/apache/apisix-dashboard/pull/1558#discussion_r596545088 ## File path: web/src/pages/Route/List.tsx ## @@ -387,6 +387,9 @@ const Page: React.FC = () => { }}> {formatMessage({ id: 'component.global.view' })} + history.push(`/routes/${record.id}/duplicate`)}> Review comment: we can't do that because the route name is unique, we need to take user to `/routes/:rid/duplicate` and fill the copied data, user needs to change the name and then get next to submit 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [apisix-dashboard] batman-ezio commented on a change in pull request #1558: feat:Support duplicate one existing Route
batman-ezio commented on a change in pull request #1558: URL: https://github.com/apache/apisix-dashboard/pull/1558#discussion_r588862808 ## File path: api/internal/handler/route/route.go ## @@ -307,6 +307,12 @@ func generateLuaCode(script map[string]interface{}) (string, error) { func (h *Handler) Create(c droplet.Context) (interface{}, error) { input := c.Input().(*entity.Route) + // check duplicate name + if err := h.checkDuplicateName(c, input.Name, ""); err != nil { Review comment: ok 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org