mirror of https://github.com/apache/nifi.git
NIFI-13050 Add bundle dependencies info in NiFi Registry UI
This closes #8651 Signed-off-by: David Handermann <exceptionfactory@apache.org>
This commit is contained in:
parent
d54e85fab2
commit
bb44ffe357
|
@ -142,6 +142,20 @@ limitations under the License.
|
|||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row" class="mat-body-3">
|
||||
<mat-expansion-panel class="dep-panel" (opened)="version = nfRegistryService.getDropletSnapshotVersionDetails(snapshotMeta)">
|
||||
<mat-expansion-panel-header class="dep-panel">
|
||||
<mat-panel-title>
|
||||
Dependencies:
|
||||
</mat-panel-title>
|
||||
</mat-expansion-panel-header>
|
||||
<ul *ngIf="snapshotMeta.versionDetails">
|
||||
<li *ngFor="let dep of (snapshotMeta.versionDetails.dependencies || [])">
|
||||
{{dep.groupId}}:{{dep.artifactId}}:{{dep.version}}
|
||||
</li>
|
||||
</ul>
|
||||
</mat-expansion-panel>
|
||||
</div>
|
||||
<div *ngIf="snapshotMeta.comments" fxLayout="row" class="mat-body-2">
|
||||
{{snapshotMeta.comments}}
|
||||
</div>
|
||||
|
|
|
@ -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.
|
||||
*
|
||||
|
|
|
@ -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`.
|
||||
*
|
||||
|
|
|
@ -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;
|
||||
}
|
Loading…
Reference in New Issue