-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #166 from webzard-io/bowen/pvc
feat: add more pvc columns and fields
- Loading branch information
Showing
12 changed files
with
286 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "@dovetail-v2/refine", | ||
"version": "0.0.66", | ||
"version": "0.1.0", | ||
"type": "module", | ||
"files": [ | ||
"dist", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import React from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
interface Props { | ||
value: string; | ||
} | ||
|
||
export function PVPhaseDisplay(props: Props) { | ||
const {value} = props; | ||
const i18n = useTranslation(); | ||
|
||
const map = { | ||
Available: i18n.t('dovetail.pv_phase_available'), | ||
Bound: i18n.t('dovetail.pv_phase_bound'), | ||
Failed: i18n.t('dovetail.pv_phase_released'), | ||
Pending: i18n.t('dovetail.pv_phase_failed'), | ||
Released: i18n.t('dovetail.pv_phase_pending'), | ||
}; | ||
|
||
return <div>{map[value as keyof typeof map] || value}</div>; | ||
} | ||
|
||
export function PVVolumeModeDisplay(props: Props) { | ||
const {value} = props; | ||
const i18n = useTranslation(); | ||
|
||
const map = { | ||
Block: i18n.t('dovetail.block'), | ||
Filesystem: i18n.t('dovetail.file_system'), | ||
}; | ||
|
||
return <div>{map[value as keyof typeof map] || value}</div>; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.