diff --git a/pkg/kotsadmsnapshot/backup.go b/pkg/kotsadmsnapshot/backup.go index 53e8e7b020..6b354eb9b5 100644 --- a/pkg/kotsadmsnapshot/backup.go +++ b/pkg/kotsadmsnapshot/backup.go @@ -917,6 +917,9 @@ func listBackupVolumes(backupVolumes []velerov1.PodVolumeBackup) []types.Snapsho for _, backupVolume := range backupVolumes { v := types.SnapshotVolume{ Name: backupVolume.Name, + PodName: backupVolume.Spec.Pod.Name, + PodNamespace: backupVolume.Spec.Pod.Namespace, + PodVolumeName: backupVolume.Spec.Volume, SizeBytesHuman: units.HumanSize(float64(backupVolume.Status.Progress.TotalBytes)), DoneBytesHuman: units.HumanSize(float64(backupVolume.Status.Progress.BytesDone)), Phase: string(backupVolume.Status.Phase), diff --git a/pkg/kotsadmsnapshot/types/types.go b/pkg/kotsadmsnapshot/types/types.go index 9290cd3b90..d23cc379d6 100644 --- a/pkg/kotsadmsnapshot/types/types.go +++ b/pkg/kotsadmsnapshot/types/types.go @@ -66,6 +66,9 @@ type SnapshotHook struct { type SnapshotVolume struct { Name string `json:"name"` + PodName string `json:"podName"` + PodNamespace string `json:"podNamespace"` + PodVolumeName string `json:"podVolumeName"` SizeBytesHuman string `json:"sizeBytesHuman"` DoneBytesHuman string `json:"doneBytesHuman"` CompletionPercent int `json:"completionPercent"` diff --git a/web/src/components/snapshots/SnapshotDetails.jsx b/web/src/components/snapshots/SnapshotDetails.jsx index 27b0f4d34a..96c922242c 100644 --- a/web/src/components/snapshots/SnapshotDetails.jsx +++ b/web/src/components/snapshots/SnapshotDetails.jsx @@ -13,6 +13,7 @@ import ShowAllModal from "../modals/ShowAllModal"; import ViewSnapshotLogsModal from "../modals/ViewSnapshotLogsModal"; import ErrorModal from "../modals/ErrorModal"; import { Utilities } from "../../utilities/utilities"; + dayjs.extend(minMax); dayjs.extend(duration); @@ -318,7 +319,13 @@ class SnapshotDetails extends Component { >

- {volume.name} + {volume.podNamespace} + {"/"} + {volume.podName} {volume.podVolumeName} + + {" "} + {volume.name} +

Size: diff --git a/web/src/stories/ShowAllModal.stories.tsx b/web/src/stories/ShowAllModal.stories.tsx index 915aa9340d..5ade96f80f 100644 --- a/web/src/stories/ShowAllModal.stories.tsx +++ b/web/src/stories/ShowAllModal.stories.tsx @@ -20,6 +20,9 @@ export const Volumes = () => { sizeBytesHuman: "582B", startedAt: "2022-12-03T00:00:20Z", timeRemainingSeconds: 0, + podName: "podName", + podNamespace: "podNamespace", + podVolumeName: "podVolumeName", }, { completionPercent: 100, @@ -30,6 +33,9 @@ export const Volumes = () => { sizeBytesHuman: "582B", startedAt: "2022-12-03T00:00:20Z", timeRemainingSeconds: 0, + podName: "podName", + podNamespace: "podNamespace", + podVolumeName: "podVolumeName", }, { completionPercent: 100, @@ -40,6 +46,9 @@ export const Volumes = () => { sizeBytesHuman: "582B", startedAt: "2022-12-03T00:00:20Z", timeRemainingSeconds: 0, + podName: "podName", + podNamespace: "podNamespace", + podVolumeName: "podVolumeName", }, ]; return volumes.map((volume) => {