Skip to content

Commit

Permalink
Bug 1850474: The manage button on Volumes page under Container tab is…
Browse files Browse the repository at this point in the history
… invalid

The manage button on Volumes page should redirect to the catalog resource page.

Change-Id: I9a07dc2bfab2dfccef6583c819a24a2eca5c083c
Reviewed-on: http://bellevue-ci.eng.vmware.com:8080/9262
Compute-Verified: jenkins <[email protected]>
Closures-Verified: jenkins <[email protected]>
CS-Verified: jenkins <[email protected]>
Upgrade-Verified: jenkins <[email protected]>
Bellevue-Verified: jenkins <[email protected]>
Reviewed-by: Sergio Sanchez <[email protected]>
  • Loading branch information
jdillet committed Apr 20, 2017
1 parent 943b586 commit 8e4a3a3
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/app/src/js/core/services.js
Original file line number Diff line number Diff line change
Expand Up @@ -1407,6 +1407,10 @@ services.manageNetwork = function(networkId) {
return get(links.CONTAINER_NETWORKS + '/' + networkId + links.MANAGE_CONTAINERS_ENDPOINT);
};

services.manageVolume = function(volumeId) {
return get(links.CONTAINER_VOLUMES + '/' + volumeId + links.MANAGE_CONTAINERS_ENDPOINT);
};

services.loadClosure = function(closureId) {
return get(links.CLOSURES + '/' + closureId);
};
Expand Down
13 changes: 13 additions & 0 deletions ui/app/src/js/stores/ContainersStore.js
Original file line number Diff line number Diff line change
Expand Up @@ -729,6 +729,19 @@ let ContainersStore = Reflux.createStore({
}
},

onOpenManageVolumes: function(volumeId) {
var operation = this.requestCancellableOperation(constants.RESOURCES.VOLUMES.OPERATION.MANAGE);

if (operation) {
operation.forPromise(services.manageVolume(volumeId))
.then((catalogResource) => {
if (catalogResource && catalogResource.id) {
redirectToCatalogItem(catalogResource.id);
}
});
}
},

onOpenContainerDetails: function(containerId, clusterId, compositeComponentId) {
this.cancelOperations(constants.CONTAINERS.OPERATION.DETAILS,
constants.CONTAINERS.OPERATION.STATS, constants.CONTAINERS.OPERATION.LOGS);
Expand Down

0 comments on commit 8e4a3a3

Please sign in to comment.