How to use the @covalent/core/data-table.TdDataTableService function in @covalent/core

To help you get started, we’ve selected a few @covalent/core examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github apache / nifi-registry / nifi-registry-core / nifi-registry-web-ui / src / main / webapp / components / administration / users / dialogs / add-users-to-group / nf-registry-add-users-to-group.spec.js View on Github external
beforeEach(function () {
        nfRegistryService = new NfRegistryService();
        // setup the nfRegistryService
        nfRegistryService.group = {identifier: 1, identity: 'Group 1', users: []};
        nfRegistryService.users = [{identifier: 2, identity: 'User 1', checked: true}];

        nfRegistryApi = new NfRegistryApi();
        dialogService = new FdsDialogService();
        snackBarService = new FdsSnackBarService();
        dataTableService = new TdDataTableService();
        comp = new NfRegistryAddUsersToGroup(nfRegistryApi, dataTableService, nfRegistryService, {
            close: function () {
            }
        }, dialogService, snackBarService, {group: nfRegistryService.group});

        // Spy
        spyOn(nfRegistryApi, 'getUsers').and.callFake(function () {
        }).and.returnValue(of([{identifier: 2, identity: 'User 1', checked: true}]));
        spyOn(nfRegistryApi, 'updateUserGroup').and.callFake(function () {
        }).and.returnValue(of({identifier: 1, identity: 'Group 1'}));
        spyOn(comp.dialogRef, 'close');
        spyOn(comp.snackBarService, 'openCoaster');
        spyOn(comp, 'filterUsers').and.callThrough();

        // initialize the component
        comp.ngOnInit();
github apache / nifi-registry / nifi-registry-core / nifi-registry-web-ui / src / main / webapp / components / administration / users / dialogs / add-user-to-groups / nf-registry-add-user-to-groups.spec.js View on Github external
beforeEach(function () {
        nfRegistryService = new NfRegistryService();
        // setup the nfRegistryService
        nfRegistryService.user = {identifier: 3, identity: 'User 3', userGroups: []};
        nfRegistryService.groups = [{identifier: 1, identity: 'Group 1', configurable: true, checked: true, users: []}];

        nfRegistryApi = new NfRegistryApi();
        dialogService = new FdsDialogService();
        snackBarService = new FdsSnackBarService();
        dataTableService = new TdDataTableService();
        comp = new NfRegistryAddUserToGroups(nfRegistryApi, dataTableService, nfRegistryService, {
            close: function () {
            }
        }, dialogService, snackBarService, {user: nfRegistryService.user});

        // Spy
        spyOn(nfRegistryApi, 'getUserGroups').and.callFake(function () {
        }).and.returnValue(of([{identifier: 1, identity: 'Group 1', configurable: true, checked: true, users: []}]));
        spyOn(nfRegistryApi, 'getUserGroup').and.callFake(function () {
        }).and.returnValue(of({identifier: 1, identity: 'Group 1'}));
        spyOn(nfRegistryApi, 'updateUserGroup').and.callFake(function () {
        }).and.returnValue(of({identifier: 1, identity: 'Group 1'}));
        spyOn(comp.dialogRef, 'close');
        spyOn(comp.snackBarService, 'openCoaster');
        spyOn(comp, 'filterGroups').and.callThrough();