diff --git a/app/kubernetes/views/applications/create/createApplicationController.js b/app/kubernetes/views/applications/create/createApplicationController.js index 15ad90b2b..86679639f 100644 --- a/app/kubernetes/views/applications/create/createApplicationController.js +++ b/app/kubernetes/views/applications/create/createApplicationController.js @@ -37,7 +37,8 @@ class KubernetesCreateApplicationController { KubernetesStackService, KubernetesConfigurationService, KubernetesNodeService, - KubernetesPersistentVolumeClaimService + KubernetesPersistentVolumeClaimService, + KubernetesNamespaceHelper ) { this.$async = $async; this.$state = $state; @@ -51,6 +52,7 @@ class KubernetesCreateApplicationController { this.KubernetesConfigurationService = KubernetesConfigurationService; this.KubernetesNodeService = KubernetesNodeService; this.KubernetesPersistentVolumeClaimService = KubernetesPersistentVolumeClaimService; + this.KubernetesNamespaceHelper = KubernetesNamespaceHelper; this.ApplicationDeploymentTypes = KubernetesApplicationDeploymentTypes; this.ApplicationDataAccessPolicies = KubernetesApplicationDataAccessPolicies; @@ -592,7 +594,8 @@ class KubernetesCreateApplicationController { const [resourcePools, nodes] = await Promise.all([this.KubernetesResourcePoolService.get(), this.KubernetesNodeService.get()]); - this.resourcePools = resourcePools; + this.resourcePools = _.filter(resourcePools, (resourcePool) => !this.KubernetesNamespaceHelper.isSystemNamespace(resourcePool.Namespace.Name)); + this.formValues.ResourcePool = this.resourcePools[0]; _.forEach(nodes, (item) => { diff --git a/app/kubernetes/views/configurations/create/createConfigurationController.js b/app/kubernetes/views/configurations/create/createConfigurationController.js index 696a2efc7..7182c267d 100644 --- a/app/kubernetes/views/configurations/create/createConfigurationController.js +++ b/app/kubernetes/views/configurations/create/createConfigurationController.js @@ -5,7 +5,7 @@ import { KubernetesConfigurationTypes } from 'Kubernetes/models/configuration/mo class KubernetesCreateConfigurationController { /* @ngInject */ - constructor($async, $state, Notifications, Authentication, KubernetesConfigurationService, KubernetesResourcePoolService) { + constructor($async, $state, Notifications, Authentication, KubernetesConfigurationService, KubernetesResourcePoolService, KubernetesNamespaceHelper) { this.$async = $async; this.$state = $state; this.Notifications = Notifications; @@ -13,6 +13,7 @@ class KubernetesCreateConfigurationController { this.KubernetesConfigurationService = KubernetesConfigurationService; this.KubernetesResourcePoolService = KubernetesResourcePoolService; this.KubernetesConfigurationTypes = KubernetesConfigurationTypes; + this.KubernetesNamespaceHelper = KubernetesNamespaceHelper; this.onInit = this.onInit.bind(this); this.createConfigurationAsync = this.createConfigurationAsync.bind(this); @@ -74,7 +75,9 @@ class KubernetesCreateConfigurationController { this.formValues.Data.push(new KubernetesConfigurationFormValuesDataEntry()); try { - this.resourcePools = await this.KubernetesResourcePoolService.get(); + const resourcePools = await this.KubernetesResourcePoolService.get(); + this.resourcePools = _.filter(resourcePools, (resourcePool) => !this.KubernetesNamespaceHelper.isSystemNamespace(resourcePool.Namespace.Name)); + this.formValues.ResourcePool = this.resourcePools[0]; await this.getConfigurations(); } catch (err) { diff --git a/app/kubernetes/views/configurations/edit/configuration.html b/app/kubernetes/views/configurations/edit/configuration.html index 3d97546ea..6b5a0ae8f 100644 --- a/app/kubernetes/views/configurations/edit/configuration.html +++ b/app/kubernetes/views/configurations/edit/configuration.html @@ -76,7 +76,7 @@
Key | +Value | +
{{ item.Key }} | +
+ {{ item.Value }}
+
+ Copy
+
+
+ |
+