mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 05:19:39 +02:00
feat(kompose): hide kompose [EE-4562] (#8084)
This commit is contained in:
parent
8fd0efa34f
commit
9cdc0da615
9 changed files with 92 additions and 5 deletions
|
@ -9,6 +9,7 @@ import { renderTemplate } from '@/react/portainer/custom-templates/components/ut
|
|||
import { isBE } from '@/react/portainer/feature-flags/feature-flags.service';
|
||||
import { compose, kubernetes } from '@@/BoxSelector/common-options/deployment-methods';
|
||||
import { editor, git, template, url } from '@@/BoxSelector/common-options/build-methods';
|
||||
import { getPublicSettings } from '@/react/portainer/settings/settings.service';
|
||||
|
||||
class KubernetesDeployController {
|
||||
/* @ngInject */
|
||||
|
@ -27,10 +28,7 @@ class KubernetesDeployController {
|
|||
|
||||
this.isTemplateVariablesEnabled = isBE;
|
||||
|
||||
this.deployOptions = [
|
||||
{ ...kubernetes, value: KubernetesDeployManifestTypes.KUBERNETES },
|
||||
{ ...compose, value: KubernetesDeployManifestTypes.COMPOSE },
|
||||
];
|
||||
this.deployOptions = [{ ...kubernetes, value: KubernetesDeployManifestTypes.KUBERNETES }];
|
||||
|
||||
this.methodOptions = [
|
||||
{ ...git, value: KubernetesDeployBuildMethods.GIT },
|
||||
|
@ -341,6 +339,16 @@ class KubernetesDeployController {
|
|||
}
|
||||
}
|
||||
|
||||
try {
|
||||
const publicSettings = await getPublicSettings();
|
||||
this.showKomposeBuildOption = publicSettings.ShowKomposeBuildOption;
|
||||
} catch (err) {
|
||||
this.Notifications.error('Failure', err, 'Unable to get public settings');
|
||||
}
|
||||
if (this.showKomposeBuildOption) {
|
||||
this.deployOptions = [...this.deployOptions, { ...compose, value: KubernetesDeployManifestTypes.COMPOSE }];
|
||||
}
|
||||
|
||||
this.state.viewReady = true;
|
||||
|
||||
this.$window.onbeforeunload = () => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue