in web/src/api/hooks/models.ts [128:155]
export async function deployedPreprocessorsFetcher(
page = 1,
size = pageSizes._15,
search: string = ''
): Promise<PagedResponse<Model>> {
const filters = [
{ field: 'type', operator: Operators.EQ, value: 'preprocessing' },
{ field: 'status', operator: Operators.EQ, value: 'deployed' }
];
if (search) {
filters.push({
field: 'name',
operator: Operators.ILIKE,
value: `%${search.trim().toLowerCase()}%`
});
}
const body = {
pagination: { page_num: page, page_size: size },
filters,
sorting: [{ direction: SortingDirection.ASC, field: 'name' }]
};
return useBadgerFetch<PagedResponse<Model>>({
url: `${namespace}/models/search`,
method: 'post',
withCredentials: true
})(JSON.stringify(body));
}