Skip to content
Snippets Groups Projects
Commit 957366e3 authored by ml bonhomme's avatar ml bonhomme :bee: Committed by Erwan Rouchet
Browse files

Only list non archived models by default

parent 4c35f26f
No related branches found
No related tags found
1 merge request!1610Only list non archived models by default
......@@ -18,6 +18,11 @@ export interface ModelListParameters extends PageNumberPaginationParameters {
* Filter models by case-insensitive name
*/
name?: string
/**
* Filter models according to whether or not they are archived
*/
archived?: boolean
}
export type ModelVersionEditParameters = Partial<Pick<ModelVersion, 'description' | 'tag' | 'parent' | 'configuration'>>
......
......@@ -160,7 +160,7 @@ export default defineComponent({
async updateModelsPage () {
this.loading = true
try {
const payload: ModelListParameters = { page: this.page }
const payload: ModelListParameters = { page: this.page, archived: false }
if (this.nameFilter) payload.name = this.nameFilter
if (this.compatibleWorkerId && !this.allModels) payload.compatible_worker = this.compatibleWorkerId
this.modelsPage = await this.listModels(payload)
......
......@@ -169,7 +169,7 @@ export default defineComponent({
this.loading = true
try {
this.selectedModel = null
const payload: ModelListParameters = { page: this.page }
const payload: ModelListParameters = { page: this.page, archived: false }
if (this.nameFilter) payload.name = this.nameFilter
if (this.compatibleWorkerId && !this.allModels) payload.compatible_worker = this.compatibleWorkerId
this.modelsPage = await this.listModels(payload)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment