diff --git a/web/src/polaris/service/detail/instance/PageDuck.ts b/web/src/polaris/service/detail/instance/PageDuck.ts index 14dd600..8892bab 100644 --- a/web/src/polaris/service/detail/instance/PageDuck.ts +++ b/web/src/polaris/service/detail/instance/PageDuck.ts @@ -14,7 +14,7 @@ import { Modal, TagValue } from 'tea-component' import { KeyValuePair } from '@src/polaris/configuration/fileGroup/types' import { MetadataTagKey, HealthyTagKey, DefaultHostTagAttribute, HostTagKey } from './Page' import { Service } from '../../types' -import { InternalSyncKey } from '../../utils' +import { SourcePolarisIpKey } from './getColumns' export const EmptyCustomFilter = { host: '', @@ -296,7 +296,7 @@ export default class ServicePageDuck extends GridPageDuck { } = filters let { key, value } = metadata || {} if (sourceIp) { - key = InternalSyncKey + key = SourcePolarisIpKey value = sourceIp } const searchParams = { diff --git a/web/src/polaris/service/detail/instance/getColumns.tsx b/web/src/polaris/service/detail/instance/getColumns.tsx index a54d1b4..daf5fca 100644 --- a/web/src/polaris/service/detail/instance/getColumns.tsx +++ b/web/src/polaris/service/detail/instance/getColumns.tsx @@ -7,9 +7,9 @@ import { Text, Icon } from 'tea-component' import Action from '@src/polaris/common/duckComponents/grid/Action' import { checkGlobalRegistry, isReadOnly } from '../../utils' import { disableDeleteTip } from '../../getColumns' - +export const SourcePolarisIpKey = 'internal-sync-local-registry-host' export const getSourcePolairisIp = x => { - const hasSyncGlobal = Object.entries(x.metadata).find(([key]) => key === 'internal-sync-local-registry-host') + const hasSyncGlobal = Object.entries(x.metadata).find(([key]) => key === SourcePolarisIpKey) return hasSyncGlobal?.[1] } export default ({ duck: { creators, selector }, store }: DuckCmpProps): Column[] => [