Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NIFI-8899 - Add NiFi Registry version information to the Registry under an "about" button. #5743

Merged
merged 10 commits into from Mar 12, 2022

Conversation

ohnoitsyou
Copy link
Contributor

Add a new endpoint to the registry API that serves up the project version.
Add a new "about" button to the Registry layout that shows a dialog with
version information.
Closes #NIFI-8899

For all changes:

  • Is there a JIRA ticket associated with this PR? Is it referenced
    in the commit message?

  • Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.

  • Has your PR been rebased against the latest commit within the target branch (typically main)?

  • Is your initial contribution a single, squashed commit? Additional commits in response to PR reviewer feedback should be made on this branch and pushed to allow change tracking. Do not squash or use --force when pushing to allow for clean monitoring of changes.

For code changes:

  • Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
  • Have you written or updated unit tests to verify your changes?
  • No similar bits of code have tests
  • Have you verified that the full build is successful on JDK 8?
  • Have you verified that the full build is successful on JDK 11?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
  • If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
  • If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?

For documentation related changes:

  • Have you ensured that format looks appropriate for the output in which it is rendered?

@ohnoitsyou ohnoitsyou force-pushed the NIFI-8899 branch 2 times, most recently from 0abb2ce to 53ec8e2 Compare February 10, 2022 17:34
@ohnoitsyou
Copy link
Contributor Author

I think this is all ready to go. I've had it successfully build all three flows on my fork.

response = RegistryVersion.class
)
public Response getVersion() {
final String implVersion = NiFiRegistryApiApplication.class.getPackage().getImplementationVersion();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What version is actually being returned here?

We would need the Maven version like 1.16.0-SNAPSHOT. Was expecting that Maven would have to filter the version into some file that registry core can read from.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It ultimately returns the project.version from the nifi-registry-web-api pom

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it that was initially, with the filtering, but Mark (up above) recommended against that as it allowed it to be modified at runtime

description = "Retrieves the version information for this NiFi Registry.",
authorizations = { @Authorization("Authorization") }
)
public class VersionResource extends ApplicationResource {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about calling this AboutResource? and the object being returned could be AboutInfo (or something)?

My thought was the using the word "version" could be a little confusing since registry is all about version control, but this doesn't have anything to do with that aspect.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm open to this. Thinking about it, makes perfect sense.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've updated these classes, let me know what you think

@markobean
Copy link
Contributor

I installed Registry to see how the UI reports the version. This is a good start. I'd like to recommend the UI dialog mimic the "About" dialog for Apache NiFi for a consistent look across related applications. For example, "About NiFi Registry" placed on a colored background, inclusion of NiFi Registry logo, and a short description of Registry. Perhaps the description can be that of the Registry website: "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."

@ohnoitsyou ohnoitsyou force-pushed the NIFI-8899 branch 2 times, most recently from 41928c2 to 199e664 Compare February 17, 2022 20:03
@ohnoitsyou
Copy link
Contributor Author

@markobean I've created the new about page, take a look and let me know what you think

@markobean
Copy link
Contributor

@ohnoitsyou - UI dialog looks better. Thanks for the improvement.
I tested the UI out, and it reports the correct version. Hope we can get this into 1.16.0 release.
+1

Copy link
Contributor

@mtien-apache mtien-apache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates! Works well and overall looks good. Just a few minor fixes and it should be good to go.

@ohnoitsyou
Copy link
Contributor Author

ohnoitsyou commented Mar 1, 2022

Thanks for the updates! Works well and overall looks good. Just a few minor fixes and it should be good to go.

@mtien-apache
I've addressed these and pushed the changes.
If you or someone else could trigger the new build actions that would be appreciated.

@mtien-apache
Copy link
Contributor

@ohnoitsyou Thanks for the updates! Unfortunately I found a few other things.

  • When I click on the info icon, the circle is off-center from the icon. It should look more like the wrench settings icon when clicked.

    2-info-icon-circle-not-centered

    3-wrench-icon-circle

  • In the dialog, the different states of the Close button style looks different than other buttons in the app. NiFi Registry follows the NiFi Flow Design System (FDS) for all of its style conventions. Specifically it has a FdsDialogService component you can leverage. An example of a similar button can be seen in the New Bucket dialog's Cancel button.

    4-about-dialog

    Button state when it's clicked on:
    5-close-dialog

  • The info icon vertical alignment looks off from the question mark and wrench icons.
    Screen Shot 2022-03-04 at 1 00 00 PM

…er an "about" button.

Add a new endpoint to the registry API that serves up the project version.
Add a new "about" button to the Registry layout that shows a dialog with
version information.
Change from pulling the version information from the POM itself, set by having maven filter the properties file at build time, to getting it from the `NiFiRegistryApiApplication` class's `getImplementationVersion` method.
Left in an extra import
Rebased on top of main, merged new dependencies
Updated and locking Sass to 1.49.7
Updated typescript to something more modern. (latest)
Changed plain 'Version' to be more explicit about whose version: Registry
Changed the url endpoint from 'version' to 'about' to make it more clear it's
  not a versioned resource but information about the registry itself
API changes are now reflected in the UI
Bring the look-and-feel more inline with the Nifi about page.
  It's not perfect, but it looks much better than before.
Update the build-and-run script for the registry to not actually run the
  registry if the build didn't complete
Removed unused import
Fixed param name in javadoc
Fixed spacing in HTML
Changed close button to use raised accent styling
Moved dialog showing into nf-registry.api.js
Changed click call to show dialog using the api method
Showing the dialog now makes the api call before rendering.
@ohnoitsyou
Copy link
Contributor Author

@mtien-apache : I think I've captured what you are looking for. If you could take a look when you get a chance and let me know. I'd love to have this included in the 1.16 release if possible.

Copy link
Contributor

@mtien-apache mtien-apache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ohnoitsyou Thanks for addressing my previous comments! Most of it looks good now. However, I've made several suggestions that I think would provide better functionality. Specifically, the showAboutDialog is not being called now. Pls see my comments below.

@ohnoitsyou
Copy link
Contributor Author

I had a bad feeling I forgot to address some things. Thanks for catching this. I'll work on it post haste

Changed close button to use raised primary style
Changed click call to use nf-regisry.js to call the api method
  Removed the extra call to show the dialog.
Removed some comments and outdated references
Copy link
Contributor

@mtien-apache mtien-apache left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ohnoitsyou +1 Looks good! Thanks for all the fixes and useful addition!

@mtien-apache mtien-apache merged commit d424537 into apache:main Mar 12, 2022
krisztina-zsihovszki pushed a commit to krisztina-zsihovszki/nifi that referenced this pull request Jun 28, 2022
…er an "about" button. (apache#5743)

* NIFI-8899 - Add NiFi Registry version information to the Registry under an "about" button.

Add a new endpoint to the registry API that serves up the project version.
Add a new "about" button to the Registry layout that shows a dialog with
version information.

* NIFI-8899 - Change where the version information is retrieved from

Change from pulling the version information from the POM itself, set by having maven filter the properties file at build time, to getting it from the `NiFiRegistryApiApplication` class's `getImplementationVersion` method.

* NIFI-8899 - Remove unused dependency

Left in an extra import

* NIFI-8899 - Rebase and update npm dependencies

Rebased on top of main, merged new dependencies
Updated and locking Sass to 1.49.7

* NIFI-8899 - Update typescript

Updated typescript to something more modern. (latest)

* NIFI-8899 - Change Version to RegistryVersion

Changed plain 'Version' to be more explicit about whose version: Registry
Changed the url endpoint from 'version' to 'about' to make it more clear it's
  not a versioned resource but information about the registry itself

* NIFI-8899 - Reflect new API in UI, look-and-feel, build-and-run script

API changes are now reflected in the UI
Bring the look-and-feel more inline with the Nifi about page.
  It's not perfect, but it looks much better than before.
Update the build-and-run script for the registry to not actually run the
  registry if the build didn't complete

* NIFI-8899 - Fix spacing, documentation

Removed unused import
Fixed param name in javadoc
Fixed spacing in HTML

* NIFI-8899 - Change to dialogService, fix styling

Changed close button to use raised accent styling
Moved dialog showing into nf-registry.api.js
Changed click call to show dialog using the api method
Showing the dialog now makes the api call before rendering.

* NIFI-8899 - Fixed styling, refactored the about dialog codepath

Changed close button to use raised primary style
Changed click call to use nf-regisry.js to call the api method
  Removed the extra call to show the dialog.
Removed some comments and outdated references

Merged apache#5743 into main.
Lehel44 pushed a commit to Lehel44/nifi that referenced this pull request Jul 1, 2022
…er an "about" button. (apache#5743)

* NIFI-8899 - Add NiFi Registry version information to the Registry under an "about" button.

Add a new endpoint to the registry API that serves up the project version.
Add a new "about" button to the Registry layout that shows a dialog with
version information.

* NIFI-8899 - Change where the version information is retrieved from

Change from pulling the version information from the POM itself, set by having maven filter the properties file at build time, to getting it from the `NiFiRegistryApiApplication` class's `getImplementationVersion` method.

* NIFI-8899 - Remove unused dependency

Left in an extra import

* NIFI-8899 - Rebase and update npm dependencies

Rebased on top of main, merged new dependencies
Updated and locking Sass to 1.49.7

* NIFI-8899 - Update typescript

Updated typescript to something more modern. (latest)

* NIFI-8899 - Change Version to RegistryVersion

Changed plain 'Version' to be more explicit about whose version: Registry
Changed the url endpoint from 'version' to 'about' to make it more clear it's
  not a versioned resource but information about the registry itself

* NIFI-8899 - Reflect new API in UI, look-and-feel, build-and-run script

API changes are now reflected in the UI
Bring the look-and-feel more inline with the Nifi about page.
  It's not perfect, but it looks much better than before.
Update the build-and-run script for the registry to not actually run the
  registry if the build didn't complete

* NIFI-8899 - Fix spacing, documentation

Removed unused import
Fixed param name in javadoc
Fixed spacing in HTML

* NIFI-8899 - Change to dialogService, fix styling

Changed close button to use raised accent styling
Moved dialog showing into nf-registry.api.js
Changed click call to show dialog using the api method
Showing the dialog now makes the api call before rendering.

* NIFI-8899 - Fixed styling, refactored the about dialog codepath

Changed close button to use raised primary style
Changed click call to use nf-regisry.js to call the api method
  Removed the extra call to show the dialog.
Removed some comments and outdated references

Merged apache#5743 into main.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants