Skip to content

Commit bb7598d

Browse files
LiteSunjohzchen
authored andcommitted
fix: active check & plugin form (#1793)
1 parent 7ff4ff7 commit bb7598d

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

web/src/components/Plugin/PluginDetail.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import addFormats from 'ajv-formats';
4141
import { fetchSchema } from './service';
4242
import { json2yaml, yaml2json } from '../../helpers';
4343
import { PluginForm, PLUGIN_UI_LIST } from './UI';
44+
import { PluginType } from './data';
4445

4546
type Props = {
4647
name: string;
@@ -365,7 +366,7 @@ const PluginDetail: React.FC<Props> = ({
365366
<PageHeader
366367
title=""
367368
subTitle={
368-
pluginType === 'auth' && schemaType !== 'consumer' && (codeMirrorMode !== codeMirrorModeList.UIForm) ? (
369+
pluginType === PluginType.authentication && schemaType !== 'consumer' && (codeMirrorMode !== codeMirrorModeList.UIForm) ? (
369370
<Alert message={formatMessage({ id: 'component.plugin.noConfigurationRequired' })} type="warning" />
370371
) : null
371372
}
@@ -402,7 +403,7 @@ const PluginDetail: React.FC<Props> = ({
402403
</Button>
403404
]}
404405
/>
405-
{Boolean(codeMirrorMode === codeMirrorModeList.UIForm) && <PluginForm name={name} form={UIForm} renderForm={!(pluginType === 'auth' && schemaType !== 'consumer')} />}
406+
{Boolean(codeMirrorMode === codeMirrorModeList.UIForm) && <PluginForm name={name} form={UIForm} renderForm={!(pluginType === PluginType.authentication && schemaType !== 'consumer')} />}
406407
<div style={{ display: codeMirrorMode === codeMirrorModeList.UIForm ? 'none' : 'unset' }}><CodeMirror
407408
ref={(codemirror) => {
408409
ref.current = codemirror;

web/src/components/Upstream/components/active-check/HttpsVerifyCertificate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const HttpsVerifyCertificateComponent: React.FC<Props> = ({ readonly }) => {
2727
return (
2828
<Form.Item
2929
label={formatMessage({ id: 'component.upstream.fields.checks.active.https_verify_certificate' })}
30-
name="https_verify_certificate"
30+
name={['checks', 'active', 'https_verify_certificate']}
3131
tooltip={formatMessage({ id: 'component.upstream.fields.checks.active.https_verify_certificate.tooltip' })}
3232
initialValue={true}
3333
valuePropName="checked"

0 commit comments

Comments
 (0)