mirror of
https://github.com/portainer/portainer.git
synced 2025-08-07 23:05:26 +02:00
fix(stacks): confirm enable tls verification [EE-5410] (#8896)
This commit is contained in:
parent
5daef54456
commit
e37e87971d
3 changed files with 30 additions and 2 deletions
|
@ -4,6 +4,7 @@ import { buildConfirmButton } from '@@/modals/utils';
|
|||
import { ModalType } from '@@/modals';
|
||||
import { parseAutoUpdateResponse } from '@/react/portainer/gitops/AutoUpdateFieldset/utils';
|
||||
import { baseStackWebhookUrl, createWebhookId } from '@/portainer/helpers/webhookHelper';
|
||||
import { confirmEnableTLSVerify } from '@/react/portainer/gitops/utils';
|
||||
|
||||
class KubernetesRedeployAppGitFormController {
|
||||
/* @ngInject */
|
||||
|
@ -71,6 +72,13 @@ class KubernetesRedeployAppGitFormController {
|
|||
|
||||
onChangeTLSSkipVerify(value) {
|
||||
return this.$async(async () => {
|
||||
if (this.stack.GitConfig.TLSSkipVerify && !value) {
|
||||
const confirmed = await confirmEnableTLSVerify();
|
||||
|
||||
if (!confirmed) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.onChange({ TLSSkipVerify: value });
|
||||
});
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import { confirmStackUpdate } from '@/react/docker/stacks/common/confirm-stack-u
|
|||
|
||||
import { parseAutoUpdateResponse } from '@/react/portainer/gitops/AutoUpdateFieldset/utils';
|
||||
import { baseStackWebhookUrl, createWebhookId } from '@/portainer/helpers/webhookHelper';
|
||||
import { confirmEnableTLSVerify } from '@/react/portainer/gitops/utils';
|
||||
|
||||
class StackRedeployGitFormController {
|
||||
/* @ngInject */
|
||||
|
@ -95,8 +96,17 @@ class StackRedeployGitFormController {
|
|||
this.onChange({ Env: value });
|
||||
}
|
||||
|
||||
onChangeTLSSkipVerify(value) {
|
||||
this.onChange({ TLSSkipVerify: value });
|
||||
async onChangeTLSSkipVerify(value) {
|
||||
return this.$async(async () => {
|
||||
if (this.model.TLSSkipVerify && !value) {
|
||||
const confirmed = await confirmEnableTLSVerify();
|
||||
|
||||
if (!confirmed) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.onChange({ TLSSkipVerify: value });
|
||||
});
|
||||
}
|
||||
|
||||
onChangeOption(values) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue