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 2020/06/04 07:48:09 UTC
[incubator-apisix-dashboard] branch feat-route-list created (now
ef1e513)
This is an automated email from the ASF dual-hosted git repository.
juzhiyuan pushed a change to branch feat-route-list
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-dashboard.git.
at ef1e513 feat: added list page
This branch includes the following new commits:
new 2164a57 feat: initial route list
new ef1e513 feat: added list page
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[incubator-apisix-dashboard] 01/02: feat: initial route list
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juzhiyuan pushed a commit to branch feat-route-list
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-dashboard.git
commit 2164a576441655bb199c7899abeb34a9794c5071
Author: juzhiyuan <jj...@gmail.com>
AuthorDate: Thu Jun 4 14:19:53 2020 +0800
feat: initial route list
---
config/routes.ts | 8 +++++++-
src/locales/en-US/menu.ts | 1 +
src/locales/zh-CN/menu.ts | 1 +
src/pages/Routes/List.tsx | 8 ++++++++
4 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/config/routes.ts b/config/routes.ts
index 84ea03d..6938834 100644
--- a/config/routes.ts
+++ b/config/routes.ts
@@ -40,7 +40,13 @@ const routes = [
routes: [
{
path: '/routes',
- redirect: '/routes/create',
+ redirect: '/routes/list',
+ },
+ {
+ path: '/routes/list',
+ name: 'list',
+ icon: 'BarsOutlined',
+ component: './Routes/List',
},
{
path: '/routes/create',
diff --git a/src/locales/en-US/menu.ts b/src/locales/en-US/menu.ts
index 1409f6d..90b066f 100644
--- a/src/locales/en-US/menu.ts
+++ b/src/locales/en-US/menu.ts
@@ -54,6 +54,7 @@ export default {
'menu.ssl.create': 'Create',
'menu.setting': 'Settings',
'menu.routes': 'Route',
+ 'menu.routes.list': 'Route List',
'menu.routes.create': 'Create a Route',
'menu.routes.edit': 'Edit the Route',
};
diff --git a/src/locales/zh-CN/menu.ts b/src/locales/zh-CN/menu.ts
index 6a6f5c6..888b1c6 100644
--- a/src/locales/zh-CN/menu.ts
+++ b/src/locales/zh-CN/menu.ts
@@ -54,6 +54,7 @@ export default {
'menu.ssl.create': '创建',
'menu.setting': '设置',
'menu.routes': '路由',
+ 'menu.routes.list': '列表',
'menu.routes.create': '创建',
'menu.routes.edit': '编辑',
};
diff --git a/src/pages/Routes/List.tsx b/src/pages/Routes/List.tsx
new file mode 100644
index 0000000..e5cdb20
--- /dev/null
+++ b/src/pages/Routes/List.tsx
@@ -0,0 +1,8 @@
+import React from 'react';
+import { PageHeaderWrapper } from '@ant-design/pro-layout';
+
+const RouteList: React.FC = () => {
+ return <PageHeaderWrapper>Hi</PageHeaderWrapper>;
+};
+
+export default RouteList;
[incubator-apisix-dashboard] 02/02: feat: added list page
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juzhiyuan pushed a commit to branch feat-route-list
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-dashboard.git
commit ef1e51347a849f70330bc8fa83af2e0651966ffa
Author: juzhiyuan <jj...@gmail.com>
AuthorDate: Thu Jun 4 15:46:48 2020 +0800
feat: added list page
---
src/pages/Routes/List.tsx | 18 +++++++++++++++++-
src/pages/Routes/typing.d.ts | 5 +++++
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/src/pages/Routes/List.tsx b/src/pages/Routes/List.tsx
index e5cdb20..9d8e99f 100644
--- a/src/pages/Routes/List.tsx
+++ b/src/pages/Routes/List.tsx
@@ -1,8 +1,24 @@
import React from 'react';
import { PageHeaderWrapper } from '@ant-design/pro-layout';
+import ProTable, { ProColumns } from '@ant-design/pro-table';
+
+import { ListItem } from '@/transforms/global';
const RouteList: React.FC = () => {
- return <PageHeaderWrapper>Hi</PageHeaderWrapper>;
+ const columns: ProColumns<ListItem<RouteModule.BaseData>>[] = [
+ {
+ title: 'ID',
+ dataIndex: 'displayKey',
+ sortOrder: 'descend',
+ hideInSearch: true,
+ },
+ ];
+
+ return (
+ <PageHeaderWrapper>
+ <ProTable<ListItem<RouteModule.BaseData>> columns={columns} search={false} />
+ </PageHeaderWrapper>
+ );
};
export default RouteList;
diff --git a/src/pages/Routes/typing.d.ts b/src/pages/Routes/typing.d.ts
index acc91f7..652869c 100644
--- a/src/pages/Routes/typing.d.ts
+++ b/src/pages/Routes/typing.d.ts
@@ -14,6 +14,11 @@ declare namespace RouteModule {
type HttpMethod = 'GET' | 'HEAD' | 'POST' | 'PUT' | 'DELETE' | 'OPTIONS' | 'PATCH';
type RequestProtocol = 'https' | 'http' | 'websocket';
+ type BaseData = {
+ name: string;
+ desc: string;
+ };
+
type Step1Data = {
name: string;
desc: string;