Skip to content

Commit

Permalink
chore: ClusterMap - move to fe-lib
Browse files Browse the repository at this point in the history
  • Loading branch information
RohitRaj011 committed Nov 14, 2024
1 parent beac4ef commit 0e44577
Show file tree
Hide file tree
Showing 8 changed files with 4 additions and 221 deletions.
101 changes: 0 additions & 101 deletions src/Pages/ResourceBrowser/ClusterList/ClusterMap/ClusterMap.tsx

This file was deleted.

35 changes: 0 additions & 35 deletions src/Pages/ResourceBrowser/ClusterList/ClusterMap/clustermap.scss

This file was deleted.

2 changes: 0 additions & 2 deletions src/Pages/ResourceBrowser/ClusterList/ClusterMap/index.ts

This file was deleted.

19 changes: 0 additions & 19 deletions src/Pages/ResourceBrowser/ClusterList/ClusterMap/types.ts

This file was deleted.

58 changes: 0 additions & 58 deletions src/Pages/ResourceBrowser/ClusterList/ClusterMap/utils.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/Pages/ResourceBrowser/ClusterList/index.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/Pages/ResourceBrowser/index.ts

This file was deleted.

8 changes: 4 additions & 4 deletions src/components/ClusterNodes/ClusterSelectionList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ import { AddClusterButton } from '@Components/ResourceBrowser/PageHeader.buttons
import { ReactComponent as Error } from '@Icons/ic-error-exclamation.svg'
import { ReactComponent as Success } from '@Icons/appstatus/healthy.svg'
import { ReactComponent as TerminalIcon } from '@Icons/ic-terminal-fill.svg'
import { ClusterMap, ClusterTreeMapData } from '@Pages/ResourceBrowser'
import { ClusterDetail } from './types'
import ClusterNodeEmptyState from './ClusterNodeEmptyStates'
import { ClusterSelectionType } from '../ResourceBrowser/Types'
Expand All @@ -45,11 +44,12 @@ import './clusterNodes.scss'
const KubeConfigButton = importComponentFromFELibrary('KubeConfigButton', null, 'function')
const ClusterStatusCell = importComponentFromFELibrary('ClusterStatus', null, 'function')
const ClusterFilters = importComponentFromFELibrary('ClusterFilters', null, 'function')
const ClusterMap = importComponentFromFELibrary('ClusterMap', null, 'function')

const getClusterMapData = (data: ClusterDetail[]): ClusterTreeMapData['data'] =>
const getClusterMapData = (data: ClusterDetail[]) =>
data.map(({ name, id, nodeCount, status }) => ({
name,
status: status as ClusterTreeMapData['data'][0]['status'],
status,
href: `${URLS.RESOURCE_BROWSER}/${id}/${ALL_NAMESPACE_OPTION.value}/${SIDEBAR_KEYS.nodeGVK.Kind.toLowerCase()}/${K8S_EMPTY_GROUP}`,
value: nodeCount ?? 0,
}))
Expand Down Expand Up @@ -86,7 +86,7 @@ const ClusterSelectionList: React.FC<ClusterSelectionType> = ({
})
}, [searchKey, clusterOptions, `${clusterFilter}`])

const treeMapData = useMemo<ClusterTreeMapData[]>(() => {
const treeMapData = useMemo(() => {
const { prodClusters, nonProdClusters } = filteredList.reduce(
(acc, curr) => {
if (curr.status && curr.status !== ClusterStatusType.CONNECTION_FAILED) {
Expand Down

0 comments on commit 0e44577

Please sign in to comment.