fix: active check & plugin form (#1793)
diff --git a/web/src/components/Plugin/PluginDetail.tsx b/web/src/components/Plugin/PluginDetail.tsx
index 72c474b..983765a 100644
--- a/web/src/components/Plugin/PluginDetail.tsx
+++ b/web/src/components/Plugin/PluginDetail.tsx
@@ -41,6 +41,7 @@
import { fetchSchema } from './service';
import { json2yaml, yaml2json } from '../../helpers';
import { PluginForm, PLUGIN_UI_LIST } from './UI';
+import { PluginType } from './data';
type Props = {
name: string;
@@ -365,7 +366,7 @@
<PageHeader
title=""
subTitle={
- pluginType === 'auth' && schemaType !== 'consumer' && (codeMirrorMode !== codeMirrorModeList.UIForm) ? (
+ pluginType === PluginType.authentication && schemaType !== 'consumer' && (codeMirrorMode !== codeMirrorModeList.UIForm) ? (
<Alert message={formatMessage({ id: 'component.plugin.noConfigurationRequired' })} type="warning" />
) : null
}
@@ -402,7 +403,7 @@
</Button>
]}
/>
- {Boolean(codeMirrorMode === codeMirrorModeList.UIForm) && <PluginForm name={name} form={UIForm} renderForm={!(pluginType === 'auth' && schemaType !== 'consumer')} />}
+ {Boolean(codeMirrorMode === codeMirrorModeList.UIForm) && <PluginForm name={name} form={UIForm} renderForm={!(pluginType === PluginType.authentication && schemaType !== 'consumer')} />}
<div style={{ display: codeMirrorMode === codeMirrorModeList.UIForm ? 'none' : 'unset' }}><CodeMirror
ref={(codemirror) => {
ref.current = codemirror;
diff --git a/web/src/components/Upstream/components/active-check/HttpsVerifyCertificate.tsx b/web/src/components/Upstream/components/active-check/HttpsVerifyCertificate.tsx
index 901c509..0d33fef 100644
--- a/web/src/components/Upstream/components/active-check/HttpsVerifyCertificate.tsx
+++ b/web/src/components/Upstream/components/active-check/HttpsVerifyCertificate.tsx
@@ -27,7 +27,7 @@
return (
<Form.Item
label={formatMessage({ id: 'component.upstream.fields.checks.active.https_verify_certificate' })}
- name="https_verify_certificate"
+ name={['checks', 'active', 'https_verify_certificate']}
tooltip={formatMessage({ id: 'component.upstream.fields.checks.active.https_verify_certificate.tooltip' })}
initialValue={true}
valuePropName="checked"