ui: garbage-collection: use different state-id for global and per-datastore view
For one these different views have different columns shown, and more importantly: with the state being shared one could change sorting in the global view and then have that applied in the per-datastore view too, even if one cannot sort that view explicitly otherwise as there's just one row anyway. This small glitch might lead to a bit of confusion in the worst case and looks unpolished in any way. Note that I explicitly decided against encoding the datastore in the state-id for the per-datastore views for now, as most users will want to adapt layout (like column width) for all per-datastores views. Having to re-do that for every datastore separately can be quite a nuisance while the same user wanting different layout for each datastore in their per-datastore view seems rather to be an edge case. And we can always change this, so starting out with the slightly more restricted design that has less browser local data to be saved seems better w.r.t. maintainability. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
0385762859
commit
3c23c4c250
@ -16,7 +16,6 @@ Ext.define('PBS.config.GCJobView', {
|
||||
alias: 'widget.pbsGCJobView',
|
||||
|
||||
stateful: true,
|
||||
stateId: 'grid-gc-jobs-v1',
|
||||
allowDeselect: false,
|
||||
|
||||
title: gettext('Garbage Collect Jobs'),
|
||||
@ -218,6 +217,8 @@ Ext.define('PBS.config.GCJobView', {
|
||||
let me = this;
|
||||
let isSingleDatastore = !!me.datastore;
|
||||
|
||||
me.stateId = isSingleDatastore ? 'grid-gc-jobs-single' : 'grid-gc-jobs-v1';
|
||||
|
||||
for (let column of me.columns) {
|
||||
column.sortable = !isSingleDatastore;
|
||||
if (column.dataIndex === 'store') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user