From bb44ffe357e081077152357c3813dff696e89356 Mon Sep 17 00:00:00 2001 From: Pierre Villard Date: Mon, 15 Apr 2024 21:26:02 +0200 Subject: [PATCH] NIFI-13050 Add bundle dependencies info in NiFi Registry UI This closes #8651 Signed-off-by: David Handermann --- .../nf-registry-grid-list-viewer.html | 14 +++++++++++ .../main/webapp/services/nf-registry.api.js | 25 +++++++++++++++++++ .../webapp/services/nf-registry.service.js | 11 ++++++++ .../grid-list/_structureElements.scss | 18 +++++++++++++ 4 files changed, 68 insertions(+) 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 eeb73dd6d6..4a5e34e5b2 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 @@ -142,6 +142,20 @@ limitations under the License. +
+ + + + Dependencies: + + +
    +
  • + {{dep.groupId}}:{{dep.artifactId}}:{{dep.version}} +
  • +
+
+
{{snapshotMeta.comments}}
diff --git a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.api.js b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.api.js index fbc6740afe..836a06ae6a 100644 --- a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.api.js +++ b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/services/nf-registry.api.js @@ -77,6 +77,31 @@ NfRegistryApi.prototype = { ); }, + /** + * Retrieves the version details for an existing snapshot the registry has stored. + * + * @param {string} versionUri The uri of the version to request. + * @returns {*} + */ + getDropletSnapshotVersionDetails: function (versionUri) { + var self = this; + var url = '../nifi-registry-api/' + versionUri; + return this.http.get(url).pipe( + map(function (response) { + return response; + }), + catchError(function (error) { + self.dialogService.openConfirm({ + title: 'Error', + message: error.error, + acceptButton: 'Ok', + acceptButtonColor: 'fds-warn' + }); + return of(error); + }) + ); + }, + /** * Retrieves the specified versioned flow snapshot for an existing droplet the registry has stored. * 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 c5d1a5cc88..4fa5a4bb72 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 @@ -562,6 +562,17 @@ NfRegistryService.prototype = { }); }, + /** + * Retrieves the snapshot version details for the given snapshot. + * + * @param snapshot The snapshot. + */ + getDropletSnapshotVersionDetails: function (snapshot) { + this.api.getDropletSnapshotVersionDetails(snapshot.link.href, true).subscribe(function (versionDetails) { + snapshot.versionDetails = versionDetails; + }); + }, + /** * Sort `filteredDroplets` by `column`. * diff --git a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/theming/components/explorer/grid-list/_structureElements.scss b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/theming/components/explorer/grid-list/_structureElements.scss index ddf48b1800..5717261b15 100644 --- a/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/theming/components/explorer/grid-list/_structureElements.scss +++ b/nifi-registry/nifi-registry-core/nifi-registry-web-ui/src/main/webapp/theming/components/explorer/grid-list/_structureElements.scss @@ -66,3 +66,21 @@ button.nf-registry-change-log-refresh.mat-icon-button { font-size: 12px; color: #5a656d; } + +mat-expansion-panel.dep-panel { + background: none; + box-shadow: none !important; + width: 50%; +} + +mat-expansion-panel-header.dep-panel { + padding-left: 0; +} + +mat-expansion-panel-header.mat-expanded.dep-panel { + height: 48px; +} + +.mat-expansion-panel-body { + padding-left: 0 !important; +} \ No newline at end of file