diff --git a/app/kubernetes/views/cluster/clusterController.js b/app/kubernetes/views/cluster/clusterController.js index 81d711849..4da41a192 100644 --- a/app/kubernetes/views/cluster/clusterController.js +++ b/app/kubernetes/views/cluster/clusterController.js @@ -7,7 +7,7 @@ import { getMetricsForAllNodes } from '@/react/kubernetes/services/service.ts'; class KubernetesClusterController { /* @ngInject */ - constructor($async, $state, Notifications, LocalStorage, Authentication, KubernetesNodeService, KubernetesApplicationService, KubernetesEndpointService) { + constructor($async, $state, Notifications, LocalStorage, Authentication, KubernetesNodeService, KubernetesApplicationService, KubernetesEndpointService, EndpointService) { this.$async = $async; this.$state = $state; this.Authentication = Authentication; @@ -16,6 +16,7 @@ class KubernetesClusterController { this.KubernetesNodeService = KubernetesNodeService; this.KubernetesApplicationService = KubernetesApplicationService; this.KubernetesEndpointService = KubernetesEndpointService; + this.EndpointService = EndpointService; this.onInit = this.onInit.bind(this); this.getNodes = this.getNodes.bind(this); @@ -120,6 +121,7 @@ class KubernetesClusterController { } async onInit() { + this.endpoint = await this.EndpointService.endpoint(this.endpoint.Id); this.isAdmin = this.Authentication.isAdmin(); const useServerMetrics = this.endpoint.Kubernetes.Configuration.UseServerMetrics; diff --git a/app/kubernetes/views/resource-pools/create/createResourcePoolController.js b/app/kubernetes/views/resource-pools/create/createResourcePoolController.js index 7d46c926f..e319e0b13 100644 --- a/app/kubernetes/views/resource-pools/create/createResourcePoolController.js +++ b/app/kubernetes/views/resource-pools/create/createResourcePoolController.js @@ -26,6 +26,7 @@ class KubernetesCreateResourcePoolController { }); this.IngressClassTypes = KubernetesIngressClassTypes; + this.EndpointService = EndpointService; this.LBQuotaFeatureId = FeatureId.K8S_RESOURCE_POOL_LB_QUOTA; this.onToggleStorageQuota = this.onToggleStorageQuota.bind(this); @@ -175,7 +176,7 @@ class KubernetesCreateResourcePoolController { $onInit() { return this.$async(async () => { try { - const endpoint = this.endpoint; + const endpoint = await this.EndpointService.endpoint(this.endpoint.Id); this.defaults = KubernetesResourceQuotaDefaults; this.formValues = new KubernetesResourcePoolFormValues(this.defaults); this.formValues.EndpointId = this.endpoint.Id; diff --git a/app/kubernetes/views/resource-pools/edit/resourcePoolController.js b/app/kubernetes/views/resource-pools/edit/resourcePoolController.js index 76762e84d..f72f88c48 100644 --- a/app/kubernetes/views/resource-pools/edit/resourcePoolController.js +++ b/app/kubernetes/views/resource-pools/edit/resourcePoolController.js @@ -60,9 +60,11 @@ class KubernetesResourcePoolController { this.IngressClassTypes = KubernetesIngressClassTypes; this.ResourceQuotaDefaults = KubernetesResourceQuotaDefaults; + this.EndpointService = EndpointService; this.LBQuotaFeatureId = FeatureId.K8S_RESOURCE_POOL_LB_QUOTA; this.StorageQuotaFeatureId = FeatureId.K8S_RESOURCE_POOL_STORAGE_QUOTA; + this.StorageQuotaFeatureId = FeatureId.K8S_RESOURCE_POOL_STORAGE_QUOTA; this.updateResourcePoolAsync = this.updateResourcePoolAsync.bind(this); this.getEvents = this.getEvents.bind(this); @@ -339,6 +341,7 @@ class KubernetesResourcePoolController { $onInit() { return this.$async(async () => { try { + this.endpoint = await this.EndpointService.endpoint(this.endpoint.Id); this.isAdmin = this.Authentication.isAdmin(); this.state = { diff --git a/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/IngressClassDatatable.tsx b/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/IngressClassDatatable.tsx index e75e35950..206ba1185 100644 --- a/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/IngressClassDatatable.tsx +++ b/app/react/kubernetes/cluster/ingressClass/IngressClassDatatable/IngressClassDatatable.tsx @@ -1,14 +1,15 @@ import { useEffect, useState } from 'react'; -import { Database, AlertTriangle } from 'lucide-react'; + +import Route from '@/assets/ico/route.svg?c'; import { confirm } from '@@/modals/confirm'; import { ModalType } from '@@/modals'; import { Datatable } from '@@/datatables'; import { Button, ButtonGroup } from '@@/buttons'; -import { Icon } from '@@/Icon'; import { createPersistedStore } from '@@/datatables/types'; import { buildConfirmButton } from '@@/modals/utils'; import { useTableState } from '@@/datatables/useTableState'; +import { TextTip } from '@@/Tip/TextTip'; import { IngressControllerClassMapRowData } from '../types'; @@ -98,7 +99,7 @@ export function IngressClassDatatable({ isLoading={isLoading} emptyContentLabel={noIngressControllerLabel} title="Ingress Controllers" - titleIcon={Database} + titleIcon={Route} getRowId={(row) => `${row.Name}-${row.ClassName}-${row.Type}`} renderTableActions={(selectedRows) => renderTableActions(selectedRows)} description={renderIngressClassDescription()} @@ -160,12 +161,7 @@ export function IngressClassDatatable({ isUnsavedChanges( initialIngressControllers, ingControllerFormValues - ) && ( - - - Unsaved changes. - - )} + ) && Unsaved changes.} ); }