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

fix(edge/groups): show tags for environments [EE-4422] (#7940)

This commit is contained in:
Chaim Lev-Ari 2022-12-14 09:17:49 +02:00 committed by GitHub
parent 52e150fa29
commit f38b8234d9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 9 deletions

View file

@ -2,6 +2,8 @@ import _ from 'lodash-es';
import { confirmDestructiveAsync } from '@/portainer/services/modal.service/confirm';
import { EdgeTypes } from '@/react/portainer/environments/types';
import { getEnvironments } from '@/react/portainer/environments/environment.service';
import { getTags } from '@/portainer/tags/tags.service';
import { notifyError } from '@/portainer/services/notifications';
export class EdgeGroupFormController {
/* @ngInject */
@ -19,6 +21,8 @@ export class EdgeGroupFormController {
value: null,
};
this.tags = [];
this.associateEndpoint = this.associateEndpoint.bind(this);
this.dissociateEndpoint = this.dissociateEndpoint.bind(this);
this.getDynamicEndpointsAsync = this.getDynamicEndpointsAsync.bind(this);
@ -88,4 +92,18 @@ export class EdgeGroupFormController {
this.endpoints.value = response.value;
this.endpoints.state.totalCount = totalCount;
}
getTags() {
return this.$async(async () => {
try {
this.tags = await getTags();
} catch (err) {
notifyError('Failure', err, 'Unable to retrieve tags');
}
});
}
$onInit() {
this.getTags();
}
}