diff --git a/web/src/polaris/administration/dynamicRoute/customRoute/getColumns.tsx b/web/src/polaris/administration/dynamicRoute/customRoute/getColumns.tsx index 251af5c8..3a5190e5 100644 --- a/web/src/polaris/administration/dynamicRoute/customRoute/getColumns.tsx +++ b/web/src/polaris/administration/dynamicRoute/customRoute/getColumns.tsx @@ -45,6 +45,11 @@ export default ( header: '状态', render: x => (x.enable ? 已启用 : 未启用), }, + { + key: 'priority', + header: '优先级', + render: x => x.priority, + }, { key: 'description', header: '描述', diff --git a/web/src/polaris/namespace/operation/CreateDuck.ts b/web/src/polaris/namespace/operation/CreateDuck.ts index 8b057abd..a530c624 100644 --- a/web/src/polaris/namespace/operation/CreateDuck.ts +++ b/web/src/polaris/namespace/operation/CreateDuck.ts @@ -157,7 +157,7 @@ export default class CreateDuck extends FormDialog { form.creators.setValues({ ...data, visibilityMode, - sync_to_global_registry: false, + sync_to_global_registry: data.sync_to_global_registry ?? false, }), ) // TODO 表单弹窗逻辑,在弹窗关闭后自动cancel diff --git a/web/src/polaris/service/Page.tsx b/web/src/polaris/service/Page.tsx index fbe32ddf..b2b86ccf 100644 --- a/web/src/polaris/service/Page.tsx +++ b/web/src/polaris/service/Page.tsx @@ -10,7 +10,7 @@ import { selectable, expandable, filterable } from 'tea-component/lib/table/addo import insertCSS from '../common/helpers/insertCSS' import csvColumns from './csvColumns' import { enableNearbyString } from './operation/CreateDuck' -import { isReadOnly, showAllLabels } from './utils' +import { checkGlobalRegistry, isReadOnly, showAllLabels } from './utils' import MetadataSelectPanel from '../common/components/MetadataSelectPanel' import { replaceTags } from '../configuration/utils' import { useServerConfig } from '../common/util/serverConfig' @@ -199,9 +199,9 @@ export default function ServicePage(props: DuckCmpProps) { value: selection, onChange: handlers.select, rowSelectable: (rowKey, { record }) => - !isReadOnly(record.namespace) && record.editable && !record.sync_to_global_registry, + !isReadOnly(record.namespace) && record.editable && !checkGlobalRegistry(record), render: (element, { record }) => { - if (isReadOnly(record.namespace) || !record.editable || record.sync_to_global_registry) { + if (isReadOnly(record.namespace) || !record.editable || checkGlobalRegistry(record)) { return ( ) { ? '该命名空间为只读的' : !record.editable ? '无权限' - : record.sync_to_global_registry + : checkGlobalRegistry(record) ? disableDeleteTip : '编辑' } diff --git a/web/src/polaris/service/detail/instance/Page.tsx b/web/src/polaris/service/detail/instance/Page.tsx index 6e686434..0d958128 100644 --- a/web/src/polaris/service/detail/instance/Page.tsx +++ b/web/src/polaris/service/detail/instance/Page.tsx @@ -322,7 +322,7 @@ export default function ServiceInstancePage(props: DuckCmpProps onChange: handlers.select, rowSelectable: (rowKey, { record }) => !isReadOnly(namespace) && editable && !checkGlobalRegistry(record), render: (element, { record }) => { - if (isReadOnly(namespace) || !editable || !checkGlobalRegistry(record)) { + if (isReadOnly(namespace) || !editable || checkGlobalRegistry(record)) { return ( { - const hasSyncGlobal = Object.entries(x.metadata).find(([key]) => key === 'MetadataKeySyncLocalRegistryHost') + const hasSyncGlobal = Object.entries(x.metadata).find(([key]) => key === 'internal-sync-local-registry-host') return hasSyncGlobal?.[1] } export default ({ duck: { creators, selector }, store }: DuckCmpProps): Column[] => [ @@ -30,12 +30,12 @@ export default ({ duck: { creators, selector }, store }: DuckCmpProps {getSourcePolairisIp(x) || '-'}, + render: x => {x.host}, }, { key: 'sourceIp', header: '来源北极星IP', - render: x => {x.host}, + render: x => {getSourcePolairisIp(x) || '-'}, }, { key: 'port', diff --git a/web/src/polaris/service/model.ts b/web/src/polaris/service/model.ts index 21075b5c..51bd1a14 100644 --- a/web/src/polaris/service/model.ts +++ b/web/src/polaris/service/model.ts @@ -31,6 +31,7 @@ export interface CreateServicesParams { user_ids?: string[] group_ids?: string[] export_to?: string[] + sync_to_global_registry?: boolean } export interface ModifyServicesParams { @@ -50,6 +51,7 @@ export interface ModifyServicesParams { remove_user_ids?: string[] remove_group_ids?: string[] export_to?: string[] + sync_to_global_registry?: boolean } export interface DescribeNamespacesResult { amount: number diff --git a/web/src/polaris/service/operation/CreateDuck.ts b/web/src/polaris/service/operation/CreateDuck.ts index 6e39601c..ba7364d4 100644 --- a/web/src/polaris/service/operation/CreateDuck.ts +++ b/web/src/polaris/service/operation/CreateDuck.ts @@ -103,6 +103,7 @@ export default class CreateDuck extends FormDialog { remove_user_ids: removeUserIds, remove_group_ids: removeGroupIds, export_to: values.export_to, + sync_to_global_registry: values.sync_to_global_registry, }, ]), ) @@ -122,6 +123,7 @@ export default class CreateDuck extends FormDialog { user_ids: userIds, group_ids: groupIds, export_to: values.export_to, + sync_to_global_registry: values.sync_to_global_registry, }, ]), )