httpTesting.expectOne('ui-api/iscsi/settings').flush(SETTINGS);
httpTesting.expectOne('ui-api/iscsi/portals').flush(PORTALS);
httpTesting.expectOne('ui-api/iscsi/version').flush(VERSION);
- httpTesting.expectOne('api/block/image?offset=0&limit=-1').flush(RBD_LIST);
+ httpTesting.expectOne('api/block/image?offset=0&limit=-1&search=&sort=%3Ename').flush(RBD_LIST);
httpTesting.expectOne('api/iscsi/target').flush(LIST_TARGET);
httpTesting.verify();
});
context.search = this.userConfig.search;
if (this.userConfig.sorts?.length) {
const sort = this.userConfig.sorts[0];
- context.sort = `${sort.dir == 'desc' ? '<' : '>'}${sort.prop}`;
+ context.sort = `${sort.dir === 'desc' ? '<' : '>'}${sort.prop}`;
}
this.fetchData.emit(context);
this.updating = true;
return joint_refs
@classmethod
- def rbd_pool_list(cls, pool_names: List[str], namespace=None, offset=0, limit=0, search='', sort=''):
+ def rbd_pool_list(cls, pool_names: List[str], namespace=None, offset=0, limit=0,
+ search='', sort=''):
offset = int(offset)
limit = int(limit)
# let's use -1 to denotate we want ALL images for now. Iscsi currently gathers
result = []
end = offset + limit
+ if len(sort) < 2:
+ sort = '>name'
descending = sort[0] == '<'
sort_by = sort[1:]
if sort_by == 'pool_name':