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 07:11:33 UTC

[incubator-apisix-dashboard] branch feat-refactor created (now 673607b)

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

juzhiyuan pushed a change to branch feat-refactor
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-dashboard.git.


      at 673607b  feat: remove Welcome

This branch includes the following new commits:

     new f26417e  feat: remove edit ssl
     new 021134e  feat: update SSL icon
     new 673607b  feat: remove Welcome

The 3 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/03: feat: remove edit ssl

Posted by ju...@apache.org.
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

commit f26417ec89c7ad1e8cd1a3792a6669f3e67af47f
Author: juzhiyuan <jj...@gmail.com>
AuthorDate: Wed May 20 15:05:12 2020 +0800

    feat: remove edit ssl
---
 config/config.ts                     |   6 --
 src/pages/SSLModule/detail/index.tsx | 129 -----------------------------------
 2 files changed, 135 deletions(-)

diff --git a/config/config.ts b/config/config.ts
index c045c1e..6ba0544 100644
--- a/config/config.ts
+++ b/config/config.ts
@@ -76,12 +76,6 @@ export default defineConfig({
                   hideInMenu: true,
                 },
                 {
-                  path: '/ssl/:key/edit',
-                  name: 'edit',
-                  component: './SSLModule/detail',
-                  hideInMenu: true,
-                },
-                {
                   name: 'create',
                   path: '/ssl/create',
                   component: './SSLModule/create',
diff --git a/src/pages/SSLModule/detail/index.tsx b/src/pages/SSLModule/detail/index.tsx
deleted file mode 100644
index 2c0abef..0000000
--- a/src/pages/SSLModule/detail/index.tsx
+++ /dev/null
@@ -1,129 +0,0 @@
-import React, { useState, useEffect } from 'react';
-import { PageHeaderWrapper } from '@ant-design/pro-layout';
-import { Form, Input, Card, Button, notification, message } from 'antd';
-import { useIntl, history, useParams } from 'umi';
-import { useForm } from 'antd/es/form/util';
-
-import { getPageMode } from '@/utils/utils';
-import {
-  fetchItem as fetchSSLItem,
-  create as createSSL,
-  update as updateSSL,
-} from '@/services/ssl';
-
-const layout = {
-  labelCol: {
-    span: 2,
-  },
-  wrapperCol: {
-    span: 8,
-  },
-};
-
-const tailLayout = {
-  wrapperCol: {
-    offset: 2,
-  },
-};
-
-const Detail: React.FC = () => {
-  const [mode] = useState<PageMode>(getPageMode());
-  const { key } = useParams();
-  const [form] = useForm();
-  const { formatMessage } = useIntl();
-
-  useEffect(() => {
-    const hideLoading = message.loading(formatMessage({ id: 'component.global.loading' }), 0);
-    if (mode === 'EDIT' && key) {
-      fetchSSLItem(key).then((data) => {
-        form.setFieldsValue(data.value);
-        hideLoading();
-      });
-    } else {
-      hideLoading();
-    }
-  }, [mode]);
-
-  const onFinish = (values: any) => {
-    const hideLoading = message.loading(formatMessage({ id: 'component.global.loading' }), 0);
-    if (mode === 'EDIT' && key) {
-      hideLoading();
-      updateSSL(key, values).then(() => {
-        notification.success({
-          message: `${formatMessage({ id: 'component.global.update' })} SSL ${formatMessage({
-            id: 'component.status.success',
-          }).toLowerCase()}`,
-        });
-
-        history.goBack();
-      });
-    }
-
-    if (mode === 'CREATE') {
-      createSSL(values).then(() => {
-        hideLoading();
-        notification.success({
-          message: `${formatMessage({ id: 'component.global.create' })} SSL ${formatMessage({
-            id: 'component.status.success',
-          }).toLowerCase()}`,
-        });
-
-        history.goBack();
-      });
-    }
-  };
-
-  return (
-    <PageHeaderWrapper>
-      <Card>
-        <Form {...layout} form={form} onFinish={onFinish}>
-          <Form.Item
-            label="SNI"
-            name="sni"
-            rules={[
-              { required: true, message: formatMessage({ id: 'component.ssl.fieldSNIInvalid' }) },
-            ]}
-          >
-            <Input />
-          </Form.Item>
-
-          <Form.Item
-            label="Cert"
-            name="cert"
-            rules={[
-              { required: true, message: formatMessage({ id: 'component.ssl.fieldCertInvalid' }) },
-              { min: 128, message: formatMessage({ id: 'component.ssl.fieldCertTooShort' }) },
-            ]}
-          >
-            <Input.TextArea rows={6} />
-          </Form.Item>
-
-          <Form.Item
-            label="Key"
-            name="key"
-            rules={[
-              { required: true, message: formatMessage({ id: 'component.ssl.fieldKeyInvalid' }) },
-              { min: 128, message: formatMessage({ id: 'component.ssl.fieldKeyTooShort' }) },
-            ]}
-          >
-            <Input.TextArea rows={6} />
-          </Form.Item>
-
-          <Form.Item {...tailLayout}>
-            <Button style={{ marginRight: 10 }} onClick={() => history.goBack()}>
-              {formatMessage({ id: 'component.global.cancel' })}
-            </Button>
-
-            <Button htmlType="submit" type="primary">
-              {mode === 'CREATE'
-                ? formatMessage({ id: 'component.global.create' })
-                : formatMessage({ id: 'component.global.save' })}
-            </Button>
-          </Form.Item>
-        </Form>
-      </Card>
-    </PageHeaderWrapper>
-  );
-};
-
-export default Detail;


[incubator-apisix-dashboard] 03/03: feat: remove Welcome

Posted by ju...@apache.org.
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

commit 673607b772306b4de3daf7bcb2d1ed06da77acc8
Author: juzhiyuan <jj...@gmail.com>
AuthorDate: Wed May 20 15:11:13 2020 +0800

    feat: remove Welcome
---
 config/config.ts          |  8 +-----
 src/locales/en-US.ts      |  2 --
 src/locales/en-US/menu.ts |  1 -
 src/locales/zh-CN.ts      |  2 --
 src/locales/zh-CN/menu.ts |  1 -
 src/pages/Welcome.less    |  8 ------
 src/pages/Welcome.tsx     | 62 -----------------------------------------------
 7 files changed, 1 insertion(+), 83 deletions(-)

diff --git a/config/config.ts b/config/config.ts
index 418807c..498345d 100644
--- a/config/config.ts
+++ b/config/config.ts
@@ -46,13 +46,7 @@ export default defineConfig({
           routes: [
             {
               path: '/',
-              redirect: '/welcome',
-            },
-            {
-              path: '/welcome',
-              name: 'welcome',
-              icon: 'smile',
-              component: './Welcome',
+              redirect: '/settings',
             },
             {
               name: 'settings',
diff --git a/src/locales/en-US.ts b/src/locales/en-US.ts
index 3d57988..4ff9776 100644
--- a/src/locales/en-US.ts
+++ b/src/locales/en-US.ts
@@ -11,8 +11,6 @@ export default {
   'layout.user.link.privacy': 'Privacy',
   'layout.user.link.terms': 'Terms',
   'app.preview.down.block': 'Download this page to your local project',
-  'app.welcome.link.fetch-blocks': 'Get all block',
-  'app.welcome.link.block-list': 'Quickly build standard, pages based on `block` development',
   ...globalHeader,
   ...menu,
   ...settingDrawer,
diff --git a/src/locales/en-US/menu.ts b/src/locales/en-US/menu.ts
index 5e605dd..914dc06 100644
--- a/src/locales/en-US/menu.ts
+++ b/src/locales/en-US/menu.ts
@@ -1,5 +1,4 @@
 export default {
-  'menu.welcome': 'Welcome',
   'menu.more-blocks': 'More Blocks',
   'menu.home': 'Home',
   'menu.admin': 'Admin',
diff --git a/src/locales/zh-CN.ts b/src/locales/zh-CN.ts
index 1822d7b..b37ec0f 100644
--- a/src/locales/zh-CN.ts
+++ b/src/locales/zh-CN.ts
@@ -11,8 +11,6 @@ export default {
   'layout.user.link.privacy': '隐私',
   'layout.user.link.terms': '条款',
   'app.preview.down.block': '下载此页面到本地项目',
-  'app.welcome.link.fetch-blocks': '获取全部区块',
-  'app.welcome.link.block-list': '基于 block 开发,快速构建标准页面',
   ...globalHeader,
   ...menu,
   ...settingDrawer,
diff --git a/src/locales/zh-CN/menu.ts b/src/locales/zh-CN/menu.ts
index 6f22688..11ea16f 100644
--- a/src/locales/zh-CN/menu.ts
+++ b/src/locales/zh-CN/menu.ts
@@ -1,5 +1,4 @@
 export default {
-  'menu.welcome': '欢迎',
   'menu.more-blocks': '更多区块',
   'menu.home': '首页',
   'menu.admin': '管理页',
diff --git a/src/pages/Welcome.less b/src/pages/Welcome.less
deleted file mode 100644
index 914c40d..0000000
--- a/src/pages/Welcome.less
+++ /dev/null
@@ -1,8 +0,0 @@
-@import '~antd/lib/style/themes/default.less';
-
-.pre {
-  margin: 12px 0;
-  padding: 12px 20px;
-  background: @input-bg;
-  box-shadow: @card-shadow;
-}
diff --git a/src/pages/Welcome.tsx b/src/pages/Welcome.tsx
deleted file mode 100644
index 6d7c3ea..0000000
--- a/src/pages/Welcome.tsx
+++ /dev/null
@@ -1,62 +0,0 @@
-import React from 'react';
-import { PageHeaderWrapper } from '@ant-design/pro-layout';
-import { Card, Typography, Alert } from 'antd';
-import styles from './Welcome.less';
-
-const CodePreview: React.FC<{}> = ({ children }) => (
-  <pre className={styles.pre}>
-    <code>
-      <Typography.Text copyable>{children}</Typography.Text>
-    </code>
-  </pre>
-);
-
-export default (): React.ReactNode => (
-  <PageHeaderWrapper>
-    <Card>
-      <Alert
-        message="umi ui 现已发布,点击右下角 umi 图标即可使用"
-        type="success"
-        showIcon
-        banner
-        style={{
-          margin: -12,
-          marginBottom: 24,
-        }}
-      />
-      <Typography.Text strong>
-        <a target="_blank" rel="noopener noreferrer" href="https://pro.ant.design/docs/block">
-          基于 block 开发,快速构建标准页面
-        </a>
-      </Typography.Text>
-      <CodePreview> npm run ui</CodePreview>
-      <Typography.Text
-        strong
-        style={{
-          marginBottom: 12,
-        }}
-      >
-        <a
-          target="_blank"
-          rel="noopener noreferrer"
-          href="https://pro.ant.design/docs/available-script#npm-run-fetchblocks"
-        >
-          获取全部区块
-        </a>
-      </Typography.Text>
-      <CodePreview> npm run fetch:blocks</CodePreview>
-    </Card>
-    <p
-      style={{
-        textAlign: 'center',
-        marginTop: 24,
-      }}
-    >
-      Want to add more pages? Please refer to{' '}
-      <a href="https://pro.ant.design/docs/block-cn" target="_blank" rel="noopener noreferrer">
-        use block
-      </a>
-      。
-    </p>
-  </PageHeaderWrapper>
-);


[incubator-apisix-dashboard] 02/03: feat: update SSL icon

Posted by ju...@apache.org.
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

commit 021134e7244f78d0392b541617f583bc354ced65
Author: juzhiyuan <jj...@gmail.com>
AuthorDate: Wed May 20 15:09:01 2020 +0800

    feat: update SSL icon
---
 config/config.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config/config.ts b/config/config.ts
index 6ba0544..418807c 100644
--- a/config/config.ts
+++ b/config/config.ts
@@ -63,7 +63,7 @@ export default defineConfig({
             {
               name: 'ssl',
               path: '/ssl',
-              icon: 'crown',
+              icon: 'BarsOutlined',
               routes: [
                 {
                   path: '/ssl',