This is an automated email from the ASF dual-hosted git repository.
juzhiyuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix-dashboard.git
The following commit(s) were added to refs/heads/master by this push:
new 7296a56 feat: update plugin (#482)
7296a56 is described below
commit 7296a56684c72d26ac3c8b5266d57ffe3ff35afb
Author: 琚致远 <[email protected]>
AuthorDate: Mon Sep 21 10:46:15 2020 +0800
feat: update plugin (#482)
---
package.json | 2 +-
src/pages/Consumer/Create.tsx | 4 ++--
src/pages/Consumer/components/Preview.tsx | 4 ++--
yarn.lock | 19 +++++++++++++++----
4 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/package.json b/package.json
index 17cfac3..39aba95 100644
--- a/package.json
+++ b/package.json
@@ -54,7 +54,7 @@
"@ant-design/icons": "^4.0.0",
"@ant-design/pro-layout": "^6.0.0",
"@ant-design/pro-table": "2.6.3",
- "@api7-dashboard/plugin": "^1.0.4",
+ "@api7-dashboard/plugin": "^1.0.5",
"@api7-dashboard/pluginchart": "^1.0.11",
"@api7-dashboard/ui": "^1.0.3",
"@rjsf/antd": "2.2.0",
diff --git a/src/pages/Consumer/Create.tsx b/src/pages/Consumer/Create.tsx
index 7e918de..bc6e995 100644
--- a/src/pages/Consumer/Create.tsx
+++ b/src/pages/Consumer/Create.tsx
@@ -28,7 +28,7 @@ import { fetchItem, create, update } from './service';
const Page: React.FC = (props) => {
const [step, setStep] = useState(1);
- const [plugins, setPlugins] = useState<PluginPageType.PluginData>({});
+ const [plugins, setPlugins] = useState<PluginPageType.FinalData>({});
const [form1] = Form.useForm();
const { formatMessage } = useIntl();
@@ -100,7 +100,7 @@ const Page: React.FC = (props) => {
</Steps>
{step === 1 && <Step1 form={form1} />}
- {step === 2 && <PluginPage data={plugins} onChange={setPlugins} />}
+ {step === 2 && <PluginPage initialData={plugins}
onChange={setPlugins} />}
{step === 3 && <Preview form1={form1} plugins={plugins} />}
</Card>
</PageContainer>
diff --git a/src/pages/Consumer/components/Preview.tsx
b/src/pages/Consumer/components/Preview.tsx
index a894f0e..92e4b01 100644
--- a/src/pages/Consumer/components/Preview.tsx
+++ b/src/pages/Consumer/components/Preview.tsx
@@ -22,14 +22,14 @@ import Step1 from './Step1';
type Props = {
form1: FormInstance;
- plugins: PluginPageType.PluginData;
+ plugins: PluginPageType.FinalData;
};
const Page: React.FC<Props> = ({ form1, plugins }) => {
return (
<>
<Step1 form={form1} disabled />
- <PluginPage data={plugins} disabled />
+ <PluginPage initialData={plugins} readonly />
</>
);
};
diff --git a/yarn.lock b/yarn.lock
index 86bb110..3416ece 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -187,14 +187,15 @@
lodash "^4.17.15"
resize-observer-polyfill "^1.5.0"
-"@api7-dashboard/plugin@^1.0.4":
- version "1.0.4"
- resolved
"https://registry.yarnpkg.com/@api7-dashboard/plugin/-/plugin-1.0.4.tgz#aaf945136398e61ef154b7cdd15319956854285b"
- integrity
sha512-hjwwhQCOWLR9ybIYeItSnTStU4A9ZcZMHsfrwXdLaWLGMVLLFhhopoBBtRUIszm5NHN1fCYNsLjGv4bNnCI/Qg==
+"@api7-dashboard/plugin@^1.0.5":
+ version "1.0.5"
+ resolved
"https://registry.yarnpkg.com/@api7-dashboard/plugin/-/plugin-1.0.5.tgz#75ae3348984f7619f7cfb87e49e17d6de6619909"
+ integrity
sha512-FVAtsT1CJGmKN+jSsF8rOljNXj7VfMPOzf/BfaKuz7nhYrPUVTmIxAJ3BjS4eucNop5eo3FBFb0ohNAJU+qp4g==
dependencies:
"@rjsf/antd" "^2.3.0"
"@rjsf/core" "^2.3.0"
"@uiw/react-codemirror" "^3.0.1"
+ ajv "^6.12.5"
json-schema "^0.2.5"
set-value "^3.0.2"
@@ -3818,6 +3819,16 @@ ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.2,
ajv@^6.12.3, ajv@^6.7.0, ajv@
json-schema-traverse "^0.4.1"
uri-js "^4.2.2"
+ajv@^6.12.5:
+ version "6.12.5"
+ resolved
"https://registry.yarnpkg.com/ajv/-/ajv-6.12.5.tgz#19b0e8bae8f476e5ba666300387775fb1a00a4da"
+ integrity
sha512-lRF8RORchjpKG50/WFf8xmg7sgCLFiYNNnqdKflk63whMQcWR5ngGjiSXkL9bjxy6B2npOK2HSMN49jEBMSkag==
+ dependencies:
+ fast-deep-equal "^3.1.1"
+ fast-json-stable-stringify "^2.0.0"
+ json-schema-traverse "^0.4.1"
+ uri-js "^4.2.2"
+
alphanum-sort@^1.0.0:
version "1.0.2"
resolved
"https://registry.npm.taobao.org/alphanum-sort/download/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3"