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:
parent
df13f3b4cc
commit
2542d30a09
4 changed files with 75 additions and 6 deletions
|
@ -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() {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue