You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by scottyaslan <gi...@git.apache.org> on 2017/09/01 14:39:34 UTC

[GitHub] nifi-registry pull request #8: [NIFIREG-13] Initial implementation of the re...

GitHub user scottyaslan opened a pull request:

    https://github.com/apache/nifi-registry/pull/8

    [NIFIREG-13] Initial implementation of the registry UI/UX

    You may view the FDS atomic component NgModule demo here: http://localhost:8080/nifi-registry/fluid-design-system
    
    The initial NiFi Registry UI can be located at the following: http://localhost:8080/nifi-registry/explorer/grid-list/23f6cc59-0156-1000-06b4-2b0810089090

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/scottyaslan/nifi-registry devBranch

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi-registry/pull/8.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #8
    
----
commit 53202c5f244c734a55b85bede99359642825f507
Author: Scott Aslan <sc...@gmail.com>
Date:   2017-09-01T14:23:16Z

    [NIFIREG-13] Initial implementation of the registry UI/UX

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-registry pull request #8: [NIFIREG-13] Initial implementation of the re...

Posted by mcgilman <gi...@git.apache.org>.
Github user mcgilman commented on a diff in the pull request:

    https://github.com/apache/nifi-registry/pull/8#discussion_r137048675
  
    --- Diff: nifi-registry-web-ui/src/main/webapp/nf-registry.routes.js ---
    @@ -0,0 +1,104 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +var ngRouter = require('@angular/router');
    +var FdsDemo = require('nifi-registry/components/fluid-design-system/fds-demo.js');
    +var NfPageNotFoundComponent = require('nifi-registry/components/page-not-found/nf-registry-page-not-found.js');
    +var NfRegistryExplorer = require('nifi-registry/components/explorer/nf-registry-explorer.js');
    +var NfRegistryExplorerGridListViewer = require('nifi-registry/components/explorer/grid-list/nf-registry-explorer-grid-list-viewer.js');
    +var NfRegistryAdministration = require('nifi-registry/components/administration/nf-registry-administration.js');
    +var NfRegistryGeneralAdministration = require('nifi-registry/components/administration/general/nf-registry-general-administration.js');
    +var NfRegistryUsersAdministration = require('nifi-registry/components/administration/users/nf-registry-users-administration.js');
    +var NfRegistryAddUser = require('nifi-registry/components/administration/users/add/nf-registry-add-user.js');
    +var NfRegistryUserDetails = require('nifi-registry/components/administration/users/details/nf-registry-user-details.js');
    +var NfRegistryUserPermissions = require('nifi-registry/components/administration/users/permissions/nf-registry-user-permissions.js');
    +var NfRegistryBucketPermissions = require('nifi-registry/components/administration/workflow/buckets/permissions/nf-registry-bucket-permissions.js');
    +var NfRegistryWorkflowAdministration = require('nifi-registry/components/administration/workflow/nf-registry-workflow-administration.js');
    +var NfRegistryGridListViewer = require('nifi-registry/components/explorer/grid-list/registry/nf-registry-grid-list-viewer.js');
    +var NfRegistryBucketGridListViewer = require('nifi-registry/components/explorer/grid-list/registry/bucket/nf-registry-bucket-grid-list-viewer.js');
    +var NfRegistryDropletGridListViewer = require('nifi-registry/components/explorer/grid-list/registry/bucket/droplet/nf-registry-droplet-grid-list-viewer.js');
    +
    +var NfRegistryRoutes = new ngRouter.RouterModule.forRoot([{
    +    path: 'nifi-registry/explorer',
    +    component: NfRegistryExplorer,
    +    children: [{
    +        path: 'grid-list',
    +        component: NfRegistryExplorerGridListViewer,
    +        children: [{
    +            path: ':registryId',
    +            component: NfRegistryGridListViewer,
    +            children: [{
    +                path: ':bucketId',
    +                component: NfRegistryBucketGridListViewer,
    +                children: [{
    +                    path: ':dropletId',
    +                    component: NfRegistryDropletGridListViewer
    +                }]
    +            }]
    +        }]
    +    }]
    +    // canActivate: [AuthGuard] //TODO: https://angular.io/api/router/CanActivate https://scotch.io/tutorials/routing-angular-2-single-page-apps-with-the-component-router
    +}, {
    +    path: 'nifi-registry/fluid-design-system',
    --- End diff --
    
    Let's file a follow-on JIRA to remvoe the FDS demo from the registry app. We'll need to identify where the FDS will live (separately vs embedded in the registry).


---

[GitHub] nifi-registry pull request #8: [NIFIREG-13] Initial implementation of the re...

Posted by scottyaslan <gi...@git.apache.org>.
Github user scottyaslan commented on a diff in the pull request:

    https://github.com/apache/nifi-registry/pull/8#discussion_r137112635
  
    --- Diff: nifi-registry-web-ui/src/main/webapp/nf-registry.routes.js ---
    @@ -0,0 +1,104 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +var ngRouter = require('@angular/router');
    +var FdsDemo = require('nifi-registry/components/fluid-design-system/fds-demo.js');
    +var NfPageNotFoundComponent = require('nifi-registry/components/page-not-found/nf-registry-page-not-found.js');
    +var NfRegistryExplorer = require('nifi-registry/components/explorer/nf-registry-explorer.js');
    +var NfRegistryExplorerGridListViewer = require('nifi-registry/components/explorer/grid-list/nf-registry-explorer-grid-list-viewer.js');
    +var NfRegistryAdministration = require('nifi-registry/components/administration/nf-registry-administration.js');
    +var NfRegistryGeneralAdministration = require('nifi-registry/components/administration/general/nf-registry-general-administration.js');
    +var NfRegistryUsersAdministration = require('nifi-registry/components/administration/users/nf-registry-users-administration.js');
    +var NfRegistryAddUser = require('nifi-registry/components/administration/users/add/nf-registry-add-user.js');
    +var NfRegistryUserDetails = require('nifi-registry/components/administration/users/details/nf-registry-user-details.js');
    +var NfRegistryUserPermissions = require('nifi-registry/components/administration/users/permissions/nf-registry-user-permissions.js');
    +var NfRegistryBucketPermissions = require('nifi-registry/components/administration/workflow/buckets/permissions/nf-registry-bucket-permissions.js');
    +var NfRegistryWorkflowAdministration = require('nifi-registry/components/administration/workflow/nf-registry-workflow-administration.js');
    +var NfRegistryGridListViewer = require('nifi-registry/components/explorer/grid-list/registry/nf-registry-grid-list-viewer.js');
    +var NfRegistryBucketGridListViewer = require('nifi-registry/components/explorer/grid-list/registry/bucket/nf-registry-bucket-grid-list-viewer.js');
    +var NfRegistryDropletGridListViewer = require('nifi-registry/components/explorer/grid-list/registry/bucket/droplet/nf-registry-droplet-grid-list-viewer.js');
    +
    +var NfRegistryRoutes = new ngRouter.RouterModule.forRoot([{
    +    path: 'nifi-registry/explorer',
    +    component: NfRegistryExplorer,
    +    children: [{
    +        path: 'grid-list',
    +        component: NfRegistryExplorerGridListViewer,
    +        children: [{
    +            path: ':registryId',
    +            component: NfRegistryGridListViewer,
    +            children: [{
    +                path: ':bucketId',
    +                component: NfRegistryBucketGridListViewer,
    +                children: [{
    +                    path: ':dropletId',
    +                    component: NfRegistryDropletGridListViewer
    +                }]
    +            }]
    +        }]
    +    }]
    +    // canActivate: [AuthGuard] //TODO: https://angular.io/api/router/CanActivate https://scotch.io/tutorials/routing-angular-2-single-page-apps-with-the-component-router
    +}, {
    +    path: 'nifi-registry/fluid-design-system',
    --- End diff --
    
    https://issues.apache.org/jira/projects/NIFIREG/issues/NIFIREG-14?filter=allopenissues


---

[GitHub] nifi-registry pull request #8: [NIFIREG-13] Initial implementation of the re...

Posted by mcgilman <gi...@git.apache.org>.
Github user mcgilman commented on a diff in the pull request:

    https://github.com/apache/nifi-registry/pull/8#discussion_r137047620
  
    --- Diff: nifi-registry-web-ui/src/main/webapp/nf-registry-bootstrap.js ---
    @@ -0,0 +1,57 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +require('core-js');
    +require('zone.js');
    +require('hammerjs');
    +require('switchMap');
    +var $ = require('jquery');
    +var NfRegistryModule = require('nifi-registry/nf-registry.module.js');
    +var ngPlatformBrowserDynamic = require('@angular/platform-browser-dynamic');
    +var ngCore = require('@angular/core');
    +
    +// Comment out this line when developing to assert for unidirectional data flow
    +ngCore.enableProdMode();
    +
    +// Get the locale id from the global
    +var locale = navigator.language;
    +
    +var providers = [];
    +
    +// No locale or U.S. English: no translation providers so go ahead and bootstrap the app
    +if (!locale || locale === 'en-US') {
    +    ngPlatformBrowserDynamic.platformBrowserDynamic().bootstrapModule(NfRegistryModule, {providers: providers});
    +} else { //load the translation providers and bootstrap the module
    +    var translationFile = './nifi-registry/messages.' + locale + '.xlf';
    +
    +    $.ajax({
    +        url: translationFile,
    +        dataType: "text",
    +        success: function (translations) {
    --- End diff --
    
    Let's update to use the deferred API.


---

[GitHub] nifi-registry pull request #8: [NIFIREG-13] Initial implementation of the re...

Posted by scottyaslan <gi...@git.apache.org>.
Github user scottyaslan commented on a diff in the pull request:

    https://github.com/apache/nifi-registry/pull/8#discussion_r137107760
  
    --- Diff: nifi-registry-web-ui/src/main/webapp/components/administration/users/nf-registry-users-administration.js ---
    @@ -0,0 +1,128 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +var ngCore = require('@angular/core');
    +var NfRegistryService = require('nifi-registry/services/nf-registry.service.js');
    +var ngRouter = require('@angular/router');
    +var nfRegistryAnimations = require('nifi-registry/nf-registry.animations.js');
    +var fdsDialogsModule = require('@fluid-design-system/dialogs');
    +
    +/**
    + * NfRegistryUsersAdministration constructor.
    + *
    + * @param nfRegistryService     The nf-registry.service module.
    + * @param ActivatedRoute        The angular activated route module.
    + * @param Router                The angular router module.
    + * @param FdsDialogService      The FDS dialog service.
    + * @constructor
    + */
    +function NfRegistryUsersAdministration(nfRegistryService, ActivatedRoute, Router, FdsDialogService) {
    +    this.route = ActivatedRoute;
    +    this.nfRegistryService = nfRegistryService;
    +    this.router = Router;
    +    this.dialogService = FdsDialogService;
    +};
    +
    +NfRegistryUsersAdministration.prototype = {
    +    constructor: NfRegistryUsersAdministration,
    +
    +    /**
    +     * Initialize the component.
    +     */
    +    ngOnInit: function () {
    +        var self = this;
    +        this.route.params
    +            .switchMap(function (params) {
    +                self.nfRegistryService.adminPerspective = 'users';
    +                return self.nfRegistryService.getUsers(self.nfRegistryService.registry.id);
    +            })
    +            .subscribe(function (users) {
    +                self.nfRegistryService.users = self.nfRegistryService.filteredUsers = users;
    +                self.nfRegistryService.filterUsers();
    +            });
    +    },
    +
    +    /**
    +     * Destroy the component.
    +     */
    +    ngOnDestroy: function () {
    +        this.nfRegistryService.adminPerspective = '';
    +        this.nfRegistryService.users = this.nfRegistryService.filteredUsers = [];
    +    },
    +
    +    /**
    +     * Execute the given user action.
    +     *
    +     * @param action        The action object.
    +     * @param user          The user object the `action` will act upon.
    +     */
    +    execute: function (action, user) {
    +        var self = this;
    +        if (user) {
    +            user.checked = !user.checked;
    +        }
    +        switch (action.name.toLowerCase()) {
    +            case 'delete':
    +                this.dialogService.openConfirm({
    +                    title: 'Delete User',
    +                    message: 'User will be deleted.',
    +                    cancelButton: 'Cancel',
    +                    acceptButton: 'Delete',
    +                    acceptButtonColor: 'fds-warn'
    +                }).afterClosed().subscribe(
    +                    function (accept) {
    +                        if (accept) {
    +                            self.nfRegistryService.deleteUser(user.id);
    +                        }
    +                    });
    +                break;
    +            case 'suspend':
    +                this.dialogService.openConfirm({
    +                    title: 'Suspend User',
    +                    message: 'User permissions will be suspended.',
    +                    cancelButton: 'Cancel',
    +                    acceptButton: 'Confirm',
    +                    acceptButtonColor: 'fds-critical'
    +                }).afterClosed().subscribe(
    +                    function (accept) {
    +                        if (accept) {
    +                            self.nfRegistryService.suspendUser(user.id);
    +                        }
    +                    });
    +                break;
    +            case 'add':
    +                this.router.navigateByUrl('/nifi-registry/administration/' + this.nfRegistryService.registry.id + '/users(sidenav:user/add)');
    +                break;
    +            default:
    +                this.router.navigateByUrl('/nifi-registry/administration/' + this.nfRegistryService.registry.id + '/users(' + action.type + ':user/' + action.name + '/' + user.id + ')');
    --- End diff --
    
    Yes


---

[GitHub] nifi-registry pull request #8: [NIFIREG-13] Initial implementation of the re...

Posted by mcgilman <gi...@git.apache.org>.
Github user mcgilman commented on a diff in the pull request:

    https://github.com/apache/nifi-registry/pull/8#discussion_r137052037
  
    --- Diff: nifi-registry-web-ui/src/main/platform/core/package.json ---
    @@ -0,0 +1,33 @@
    +{
    +  "name": "@fluid-design-system/core",
    +  "version": "0.0.0",
    +  "description": "The Fluid Design System module is an atomic reusable platform providing consistent set of UI/UX components for Apache Nifi and Apache Nifi Registry (or any other open source friendly) web applications to consume.",
    +  "module": "./fluid-design-system.module.js",
    +  "keywords": [
    +    "fluid design system",
    +    "angular",
    +    "material",
    +    "material design",
    +    "components",
    +    "reusable",
    +    "covalent"
    +  ],
    +  "scripts": {
    +  },
    +  "engines": {
    +    "node": ">=6.11.1",
    --- End diff --
    
    We're these needed?


---

[GitHub] nifi-registry issue #8: [NIFIREG-13] Initial implementation of the registry ...

Posted by scottyaslan <gi...@git.apache.org>.
Github user scottyaslan commented on the issue:

    https://github.com/apache/nifi-registry/pull/8
  
    @mcgilman I have addressed or replied to your comments, rebased against master, and updated this PR. I also opened two JIRA: https://issues.apache.org/jira/browse/NIFIREG-14 to address the FDS NgModule as well as https://issues.apache.org/jira/browse/NIFIREG-15 to address the splash screen and page load times.


---

[GitHub] nifi-registry pull request #8: [NIFIREG-13] Initial implementation of the re...

Posted by mcgilman <gi...@git.apache.org>.
Github user mcgilman commented on a diff in the pull request:

    https://github.com/apache/nifi-registry/pull/8#discussion_r137051887
  
    --- Diff: nifi-registry-web-ui/src/main/frontend/package.json ---
    @@ -0,0 +1,65 @@
    +{
    +  "name": "nifi-registry",
    +  "version": "0.0.1",
    +  "description": "",
    +  "scripts": {
    +    "protractor": "protractor protractor.config.js",
    +    "test:dev": "./node_modules/protractor/bin/webdriver-manager update --gecko false && karma start karma.conf.js",
    +    "test:ci": "./node_modules/protractor/bin/webdriver-manager update --gecko false && karma start karma.conf.ci.js",
    +    "test:once": "karma start karma.conf.js --single-run"
    +  },
    +  "keywords": [],
    +  "author": "",
    +  "repository": {
    +    "type": "git",
    +    "url": "https://github.com/apache/nifi-registry"
    +  },
    +  "dependencies": {
    +    "@covalent/core": "^1.0.0-beta.6",
    +    "angular2-moment": "^1.6.0",
    --- End diff --
    
    Let's avoid version ranges.


---

[GitHub] nifi-registry pull request #8: [NIFIREG-13] Initial implementation of the re...

Posted by scottyaslan <gi...@git.apache.org>.
Github user scottyaslan commented on a diff in the pull request:

    https://github.com/apache/nifi-registry/pull/8#discussion_r137099164
  
    --- Diff: nifi-registry-web-ui/src/main/webapp/nf-registry-bootstrap.js ---
    @@ -0,0 +1,57 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +
    +require('core-js');
    +require('zone.js');
    +require('hammerjs');
    +require('switchMap');
    +var $ = require('jquery');
    +var NfRegistryModule = require('nifi-registry/nf-registry.module.js');
    +var ngPlatformBrowserDynamic = require('@angular/platform-browser-dynamic');
    +var ngCore = require('@angular/core');
    +
    +// Comment out this line when developing to assert for unidirectional data flow
    +ngCore.enableProdMode();
    +
    +// Get the locale id from the global
    +var locale = navigator.language;
    +
    +var providers = [];
    +
    +// No locale or U.S. English: no translation providers so go ahead and bootstrap the app
    +if (!locale || locale === 'en-US') {
    +    ngPlatformBrowserDynamic.platformBrowserDynamic().bootstrapModule(NfRegistryModule, {providers: providers});
    +} else { //load the translation providers and bootstrap the module
    +    var translationFile = './nifi-registry/messages.' + locale + '.xlf';
    +
    +    $.ajax({
    +        url: translationFile,
    +        dataType: "text",
    +        success: function (translations) {
    --- End diff --
    
    ok


---

[GitHub] nifi-registry pull request #8: [NIFIREG-13] Initial implementation of the re...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/nifi-registry/pull/8


---

[GitHub] nifi-registry issue #8: [NIFIREG-13] Initial implementation of the registry ...

Posted by mcgilman <gi...@git.apache.org>.
Github user mcgilman commented on the issue:

    https://github.com/apache/nifi-registry/pull/8
  
    Will review...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] nifi-registry pull request #8: [NIFIREG-13] Initial implementation of the re...

Posted by scottyaslan <gi...@git.apache.org>.
Github user scottyaslan commented on a diff in the pull request:

    https://github.com/apache/nifi-registry/pull/8#discussion_r137098986
  
    --- Diff: nifi-registry-web-ui/src/main/frontend/package.json ---
    @@ -0,0 +1,65 @@
    +{
    +  "name": "nifi-registry",
    +  "version": "0.0.1",
    +  "description": "",
    +  "scripts": {
    +    "protractor": "protractor protractor.config.js",
    +    "test:dev": "./node_modules/protractor/bin/webdriver-manager update --gecko false && karma start karma.conf.js",
    +    "test:ci": "./node_modules/protractor/bin/webdriver-manager update --gecko false && karma start karma.conf.ci.js",
    +    "test:once": "karma start karma.conf.js --single-run"
    +  },
    +  "keywords": [],
    +  "author": "",
    +  "repository": {
    +    "type": "git",
    +    "url": "https://github.com/apache/nifi-registry"
    +  },
    +  "dependencies": {
    +    "@covalent/core": "^1.0.0-beta.6",
    +    "angular2-moment": "^1.6.0",
    --- End diff --
    
    def


---

[GitHub] nifi-registry pull request #8: [NIFIREG-13] Initial implementation of the re...

Posted by scottyaslan <gi...@git.apache.org>.
Github user scottyaslan commented on a diff in the pull request:

    https://github.com/apache/nifi-registry/pull/8#discussion_r137093847
  
    --- Diff: nifi-registry-web-ui/src/main/platform/core/package.json ---
    @@ -0,0 +1,33 @@
    +{
    +  "name": "@fluid-design-system/core",
    +  "version": "0.0.0",
    +  "description": "The Fluid Design System module is an atomic reusable platform providing consistent set of UI/UX components for Apache Nifi and Apache Nifi Registry (or any other open source friendly) web applications to consume.",
    +  "module": "./fluid-design-system.module.js",
    +  "keywords": [
    +    "fluid design system",
    +    "angular",
    +    "material",
    +    "material design",
    +    "components",
    +    "reusable",
    +    "covalent"
    +  ],
    +  "scripts": {
    +  },
    +  "engines": {
    +    "node": ">=6.11.1",
    --- End diff --
    
    I removed this file for now as it is unnecessary. It would be for defining the FDS NgModule as an npm package. 


---

[GitHub] nifi-registry issue #8: [NIFIREG-13] Initial implementation of the registry ...

Posted by mcgilman <gi...@git.apache.org>.
Github user mcgilman commented on the issue:

    https://github.com/apache/nifi-registry/pull/8
  
    Thanks for updating @scottyaslan! This has been merged to master.


---

[GitHub] nifi-registry pull request #8: [NIFIREG-13] Initial implementation of the re...

Posted by mcgilman <gi...@git.apache.org>.
Github user mcgilman commented on a diff in the pull request:

    https://github.com/apache/nifi-registry/pull/8#discussion_r137053368
  
    --- Diff: nifi-registry-web-ui/src/main/webapp/components/administration/users/nf-registry-users-administration.js ---
    @@ -0,0 +1,128 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to You under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + *     http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +var ngCore = require('@angular/core');
    +var NfRegistryService = require('nifi-registry/services/nf-registry.service.js');
    +var ngRouter = require('@angular/router');
    +var nfRegistryAnimations = require('nifi-registry/nf-registry.animations.js');
    +var fdsDialogsModule = require('@fluid-design-system/dialogs');
    +
    +/**
    + * NfRegistryUsersAdministration constructor.
    + *
    + * @param nfRegistryService     The nf-registry.service module.
    + * @param ActivatedRoute        The angular activated route module.
    + * @param Router                The angular router module.
    + * @param FdsDialogService      The FDS dialog service.
    + * @constructor
    + */
    +function NfRegistryUsersAdministration(nfRegistryService, ActivatedRoute, Router, FdsDialogService) {
    +    this.route = ActivatedRoute;
    +    this.nfRegistryService = nfRegistryService;
    +    this.router = Router;
    +    this.dialogService = FdsDialogService;
    +};
    +
    +NfRegistryUsersAdministration.prototype = {
    +    constructor: NfRegistryUsersAdministration,
    +
    +    /**
    +     * Initialize the component.
    +     */
    +    ngOnInit: function () {
    +        var self = this;
    +        this.route.params
    +            .switchMap(function (params) {
    +                self.nfRegistryService.adminPerspective = 'users';
    +                return self.nfRegistryService.getUsers(self.nfRegistryService.registry.id);
    +            })
    +            .subscribe(function (users) {
    +                self.nfRegistryService.users = self.nfRegistryService.filteredUsers = users;
    +                self.nfRegistryService.filterUsers();
    +            });
    +    },
    +
    +    /**
    +     * Destroy the component.
    +     */
    +    ngOnDestroy: function () {
    +        this.nfRegistryService.adminPerspective = '';
    +        this.nfRegistryService.users = this.nfRegistryService.filteredUsers = [];
    +    },
    +
    +    /**
    +     * Execute the given user action.
    +     *
    +     * @param action        The action object.
    +     * @param user          The user object the `action` will act upon.
    +     */
    +    execute: function (action, user) {
    +        var self = this;
    +        if (user) {
    +            user.checked = !user.checked;
    +        }
    +        switch (action.name.toLowerCase()) {
    +            case 'delete':
    +                this.dialogService.openConfirm({
    +                    title: 'Delete User',
    +                    message: 'User will be deleted.',
    +                    cancelButton: 'Cancel',
    +                    acceptButton: 'Delete',
    +                    acceptButtonColor: 'fds-warn'
    +                }).afterClosed().subscribe(
    +                    function (accept) {
    +                        if (accept) {
    +                            self.nfRegistryService.deleteUser(user.id);
    +                        }
    +                    });
    +                break;
    +            case 'suspend':
    +                this.dialogService.openConfirm({
    +                    title: 'Suspend User',
    +                    message: 'User permissions will be suspended.',
    +                    cancelButton: 'Cancel',
    +                    acceptButton: 'Confirm',
    +                    acceptButtonColor: 'fds-critical'
    +                }).afterClosed().subscribe(
    +                    function (accept) {
    +                        if (accept) {
    +                            self.nfRegistryService.suspendUser(user.id);
    +                        }
    +                    });
    +                break;
    +            case 'add':
    +                this.router.navigateByUrl('/nifi-registry/administration/' + this.nfRegistryService.registry.id + '/users(sidenav:user/add)');
    +                break;
    +            default:
    +                this.router.navigateByUrl('/nifi-registry/administration/' + this.nfRegistryService.registry.id + '/users(' + action.type + ':user/' + action.name + '/' + user.id + ')');
    --- End diff --
    
    Does `navigateByUrl` automatically encode these URI components?


---

[GitHub] nifi-registry pull request #8: [NIFIREG-13] Initial implementation of the re...

Posted by scottyaslan <gi...@git.apache.org>.
Github user scottyaslan commented on a diff in the pull request:

    https://github.com/apache/nifi-registry/pull/8#discussion_r137099076
  
    --- Diff: nifi-registry-web-ui/src/main/platform/core/LICENSE.md ---
    @@ -0,0 +1,22 @@
    +The MIT License
    --- End diff --
    
    I removed this file until we can sort it out.


---

[GitHub] nifi-registry pull request #8: [NIFIREG-13] Initial implementation of the re...

Posted by mcgilman <gi...@git.apache.org>.
Github user mcgilman commented on a diff in the pull request:

    https://github.com/apache/nifi-registry/pull/8#discussion_r137049115
  
    --- Diff: nifi-registry-web-ui/src/main/platform/core/LICENSE.md ---
    @@ -0,0 +1,22 @@
    +The MIT License
    --- End diff --
    
    Let's license as Apache until we decide where FDS will live.


---

[GitHub] nifi-registry issue #8: [NIFIREG-13] Initial implementation of the registry ...

Posted by mcgilman <gi...@git.apache.org>.
Github user mcgilman commented on the issue:

    https://github.com/apache/nifi-registry/pull/8
  
    The PR is a great starting point for the registry front end. Obviously, there is some work remaining to get the front end and back end integrated but we can file subsequent JIRAs for that effort and coordinate that work among the relevant contributors. 
    
    Also a couple more general comments:
    
    - We'll need to figure out where the fluid design system will live and then move the demo application with it. I do not believe it belongs as part of the registry front end. But, let's file a follow-on JIRA for this effort.
    - There appears to be some delay when loading the page for the first time. Let's file another follow-on JIRA to investigate further and possibly add a loading screen.
    
    Let's address a few of the smaller items mentioned here and get this merged so we can continue with the integration effort while looking into a few of the larger term items which we'll file follow-on JIRAs for.
    
    Thanks again @scottyaslan!


---