mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 21:39:40 +02:00
fix(dialog): dialog migration issues [EE-5385] (#8849)
* fix(dialog): dialog migration issues [EE-5385] * don't highlight slider tooltip text --------- Co-authored-by: testa113 <testa113>
This commit is contained in:
parent
ed279ba65b
commit
14a581e86b
8 changed files with 120 additions and 56 deletions
|
@ -8,7 +8,7 @@ import { KubernetesNodeLabelFormValues, KubernetesNodeTaintFormValues } from 'Ku
|
|||
import { KubernetesNodeTaintEffects, KubernetesNodeAvailabilities } from 'Kubernetes/node/models';
|
||||
import KubernetesFormValidationHelper from 'Kubernetes/helpers/formValidationHelper';
|
||||
import { KubernetesNodeHelper } from 'Kubernetes/node/helper';
|
||||
import { confirmUpdate } from '@@/modals/confirm';
|
||||
import { confirmUpdateNode } from '@/react/kubernetes/cluster/NodeView/ConfirmUpdateNode';
|
||||
|
||||
class KubernetesNodeController {
|
||||
/* @ngInject */
|
||||
|
@ -264,44 +264,8 @@ class KubernetesNodeController {
|
|||
const cordonWarning = this.computeCordonWarning();
|
||||
const drainWarning = this.computeDrainWarning();
|
||||
|
||||
if (taintsWarning && !labelsWarning) {
|
||||
confirmUpdate(
|
||||
'Changes to taints will immediately deschedule applications running on this node without the corresponding tolerations. Do you wish to continue?',
|
||||
(confirmed) => {
|
||||
if (confirmed) {
|
||||
return this.$async(this.updateNodeAsync);
|
||||
}
|
||||
}
|
||||
);
|
||||
} else if (!taintsWarning && labelsWarning) {
|
||||
confirmUpdate(
|
||||
'Removing or changing a label that is used might prevent applications from being scheduled on this node in the future. Do you wish to continue?',
|
||||
(confirmed) => {
|
||||
if (confirmed) {
|
||||
return this.$async(this.updateNodeAsync);
|
||||
}
|
||||
}
|
||||
);
|
||||
} else if (taintsWarning && labelsWarning) {
|
||||
confirmUpdate(
|
||||
'Changes to taints will immediately deschedule applications running on this node without the corresponding tolerations.<br/></br/>Removing or changing a label that is used might prevent applications from scheduling on this node in the future.\n\nDo you wish to continue?',
|
||||
(confirmed) => {
|
||||
if (confirmed) {
|
||||
return this.$async(this.updateNodeAsync);
|
||||
}
|
||||
}
|
||||
);
|
||||
} else if (cordonWarning) {
|
||||
confirmUpdate(
|
||||
'Marking this node as unschedulable will effectively cordon the node and prevent any new workload from being scheduled on that node. Are you sure?',
|
||||
(confirmed) => {
|
||||
if (confirmed) {
|
||||
return this.$async(this.updateNodeAsync);
|
||||
}
|
||||
}
|
||||
);
|
||||
} else if (drainWarning) {
|
||||
confirmUpdate('Draining this node will cause all workloads to be evicted from that node. This might lead to some service interruption. Are you sure?', (confirmed) => {
|
||||
if (taintsWarning || labelsWarning || cordonWarning || drainWarning) {
|
||||
confirmUpdateNode(taintsWarning, labelsWarning, cordonWarning, drainWarning).then((confirmed) => {
|
||||
if (confirmed) {
|
||||
return this.$async(this.updateNodeAsync);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue