2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing,
12 * software distributed under the License is distributed on an
13 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14 * KIND, either express or implied. See the License for the
15 * specific language governing permissions and limitations
19 import {Component, OnInit} from '@angular/core';
20 import {TranslateService} from "@ngx-translate/core";
21 import {UserService} from "@app/services/user.service";
22 import {EntityService} from "@app/model/entity-service";
23 import {Role} from "@app/model/role";
24 import {Observable} from "rxjs";
25 import {PagedResult} from "@app/model/paged-result";
26 import {UserInfo} from "@app/model/user-info";
27 import {RoleService} from "@app/services/role.service";
30 selector: 'app-manage-roles-list',
31 templateUrl: './manage-roles-list.component.html',
32 styleUrls: ['./manage-roles-list.component.scss']
34 export class ManageRolesListComponent implements OnInit {
36 service: EntityService<Role>
38 constructor(private translator: TranslateService, private roleService : RoleService) {
39 this.service = function (searchTerm: string, offset: number, limit: number, orderBy: string[], order: string) : Observable<PagedResult<Role>> {
40 console.log("Retrieving data " + searchTerm + "," + offset + "," + limit + "," + orderBy + "," + order);
41 return roleService.query(searchTerm, offset, limit, orderBy, order);