mirror of
https://github.com/portainer/portainer.git
synced 2025-08-05 13:55:21 +02:00
fix(edge): fix edge views (#4184)
* fix(edge): add ngInject * feat(edge): init edge job model
This commit is contained in:
parent
134f2f1532
commit
c439bc56ff
11 changed files with 23 additions and 11 deletions
|
@ -1,9 +1,19 @@
|
|||
export class CreateEdgeJobViewController {
|
||||
/* @ngInject */
|
||||
constructor($async, $q, $state, EdgeJobService, GroupService, Notifications, TagService) {
|
||||
this.state = {
|
||||
actionInProgress: false,
|
||||
};
|
||||
|
||||
this.model = {
|
||||
Name: '',
|
||||
Recurring: false,
|
||||
CronExpression: '',
|
||||
Endpoints: [],
|
||||
FileContent: '',
|
||||
File: null,
|
||||
};
|
||||
|
||||
this.$async = $async;
|
||||
this.$q = $q;
|
||||
this.$state = $state;
|
||||
|
@ -43,15 +53,6 @@ export class CreateEdgeJobViewController {
|
|||
}
|
||||
|
||||
async $onInit() {
|
||||
this.model = {
|
||||
Name: '',
|
||||
Recurring: false,
|
||||
CronExpression: '',
|
||||
Endpoints: [],
|
||||
FileContent: '',
|
||||
File: null,
|
||||
};
|
||||
|
||||
try {
|
||||
const [groups, tags] = await Promise.all([this.GroupService.groups(), this.TagService.tags()]);
|
||||
this.groups = groups;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import _ from 'lodash-es';
|
||||
|
||||
export class EdgeJobController {
|
||||
/* @ngInject */
|
||||
constructor($async, $q, $state, EdgeJobService, EndpointService, FileSaver, GroupService, HostBrowserService, Notifications, TagService) {
|
||||
this.state = {
|
||||
actionInProgress: false,
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import _ from 'lodash-es';
|
||||
|
||||
export class EdgeJobsViewController {
|
||||
/* @ngInject */
|
||||
constructor($async, $state, EdgeJobService, ModalService, Notifications) {
|
||||
this.$async = $async;
|
||||
this.$state = $state;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import _ from 'lodash-es';
|
||||
|
||||
export class CreateEdgeStackViewController {
|
||||
/* @ngInject */
|
||||
constructor($state, EdgeStackService, EdgeGroupService, EdgeTemplateService, Notifications, FormHelper, $async) {
|
||||
Object.assign(this, { $state, EdgeStackService, EdgeGroupService, EdgeTemplateService, Notifications, FormHelper, $async });
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import _ from 'lodash-es';
|
||||
|
||||
export class EdgeStacksViewController {
|
||||
/* @ngInject */
|
||||
constructor($state, Notifications, EdgeStackService, $scope, $async) {
|
||||
this.$state = $state;
|
||||
this.Notifications = Notifications;
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import _ from 'lodash-es';
|
||||
|
||||
export class EditEdgeStackViewController {
|
||||
/* @ngInject */
|
||||
constructor($async, $state, EdgeGroupService, EdgeStackService, EndpointService, Notifications) {
|
||||
this.$async = $async;
|
||||
this.$state = $state;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue