mirror of
https://github.com/portainer/portainer.git
synced 2025-07-23 07:19:41 +02:00
refactor(app): convert tag-selector to react [EE-2983] (#6783)
This commit is contained in:
parent
75d854e6ad
commit
d52417c14f
29 changed files with 103 additions and 288 deletions
|
@ -6,6 +6,7 @@ export class EdgeGroupFormController {
|
|||
constructor(EndpointService, $async, $scope) {
|
||||
this.EndpointService = EndpointService;
|
||||
this.$async = $async;
|
||||
this.$scope = $scope;
|
||||
|
||||
this.endpoints = {
|
||||
state: {
|
||||
|
@ -22,6 +23,7 @@ export class EdgeGroupFormController {
|
|||
this.dissociateEndpoint = this.dissociateEndpoint.bind(this);
|
||||
this.getDynamicEndpointsAsync = this.getDynamicEndpointsAsync.bind(this);
|
||||
this.getDynamicEndpoints = this.getDynamicEndpoints.bind(this);
|
||||
this.onChangeTags = this.onChangeTags.bind(this);
|
||||
|
||||
$scope.$watch(
|
||||
() => this.model,
|
||||
|
@ -34,6 +36,12 @@ export class EdgeGroupFormController {
|
|||
);
|
||||
}
|
||||
|
||||
onChangeTags(value) {
|
||||
return this.$scope.$evalAsync(() => {
|
||||
this.model.TagIds = value;
|
||||
});
|
||||
}
|
||||
|
||||
associateEndpoint(endpoint) {
|
||||
if (!_.includes(this.model.Endpoints, endpoint.Id)) {
|
||||
this.model.Endpoints = [...this.model.Endpoints, endpoint.Id];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue