File tree Expand file tree Collapse file tree 6 files changed +78
-12
lines changed
cluster-api/src/components Expand file tree Collapse file tree 6 files changed +78
-12
lines changed Original file line number Diff line number Diff line change 1- import { ResourceListView } from '@kinvolk/headlamp-plugin/lib/CommonComponents ' ;
1+ import { Link , ResourceListView } from '@kinvolk/headlamp-plugin/lib/components/common ' ;
22import { Cluster } from '../../resources/cluster' ;
33
44export function ClustersList ( ) {
@@ -12,7 +12,18 @@ export function ClustersList() {
1212 {
1313 id : 'clusterclass' ,
1414 label : 'Cluster Class' ,
15- getValue : cluster => cluster . spec ?. topology ?. class ,
15+ getValue : null ,
16+ render : cluster => (
17+ < Link
18+ routeName = "clusterclasse"
19+ params = { {
20+ name : cluster . spec ?. topology ?. class ,
21+ namespace : cluster . metadata ?. namespace ,
22+ } }
23+ >
24+ { cluster . spec ?. topology ?. class }
25+ </ Link >
26+ ) ,
1627 } ,
1728 {
1829 id : 'phase' ,
Original file line number Diff line number Diff line change 1- import { ResourceListView } from '@kinvolk/headlamp-plugin/lib/CommonComponents ' ;
1+ import { Link , ResourceListView } from '@kinvolk/headlamp-plugin/lib/components/common ' ;
22import { KubeadmConfig } from '../../resources/kubeadmconfig' ;
33
44export function KubeadmConfigsList ( ) {
@@ -12,7 +12,18 @@ export function KubeadmConfigsList() {
1212 {
1313 id : 'cluster' ,
1414 label : 'Cluster' ,
15- getValue : kc => kc . metadata ?. labels ?. [ 'cluster.x-k8s.io/cluster-name' ] ,
15+ getValue : null ,
16+ render : kc => (
17+ < Link
18+ routeName = "capicluster"
19+ params = { {
20+ name : kc . metadata ?. labels ?. [ 'cluster.x-k8s.io/cluster-name' ] ,
21+ namespace : kc . metadata ?. namespace ,
22+ } }
23+ >
24+ { kc . metadata ?. labels ?. [ 'cluster.x-k8s.io/cluster-name' ] }
25+ </ Link >
26+ ) ,
1627 } ,
1728 'age' ,
1829 ] }
Original file line number Diff line number Diff line change 1- import { ResourceListView } from '@kinvolk/headlamp-plugin/lib/CommonComponents ' ;
1+ import { Link , ResourceListView } from '@kinvolk/headlamp-plugin/lib/components/common ' ;
22import { KubeadmControlPlane } from '../../resources/kubeadmcontrolplane' ;
33
44export function KubeadmControlPlanesList ( ) {
@@ -12,7 +12,18 @@ export function KubeadmControlPlanesList() {
1212 {
1313 id : 'cluster' ,
1414 label : 'Cluster' ,
15- getValue : kcp => kcp . metadata ?. labels ?. [ 'cluster.x-k8s.io/cluster-name' ] ,
15+ getValue : null ,
16+ render : kcp => (
17+ < Link
18+ routeName = "capicluster"
19+ params = { {
20+ name : kcp . metadata ?. labels ?. [ 'cluster.x-k8s.io/cluster-name' ] ,
21+ namespace : kcp . metadata ?. namespace ,
22+ } }
23+ >
24+ { kcp . metadata ?. labels ?. [ 'cluster.x-k8s.io/cluster-name' ] }
25+ </ Link >
26+ ) ,
1627 } ,
1728 {
1829 id : 'initialized' ,
Original file line number Diff line number Diff line change 1- import { ResourceListView } from '@kinvolk/headlamp-plugin/lib/CommonComponents ' ;
1+ import { Link , ResourceListView } from '@kinvolk/headlamp-plugin/lib/components/common ' ;
22import { MachineDeployment } from '../../resources/machinedeployment' ;
33
44export function MachineDeploymentsList ( ) {
@@ -12,7 +12,18 @@ export function MachineDeploymentsList() {
1212 {
1313 id : 'cluster' ,
1414 label : 'Cluster' ,
15- getValue : deployment => deployment . spec ?. clusterName ,
15+ getValue : null ,
16+ render : deployment => (
17+ < Link
18+ routeName = "capicluster"
19+ params = { {
20+ name : deployment . metadata ?. labels ?. [ 'cluster.x-k8s.io/cluster-name' ] ,
21+ namespace : deployment . metadata ?. namespace ,
22+ } }
23+ >
24+ { deployment . metadata ?. labels ?. [ 'cluster.x-k8s.io/cluster-name' ] }
25+ </ Link >
26+ ) ,
1627 } ,
1728 {
1829 id : 'replicas' ,
Original file line number Diff line number Diff line change 1- import { ResourceListView } from '@kinvolk/headlamp-plugin/lib/CommonComponents ' ;
1+ import { Link , ResourceListView } from '@kinvolk/headlamp-plugin/lib/components/common ' ;
22import { MachineHealthCheck } from '../../resources/machinehealthcheck' ;
33
44export function MachineHealthChecksList ( ) {
@@ -12,7 +12,18 @@ export function MachineHealthChecksList() {
1212 {
1313 id : 'cluster' ,
1414 label : 'Cluster' ,
15- getValue : mhc => mhc . spec ?. clusterName ,
15+ getValue : null ,
16+ render : mhc => (
17+ < Link
18+ routeName = "capicluster"
19+ params = { {
20+ name : mhc . metadata ?. labels ?. [ 'cluster.x-k8s.io/cluster-name' ] ,
21+ namespace : mhc . metadata ?. namespace ,
22+ } }
23+ >
24+ { mhc . metadata ?. labels ?. [ 'cluster.x-k8s.io/cluster-name' ] }
25+ </ Link >
26+ ) ,
1627 } ,
1728 {
1829 id : 'expectedMachines' ,
Original file line number Diff line number Diff line change 1- import { ResourceListView } from '@kinvolk/headlamp-plugin/lib/CommonComponents ' ;
1+ import { Link , ResourceListView } from '@kinvolk/headlamp-plugin/lib/components/common ' ;
22import { MachineSet } from '../../resources/machineset' ;
33
44export function MachineSetsList ( ) {
@@ -12,7 +12,18 @@ export function MachineSetsList() {
1212 {
1313 id : 'cluster' ,
1414 label : 'Cluster' ,
15- getValue : machineset => machineset . spec . clusterName ,
15+ getValue : null ,
16+ render : machineset => (
17+ < Link
18+ routeName = "capicluster"
19+ params = { {
20+ name : machineset . metadata ?. labels ?. [ 'cluster.x-k8s.io/cluster-name' ] ,
21+ namespace : machineset . metadata ?. namespace ,
22+ } }
23+ >
24+ { machineset . metadata ?. labels ?. [ 'cluster.x-k8s.io/cluster-name' ] }
25+ </ Link >
26+ ) ,
1627 } ,
1728 {
1829 id : 'replicas' ,
You can’t perform that action at this time.
0 commit comments