diff --git a/web/src/polaris/administration/breaker/faultDetect/getColumns.tsx b/web/src/polaris/administration/breaker/faultDetect/getColumns.tsx index a120cc6c..c4d6087b 100644 --- a/web/src/polaris/administration/breaker/faultDetect/getColumns.tsx +++ b/web/src/polaris/administration/breaker/faultDetect/getColumns.tsx @@ -1,13 +1,11 @@ import * as React from 'react' import FaultDetectDuck from './PageDuck' -import { Text, Copy, Bubble, Icon } from 'tea-component' +import { Text, Copy } from 'tea-component' import { Column } from '@src/polaris/common/ducks/GridPage' import Action from '@src/polaris/common/duckComponents/grid/Action' import { DuckCmpProps } from 'saga-duck' import router from '@src/polaris/common/util/router' import { FaultDetectRule } from './types' -import { disableDeleteTip } from '@src/polaris/service/getColumns' -import { checkGlobalRegistry } from '../getColumns' export default (props: DuckCmpProps): Column[] => { const { @@ -27,14 +25,7 @@ export default (props: DuckCmpProps): Column[]
- - {x.name} - {checkGlobalRegistry(x) && ( - - - - )} - + {x.name} ) }, @@ -88,16 +79,14 @@ export default (props: DuckCmpProps): Column[] key: 'action', header: '操作', render: x => { - const hasGlobalRegistry = checkGlobalRegistry(x) return ( { router.navigate(`/faultDetect-create?id=${x.id}`) }} - tip={hasGlobalRegistry ? disableDeleteTip : '编辑'} /> { - const hasSyncGlobal = Object.entries(x.metadata).find( - ([key, value]) => key === 'MetadataKeySyncFromLocalRegistry' && value === 'internal-sync-from-local-registry', - ) - return !!hasSyncGlobal -} export default (props: DuckCmpProps): Column[] => { const { @@ -34,14 +26,7 @@ export default (props: DuckCmpProps): Column
- - {x.name} - {checkGlobalRegistry(x) && ( - - - - )} - + {x.name} ) }, @@ -108,25 +93,22 @@ export default (props: DuckCmpProps): Column { - const hasGlobalRegistry = checkGlobalRegistry(x) return ( { dispatch(creators.toggle(x)) }} - tip={hasGlobalRegistry ? disableDeleteTip : ''} /> { const type = checkRuleType(x?.level) router.navigate(`/circuitBreaker-create?id=${x.id}&type=${type}`) }} - tip={hasGlobalRegistry ? disableDeleteTip : ''} /> } export interface ErrorCondition { inputType: string diff --git a/web/src/polaris/administration/dynamicRoute/customRoute/getColumns.tsx b/web/src/polaris/administration/dynamicRoute/customRoute/getColumns.tsx index 8464f283..a130a110 100644 --- a/web/src/polaris/administration/dynamicRoute/customRoute/getColumns.tsx +++ b/web/src/polaris/administration/dynamicRoute/customRoute/getColumns.tsx @@ -1,14 +1,12 @@ import * as React from 'react' import AccessLimitingDuck from './PageDuck' -import { Text, Copy, Bubble, Icon } from 'tea-component' +import { Text, Copy } from 'tea-component' import { Column } from '@src/polaris/common/ducks/GridPage' import Action from '@src/polaris/common/duckComponents/grid/Action' import { Dispatch } from 'redux' import { CustomRoute } from './model' import { SwitchStatusAction } from '../../accessLimiting/types' import { Link } from 'react-router-dom' -import { disableDeleteTip } from '@src/polaris/service/getColumns' -import { checkGlobalRegistry } from '../../breaker/getColumns' export default ( { creators, selector }: AccessLimitingDuck, @@ -29,14 +27,7 @@ export default (
- - {x.name} - {checkGlobalRegistry(x) && ( - - - - )} - + {x.name} ), }, @@ -102,13 +93,11 @@ export default ( key: 'action', header: '操作', render: x => { - const hasGlobalRegistry = checkGlobalRegistry(x) const actions: { id: string text: string fn: (dispatch?: Dispatch, e?) => void disabled: boolean - tip?: string }[] = [ { id: 'switchStatus', @@ -117,8 +106,7 @@ export default ( const swtichStatusAction = x.enable ? SwitchStatusAction.disable : SwitchStatusAction.start dispatch(creators.switchStatus(x.id, x.name, swtichStatusAction)) }, - disabled: !x.editable || hasGlobalRegistry, - tip: hasGlobalRegistry ? disableDeleteTip : '', + disabled: !x.editable, }, { id: 'modify', @@ -126,8 +114,7 @@ export default ( fn: dispatch => { dispatch(creators.modify(x)) }, - disabled: !x.editable || hasGlobalRegistry, - tip: hasGlobalRegistry ? disableDeleteTip : '', + disabled: !x.editable, }, { id: 'remove', @@ -141,7 +128,7 @@ export default ( return ( {actions.map(action => ( - + ))} ) diff --git a/web/src/polaris/common/util/checkFeature.ts b/web/src/polaris/common/util/checkFeature.ts index 83c5dc22..24b89b72 100644 --- a/web/src/polaris/common/util/checkFeature.ts +++ b/web/src/polaris/common/util/checkFeature.ts @@ -33,9 +33,7 @@ export const checkFeatureKey = (feature: Feature[], key: string) => { export async function checkFeatureValid(featureKey) { const feature = await cacheCheckFeature() if (feature.length === 0) return true - const check = feature.find(item => item.name === featureKey) - if (!check) return true - return check?.display === FeatureDisplayType.visible + return feature.find(item => item.name === featureKey)?.display === FeatureDisplayType.visible } export function useCheckFeatureValid(features: string[] = []) { const [result, setResult] = React.useState([] as Feature[]) diff --git a/web/src/polaris/common/util/serverConfig.ts b/web/src/polaris/common/util/serverConfig.ts deleted file mode 100644 index 30e62b01..00000000 --- a/web/src/polaris/common/util/serverConfig.ts +++ /dev/null @@ -1,34 +0,0 @@ -import React from 'react' -import { getApiRequest } from './apiRequest' -import { once, ttl } from '../helpers/cacheable' - -export type DescribeServerConfigParams = { - module: string -} -export async function describeServerConfig(params) { - const res = await getApiRequest({ - action: '/maintain/v1/bootstrap/config', - data: params, - noError: true, - }) - return res -} -export const cacheDescribeServerConfig = once(describeServerConfig, ttl(60 * 5 * 1000)) -export function useServerConfig(configKey: string) { - const [result, setResult] = React.useState({} as any) - const getServerConfig = React.useCallback(async () => { - try { - const res = await cacheDescribeServerConfig({ module: configKey }) - setResult(res) - } catch (e) { - setResult({} as any) - } - }, []) - React.useEffect(() => { - getServerConfig() - }, [getServerConfig]) - if (!configKey) { - return result - } - return result -} diff --git a/web/src/polaris/namespace/Page.tsx b/web/src/polaris/namespace/Page.tsx index 04573a17..a45562a3 100644 --- a/web/src/polaris/namespace/Page.tsx +++ b/web/src/polaris/namespace/Page.tsx @@ -7,7 +7,6 @@ import { Justify, Table, Button, SearchBox, Card } from 'tea-component' import GridPageGrid from '../common/duckComponents/GridPageGrid' import GridPagePagination from '../common/duckComponents/GridPagePagination' import BasicLayout from '../common/components/BaseLayout' -import { useServerConfig } from '../common/util/serverConfig' insertCSS( 'service', @@ -32,8 +31,6 @@ export default function ServicePage(props: DuckCmpProps) { const { selectors } = duck const columns = getColumns(props) const handlers = getHandlers(props) - const multiRegConfig = useServerConfig('multiregistries') - const multiRegConfigEnabled = multiRegConfig.open return ( }> @@ -58,17 +55,7 @@ export default function ServicePage(props: DuckCmpProps) { /> - { - if (item.key === 'sync_to_global_registry') { - return multiRegConfigEnabled - } - return true - })} - /> + diff --git a/web/src/polaris/namespace/getColumns.tsx b/web/src/polaris/namespace/getColumns.tsx index a86eba5b..cdb59993 100644 --- a/web/src/polaris/namespace/getColumns.tsx +++ b/web/src/polaris/namespace/getColumns.tsx @@ -1,30 +1,16 @@ import * as React from 'react' import { DuckCmpProps } from 'saga-duck' import NamespacePageDuck, { NamespaceItem } from './PageDuck' -import { Bubble, Icon, Text } from 'tea-component' +import { Bubble, Text } from 'tea-component' import { Column } from '../common/ducks/GridPage' import Action from '../common/duckComponents/grid/Action' import { CheckVisibilityMode, VisibilityModeMap } from '../service/operation/CreateDuck' -import { disableDeleteTip } from '../service/getColumns' + export default ({ duck: { creators } }: DuckCmpProps): Column[] => [ { key: 'name', header: '名称', - render: x => ( - - {x.name} - {x.sync_to_global_registry && ( - - - - )} - - ), - }, - { - key: 'sync_to_global_registry', - header: '同步全局注册中心', - render: x => {x.sync_to_global_registry ? '开启' : '关闭' || '-'}, + render: x => {x.name}, }, { key: 'service_export_to', @@ -56,7 +42,11 @@ export default ({ duck: { creators } }: DuckCmpProps): Column ) }, }, - + { + key: 'sync_to_global_registry', + header: '同步全局注册中心', + render: x => {x.sync_to_global_registry ? '开启' : '关闭' || '-'}, + }, { key: 'commnet', header: '描述', @@ -92,11 +82,7 @@ export default ({ duck: { creators } }: DuckCmpProps): Column render: x => { return ( - dispatch(creators.edit(x))} - disabled={!x.editable || x.sync_to_global_registry} - tip={x.sync_to_global_registry ? disableDeleteTip : '编辑'} - > + dispatch(creators.edit(x))} disabled={!x.editable} tip={'编辑'}> {'编辑'} dispatch(creators.remove(x))} disabled={x.deleteable === false} tip={'删除'}> diff --git a/web/src/polaris/namespace/operation/Create.tsx b/web/src/polaris/namespace/operation/Create.tsx index 564a8ff9..0c4e608d 100644 --- a/web/src/polaris/namespace/operation/Create.tsx +++ b/web/src/polaris/namespace/operation/Create.tsx @@ -1,13 +1,12 @@ import React from 'react' import { DuckCmpProps, purify } from 'saga-duck' import Duck from './CreateDuck' -import { Form, Button, Icon, FormItem, Radio, RadioGroup, Switch, TagSelect, Modal } from 'tea-component' +import { Form, Button, Icon, FormItem, Radio, RadioGroup, SelectMultiple, Switch } from 'tea-component' import Dialog from '@src/polaris/common/duckComponents/Dialog' import FormField from '@src/polaris/common/duckComponents/form/Field' import Input from '@src/polaris/common/duckComponents/form/Input' import ResourcePrincipalAuth from '@src/polaris/auth/user/operation/ResourcePrincipalAuth' import { VisibilityMode } from '@src/polaris/service/operation/CreateDuck' -import { useServerConfig } from '@src/polaris/common/util/serverConfig' export default function Create(props: DuckCmpProps) { const { duck, store, dispatch } = props @@ -48,8 +47,6 @@ const CreateForm = purify(function CreateForm(props: DuckCmpProps) { const options = selectors.options(store) const [showAdvance, setShowAdvance] = React.useState(false) - const multiRegConfig = useServerConfig('multiregistries') - const multiRegConfigEnabled = multiRegConfig.open return ( <>
@@ -75,6 +72,15 @@ const CreateForm = purify(function CreateForm(props: DuckCmpProps) { {showAdvance && ( <> + + sync_to_global_registry.setValue(v)} + > +
) {
{visibilityMode.getValue() === '' && ( - { - if (value.includes('__all__')) { - service_export_to.setValue([ - ...new Set([...service_export_to.getValue(), ...options.namespaceList.map(x => x.value)]), - ]) - visibilityMode.setValue('') - } else { - service_export_to.setValue(value) - visibilityMode.setValue('') - } + service_export_to.setValue(value) + visibilityMode.setValue('') }} - /> + appearance={'button'} + size='l' + > )}
- {multiRegConfigEnabled && ( - - { - let confirm = false - if (v) { - confirm = await Modal.confirm({ - message: '确认开启同步开关', - description: - '开启后,该命名空间下,全部服务的同步开关将自动开启。全部服务、服务实例、治理规则将同步至全局实例。同步至全局实例后,全局实例中的服务可见性为全局可见。', - }) - } else { - confirm = await Modal.confirm({ - message: '确认关闭同步开关', - description: - '关闭后,该命名空间下,全部服务的同步开关将自动关闭。全部服务、服务实例、治理规则将不再同步至全局实例。', - }) - } - if (confirm) sync_to_global_registry.setValue(v) - }} - > - - )} {options.authOpen && ( ) { values: [ { name: '是', - value: true, + value: true }, { name: '否', - value: false, + value: false }, ], reusable: false, - }, + } ] } export default function ServicePage(props: DuckCmpProps) { @@ -127,8 +126,6 @@ export default function ServicePage(props: DuckCmpProps) { tags, grid: { list }, } = selector(store) - const multiRegConfig = useServerConfig('multiregistries') - const multiRegConfigEnabled = multiRegConfig.open return ( }> @@ -170,39 +167,13 @@ export default function ServicePage(props: DuckCmpProps) { duck={duck} dispatch={dispatch} store={store} - columns={columns.filter(item => { - if (item.key === 'sync_to_global_registry') { - return multiRegConfigEnabled - } - return true - })} + columns={columns} addons={[ selectable({ all: true, value: selection, onChange: handlers.select, - rowSelectable: (rowKey, { record }) => - !isReadOnly(record.namespace) && record.editable && !record.sync_to_global_registry, - render: (element, { record }) => { - if (isReadOnly(record.namespace) || !record.editable || record.sync_to_global_registry) { - return ( - - {element} - - ) - } - return <>{element} - }, + rowSelectable: (rowKey, { record }) => !isReadOnly(record.namespace) && record.editable, }), expandable({ // 已经展开的产品 diff --git a/web/src/polaris/service/detail/instance/Page.tsx b/web/src/polaris/service/detail/instance/Page.tsx index 72702e7c..719a01a1 100644 --- a/web/src/polaris/service/detail/instance/Page.tsx +++ b/web/src/polaris/service/detail/instance/Page.tsx @@ -15,7 +15,6 @@ import { Copy, TagSearchBox, notification, - Bubble, } from 'tea-component' import GridPageGrid from '@src/polaris/common/duckComponents/GridPageGrid' import GridPagePagination from '@src/polaris/common/duckComponents/GridPagePagination' @@ -27,8 +26,6 @@ import { HEALTH_STATUS, HEALTH_STATUS_MAP, ISOLATE_STATUS_MAP, ISOLATE_STATUS, H import { isReadOnly, showAllLabels } from '../../utils' import MetadataSelectPanel from '@src/polaris/common/components/MetadataSelectPanel' import { replaceTags } from '@src/polaris/configuration/utils' -import { checkGlobalRegistry } from '@src/polaris/administration/breaker/getColumns' -import { disableDeleteTip } from '../../getColumns' insertCSS( 'service-detail-instance', @@ -321,27 +318,7 @@ export default function ServiceInstancePage(props: DuckCmpProps all: true, value: selection, onChange: handlers.select, - rowSelectable: (rowKey, { record }) => !isReadOnly(namespace) && editable && !checkGlobalRegistry(record), - render: (element, { record }) => { - if (isReadOnly(namespace) || !editable || !checkGlobalRegistry(record)) { - return ( - - {element} - - ) - } - return <>{element} - }, + rowSelectable: (rowKey, { record }) => !isReadOnly(namespace) || record.editable, }), filterable({ type: 'single', diff --git a/web/src/polaris/service/detail/instance/getColumns.tsx b/web/src/polaris/service/detail/instance/getColumns.tsx index bdd8edb9..47af0ebc 100644 --- a/web/src/polaris/service/detail/instance/getColumns.tsx +++ b/web/src/polaris/service/detail/instance/getColumns.tsx @@ -6,13 +6,7 @@ import ServiceInstanceDuck from './PageDuck' import { Text, Icon } from 'tea-component' import Action from '@src/polaris/common/duckComponents/grid/Action' import { isReadOnly } from '../../utils' -import { checkGlobalRegistry } from '@src/polaris/administration/breaker/getColumns' -import { disableDeleteTip } from '../../getColumns' -export const getSourcePolairisIp = x => { - const hasSyncGlobal = Object.entries(x.metadata).find(([key]) => key === 'MetadataKeySyncLocalRegistryHost') - return hasSyncGlobal?.[1] -} export default ({ duck: { creators, selector }, store }: DuckCmpProps): Column[] => [ // { // key: "id", @@ -31,11 +25,6 @@ export default ({ duck: { creators, selector }, store }: DuckCmpProps {getSourcePolairisIp(x) || '-'}, - }, - { - key: 'sourceIp', - header: '来源北极星IP', render: x => {x.host}, }, { @@ -119,22 +108,13 @@ export default ({ duck: { creators, selector }, store }: DuckCmpProps dispatch(creators.edit(x))} - disabled={isReadOnly(namespace) || !editable || hasGlobalRegistry} - tip={ - isReadOnly(namespace) - ? '该命名空间为只读的' - : !editable - ? '无写权限' - : hasGlobalRegistry - ? disableDeleteTip - : '编辑' - } + disabled={isReadOnly(namespace) || !editable} + tip={isReadOnly(namespace) ? '该命名空间为只读的' : !editable ? '无写权限' : '编辑'} > diff --git a/web/src/polaris/service/getColumns.tsx b/web/src/polaris/service/getColumns.tsx index 1b5354ef..0fc1bd4a 100644 --- a/web/src/polaris/service/getColumns.tsx +++ b/web/src/polaris/service/getColumns.tsx @@ -3,10 +3,9 @@ import { Column } from '../common/ducks/GridPage' import { DuckCmpProps } from 'saga-duck' import ServicePageDuck, { ServiceItem } from './PageDuck' import { Link } from 'react-router-dom' -import { Text, Icon, Bubble } from 'tea-component' +import { Text, Icon } from 'tea-component' import Action from '../common/duckComponents/grid/Action' import { isReadOnly } from './utils' -export const disableDeleteTip = '从北极星实例同步至全局实例的数据,不支持操作。' export default ({ duck: { creators } }: DuckCmpProps): Column[] => [ { @@ -15,11 +14,6 @@ export default ({ duck: { creators } }: DuckCmpProps): Column ( {x.name} - {x.sync_to_global_registry && ( - - - - )} ), }, @@ -66,16 +60,8 @@ export default ({ duck: { creators } }: DuckCmpProps): Column dispatch(creators.edit(x))} - disabled={disabled || !x.editable || x.sync_to_global_registry} - tip={ - disabled - ? '该命名空间为只读的' - : !x.editable - ? '无权限' - : x.sync_to_global_registry - ? disableDeleteTip - : '编辑' - } + disabled={disabled || !x.editable} + tip={disabled ? '该命名空间为只读的' : !x.editable ? '无权限' : '编辑'} > diff --git a/web/src/polaris/service/operation/Create.tsx b/web/src/polaris/service/operation/Create.tsx index 18cb3966..41de0d46 100644 --- a/web/src/polaris/service/operation/Create.tsx +++ b/web/src/polaris/service/operation/Create.tsx @@ -1,27 +1,12 @@ import React from 'react' import { DuckCmpProps, purify } from 'saga-duck' import Duck, { VisibilityMode } from './CreateDuck' -import { - Form, - Text, - Icon, - Bubble, - Button, - FormItem, - Radio, - RadioGroup, - SelectMultiple, - AutoComplete, - Input as TeaInput, - Modal, - Switch, -} from 'tea-component' +import { Form, Select, Text, Icon, Bubble, Button, FormItem, Radio, RadioGroup, SelectMultiple } from 'tea-component' import FormField from '@src/polaris/common/duckComponents/form/Field' import Input from '@src/polaris/common/duckComponents/form/Input' import Dialog from '@src/polaris/common/duckComponents/Dialog' import ResourcePrincipalAuth from '@src/polaris/auth/user/operation/ResourcePrincipalAuth' import { TagTable } from '@src/polaris/common/components/TagTable' -import { useServerConfig } from '@src/polaris/common/util/serverConfig' export default function Create(props: DuckCmpProps) { const { duck, store, dispatch } = props @@ -46,17 +31,7 @@ const CreateForm = purify(function CreateForm(props: DuckCmpProps) { } = duck const formApi = form.getAPI(store, dispatch) - const { - namespace, - name, - comment, - metadata, - department, - business, - export_to, - visibilityMode, - sync_to_global_registry, - } = formApi.getFields([ + const { namespace, name, comment, metadata, department, business, export_to, visibilityMode } = formApi.getFields([ 'namespace', 'name', 'comment', @@ -66,34 +41,23 @@ const CreateForm = purify(function CreateForm(props: DuckCmpProps) { 'department', 'export_to', 'visibilityMode', - 'sync_to_global_registry', ]) const options = selectors.options(store) const [showAdvance, setShowAdvance] = React.useState(false) - const multiRegConfig = useServerConfig('multiregistries') - const multiRegConfigEnabled = multiRegConfig.open + return ( <> - { - namespace.setValue(value) - }} - > - {ref => ( - { - namespace.setValue(value) - }} - disabled={options.isModify} - size={'l'} - /> - )} - + onChange={value => namespace.setValue(value)} + type={'simulate'} + appearance={'button'} + size='l' + > @@ -173,29 +137,6 @@ const CreateForm = purify(function CreateForm(props: DuckCmpProps) { > )} - {multiRegConfigEnabled && ( - - { - let confirm = false - if (v) { - confirm = await Modal.confirm({ - message: '确认开启同步开关', - description: - '开启后,该服务、服务实例以及与该服务相关的治理规则将同步至全局实例。同步至全局实例后,全局实例中的服务可见性为全局可见。', - }) - } else { - confirm = await Modal.confirm({ - message: '确认关闭同步开关', - description: '关闭后,该服务、服务实例以及与该服务相关的治理规则将不再同步至全局实例。', - }) - } - if (confirm) sync_to_global_registry.setValue(v) - }} - > - - )} {options.authOpen && ( ({ reload: () => dispatch(creators.reload()), create: () => dispatch(creators.create()), @@ -99,19 +98,6 @@ export default function ServiceAliasPage(props: DuckCmpProps) all: true, value: selection, onChange: handlers.setSelection, - rowSelectable: (rowKey, { record }) => record.editable && !record.sync_to_global_registry, - render: (element, { record }) => { - if (!record.editable || record.sync_to_global_registry) { - return ( - - {element} - - ) - } - return <>{element} - }, }), filterable({ type: 'single', diff --git a/web/src/polaris/serviceAlias/getColumns.tsx b/web/src/polaris/serviceAlias/getColumns.tsx index 4ccb6ad4..146c1ae1 100644 --- a/web/src/polaris/serviceAlias/getColumns.tsx +++ b/web/src/polaris/serviceAlias/getColumns.tsx @@ -3,25 +3,15 @@ import { DuckCmpProps } from 'saga-duck' import { Link } from 'react-router-dom' import ServiceAliasPageDuck, { GovernanceAliasItem } from './PageDuck' import { Column } from '../common/ducks/GridPage' -import { Bubble, Icon, Tag, Text } from 'tea-component' +import { Tag, Text } from 'tea-component' import Action from '../common/duckComponents/grid/Action' -import { disableDeleteTip } from '../service/getColumns' export default ({ duck: { creators } }: DuckCmpProps): Column[] => { return [ { key: 'alias', header: '服务别名', - render: x => ( - - {x.alias} - {x.sync_to_global_registry && ( - - - - )} - - ), + render: x => {x.alias}, required: true, }, { @@ -64,8 +54,8 @@ export default ({ duck: { creators } }: DuckCmpProps): Col return ( dispatch(creators.edit(x))} > {'编辑'} diff --git a/web/src/polaris/serviceAlias/model.ts b/web/src/polaris/serviceAlias/model.ts index b14a75dd..1e846c96 100644 --- a/web/src/polaris/serviceAlias/model.ts +++ b/web/src/polaris/serviceAlias/model.ts @@ -74,9 +74,6 @@ export interface GovernanceAlias { /** 服务别名是否可删除 */ deleteable?: boolean - - /** 同步全局命名中心 */ - sync_to_global_registry?: boolean } /** 创建治理中心服务别名 */ diff --git a/web/src/polaris/serviceAlias/operation/Create.tsx b/web/src/polaris/serviceAlias/operation/Create.tsx index 82c0ba80..6e774900 100644 --- a/web/src/polaris/serviceAlias/operation/Create.tsx +++ b/web/src/polaris/serviceAlias/operation/Create.tsx @@ -2,7 +2,7 @@ import React from 'react' import { DuckCmpProps, purify } from 'saga-duck' import Duck from './CreateDuck' import Dialog from '@src/polaris/common/duckComponents/Dialog' -import { AutoComplete, Form, Input as TeaInput } from 'tea-component' +import { Form, Select } from 'tea-component' import FormField from '@src/polaris/common/duckComponents/form/Field' import Input from '@src/polaris/common/duckComponents/form/Input' @@ -50,46 +50,34 @@ const CreateForm = purify(function CreateForm(props: DuckCmpProps) { - { - alias_namespace.setValue(value) - }} - > - {ref => ( - { - alias_namespace.setValue(value) - }} - disabled={options.isModify} - size={'l'} - /> - )} - + onChange={value => alias_namespace.setValue(value)} + type={'simulate'} + appearance={'button'} + size={'l'} + disabled={options.isModify} + > + - { const [, namespaceName] = value.split('=>') service.setValue(value) namespace.setValue(namespaceName) }} - > - {ref => ( - { - service.setValue(value) - }} - size={'l'} - /> - )} - + type={'simulate'} + appearance={'button'} + size='l' + boxSizeSync + > +