mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 05:19:39 +02:00
refactor(endpoints): remove endpointProvider from views [EE-1136] (#5359)
[EE-1136]
This commit is contained in:
parent
7088da5157
commit
eb9f6c77f4
56 changed files with 408 additions and 429 deletions
|
@ -8,26 +8,13 @@ import { KubernetesDeployManifestTypes, KubernetesDeployBuildMethods, Kubernetes
|
|||
import { buildOption } from '@/portainer/components/box-selector';
|
||||
class KubernetesDeployController {
|
||||
/* @ngInject */
|
||||
constructor(
|
||||
$async,
|
||||
$state,
|
||||
$window,
|
||||
Authentication,
|
||||
ModalService,
|
||||
Notifications,
|
||||
EndpointProvider,
|
||||
KubernetesResourcePoolService,
|
||||
StackService,
|
||||
WebhookHelper,
|
||||
CustomTemplateService
|
||||
) {
|
||||
constructor($async, $state, $window, Authentication, ModalService, Notifications, KubernetesResourcePoolService, StackService, WebhookHelper, CustomTemplateService) {
|
||||
this.$async = $async;
|
||||
this.$state = $state;
|
||||
this.$window = $window;
|
||||
this.Authentication = Authentication;
|
||||
this.ModalService = ModalService;
|
||||
this.Notifications = Notifications;
|
||||
this.EndpointProvider = EndpointProvider;
|
||||
this.KubernetesResourcePoolService = KubernetesResourcePoolService;
|
||||
this.StackService = StackService;
|
||||
this.WebhookHelper = WebhookHelper;
|
||||
|
@ -73,7 +60,6 @@ class KubernetesDeployController {
|
|||
|
||||
this.ManifestDeployTypes = KubernetesDeployManifestTypes;
|
||||
this.BuildMethods = KubernetesDeployBuildMethods;
|
||||
this.endpointId = this.EndpointProvider.endpointID();
|
||||
|
||||
this.onChangeTemplateId = this.onChangeTemplateId.bind(this);
|
||||
this.deployAsync = this.deployAsync.bind(this);
|
||||
|
@ -246,7 +232,7 @@ class KubernetesDeployController {
|
|||
payload.ManifestURL = this.formValues.ManifestURL;
|
||||
}
|
||||
|
||||
await this.StackService.kubernetesDeploy(this.endpointId, method, payload);
|
||||
await this.StackService.kubernetesDeploy(this.endpoint.Id, method, payload);
|
||||
|
||||
this.Notifications.success('Manifest successfully deployed');
|
||||
this.state.isEditorDirty = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue