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

[apisix-dashboard] branch master updated: feat: add upstream id in form (#2321)

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

juzhiyuan 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 bbecd55  feat: add upstream id in form (#2321)
bbecd55 is described below

commit bbecd55fc95f67569d43fff7f84531b6bc2ecf1e
Author: Yu.Bozhong <y....@foxmail.com>
AuthorDate: Thu Feb 24 09:12:24 2022 +0800

    feat: add upstream id in form (#2321)
---
 .../upstream/create_and_edit_upstream_with_custom_chash_key.spec.js  | 1 +
 web/src/pages/Upstream/List.tsx                                      | 5 +++++
 web/src/pages/Upstream/locales/en-US.ts                              | 1 +
 web/src/pages/Upstream/locales/zh-CN.ts                              | 1 +
 4 files changed, 8 insertions(+)

diff --git a/web/cypress/integration/upstream/create_and_edit_upstream_with_custom_chash_key.spec.js b/web/cypress/integration/upstream/create_and_edit_upstream_with_custom_chash_key.spec.js
index 7b02a14..7aa3357 100644
--- a/web/cypress/integration/upstream/create_and_edit_upstream_with_custom_chash_key.spec.js
+++ b/web/cypress/integration/upstream/create_and_edit_upstream_with_custom_chash_key.spec.js
@@ -83,6 +83,7 @@ context('Create and Delete Upstream With Custom CHash Key', () => {
     cy.contains('Next').click();
     cy.contains('Submit').click();
     cy.get(selector.notification).should('contain', data.createUpstreamSuccess);
+    cy.contains('.ant-table-cell', 'ID').should('be.visible');
     cy.url().should('contains', 'upstream/list');
   });
 
diff --git a/web/src/pages/Upstream/List.tsx b/web/src/pages/Upstream/List.tsx
index 249abd2..52be85e 100644
--- a/web/src/pages/Upstream/List.tsx
+++ b/web/src/pages/Upstream/List.tsx
@@ -52,6 +52,11 @@ const Page: React.FC = () => {
 
   const columns: ProColumns<UpstreamModule.ResponseBody>[] = [
     {
+      title: formatMessage({ id: 'page.upstream.list.id' }),
+      dataIndex: 'id',
+      hideInSearch: true,
+    },
+    {
       title: formatMessage({ id: 'page.upstream.list.name' }),
       dataIndex: 'name',
     },
diff --git a/web/src/pages/Upstream/locales/en-US.ts b/web/src/pages/Upstream/locales/en-US.ts
index 01038ea..14e811f 100644
--- a/web/src/pages/Upstream/locales/en-US.ts
+++ b/web/src/pages/Upstream/locales/en-US.ts
@@ -76,6 +76,7 @@ export default {
   'page.upstream.create.basic.info': 'Basic Information',
   'page.upstream.create.preview': 'Preview',
 
+  'page.upstream.list.id': 'ID',
   'page.upstream.list.name': 'Name',
   'page.upstream.list.type': 'Type',
   'page.upstream.list.description': 'Description',
diff --git a/web/src/pages/Upstream/locales/zh-CN.ts b/web/src/pages/Upstream/locales/zh-CN.ts
index b2d6778..3bd84eb 100644
--- a/web/src/pages/Upstream/locales/zh-CN.ts
+++ b/web/src/pages/Upstream/locales/zh-CN.ts
@@ -75,6 +75,7 @@ export default {
   'page.upstream.create.basic.info': '基础信息',
   'page.upstream.create.preview': '预览',
 
+  'page.upstream.list.id': 'ID',
   'page.upstream.list.name': '名称',
   'page.upstream.list.type': '类型',
   'page.upstream.list.description': '描述',