1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-04 21:35:23 +02:00

moved formvalue to kube app component

This commit is contained in:
Felix Han 2021-08-25 14:50:26 +12:00
parent 6d87c77ab0
commit 87ef8092ba
5 changed files with 13 additions and 20 deletions

View file

@ -57,10 +57,8 @@
<!-- #region Git repository -->
<kubernetes-app-git-form
ng-if="ctrl.state.appType === ctrl.KubernetesDeploymentTypes.GIT"
git-form-values="ctrl.gitFormValues"
stack="ctrl.stack"
namespace="ctrl.formValues.ResourcePool.Namespace.Name"
is-edit="ctrl.state.isEdit"
></kubernetes-app-git-form>
<!-- #endregion -->

View file

@ -130,12 +130,6 @@ class KubernetesCreateApplicationController {
this.state.useServerMetrics = false;
this.formValues = new KubernetesApplicationFormValues();
this.gitFormValues = {
RefName: '',
RepositoryAuthentication: false,
RepositoryUsername: '',
RepositoryPassword: '',
};
this.updateApplicationAsync = this.updateApplicationAsync.bind(this);
this.deployApplicationAsync = this.deployApplicationAsync.bind(this);
@ -1033,11 +1027,6 @@ class KubernetesCreateApplicationController {
if (this.application.StackId) {
if (this.application.ApplicationKind === this.KubernetesDeploymentTypes.GIT) {
this.stack = await this.StackService.stack(this.application.StackId);
this.gitFormValues.RefName = this.stack.GitConfig.ReferenceName;
if (this.stack.GitConfig && this.stack.GitConfig.Authentication) {
this.gitFormValues.RepositoryUsername = this.stack.GitConfig.Authentication.Username;
this.gitFormValues.RepositoryAuthentication = true;
}
} else if (this.application.ApplicationKind === this.KubernetesDeploymentTypes.CONTENT) {
this.stackFileContent = await this.StackService.getStackFile(this.application.StackId);
}