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
Conversation
.../nifi-registry-core/nifi-registry-resources/src/main/resources/conf/nifi-registry.properties
Outdated
Show resolved
Hide resolved
0abb2ce
to
53ec8e2
Compare
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(); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/package.json
Outdated
Show resolved
Hide resolved
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." |
41928c2
to
199e664
Compare
@markobean I've created the new about page, take a look and let me know what you think |
@ohnoitsyou - UI dialog looks better. Thanks for the improvement. |
There was a problem hiding this 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.
...istry-web-ui/src/main/webapp/components/explorer/dialogs/about/nf-registry-explorer-about.ts
Outdated
Show resolved
Hide resolved
nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/nf-registry.html
Outdated
Show resolved
Hide resolved
...istry-web-ui/src/main/webapp/components/explorer/dialogs/about/nf-registry-explorer-about.ts
Outdated
Show resolved
Hide resolved
@mtien-apache |
@ohnoitsyou Thanks for the updates! Unfortunately I found a few other things.
|
…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.
@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. |
There was a problem hiding this 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.
...try-web-ui/src/main/webapp/components/explorer/dialogs/about/nf-registry-explorer-about.html
Outdated
Show resolved
Hide resolved
nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/nf-registry.js
Outdated
Show resolved
Hide resolved
nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/nf-registry.html
Outdated
Show resolved
Hide resolved
...registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.api.js
Outdated
Show resolved
Hide resolved
nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/nf-registry.js
Outdated
Show resolved
Hide resolved
nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/nf-registry.js
Outdated
Show resolved
Hide resolved
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
There was a problem hiding this 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!
…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.
…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.
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:
mvn -Pcontrib-check clean install
at the rootnifi
folder?LICENSE
file, including the mainLICENSE
file undernifi-assembly
?NOTICE
file, including the mainNOTICE
file found undernifi-assembly
?.displayName
in addition to .name (programmatic access) for each of the new properties?For documentation related changes: