fix(ui): update button disabled when manisfest reverted to the orignial content [EE-6544] (#10968)

pull/10969/head
Prabhat Khera 2024-01-17 13:56:10 +13:00 committed by GitHub
parent 51ae2198f6
commit 93593e1379
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 2 deletions

View File

@ -218,10 +218,12 @@ class KubernetesCreateApplicationController {
onChangeFileContent(value) {
this.$scope.$evalAsync(() => {
if (this.stackFileContent.replace(/(\r\n|\n|\r)/gm, '') !== value.replace(/(\r\n|\n|\r)/gm, '')) {
if (this.oldStackFileContent.replace(/(\r\n|\n|\r)/gm, '') !== value.replace(/(\r\n|\n|\r)/gm, '')) {
this.state.isEditorDirty = true;
this.stackFileContent = value;
} else {
this.state.isEditorDirty = false;
}
this.stackFileContent = value;
});
}
@ -1060,6 +1062,7 @@ class KubernetesCreateApplicationController {
this.stack = await this.StackService.stack(this.application.StackId);
if (this.state.appType === KubernetesDeploymentTypes.CONTENT) {
this.stackFileContent = await this.StackService.getStackFile(this.application.StackId);
this.oldStackFileContent = this.stackFileContent;
}
}
}