fix(volume): unable to inspect and browse volume [BE-11216] (#186)

release/2.25
Oscar Zhou 2024-12-03 09:10:10 +13:00 committed by GitHub
parent bb6815f681
commit cb949e443e
3 changed files with 5 additions and 3 deletions

View File

@ -14,7 +14,7 @@
<button <button
ng-if="showBrowseAction" ng-if="showBrowseAction"
class="btn btn-xs btn-primary" class="btn btn-xs btn-primary"
ui-sref="docker.volumes.volume.browse({ id: volume.Id, nodeName: volume.NodeName })" ui-sref="docker.volumes.volume.browse({ id: volume.Name, nodeName: volume.NodeName })"
authorization="DockerAgentBrowseList" authorization="DockerAgentBrowseList"
> >
<pr-icon icon="'search'" class="leading-none"></pr-icon> <pr-icon icon="'search'" class="leading-none"></pr-icon>

View File

@ -58,6 +58,8 @@ angular.module('portainer.docker').controller('VolumeController', [
var containers = dataContainers.map(function (container) { var containers = dataContainers.map(function (container) {
container.volumeData = getVolumeDataFromContainer(container, $scope.volume.Id); container.volumeData = getVolumeDataFromContainer(container, $scope.volume.Id);
$scope.volume.NodeName = container.NodeName || '';
return container; return container;
}); });
$scope.containersUsingVolume = containers; $scope.containersUsingVolume = containers;

View File

@ -81,7 +81,7 @@ function Cell({
<Link <Link
to=".volume" to=".volume"
params={{ params={{
id: item.Id, id: item.Name,
nodeName: item.NodeName, nodeName: item.NodeName,
}} }}
data-cy={`volume-link-${name}`} data-cy={`volume-link-${name}`}
@ -99,7 +99,7 @@ function Cell({
props={{ props={{
to: 'docker.volumes.volume.browse', to: 'docker.volumes.volume.browse',
params: { params: {
id: item.Id, id: item.Name,
nodeName: item.NodeName, nodeName: item.NodeName,
}, },
}} }}