mirror of https://github.com/portainer/portainer
fix(k8s): k8s deployment manifest file placeholder EE-1936
parent
d64cab0c50
commit
6b91a813f0
|
@ -45,7 +45,13 @@
|
||||||
<div class="col-sm-12 form-section-title">
|
<div class="col-sm-12 form-section-title">
|
||||||
Deployment type
|
Deployment type
|
||||||
</div>
|
</div>
|
||||||
<box-selector radio-name="deploy" ng-model="ctrl.state.DeployType" options="ctrl.deployOptions" data-cy="k8sAppDeploy-deploymentSelector"></box-selector>
|
<box-selector
|
||||||
|
radio-name="deploy"
|
||||||
|
ng-model="ctrl.state.DeployType"
|
||||||
|
on-change="(ctrl.onDeployTypeChange)"
|
||||||
|
options="ctrl.deployOptions"
|
||||||
|
data-cy="k8sAppDeploy-deploymentSelector"
|
||||||
|
></box-selector>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- repository -->
|
<!-- repository -->
|
||||||
|
@ -58,6 +64,7 @@
|
||||||
show-auth-explanation="true"
|
show-auth-explanation="true"
|
||||||
path-text-title="Manifest path"
|
path-text-title="Manifest path"
|
||||||
path-placeholder="deployment.yml"
|
path-placeholder="deployment.yml"
|
||||||
|
deploy-method="{{ ctrl.DeployMethod }}"
|
||||||
></git-form>
|
></git-form>
|
||||||
<!-- !repository -->
|
<!-- !repository -->
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ class KubernetesDeployController {
|
||||||
this.StackService = StackService;
|
this.StackService = StackService;
|
||||||
this.WebhookHelper = WebhookHelper;
|
this.WebhookHelper = WebhookHelper;
|
||||||
this.CustomTemplateService = CustomTemplateService;
|
this.CustomTemplateService = CustomTemplateService;
|
||||||
|
this.DeployMethod = 'manifest';
|
||||||
|
|
||||||
this.deployOptions = [
|
this.deployOptions = [
|
||||||
buildOption('method_kubernetes', 'fa fa-cubes', 'Kubernetes', 'Kubernetes manifest format', KubernetesDeployManifestTypes.KUBERNETES),
|
buildOption('method_kubernetes', 'fa fa-cubes', 'Kubernetes', 'Kubernetes manifest format', KubernetesDeployManifestTypes.KUBERNETES),
|
||||||
|
@ -79,6 +80,7 @@ class KubernetesDeployController {
|
||||||
this.getNamespacesAsync = this.getNamespacesAsync.bind(this);
|
this.getNamespacesAsync = this.getNamespacesAsync.bind(this);
|
||||||
this.onChangeFormValues = this.onChangeFormValues.bind(this);
|
this.onChangeFormValues = this.onChangeFormValues.bind(this);
|
||||||
this.buildAnalyticsProperties = this.buildAnalyticsProperties.bind(this);
|
this.buildAnalyticsProperties = this.buildAnalyticsProperties.bind(this);
|
||||||
|
this.onDeployTypeChange = this.onDeployTypeChange.bind(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
buildAnalyticsProperties() {
|
buildAnalyticsProperties() {
|
||||||
|
@ -280,6 +282,14 @@ class KubernetesDeployController {
|
||||||
return this.$async(this.getNamespacesAsync);
|
return this.$async(this.getNamespacesAsync);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onDeployTypeChange(value) {
|
||||||
|
if (value == this.ManifestDeployTypes.COMPOSE) {
|
||||||
|
this.DeployMethod = 'compose';
|
||||||
|
} else {
|
||||||
|
this.DeployMethod = 'manifest';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async uiCanExit() {
|
async uiCanExit() {
|
||||||
if (this.formValues.EditorContent && this.state.isEditorDirty) {
|
if (this.formValues.EditorContent && this.state.isEditorDirty) {
|
||||||
return this.ModalService.confirmWebEditorDiscard();
|
return this.ModalService.confirmWebEditorDiscard();
|
||||||
|
|
Loading…
Reference in New Issue