* [pve-devel] [PATCH proxmox-widget-toolkit/pve-storage] replace '(mounted)' string by boolean field @ 2022-06-08 7:09 Hannes Laimer 2022-06-08 7:09 ` [pve-devel] [PATCH pve-storage 1/1] api2: disks: add mounted " Hannes Laimer 2022-06-08 7:10 ` [pve-devel] [PATCH proxmox-widget-toolkit 1/1] ui: disks: add 'mounted' column Hannes Laimer 0 siblings, 2 replies; 5+ messages in thread From: Hannes Laimer @ 2022-06-08 7:09 UTC (permalink / raw) To: pve-devel The mounted status of a disk/partition is now a separate column instead of the '(mounted)' that is added to the usage string. This change seems reasonable on its own, but it is mostly so the UI works properly with the data that will be returned from the PBS api. We could also return the mountpoint instead of a boolean, the data is already there, but I'm not sure if that's something that makes sense to display in the grid, might end up looking a little 'cluttered'. * pve-storage Hannes Laimer (1): api2: disks: add mounted boolean field PVE/API2/Disks.pm | 1 + PVE/Diskmanage.pm | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) * proxmox-widget-toolkit Hannes Laimer (1): ui: disks: add 'mounted' column src/panel/DiskList.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- 2.30.2 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [pve-devel] [PATCH pve-storage 1/1] api2: disks: add mounted boolean field 2022-06-08 7:09 [pve-devel] [PATCH proxmox-widget-toolkit/pve-storage] replace '(mounted)' string by boolean field Hannes Laimer @ 2022-06-08 7:09 ` Hannes Laimer 2022-06-15 8:24 ` [pve-devel] applied: " Wolfgang Bumiller 2022-06-08 7:10 ` [pve-devel] [PATCH proxmox-widget-toolkit 1/1] ui: disks: add 'mounted' column Hannes Laimer 1 sibling, 1 reply; 5+ messages in thread From: Hannes Laimer @ 2022-06-08 7:09 UTC (permalink / raw) To: pve-devel ... and remove '(mounted)' from usage string Signed-off-by: Hannes Laimer <h.laimer@proxmox.com> --- PVE/API2/Disks.pm | 1 + PVE/Diskmanage.pm | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/PVE/API2/Disks.pm b/PVE/API2/Disks.pm index b618057..bde6132 100644 --- a/PVE/API2/Disks.pm +++ b/PVE/API2/Disks.pm @@ -125,6 +125,7 @@ __PACKAGE__->register_method ({ }, used => { type => 'string', optional => 1 }, gpt => { type => 'boolean' }, + mounted => { type => 'boolean' }, size => { type => 'integer'}, osdid => { type => 'integer'}, vendor => { type => 'string', optional => 1 }, diff --git a/PVE/Diskmanage.pm b/PVE/Diskmanage.pm index d67cc6b..253916b 100644 --- a/PVE/Diskmanage.pm +++ b/PVE/Diskmanage.pm @@ -605,6 +605,7 @@ sub get_disks { size => $sysdata->{size}, serial => $data->{serial}, gpt => $data->{gpt}, + mounted => exists $mounted->{$devpath}, rpm => $data->{rpm}, type => $type, wwn => $data->{wwn}, @@ -650,10 +651,7 @@ sub get_disks { } my $fstype = $info->{fstype}; - if (defined($fstype)) { - return "${fstype} (mounted)" if $mounted->{$devpath}; - return "${fstype}"; - } + return "${fstype}" if defined($fstype); return 'mounted' if $mounted->{$devpath}; return if !$is_partition; @@ -693,6 +691,7 @@ sub get_disks { $partitions->{$part}->{devpath} = "$partpath/$part"; $partitions->{$part}->{parent} = "$devpath"; + $partitions->{$part}->{mounted} = exists $mounted->{"$partpath/$part"}; $partitions->{$part}->{gpt} = $data->{gpt}; $partitions->{$part}->{type} = 'partition'; $partitions->{$part}->{size} = -- 2.30.2 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [pve-devel] applied: [PATCH pve-storage 1/1] api2: disks: add mounted boolean field 2022-06-08 7:09 ` [pve-devel] [PATCH pve-storage 1/1] api2: disks: add mounted " Hannes Laimer @ 2022-06-15 8:24 ` Wolfgang Bumiller 0 siblings, 0 replies; 5+ messages in thread From: Wolfgang Bumiller @ 2022-06-15 8:24 UTC (permalink / raw) To: Hannes Laimer; +Cc: pve-devel applied, thanks On Wed, Jun 08, 2022 at 07:09:59AM +0000, Hannes Laimer wrote: > ... and remove '(mounted)' from usage string > > Signed-off-by: Hannes Laimer <h.laimer@proxmox.com> > --- > PVE/API2/Disks.pm | 1 + > PVE/Diskmanage.pm | 7 +++---- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/PVE/API2/Disks.pm b/PVE/API2/Disks.pm > index b618057..bde6132 100644 > --- a/PVE/API2/Disks.pm > +++ b/PVE/API2/Disks.pm > @@ -125,6 +125,7 @@ __PACKAGE__->register_method ({ > }, > used => { type => 'string', optional => 1 }, > gpt => { type => 'boolean' }, > + mounted => { type => 'boolean' }, > size => { type => 'integer'}, > osdid => { type => 'integer'}, > vendor => { type => 'string', optional => 1 }, > diff --git a/PVE/Diskmanage.pm b/PVE/Diskmanage.pm > index d67cc6b..253916b 100644 > --- a/PVE/Diskmanage.pm > +++ b/PVE/Diskmanage.pm > @@ -605,6 +605,7 @@ sub get_disks { > size => $sysdata->{size}, > serial => $data->{serial}, > gpt => $data->{gpt}, > + mounted => exists $mounted->{$devpath}, > rpm => $data->{rpm}, > type => $type, > wwn => $data->{wwn}, > @@ -650,10 +651,7 @@ sub get_disks { > } > > my $fstype = $info->{fstype}; > - if (defined($fstype)) { > - return "${fstype} (mounted)" if $mounted->{$devpath}; > - return "${fstype}"; > - } > + return "${fstype}" if defined($fstype); > return 'mounted' if $mounted->{$devpath}; > > return if !$is_partition; > @@ -693,6 +691,7 @@ sub get_disks { > > $partitions->{$part}->{devpath} = "$partpath/$part"; > $partitions->{$part}->{parent} = "$devpath"; > + $partitions->{$part}->{mounted} = exists $mounted->{"$partpath/$part"}; > $partitions->{$part}->{gpt} = $data->{gpt}; > $partitions->{$part}->{type} = 'partition'; > $partitions->{$part}->{size} = > -- > 2.30.2 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [pve-devel] [PATCH proxmox-widget-toolkit 1/1] ui: disks: add 'mounted' column 2022-06-08 7:09 [pve-devel] [PATCH proxmox-widget-toolkit/pve-storage] replace '(mounted)' string by boolean field Hannes Laimer 2022-06-08 7:09 ` [pve-devel] [PATCH pve-storage 1/1] api2: disks: add mounted " Hannes Laimer @ 2022-06-08 7:10 ` Hannes Laimer 2022-06-15 8:58 ` [pve-devel] applied: " Wolfgang Bumiller 1 sibling, 1 reply; 5+ messages in thread From: Hannes Laimer @ 2022-06-08 7:10 UTC (permalink / raw) To: pve-devel Signed-off-by: Hannes Laimer <h.laimer@proxmox.com> --- src/panel/DiskList.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/panel/DiskList.js b/src/panel/DiskList.js index eb8b1a8..76d92cd 100644 --- a/src/panel/DiskList.js +++ b/src/panel/DiskList.js @@ -35,7 +35,7 @@ Ext.define('pmx-disk-list', { return undefined; }, }, - 'vendor', 'model', 'serial', 'rpm', 'type', 'wearout', 'health', + 'vendor', 'model', 'serial', 'rpm', 'type', 'wearout', 'health', 'mounted', ], idProperty: 'devpath', }); @@ -302,6 +302,13 @@ Ext.define('Proxmox.DiskList', { renderer: Ext.String.htmlEncode, dataIndex: 'status', }, + { + header: 'Mounted', + width: 60, + align: 'right', + renderer: Proxmox.Utils.format_boolean, + dataIndex: 'mounted', + }, { header: 'Wearout', width: 90, -- 2.30.2 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [pve-devel] applied: [PATCH proxmox-widget-toolkit 1/1] ui: disks: add 'mounted' column 2022-06-08 7:10 ` [pve-devel] [PATCH proxmox-widget-toolkit 1/1] ui: disks: add 'mounted' column Hannes Laimer @ 2022-06-15 8:58 ` Wolfgang Bumiller 0 siblings, 0 replies; 5+ messages in thread From: Wolfgang Bumiller @ 2022-06-15 8:58 UTC (permalink / raw) To: Hannes Laimer; +Cc: pve-devel applied, thanks On Wed, Jun 08, 2022 at 07:10:00AM +0000, Hannes Laimer wrote: > Signed-off-by: Hannes Laimer <h.laimer@proxmox.com> > --- > src/panel/DiskList.js | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/src/panel/DiskList.js b/src/panel/DiskList.js > index eb8b1a8..76d92cd 100644 > --- a/src/panel/DiskList.js > +++ b/src/panel/DiskList.js > @@ -35,7 +35,7 @@ Ext.define('pmx-disk-list', { > return undefined; > }, > }, > - 'vendor', 'model', 'serial', 'rpm', 'type', 'wearout', 'health', > + 'vendor', 'model', 'serial', 'rpm', 'type', 'wearout', 'health', 'mounted', > ], > idProperty: 'devpath', > }); > @@ -302,6 +302,13 @@ Ext.define('Proxmox.DiskList', { > renderer: Ext.String.htmlEncode, > dataIndex: 'status', > }, > + { > + header: 'Mounted', > + width: 60, > + align: 'right', > + renderer: Proxmox.Utils.format_boolean, > + dataIndex: 'mounted', > + }, > { > header: 'Wearout', > width: 90, > -- > 2.30.2 ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2022-06-15 8:58 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2022-06-08 7:09 [pve-devel] [PATCH proxmox-widget-toolkit/pve-storage] replace '(mounted)' string by boolean field Hannes Laimer 2022-06-08 7:09 ` [pve-devel] [PATCH pve-storage 1/1] api2: disks: add mounted " Hannes Laimer 2022-06-15 8:24 ` [pve-devel] applied: " Wolfgang Bumiller 2022-06-08 7:10 ` [pve-devel] [PATCH proxmox-widget-toolkit 1/1] ui: disks: add 'mounted' column Hannes Laimer 2022-06-15 8:58 ` [pve-devel] applied: " Wolfgang Bumiller
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox