This is an automated email from the ASF dual-hosted git repository.
exceptionfactory pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/nifi.git
The following commit(s) were added to refs/heads/main by this push:
new 5eccc4c7e7 NIFI-13048 Added Build Info and NiFi API version for
bundles to Registry
5eccc4c7e7 is described below
commit 5eccc4c7e7825d844790f07291e79ebf815e0c19
Author: Pierre Villard <[email protected]>
AuthorDate: Mon Apr 15 17:48:36 2024 +0200
NIFI-13048 Added Build Info and NiFi API version for bundles to Registry
This closes #8649
Signed-off-by: David Handermann <[email protected]>
---
.../registry/nf-registry-grid-list-viewer.html | 38 ++++++++++++++++++++--
.../main/webapp/services/nf-registry.service.js | 16 +++++++--
2 files changed, 49 insertions(+), 5 deletions(-)
diff --git
a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/explorer/grid-list/registry/nf-registry-grid-list-viewer.html
b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/explorer/grid-list/registry/nf-registry-grid-list-viewer.html
index 6eabf90ca3..eeb73dd6d6 100644
---
a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/explorer/grid-list/registry/nf-registry-grid-list-viewer.html
+++
b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/components/explorer/grid-list/registry/nf-registry-grid-list-viewer.html
@@ -102,7 +102,7 @@ limitations under the License.
<button class="nf-registry-change-log-refresh"
(click)="nfRegistryService.getDropletSnapshotMetadata(droplet)"
matTooltip="Refresh" mat-icon-button>
<i class="fa fa-refresh info"
aria-hidden="true"></i>
</button>
- <div
id="nifi-registry-explorer-grid-list-viewer-droplet-container-details-change-log">
+ <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}} - {{snapshotMeta.timestamp | amTimeAgo}}" sublabel="by
{{snapshotMeta.author}}"
*ngFor="let snapshotMeta of
droplet.snapshotMetadata; let i = index"
@@ -115,7 +115,41 @@ limitations under the License.
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:
+ <ul>
+ <li><b>NiFi API
Version</b>: {{snapshotMeta.systemApiVersion}}</li>
+ <li><b>Build
Branch</b>: {{snapshotMeta.buildInfo.buildBranch}}</li>
+ <li><b>Build
Flags</b>: {{snapshotMeta.buildInfo.buildFlags}}</li>
+ <li><b>Build
Revision</b>: {{snapshotMeta.buildInfo.buildRevision}}</li>
+ <li><b>Build Tag</b>:
{{snapshotMeta.buildInfo.buildTag}}</li>
+ <li><b>Build Tool</b>:
{{snapshotMeta.buildInfo.buildTool}}</li>
+ <li><b>Built By</b>:
{{snapshotMeta.buildInfo.builtBy}}</li>
+ <li><b>Built On</b>:
{{(snapshotMeta.buildInfo.built/1000 | amFromUnix) |
amDateFormat:'YYYY-MM-DD'}} at {{(snapshotMeta.buildInfo.built/1000 |
amFromUnix) | amDateFormat:'h:mm A'}}</li>
+ </ul>
+ </div>
+ </div>
+ <div *ngIf="snapshotMeta.comments"
fxLayout="row" class="mat-body-2">
+ {{snapshotMeta.comments}}
+ </div>
+ <div
*ngIf="!snapshotMeta.comments" fxLayout="row" class="mat-body-2">
+ No comments specified
+ </div>
+ <div fxLayout="row"
class="mat-caption">
+ {{(snapshotMeta.timestamp/1000
| amFromUnix) | amDateFormat:'YYYY-MM-DD'}} at {{(snapshotMeta.timestamp/1000 |
amFromUnix) | amDateFormat:'h:mm A'}}
</div>
</div>
</td-step>
diff --git
a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.service.js
b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.service.js
index dec1a69130..c5d1a5cc88 100644
---
a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.service.js
+++
b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.service.js
@@ -165,7 +165,7 @@ function NfRegistryService(nfRegistryApi, nfStorage,
tdDataTableService, router,
}
},
{
- name: 'Delete flow',
+ name: 'Delete',
icon: 'fa fa-trash',
tooltip: 'Delete',
disabled: function (droplet) {
@@ -436,7 +436,7 @@ NfRegistryService.prototype = {
deleteDroplet: function (droplet) {
var self = this;
this.dialogService.openConfirm({
- title: 'Delete Flow',
+ title: 'Delete ' + droplet.type,
message: 'All versions of this ' + droplet.type.toLowerCase() + '
will be deleted.',
cancelButton: 'Cancel',
acceptButton: 'Delete',
@@ -543,7 +543,7 @@ NfRegistryService.prototype = {
// Opens the export flow version dialog
this.openExportVersionedFlowDialog(droplet);
break;
- case 'delete flow':
+ case 'delete':
// Deletes the entire data flow
this.deleteDroplet(droplet);
break;
@@ -1329,6 +1329,16 @@ NfRegistryService.prototype = {
});
}
return data;
+ },
+
+ /**
+ * Returns a human readable size
+ *
+ * @param size Size in bytes.
+ */
+ getHumanReadableSize: function (size) {
+ var i = size === 0 ? 0 : Math.floor(Math.log(size) / Math.log(1024));
+ return +((size / (1024 ** i)).toFixed(2)) * 1 + ' ' + ['B', 'kB',
'MB', 'GB', 'TB'][i];
}
//</editor-fold>