Skip to content

Commit

Permalink
fix: 修改查询key
Browse files Browse the repository at this point in the history
  • Loading branch information
tingfuyeh committed Nov 29, 2024
1 parent 242b41e commit 7e828a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions web/src/polaris/service/detail/instance/PageDuck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: '',
Expand Down Expand Up @@ -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 = {
Expand Down
4 changes: 2 additions & 2 deletions web/src/polaris/service/detail/instance/getColumns.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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<ServiceInstanceDuck>): Column<Instance>[] => [
Expand Down

0 comments on commit 7e828a6

Please sign in to comment.