You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by bz...@apache.org on 2022/01/25 14:38:12 UTC

[apisix-dashboard] branch master updated: chore: add loading in route page (#2287)

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

bzp2010 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new 4c8972e  chore: add loading in route page  (#2287)
4c8972e is described below

commit 4c8972e3e8c3850e14da1b22266eef296c53861c
Author: CP3cham <87...@users.noreply.github.com>
AuthorDate: Tue Jan 25 22:38:04 2022 +0800

    chore: add loading in route page  (#2287)
---
 .../integration/route/create-edit-duplicate-delete-route.spec.js       | 3 +++
 web/src/pages/Route/List.tsx                                           | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/web/cypress/integration/route/create-edit-duplicate-delete-route.spec.js b/web/cypress/integration/route/create-edit-duplicate-delete-route.spec.js
old mode 100644
new mode 100755
index df7a384..a28bf20
--- a/web/cypress/integration/route/create-edit-duplicate-delete-route.spec.js
+++ b/web/cypress/integration/route/create-edit-duplicate-delete-route.spec.js
@@ -315,6 +315,9 @@ context('Create and Delete Route', () => {
         .within(() => {
           cy.contains('OK').click();
         });
+      cy.get(selector.deleteAlert).within(()=>{
+        cy.get('.ant-btn-loading-icon').should('be.visible');
+      })
       cy.get(selector.notification).should('contain', data.deleteRouteSuccess);
       cy.get(selector.notificationCloseIcon).click();
     });
diff --git a/web/src/pages/Route/List.tsx b/web/src/pages/Route/List.tsx
old mode 100644
new mode 100755
index 8191640..93a31f2
--- a/web/src/pages/Route/List.tsx
+++ b/web/src/pages/Route/List.tsx
@@ -264,7 +264,7 @@ const Page: React.FC = () => {
               </>
             ),
             onOk: () => {
-              remove(record.id!).then(() => {
+              return remove(record.id!).then(() => {
                 handleTableActionSuccessResponse(
                   `${formatMessage({ id: 'component.global.delete' })} ${formatMessage({
                     id: 'menu.routes',