mtien-apache commented on a change in pull request #5743:
URL: https://github.com/apache/nifi/pull/5743#discussion_r824994357



##########
File path: 
nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/explorer/dialogs/about/nf-registry-explorer-about.html
##########
@@ -0,0 +1,36 @@
+<!--
+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.
+-->
+
+<h2 mat-dialog-title>About Nifi Registry</h2>
+<div id="nf-registry-about-dialog" class="pad-sm mat-typography">
+    <div id="nf-registry-about-pic-container">
+        <div id="nf-registry-about-pic"></div>
+    </div>
+    <div id="nf-registry-about-version-info">
+        <p>Registry Version: {{ data.registryAboutVersion }}</p>
+    </div>
+    <div id="nf-registry-about-description">
+        <p>
+            Registry — a subproject of Apache NiFi — is a complementary 
application that provides
+            a central location for storage and management of shared resources 
across one or more
+            instances of NiFi and/or MiNiFi.
+        </p>
+    </div>
+</div>
+<mat-dialog-actions align="end">
+    <button mat-raised-button color="accent" mat-dialog-close>Close</button>

Review comment:
       ```suggestion
       <button mat-raised-button color="fds-primary" 
mat-dialog-close>Close</button>
   ```
   Pls update the `color` to match other primary buttons.

##########
File path: 
nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/nf-registry.js
##########
@@ -21,7 +21,9 @@ import NfRegistryService from 'services/nf-registry.service';
 import NfStorage from 'services/nf-storage.service';
 import nfRegistryAnimations from 'nf-registry.animations';
 import NfRegistryApi from 'services/nf-registry.api';
+import { NfRegistryExplorerAbout } from 
'components/explorer/dialogs/about/nf-registry-explorer-about';

Review comment:
       OK to remove if the component will not be used in `showAboutDialog` (see 
my comments about this method).

##########
File path: 
nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/explorer/dialogs/about/nf-registry-explorer-about.html
##########
@@ -0,0 +1,36 @@
+<!--
+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.
+-->
+
+<h2 mat-dialog-title>About Nifi Registry</h2>
+<div id="nf-registry-about-dialog" class="pad-sm mat-typography">
+    <div id="nf-registry-about-pic-container">
+        <div id="nf-registry-about-pic"></div>
+    </div>
+    <div id="nf-registry-about-version-info">
+        <p>Registry Version: {{ data.registryAboutVersion }}</p>
+    </div>
+    <div id="nf-registry-about-description">
+        <p>
+            Registry — a subproject of Apache NiFi — is a complementary 
application that provides
+            a central location for storage and management of shared resources 
across one or more
+            instances of NiFi and/or MiNiFi.
+        </p>
+    </div>
+</div>
+<mat-dialog-actions align="end">
+    <button mat-raised-button color="accent" mat-dialog-close>Close</button>

Review comment:
       Pls update to match for a primary button.

##########
File path: 
nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/nf-registry.html
##########
@@ -79,6 +79,9 @@
             <div id="nifi-registry-documentation" 
*ngIf="nfRegistryService.perspective !== 'login'" class="pad-right-sm">
                 <a matTooltip="Help" 
href="{{nfRegistryService.documentation.link}}" target="_blank"><i class="fa 
fa-question-circle help-icon" aria-hidden="true"></i></a>
             </div>
+            <button matTooltip="About" mat-ripple 
(click)="nfRegistryApi.showRegistryAboutDialog()" mat-icon-button>

Review comment:
       ```suggestion
               <button matTooltip="About" mat-ripple 
(click)="showAboutDialog()" mat-icon-button>
   ```
   Suggestion to restore `showAboutDialog()` method. Pls see my comment about 
this method in `nf-registry.js`.

##########
File path: 
nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/nf-registry.js
##########
@@ -99,6 +103,14 @@ NfRegistry.prototype = {
         } else {
             self.router.navigateByUrl('login');
         }
+    },
+    showAboutDialog: function () {
+        this.nfRegistryApi.showRegistryAboutDialog();
+        this.matDialog.open(NfRegistryExplorerAbout, {
+            width: '550px',
+            height: '440px',
+            data: this.nfRegistryService.registry.version
+        });
     }

Review comment:
       ```suggestion
       showAboutDialog: function () {
           this.nfRegistryApi.showRegistryAboutDialog();
       }
   ```
   
   Now the `showAboutDialog` method is not being called anywhere. Suggestion to 
call this method in the template, which would then only need to call 
`this.nfRegistryApi.showRegistryAboutDialog();`.

##########
File path: 
nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.api.js
##########
@@ -985,8 +987,25 @@ NfRegistryApi.prototype = {
                 return of({});
             })
         );
+    },
+    /**
+     * Show the NiFi Registry About dialog.
+     *
+     * @returns {*}
+     */
+    showRegistryAboutDialog: function () {
+        //var self = this;

Review comment:
       Pls remove.

##########
File path: 
nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/nf-registry.js
##########
@@ -32,15 +34,17 @@ import { Router } from '@angular/router';
  * @param nfRegistryApi     The api service.
  * @param changeDetectorRef     The change detector ref.
  * @param router                The angular router module.
+ * @param matDialog             The angular material dialog service
  * @constructor
  */
-function NfRegistry(http, nfStorage, nfRegistryService, nfRegistryApi, 
changeDetectorRef, router) {
+function NfRegistry(http, nfStorage, nfRegistryService, nfRegistryApi, 
changeDetectorRef, router, matDialog) {
     this.http = http;
     this.nfStorage = nfStorage;
     this.nfRegistryService = nfRegistryService;
     this.nfRegistryApi = nfRegistryApi;
     this.cd = changeDetectorRef;
     this.router = router;
+    this.matDialog = matDialog;

Review comment:
       OK to remove the service and its references and imports if it will not 
be used in `showAboutDialog` (see my comments about this method).




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to