How to use the @covalent/core.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-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();
        snackBarService = new fdsSnackBarsModule.FdsSnackBarService();
        dataTableService = new covalentCore.TdDataTableService();
        comp = new NfRegistryAddUserToGroups(nfRegistryApi, dataTableService, nfRegistryService, {
            close: function () {
            }
        }, snackBarService, {user: nfRegistryService.user});

        // Spy
        spyOn(nfRegistryApi, 'getUserGroup').and.callFake(function () {
        }).and.returnValue(rxjs.Observable.of({identifier: 1, identity: 'Group 1'}));
        spyOn(nfRegistryApi, 'updateUserGroup').and.callFake(function () {
        }).and.returnValue(rxjs.Observable.of({identifier: 1, identity: 'Group 1'}));
        spyOn(comp.dialogRef, 'close');
        spyOn(comp.snackBarService, 'openCoaster');
        spyOn(comp, 'filterGroups').and.callThrough();

        // initialize the component
        comp.ngOnInit();
github apache / nifi-registry / 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();
        snackBarService = new fdsSnackBarsModule.FdsSnackBarService();
        dataTableService = new covalentCore.TdDataTableService();
        comp = new NfRegistryAddUsersToGroup(nfRegistryApi, dataTableService, nfRegistryService, {
            close: function () {
            }
        }, snackBarService, {group: nfRegistryService.group});

        // Spy
        spyOn(nfRegistryApi, 'updateUserGroup').and.callFake(function () {
        }).and.returnValue(rxjs.Observable.of({identifier: 1, identity: 'Group 1'}));
        spyOn(comp.dialogRef, 'close');
        spyOn(comp.snackBarService, 'openCoaster');
        spyOn(comp, 'filterUsers').and.callThrough();

        // initialize the component
        comp.ngOnInit();

        //assertions