1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-08-02 04:15:28 +02:00

feat(endpoints): filter by ids and/or tag ids (#3690)

* feat(endpoints): add filter by tagIds

* refactor(endpoints): change endpoints service to query by tagIds

* fix(endpoints): filter by tags

* feat(endpoints): filter by endpoint groups tags

* feat(endpoints): filter by ids
This commit is contained in:
Chaim Lev-Ari 2020-04-08 12:14:50 +03:00 committed by GitHub
parent df13f3b4cc
commit 2542d30a09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 75 additions and 6 deletions

View file

@ -8,8 +8,8 @@ function EndpointServiceFactory($q, Endpoints, FileUploadService) {
return Endpoints.get({id: endpointID}).$promise;
};
service.endpoints = function(start, limit, search) {
return Endpoints.query({start, limit, search}).$promise;
service.endpoints = function(start, limit, { search, type, tagIds, endpointIds } = {}) {
return Endpoints.query({ start, limit, search, type, tagIds, endpointIds }).$promise;
};
service.snapshotEndpoints = function() {

View file

@ -22,10 +22,10 @@ function ($q, $scope, $state, EndpointService, GroupService, EndpointHelper, Not
};
$scope.getPaginatedEndpoints = getPaginatedEndpoints;
function getPaginatedEndpoints(lastId, limit, filter) {
function getPaginatedEndpoints(lastId, limit, search) {
const deferred = $q.defer();
$q.all({
endpoints: EndpointService.endpoints(lastId, limit, filter),
endpoints: EndpointService.endpoints(lastId, limit, { search }),
groups: GroupService.groups()
})
.then(function success(data) {

View file

@ -146,10 +146,10 @@ angular.module('portainer.app')
}
$scope.getPaginatedEndpoints = getPaginatedEndpoints;
function getPaginatedEndpoints(lastId, limit, filter) {
function getPaginatedEndpoints(lastId, limit, search) {
const deferred = $q.defer();
$q.all({
endpoints: EndpointService.endpoints(lastId, limit, filter),
endpoints: EndpointService.endpoints(lastId, limit, {search}),
groups: GroupService.groups()
})
.then(function success(data) {