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 2021/02/18 05:12:27 UTC
[apisix-dashboard] 01/01: feat: added tip for Plugin module
This is an automated email from the ASF dual-hosted git repository.
juzhiyuan pushed a commit to branch feat-plugin-tip
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git
commit 808a081e6d29956bb21a50b5ec828563704942c4
Author: juzhiyuan <ju...@apache.org>
AuthorDate: Thu Feb 18 13:12:05 2021 +0800
feat: added tip for Plugin module
---
web/src/components/Plugin/PluginPage.tsx | 12 +++++++++++
.../Plugin/locales/en-US.ts} | 25 ++--------------------
web/src/{ => components/Plugin}/locales/zh-CN.ts | 25 ++--------------------
web/src/locales/en-US.ts | 2 ++
web/src/locales/zh-CN.ts | 2 ++
5 files changed, 20 insertions(+), 46 deletions(-)
diff --git a/web/src/components/Plugin/PluginPage.tsx b/web/src/components/Plugin/PluginPage.tsx
index 6798f5f..e5404fb 100644
--- a/web/src/components/Plugin/PluginPage.tsx
+++ b/web/src/components/Plugin/PluginPage.tsx
@@ -18,6 +18,7 @@ import React, { useEffect, useState } from 'react';
import { Anchor, Layout, Card, Button } from 'antd';
import { PanelSection } from '@api7-dashboard/ui';
import { omit, orderBy } from 'lodash';
+import { useIntl } from 'umi';
import PluginDetail from './PluginDetail';
import { fetchList } from './service';
@@ -54,6 +55,8 @@ const PluginPage: React.FC<Props> = ({
type = 'scoped',
onChange = () => {},
}) => {
+ const { formatMessage } = useIntl();
+
const [pluginList, setPluginList] = useState<PluginComponent.Meta[]>([]);
const [name, setName] = useState<string>(NEVER_EXIST_PLUGIN_FLAG);
const [typeList, setTypeList] = useState<string[]>([]);
@@ -101,6 +104,15 @@ const PluginPage: React.FC<Props> = ({
</Anchor>
</Sider>
<Content style={{ padding: '0 10px', backgroundColor: '#fff', minHeight: 1400 }}>
+ {formatMessage({ id: 'component.plugin.tip1' })}
+ <a
+ href="https://github.com/apache/apisix-dashboard/blob/master/docs/FAQ.md#4-after-modifying-the-plugin-schema-or-creating-a-custom-plugin-in-apache-apisix-why-cant-i-find-it-on-the-dashboard"
+ target="_blank"
+ rel="noreferrer"
+ >
+ {formatMessage({ id: 'component.plugin.tip2' })}
+ </a>
+ <br />
{typeList.map((typeItem) => {
return (
<PanelSection
diff --git a/web/src/locales/zh-CN.ts b/web/src/components/Plugin/locales/en-US.ts
similarity index 52%
copy from web/src/locales/zh-CN.ts
copy to web/src/components/Plugin/locales/en-US.ts
index 030cbcb..8690c6e 100644
--- a/web/src/locales/zh-CN.ts
+++ b/web/src/components/Plugin/locales/en-US.ts
@@ -14,28 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { ActionBarZhCN } from '@/components/ActionBar';
-
-import component from './zh-CN/component';
-import globalHeader from './zh-CN/globalHeader';
-import menu from './zh-CN/menu';
-import pwa from './zh-CN/pwa';
-import settingDrawer from './zh-CN/settingDrawer';
-import settings from './zh-CN/setting';
-import PluginOrchestration from '../components/PluginOrchestration/locales/zh-CN';
-
export default {
- 'navBar.lang': '语言',
- 'layout.user.link.help': '帮助',
- 'layout.user.link.privacy': '隐私',
- 'layout.user.link.terms': '条款',
- 'app.preview.down.block': '下载此页面到本地项目',
- ...globalHeader,
- ...menu,
- ...settingDrawer,
- ...settings,
- ...pwa,
- ...component,
- ...ActionBarZhCN,
- ...PluginOrchestration,
+ 'component.plugin.tip1': 'After customizing the plugin, you need to update schema.json.',
+ 'component.plugin.tip2': 'How to update?',
};
diff --git a/web/src/locales/zh-CN.ts b/web/src/components/Plugin/locales/zh-CN.ts
similarity index 52%
copy from web/src/locales/zh-CN.ts
copy to web/src/components/Plugin/locales/zh-CN.ts
index 030cbcb..b91e6ac 100644
--- a/web/src/locales/zh-CN.ts
+++ b/web/src/components/Plugin/locales/zh-CN.ts
@@ -14,28 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-import { ActionBarZhCN } from '@/components/ActionBar';
-
-import component from './zh-CN/component';
-import globalHeader from './zh-CN/globalHeader';
-import menu from './zh-CN/menu';
-import pwa from './zh-CN/pwa';
-import settingDrawer from './zh-CN/settingDrawer';
-import settings from './zh-CN/setting';
-import PluginOrchestration from '../components/PluginOrchestration/locales/zh-CN';
-
export default {
- 'navBar.lang': '语言',
- 'layout.user.link.help': '帮助',
- 'layout.user.link.privacy': '隐私',
- 'layout.user.link.terms': '条款',
- 'app.preview.down.block': '下载此页面到本地项目',
- ...globalHeader,
- ...menu,
- ...settingDrawer,
- ...settings,
- ...pwa,
- ...component,
- ...ActionBarZhCN,
- ...PluginOrchestration,
+ 'component.plugin.tip1': '自定义插件后(修改、新增、删除等),需更新 schema.json。',
+ 'component.plugin.tip2': '如何更新?',
};
diff --git a/web/src/locales/en-US.ts b/web/src/locales/en-US.ts
index 3ca50eb..887df00 100644
--- a/web/src/locales/en-US.ts
+++ b/web/src/locales/en-US.ts
@@ -23,6 +23,7 @@ import pwa from './en-US/pwa';
import settingDrawer from './en-US/settingDrawer';
import settings from './en-US/setting';
import PluginOrchestration from '../components/PluginOrchestration/locales/en-US';
+import Plugin from '../components/Plugin/locales/en-US';
export default {
'navBar.lang': 'Languages',
@@ -38,4 +39,5 @@ export default {
...component,
...ActionBarEnUS,
...PluginOrchestration,
+ ...Plugin,
};
diff --git a/web/src/locales/zh-CN.ts b/web/src/locales/zh-CN.ts
index 030cbcb..c7989e2 100644
--- a/web/src/locales/zh-CN.ts
+++ b/web/src/locales/zh-CN.ts
@@ -23,6 +23,7 @@ import pwa from './zh-CN/pwa';
import settingDrawer from './zh-CN/settingDrawer';
import settings from './zh-CN/setting';
import PluginOrchestration from '../components/PluginOrchestration/locales/zh-CN';
+import Plugin from '../components/Plugin/locales/zh-CN';
export default {
'navBar.lang': '语言',
@@ -38,4 +39,5 @@ export default {
...component,
...ActionBarZhCN,
...PluginOrchestration,
+ ...Plugin,
};