Skip to content

Commit

Permalink
8693wugha: disable removing running / pending reports. Fix report rem…
Browse files Browse the repository at this point in the history
…oval on screen
  • Loading branch information
tomolopolis committed Mar 29, 2024
1 parent 3318cf0 commit 16c52fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion webapp/api/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,7 +698,7 @@ def remove_metrics_job(request, report_id: int):
pass
task.delete()
logger.info('Completed metrics job deleted - report ID: %s', report_id)
return Response(200, 'task / report deleted')
return Response('task / report deleted', 200)


@api_view(http_method_names=['GET', 'PUT'])
Expand Down
8 changes: 6 additions & 2 deletions webapp/frontend/src/views/MetricsHome.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
</span>
</template>
<template #cell(cleanup)="data">
<button class="btn btn-outline-danger" @click="confDeleteReportModal = data.item">
<button class="btn btn-outline-danger" @click="confDeleteReportModal = data.item"
:disabled="data.item.status === 'pending' || data.item.status === 'running'">
<font-awesome-icon icon="times"></font-awesome-icon>
</button>
</template>
Expand Down Expand Up @@ -130,7 +131,10 @@ export default {
<router-link :to="{ name: 'train-annotations', params: { projectId: '${i}' }}">${this.projects[i].name}</router-link>
</div>`
} else {
outEl += `<div>${i}</div>`
outEl += `
<div>
${i} <font-awesome-icon icon="spinner" spin></font-awesome-icon>
</div>`
}
})
return `<div>${outEl}</div>`
Expand Down

0 comments on commit 16c52fe

Please sign in to comment.