diff --git a/app/kubernetes/views/deploy/deploy.html b/app/kubernetes/views/deploy/deploy.html index 071c8106df..85a8eb8409 100644 --- a/app/kubernetes/views/deploy/deploy.html +++ b/app/kubernetes/views/deploy/deploy.html @@ -39,27 +39,22 @@ -
- -
-
- +
+
+
+
- - Namespaces specified in the manifest will be used
+
- -
-
- - You do not have access to any namespace. Contact your administrator to get access to a namespace. +
+ +
+ Namespaces specified in the manifest will be used
diff --git a/app/kubernetes/views/deploy/deployController.js b/app/kubernetes/views/deploy/deployController.js index 22b275fc71..4b1745a62e 100644 --- a/app/kubernetes/views/deploy/deployController.js +++ b/app/kubernetes/views/deploy/deployController.js @@ -371,10 +371,6 @@ class KubernetesDeployController { if (this.namespaces.length > 0) { this.formValues.Namespace = this.namespaces[0].Name; } - this.namespaceOptions = _.map(namespaces, (namespace) => ({ - label: namespace.Name, - value: namespace.Name, - })); } catch (err) { this.Notifications.error('Failure', err, 'Unable to load namespaces data'); } diff --git a/app/portainer/react/components/index.ts b/app/portainer/react/components/index.ts index d7fcd1c4e2..3b2e577c83 100644 --- a/app/portainer/react/components/index.ts +++ b/app/portainer/react/components/index.ts @@ -7,7 +7,6 @@ import { withUIRouter } from '@/react-tools/withUIRouter'; import { AnnotationsBeTeaser } from '@/react/kubernetes/annotations/AnnotationsBeTeaser'; import { withFormValidation } from '@/react-tools/withFormValidation'; import { withControlledInput } from '@/react-tools/withControlledInput'; -import { NamespacePortainerSelect } from '@/react/kubernetes/applications/components/NamespaceSelector/NamespaceSelector'; import { EnvironmentVariablesFieldset, @@ -212,15 +211,6 @@ export const ngModule = angular 'onBlur', ]) ) - .component( - 'namespacePortainerSelect', - r2a(NamespacePortainerSelect, [ - 'value', - 'onChange', - 'isDisabled', - 'options', - ]) - ) .component( 'porSlider', r2a(Slider, [ diff --git a/app/react/kubernetes/applications/components/NamespaceSelector/NamespaceSelector.tsx b/app/react/kubernetes/applications/components/NamespaceSelector/NamespaceSelector.tsx index d8accbcba8..3d3b2e31e2 100644 --- a/app/react/kubernetes/applications/components/NamespaceSelector/NamespaceSelector.tsx +++ b/app/react/kubernetes/applications/components/NamespaceSelector/NamespaceSelector.tsx @@ -58,29 +58,3 @@ export function NamespaceSelector({ ); } - -/** NamespacePortainerSelect is exported for use by angular views, so that the data-cy attribute is set correctly */ -export function NamespacePortainerSelect({ - value, - onChange, - isDisabled, - options, -}: { - value: string; - onChange: (value: string) => void; - isDisabled: boolean; - options: { label: string; value: string }[]; -}) { - return ( - 'No namespaces found'} - placeholder="No namespaces found" // will only show when there are no options - inputId="namespace-selector" - data-cy="namespace-select" - /> - ); -}