1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-29 02:09:41 +02:00

fix(edge): fix edge views (#4184)

* fix(edge): add ngInject

* feat(edge): init edge job model
This commit is contained in:
Chaim Lev-Ari 2020-08-11 00:51:21 +03:00 committed by GitHub
parent 134f2f1532
commit c439bc56ff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 23 additions and 11 deletions

View file

@ -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;