add name field for helm install in advance deployments (#10493)

pull/10501/head
Prabhat Khera 1 year ago committed by GitHub
parent 776be2e022
commit 56f3bd8417
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -56,7 +56,7 @@ export default class HelmTemplatesController {
this.state.actionInProgress = true;
try {
const payload = {
Name: this.stackName,
Name: this.name,
Repo: this.state.chart.repo,
Chart: this.state.chart.name,
Values: this.state.values,

@ -82,7 +82,7 @@
<button
type="button"
class="btn btn-primary btn-sm !ml-0"
ng-disabled="!$ctrl.state.resourcePool || $ctrl.state.loadingValues || $ctrl.state.actionInProgress"
ng-disabled="!$ctrl.state.resourcePool || $ctrl.state.loadingValues || $ctrl.state.actionInProgress || !$ctrl.name"
ng-click="$ctrl.installHelmchart()"
button-spinner="$ctrl.state.actionInProgress"
data-cy="helm-install"

@ -9,5 +9,6 @@ angular.module('portainer.kubernetes').component('helmTemplatesView', {
namespace: '<',
stackName: '<',
onSelectHelmChart: '<',
name: '<',
},
});

@ -50,12 +50,28 @@
</div>
<div class="form-group">
<label for="stack_name" class="col-lg-2 col-sm-3 control-label text-left">Name</label>
<div class="col-sm-8"> Resource names specified in the manifest will be used </div>
<label for="name" class="col-lg-2 col-sm-3 control-label text-left">Name</label>
<div class="col-sm-8" ng-if="ctrl.state.BuildMethod !== ctrl.BuildMethods.HELM"> Resource names specified in the manifest will be used </div>
<div class="col-sm-8" ng-if="ctrl.state.BuildMethod === ctrl.BuildMethods.HELM">
<input
type="text"
class="form-control"
ng-model="ctrl.formValues.Name"
id="name"
name="name"
placeholder="name"
required="ctrl.state.BuildMethod === ctrl.BuildMethods.HELM"
/>
<div class="small text-warning mt-2">
<div ng-messages="ctrl.deploymentForm.name.$error">
<p ng-message="required"> <pr-icon icon="'alert-triangle'" mode="'warning'"></pr-icon> This field is required.</p>
</div>
</div>
</div>
</div>
<kube-stack-name
ng-if="!ctrl.deploymentOptions.hideStacksFunctionality"
ng-if="!ctrl.deploymentOptions.hideStacksFunctionality && ctrl.state.BuildMethod !== ctrl.BuildMethods.HELM"
stack-name="ctrl.formValues.StackName"
set-stack-name="(ctrl.setStackName)"
is-admin="ctrl.currentUser.isAdmin"
@ -180,6 +196,7 @@
endpoint="ctrl.endpoint"
namespace="ctrl.formValues.Namespace"
stack-name="ctrl.formValues.StackName"
name="ctrl.formValues.Name"
></helm-templates-view>
</div>
<!-- !Helm -->

@ -75,6 +75,7 @@ class KubernetesDeployController {
Variables: {},
AutoUpdate: parseAutoUpdateResponse(),
TLSSkipVerify: false,
Name: '',
};
this.ManifestDeployTypes = KubernetesDeployManifestTypes;

Loading…
Cancel
Save