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/05/20 08:06:31 UTC
[incubator-apisix-dashboard] branch feat-refactor updated: feat:
remove ssl model
This is an automated email from the ASF dual-hosted git repository.
juzhiyuan pushed a commit to branch feat-refactor
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-dashboard.git
The following commit(s) were added to refs/heads/feat-refactor by this push:
new da11275 feat: remove ssl model
da11275 is described below
commit da1127594ca32602ae2b239bee38d75e12da45c6
Author: juzhiyuan <jj...@gmail.com>
AuthorDate: Wed May 20 16:06:09 2020 +0800
feat: remove ssl model
---
src/models/connect.d.ts | 2 --
src/models/ssl.ts | 23 -----------------------
src/pages/ssl/List.tsx | 1 -
src/pages/ssl/service.ts | 1 -
src/pages/ssl/typing.d.ts | 5 +++++
5 files changed, 5 insertions(+), 27 deletions(-)
diff --git a/src/models/connect.d.ts b/src/models/connect.d.ts
index 9e27465..a0696dc 100644
--- a/src/models/connect.d.ts
+++ b/src/models/connect.d.ts
@@ -3,7 +3,6 @@ import { GlobalModelState } from './global';
import { DefaultSettings as SettingModelState } from '../../config/defaultSettings';
import { UserModelState } from './user';
import { StateType } from './login';
-import { ModelState as SSLModelState } from './ssl';
export { GlobalModelState, SettingModelState, UserModelState };
@@ -25,7 +24,6 @@ export interface ConnectState {
settings: SettingModelState;
user: UserModelState;
login: StateType;
- ssl: SSLModelState;
}
export interface Route extends MenuDataItem {
diff --git a/src/models/ssl.ts b/src/models/ssl.ts
deleted file mode 100644
index 49edb08..0000000
--- a/src/models/ssl.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-export interface SSL {
- sni: string[];
- cert: string;
- key: string;
-}
-
-export interface ModelState {}
-
-export interface ModelType {
- namespace: string;
- state: ModelState;
- effects: {};
- reducers: {};
-}
-
-const model: ModelType = {
- namespace: 'ssl',
- state: {},
- effects: {},
- reducers: {},
-};
-
-export default model;
diff --git a/src/pages/ssl/List.tsx b/src/pages/ssl/List.tsx
index 3b4b257..53adaef 100644
--- a/src/pages/ssl/List.tsx
+++ b/src/pages/ssl/List.tsx
@@ -5,7 +5,6 @@ import { Button, Modal, notification, Switch } from 'antd';
import { history, useIntl } from 'umi';
import { PlusOutlined } from '@ant-design/icons';
import { fetchList as fetchSSLList, remove as removeSSL } from '@/pages/ssl/service';
-import { SSL } from '@/models/ssl';
import { ListItem } from '@/transforms/global';
interface SearchParamsProps {
diff --git a/src/pages/ssl/service.ts b/src/pages/ssl/service.ts
index f20dc2c..77e4162 100644
--- a/src/pages/ssl/service.ts
+++ b/src/pages/ssl/service.ts
@@ -1,6 +1,5 @@
import request from '@/utils/request';
import { transformFetchListData, transformFetchItemData } from '@/transforms/global';
-import { SSL } from '@/models/ssl';
export const fetchList = () =>
request('/api/ssl').then((data) => transformFetchListData<SSL>(data));
diff --git a/src/pages/ssl/typing.d.ts b/src/pages/ssl/typing.d.ts
new file mode 100644
index 0000000..0a66d55
--- /dev/null
+++ b/src/pages/ssl/typing.d.ts
@@ -0,0 +1,5 @@
+type SSL = {
+ sni: string[];
+ cert: string;
+ key: string;
+};