This is an automated email from the ASF dual-hosted git repository. juzhiyuan pushed a commit to branch feat-plugin in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git
commit 9191e2b07e8fa472247b9ea25026778e75c012d5 Author: juzhiyuan <juzhiy...@apache.org> AuthorDate: Sun Sep 6 23:08:32 2020 +0800 feat(Consumer): update auth plugin check policy --- package.json | 2 +- src/pages/Consumer/Create.tsx | 7 ++----- src/pages/Route/Create.tsx | 2 +- src/pages/Upstream/Create.tsx | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 87b7116..7f3f1bb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "apisix-dashboard", - "version": "1.5.2", + "version": "1.5.3", "private": true, "description": "Dashboard for Apache APISIX", "scripts": { diff --git a/src/pages/Consumer/Create.tsx b/src/pages/Consumer/Create.tsx index 83da1ee..7e918de 100644 --- a/src/pages/Consumer/Create.tsx +++ b/src/pages/Consumer/Create.tsx @@ -18,7 +18,7 @@ import React, { useState, useEffect } from 'react'; import { PageContainer } from '@ant-design/pro-layout'; import { Card, Steps, notification, Form } from 'antd'; import { history, useIntl } from 'umi'; -import { PluginPage, PLUGIN_MAPPER_SOURCE, PluginPageType } from '@api7-dashboard/plugin'; +import { PluginPage, PluginPageType } from '@api7-dashboard/plugin'; import ActionBar from '@/components/ActionBar'; @@ -68,10 +68,7 @@ const Page: React.FC = (props) => { setStep(nextStep); }); } else if (nextStep === 3) { - const authPluginNames = Object.entries(PLUGIN_MAPPER_SOURCE) - .filter(([name, value]) => name.includes('auth') && value.category === 'Security') - .map((item) => item[0]); - const isValid = Object.keys(plugins).some((name) => authPluginNames.includes(name)); + const isValid = Object.keys(plugins).some((name) => name.includes('auth')); if (!isValid) { notification.warning({ message: formatMessage({ id: 'consumer.create.enable.authentication.plugin' }), diff --git a/src/pages/Route/Create.tsx b/src/pages/Route/Create.tsx index 8beba5b..37819aa 100644 --- a/src/pages/Route/Create.tsx +++ b/src/pages/Route/Create.tsx @@ -18,9 +18,9 @@ import React, { useState, useEffect } from 'react'; import { Card, Steps, Form } from 'antd'; import { PageHeaderWrapper } from '@ant-design/pro-layout'; import { history, useIntl } from 'umi'; +import { transformer as chartTransformer } from '@api7-dashboard/pluginchart'; import ActionBar from '@/components/ActionBar'; -import { transformer as chartTransformer } from '@api7-dashboard/pluginchart'; import { create, diff --git a/src/pages/Upstream/Create.tsx b/src/pages/Upstream/Create.tsx index dc824c4..405ecb9 100644 --- a/src/pages/Upstream/Create.tsx +++ b/src/pages/Upstream/Create.tsx @@ -17,9 +17,9 @@ import React, { useState, useEffect } from 'react'; import { PageContainer } from '@ant-design/pro-layout'; import { Card, Steps, notification, Form } from 'antd'; +import { history, useIntl } from 'umi'; import ActionBar from '@/components/ActionBar'; -import { history, useIntl } from 'umi'; import Step1 from './components/Step1'; import Preview from './components/Preview';