mirror of
https://github.com/portainer/portainer.git
synced 2025-07-20 22:09:41 +02:00
refactor(ui/box-selector): replace all selectors [EE-3856] (#7902)
This commit is contained in:
parent
c9253319d9
commit
2dddc1c6b9
80 changed files with 1267 additions and 1011 deletions
|
@ -34,6 +34,7 @@ import KubernetesNamespaceHelper from 'Kubernetes/helpers/namespaceHelper';
|
|||
import { KubernetesNodeHelper } from 'Kubernetes/node/helper';
|
||||
import { updateIngress, getIngresses } from '@/react/kubernetes/ingresses/service';
|
||||
import { confirmUpdateAppIngress } from '@/portainer/services/modal.service/prompt';
|
||||
import { placementOptions } from './placementTypes';
|
||||
|
||||
class KubernetesCreateApplicationController {
|
||||
/* #region CONSTRUCTOR */
|
||||
|
@ -85,6 +86,8 @@ class KubernetesCreateApplicationController {
|
|||
this.ServiceTypes = KubernetesServiceTypes;
|
||||
this.KubernetesDeploymentTypes = KubernetesDeploymentTypes;
|
||||
|
||||
this.placementOptions = placementOptions;
|
||||
|
||||
this.state = {
|
||||
appType: this.KubernetesDeploymentTypes.APPLICATION_FORM,
|
||||
updateWebEditorInProgress: false,
|
||||
|
@ -148,9 +151,25 @@ class KubernetesCreateApplicationController {
|
|||
this.onServicePublishChange = this.onServicePublishChange.bind(this);
|
||||
this.checkIngressesToUpdate = this.checkIngressesToUpdate.bind(this);
|
||||
this.confirmUpdateApplicationAsync = this.confirmUpdateApplicationAsync.bind(this);
|
||||
this.onDataAccessPolicyChange = this.onDataAccessPolicyChange.bind(this);
|
||||
this.onChangeDeploymentType = this.onChangeDeploymentType.bind(this);
|
||||
this.supportGlobalDeployment = this.supportGlobalDeployment.bind(this);
|
||||
this.onChangePlacementType = this.onChangePlacementType.bind(this);
|
||||
}
|
||||
/* #endregion */
|
||||
|
||||
onChangePlacementType(value) {
|
||||
this.$scope.$evalAsync(() => {
|
||||
this.formValues.PlacementType = value;
|
||||
});
|
||||
}
|
||||
|
||||
onChangeDeploymentType(value) {
|
||||
this.$scope.$evalAsync(() => {
|
||||
this.formValues.DeploymentType = value;
|
||||
});
|
||||
}
|
||||
|
||||
onChangeFileContent(value) {
|
||||
if (this.stackFileContent.replace(/(\r\n|\n|\r)/gm, '') !== value.replace(/(\r\n|\n|\r)/gm, '')) {
|
||||
this.state.isEditorDirty = true;
|
||||
|
@ -158,6 +177,13 @@ class KubernetesCreateApplicationController {
|
|||
}
|
||||
}
|
||||
|
||||
onDataAccessPolicyChange(value) {
|
||||
this.$scope.$evalAsync(() => {
|
||||
this.formValues.DataAccessPolicy = value;
|
||||
this.resetDeploymentType();
|
||||
});
|
||||
}
|
||||
|
||||
async updateApplicationViaWebEditor() {
|
||||
return this.$async(async () => {
|
||||
try {
|
||||
|
@ -616,6 +642,7 @@ class KubernetesCreateApplicationController {
|
|||
if (hasFolders && (hasRWOOnly || isIsolated)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue