Exemple #1
0
    def get(self):
        """List services"""
        page, per_page = pagination.pages()

        services = Service.objects().paginate(page, per_page)
        paging = pagination.Pagination(services)
        return services.items, 200, paging.headers
Exemple #2
0
    def get(self):
        """List clusters"""
        page, per_page = pagination.pages()

        clusters = Cluster.objects(
            roles__in=current_identity.roles
        ).paginate(page, per_page)
        paging = pagination.Pagination(clusters)
        return clusters.items, 200, paging.headers