mirror of
https://github.com/harvester/harvester-ui-extension.git
synced 2026-08-16 04:39:15 +00:00
(cherry picked from commit 7d09cb714225f9b721c49005cb72533c5fa5d079) Signed-off-by: Jack Yu <jack.yu@suse.com> Co-authored-by: Jack Yu <jack.yu@suse.com>
This commit is contained in:
parent
d3b77e2e41
commit
e71d12f67f
@ -468,10 +468,15 @@ export default {
|
||||
const size = formatSi(sizeBytes, { increment: 1024, suffix: UNIT_SUFFIX });
|
||||
const parentDevice = d.status?.deviceStatus?.parentDevice;
|
||||
const isChildAdded = this.newDisks.find((newDisk) => newDisk.blockDevice?.status?.deviceStatus?.parentDevice === devPath);
|
||||
const mountPoint = d.status?.deviceStatus?.fileSystem?.mountPoint;
|
||||
const name = d.displayName;
|
||||
|
||||
let label = `${ name } (Type: ${ deviceType }, Size: ${ size })`;
|
||||
|
||||
if (mountPoint) {
|
||||
label = `${ label } - ${ this.t('harvester.host.disk.mounted') }`;
|
||||
}
|
||||
|
||||
if (parentDevice) {
|
||||
label = `- ${ label }`;
|
||||
}
|
||||
@ -481,7 +486,7 @@ export default {
|
||||
value: d.id,
|
||||
action: this.addDisk,
|
||||
kind: !parentDevice ? 'group' : '',
|
||||
disabled: !!isChildAdded,
|
||||
disabled: !!isChildAdded || !!mountPoint,
|
||||
group: parentDevice || devPath,
|
||||
isParent: !!parentDevice,
|
||||
};
|
||||
|
||||
@ -640,6 +640,7 @@ harvester:
|
||||
notification:
|
||||
success: 'Update host "{name}" storage configurations successfully.'
|
||||
error: Host has unready or unschedulable disks.
|
||||
mounted: Already Mounted
|
||||
fileSystem:
|
||||
info: Current file system is {system}, You can format it manually.
|
||||
formatting: Disk is formatting, please wait.
|
||||
|
||||
@ -53,7 +53,6 @@ export default {
|
||||
|
||||
devices() {
|
||||
const inStore = this.$store.getters['currentProduct'].inStore;
|
||||
|
||||
const data = this.$store.getters[`${ inStore }/all`](HCI.USB_DEVICE) || [];
|
||||
|
||||
data.forEach((row) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user