You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "pvillard31 (via GitHub)" <gi...@apache.org> on 2024/04/15 15:51:57 UTC
[PR] NIFI-13048 - Add build info, bundle size and NiFi API version for bundles in NiFi Registry [nifi]
pvillard31 opened a new pull request, #8649:
URL: https://github.com/apache/nifi/pull/8649
# Summary
[NIFI-13048](https://issues.apache.org/jira/browse/NIFI-13048) - Add build info, bundle size and NiFi API version for bundles in NiFi Registry. It also fixes the action menu to not hardcode 'Flow' as the action menu can be used for both bundles and flows.
Here is a screenshot of NiFi Registry with bundles before the change:

Here is a screenshot of NiFi Registry with bundles after the change:

# Tracking
Please complete the following tracking steps prior to pull request creation.
### Issue Tracking
- [ ] [Apache NiFi Jira](https://issues.apache.org/jira/browse/NIFI) issue created
### Pull Request Tracking
- [ ] Pull Request title starts with Apache NiFi Jira issue number, such as `NIFI-00000`
- [ ] Pull Request commit message starts with Apache NiFi Jira issue number, as such `NIFI-00000`
### Pull Request Formatting
- [ ] Pull Request based on current revision of the `main` branch
- [ ] Pull Request refers to a feature branch with one commit containing changes
# Verification
Please indicate the verification steps performed prior to pull request creation.
### Build
- [ ] Build completed using `mvn clean install -P contrib-check`
- [ ] JDK 21
### Licensing
- [ ] New dependencies are compatible with the [Apache License 2.0](https://apache.org/licenses/LICENSE-2.0) according to the [License Policy](https://www.apache.org/legal/resolved.html)
- [ ] New dependencies are documented in applicable `LICENSE` and `NOTICE` files
### Documentation
- [ ] Documentation formatting appears as expected in rendered files
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-13048 - Add build info, bundle size and NiFi API version for bundles in NiFi Registry [nifi]
Posted by "pvillard31 (via GitHub)" <gi...@apache.org>.
pvillard31 commented on code in PR #8649:
URL: https://github.com/apache/nifi/pull/8649#discussion_r1567434159
##########
nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/explorer/grid-list/registry/nf-registry-grid-list-viewer.html:
##########
@@ -121,6 +121,38 @@
</td-step>
</td-steps>
</div>
+ <div *ngIf="droplet.bundleType" id="nifi-registry-explorer-grid-list-viewer-droplet-container-details-change-log">
+ <td-steps mode="vertical">
+ <td-step label="Version {{snapshotMeta.version}} ({{nfRegistryService.getHumanReadableSize(snapshotMeta.contentSize)}}) - {{snapshotMeta.timestamp | amTimeAgo}}" sublabel="by {{snapshotMeta.author}}"
+ *ngFor="let snapshotMeta of droplet.snapshotMetadata; let i = index"
+ [active]="i === 0 ? true : false">
+ <div fxLayout="column" fxLayoutAlign="space-between stretch">
+ <div fxLayout="row" class="mat-body-3">
+ <p>
+ Build Information<br />
+ <b>NiFi API version</b>: {{snapshotMeta.systemApiVersion}}<br />
+ <b>Build branch</b>: {{snapshotMeta.buildInfo.buildBranch}}<br />
+ <b>Build flags</b>: {{snapshotMeta.buildInfo.buildFlags}}<br />
+ <b>Build revision</b>: {{snapshotMeta.buildInfo.buildRevision}}<br />
+ <b>Build tag</b>: {{snapshotMeta.buildInfo.buildTag}}<br />
+ <b>Build tool</b>: {{snapshotMeta.buildInfo.buildTool}}<br />
+ <b>Built by</b>: {{snapshotMeta.buildInfo.builtBy}}<br />
+ <b>Built on</b>: {{(snapshotMeta.buildInfo.built/1000 | amFromUnix) | amDateFormat:'MMM-DD-YYYY'}} at {{(snapshotMeta.buildInfo.built/1000 | amFromUnix) | amDateFormat:'h:mm A'}}
Review Comment:
It's also used for the date at which the version has been added in the NiFi Registry, but agree that using the other format is better
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-13048 - Add build info, bundle size and NiFi API version for bundles in NiFi Registry [nifi]
Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on PR #8649:
URL: https://github.com/apache/nifi/pull/8649#issuecomment-2059462756
> Tried many options and finally went for ul/li which seems to be the cleanest approach compared to div and CSS.
Thanks, the bullet list approach looks good.
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-13048 - Add build info, bundle size and NiFi API version for bundles in NiFi Registry [nifi]
Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory closed pull request #8649: NIFI-13048 - Add build info, bundle size and NiFi API version for bundles in NiFi Registry
URL: https://github.com/apache/nifi/pull/8649
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-13048 - Add build info, bundle size and NiFi API version for bundles in NiFi Registry [nifi]
Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on code in PR #8649:
URL: https://github.com/apache/nifi/pull/8649#discussion_r1567358326
##########
nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/explorer/grid-list/registry/nf-registry-grid-list-viewer.html:
##########
@@ -121,6 +121,38 @@
</td-step>
</td-steps>
</div>
+ <div *ngIf="droplet.bundleType" id="nifi-registry-explorer-grid-list-viewer-droplet-container-details-change-log">
+ <td-steps mode="vertical">
+ <td-step label="Version {{snapshotMeta.version}} ({{nfRegistryService.getHumanReadableSize(snapshotMeta.contentSize)}}) - {{snapshotMeta.timestamp | amTimeAgo}}" sublabel="by {{snapshotMeta.author}}"
+ *ngFor="let snapshotMeta of droplet.snapshotMetadata; let i = index"
+ [active]="i === 0 ? true : false">
+ <div fxLayout="column" fxLayoutAlign="space-between stretch">
+ <div fxLayout="row" class="mat-body-3">
+ <p>
+ Build Information<br />
+ <b>NiFi API version</b>: {{snapshotMeta.systemApiVersion}}<br />
+ <b>Build branch</b>: {{snapshotMeta.buildInfo.buildBranch}}<br />
Review Comment:
Recommend capitalizing the second word in these lines:
```suggestion
<b>Build Branch</b>: {{snapshotMeta.buildInfo.buildBranch}}<br />
```
##########
nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/explorer/grid-list/registry/nf-registry-grid-list-viewer.html:
##########
@@ -121,6 +121,38 @@
</td-step>
</td-steps>
</div>
+ <div *ngIf="droplet.bundleType" id="nifi-registry-explorer-grid-list-viewer-droplet-container-details-change-log">
+ <td-steps mode="vertical">
+ <td-step label="Version {{snapshotMeta.version}} ({{nfRegistryService.getHumanReadableSize(snapshotMeta.contentSize)}}) - {{snapshotMeta.timestamp | amTimeAgo}}" sublabel="by {{snapshotMeta.author}}"
+ *ngFor="let snapshotMeta of droplet.snapshotMetadata; let i = index"
+ [active]="i === 0 ? true : false">
+ <div fxLayout="column" fxLayoutAlign="space-between stretch">
+ <div fxLayout="row" class="mat-body-3">
+ <p>
+ Build Information<br />
+ <b>NiFi API version</b>: {{snapshotMeta.systemApiVersion}}<br />
Review Comment:
Using non-breaking spaces for formatting is not ideal, so I recommend using styled `div` tags instead.
##########
nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/explorer/grid-list/registry/nf-registry-grid-list-viewer.html:
##########
@@ -121,6 +121,38 @@
</td-step>
</td-steps>
</div>
+ <div *ngIf="droplet.bundleType" id="nifi-registry-explorer-grid-list-viewer-droplet-container-details-change-log">
+ <td-steps mode="vertical">
+ <td-step label="Version {{snapshotMeta.version}} ({{nfRegistryService.getHumanReadableSize(snapshotMeta.contentSize)}}) - {{snapshotMeta.timestamp | amTimeAgo}}" sublabel="by {{snapshotMeta.author}}"
+ *ngFor="let snapshotMeta of droplet.snapshotMetadata; let i = index"
+ [active]="i === 0 ? true : false">
+ <div fxLayout="column" fxLayoutAlign="space-between stretch">
+ <div fxLayout="row" class="mat-body-3">
+ <p>
+ Build Information<br />
+ <b>NiFi API version</b>: {{snapshotMeta.systemApiVersion}}<br />
+ <b>Build branch</b>: {{snapshotMeta.buildInfo.buildBranch}}<br />
+ <b>Build flags</b>: {{snapshotMeta.buildInfo.buildFlags}}<br />
+ <b>Build revision</b>: {{snapshotMeta.buildInfo.buildRevision}}<br />
+ <b>Build tag</b>: {{snapshotMeta.buildInfo.buildTag}}<br />
+ <b>Build tool</b>: {{snapshotMeta.buildInfo.buildTool}}<br />
+ <b>Built by</b>: {{snapshotMeta.buildInfo.builtBy}}<br />
+ <b>Built on</b>: {{(snapshotMeta.buildInfo.built/1000 | amFromUnix) | amDateFormat:'MMM-DD-YYYY'}} at {{(snapshotMeta.buildInfo.built/1000 | amFromUnix) | amDateFormat:'h:mm A'}}
Review Comment:
Is the `MMM-DD-YYYY` format common elsewhere in the application? I recommend using the ISO 8601 format of `YYYY-MM-DD`.
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-13048 - Add build info, bundle size and NiFi API version for bundles in NiFi Registry [nifi]
Posted by "pvillard31 (via GitHub)" <gi...@apache.org>.
pvillard31 commented on PR #8649:
URL: https://github.com/apache/nifi/pull/8649#issuecomment-2059193589
Thanks for the review @exceptionfactory - I believe I addressed your comments.

--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-13048 - Add build info, bundle size and NiFi API version for bundles in NiFi Registry [nifi]
Posted by "exceptionfactory (via GitHub)" <gi...@apache.org>.
exceptionfactory commented on code in PR #8649:
URL: https://github.com/apache/nifi/pull/8649#discussion_r1567441172
##########
nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/explorer/grid-list/registry/nf-registry-grid-list-viewer.html:
##########
@@ -115,7 +115,39 @@
No comments specified
</div>
<div fxLayout="row" class="mat-caption">
- {{(snapshotMeta.timestamp/1000 | amFromUnix) | amDateFormat:'MMM-DD-YYYY'}} at {{(snapshotMeta.timestamp/1000 | amFromUnix) | amDateFormat:'h:mm A'}}
+ {{(snapshotMeta.timestamp/1000 | amFromUnix) | amDateFormat:'YYYY-MM-DD'}} at {{(snapshotMeta.timestamp/1000 | amFromUnix) | amDateFormat:'h:mm A'}}
+ </div>
+ </div>
+ </td-step>
+ </td-steps>
+ </div>
+ <div *ngIf="droplet.bundleType" id="nifi-registry-explorer-grid-list-viewer-droplet-container-details-change-log">
+ <td-steps mode="vertical">
+ <td-step label="Version {{snapshotMeta.version}} ({{nfRegistryService.getHumanReadableSize(snapshotMeta.contentSize)}}) - {{snapshotMeta.timestamp | amTimeAgo}}" sublabel="by {{snapshotMeta.author}}"
+ *ngFor="let snapshotMeta of droplet.snapshotMetadata; let i = index"
+ [active]="i === 0 ? true : false">
+ <div fxLayout="column" fxLayoutAlign="space-between stretch">
+ <div fxLayout="row" class="mat-body-3">
+ <div>Build Information:</div>
+ <div style="margin-left: 14px; margin-bottom: 5px;">
Review Comment:
The inline style should be replaced with an externalized class.
##########
nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/explorer/grid-list/registry/nf-registry-grid-list-viewer.html:
##########
@@ -115,7 +115,39 @@
No comments specified
</div>
<div fxLayout="row" class="mat-caption">
- {{(snapshotMeta.timestamp/1000 | amFromUnix) | amDateFormat:'MMM-DD-YYYY'}} at {{(snapshotMeta.timestamp/1000 | amFromUnix) | amDateFormat:'h:mm A'}}
+ {{(snapshotMeta.timestamp/1000 | amFromUnix) | amDateFormat:'YYYY-MM-DD'}} at {{(snapshotMeta.timestamp/1000 | amFromUnix) | amDateFormat:'h:mm A'}}
+ </div>
+ </div>
+ </td-step>
+ </td-steps>
+ </div>
+ <div *ngIf="droplet.bundleType" id="nifi-registry-explorer-grid-list-viewer-droplet-container-details-change-log">
+ <td-steps mode="vertical">
+ <td-step label="Version {{snapshotMeta.version}} ({{nfRegistryService.getHumanReadableSize(snapshotMeta.contentSize)}}) - {{snapshotMeta.timestamp | amTimeAgo}}" sublabel="by {{snapshotMeta.author}}"
+ *ngFor="let snapshotMeta of droplet.snapshotMetadata; let i = index"
+ [active]="i === 0 ? true : false">
+ <div fxLayout="column" fxLayoutAlign="space-between stretch">
+ <div fxLayout="row" class="mat-body-3">
+ <div>Build Information:</div>
+ <div style="margin-left: 14px; margin-bottom: 5px;">
+ <b>NiFi API Version</b>: {{snapshotMeta.systemApiVersion}}<br />
Review Comment:
Instead of using `<br/>`, I believe it would be better to use one `<div>` per row.
--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] NIFI-13048 - Add build info, bundle size and NiFi API version for bundles in NiFi Registry [nifi]
Posted by "pvillard31 (via GitHub)" <gi...@apache.org>.
pvillard31 commented on PR #8649:
URL: https://github.com/apache/nifi/pull/8649#issuecomment-2059457566
Tried many options and finally went for ul/li which seems to be the cleanest approach compared to div and CSS.

--
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: issues-unsubscribe@nifi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org