Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add PDisk error reason in VDisk page and popup #1307

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/components/VDiskInfo/VDiskInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ export function VDiskInfo<T extends PreparedVDisk>({
Guid,
Replicated,
VDiskState,
PDiskErrorReason,
VDiskSlotId,
Kind,
SatisfactionRank,
Expand Down Expand Up @@ -74,6 +75,12 @@ export function VDiskInfo<T extends PreparedVDisk>({
value: VDiskState,
});
}
if (valueIsDefined(PDiskErrorReason) && PDiskErrorReason != '') {
vdiskInfo.push({
label: vDiskInfoKeyset('disk-error-reason'),
value: PDiskErrorReason,
});
}
if (Number(AllocatedSize) >= 0 && Number(AvailableSize) >= 0) {
vdiskInfo.push({
label: vDiskInfoKeyset('size'),
Expand Down
1 change: 1 addition & 0 deletions src/components/VDiskInfo/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

"replication-status": "Replicated",
"state-status": "VDisk State",
"disk-error-reason": "PDisk Error Reason",
"space-status": "Disk Space",

"fresh-rank-satisfaction": "Fresh Rank Satisfaction",
Expand Down
5 changes: 5 additions & 0 deletions src/components/VDiskPopup/VDiskPopup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ const prepareVDiskData = (data: TVDiskStateInfo) => {
const {
VDiskId,
VDiskState,
PDiskErrorReason,
SatisfactionRank,
DiskSpace,
FrontQueues,
Expand All @@ -58,6 +59,10 @@ const prepareVDiskData = (data: TVDiskStateInfo) => {
{label: 'State', value: VDiskState ?? 'not available'},
];

if (PDiskErrorReason) {
vdiskData.push({label: 'PDisk Error', value: PDiskErrorReason});
}

if (StoragePoolName) {
vdiskData.push({label: 'StoragePool', value: StoragePoolName});
}
Expand Down
2 changes: 2 additions & 0 deletions src/types/api/vdisk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ export interface TVDiskStateInfo {

/** Current state of VDisk */
VDiskState?: EVDiskState;
/** PDisk error string */
PDiskErrorReason?: string;
/** Disk space flags */
DiskSpace?: EFlag;
/** Compaction satisfaction rank */
Expand Down
Loading