IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an email to s dot adaszewski at gmail dot com. User accounts are meant only to report issues and/or generate pull requests. This is a purpose-specific Git hosting for ADARED projects. Thank you for your understanding!
瀏覽代碼

Add ability to cancel container_requests

pull/1/head
父節點
當前提交
dff95fab2d
共有 2 個檔案被更改,包括 16 行新增0 行删除
  1. +1
    -0
      frontend/src/js/component/wb-process-dashboard.js
  2. +15
    -0
      frontend/src/js/component/wb-process-listing.js

+ 1
- 0
frontend/src/js/component/wb-process-dashboard.js 查看文件

@@ -80,6 +80,7 @@ class WBProcessDashboard extends Component {
const filters = [ [ 'uuid', 'in', uuids ] ];
return getAll(ofs => makeArvadosRequest(arvHost, arvToken,
'/arvados/v1/containers?filters=' + encodeURIComponent(JSON.stringify(filters)) +
'&order=' + encodeURIComponent(JSON.stringify([ 'uuid asc' ])) +
'&offset=' + ofs));
});
prom = prom.then(cl => {


+ 15
- 0
frontend/src/js/component/wb-process-listing.js 查看文件

@@ -27,6 +27,18 @@ class WBProcessListing extends Component {
this.fetchItems();
}
cancelProcess(uuid) {
const { app } = this.props;
const { arvHost, arvToken } = app.state;
let prom = makeArvadosRequest(arvHost, arvToken,
'/arvados/v1/container_requests/' + encodeURIComponent(uuid),
{ method: 'PUT', data: JSON.stringify({ priority: 0 }) });
prom = prom.then(() => {
this.setState({ rows: maskRows(this.state.rows) });
this.fetchItems();
});
}
prepareRows(requests, containerLookup, ownerLookup, outputLookup) {
const { app, renderRenameLink, renderDeleteButton,
renderSelectionCell, renderSharingButton,
@@ -51,6 +63,9 @@ class WBProcessListing extends Component {
wbFormatDate(item['created_at']),
( <WBNameAndUuid app={ app } uuid={ item['output_uuid'] } /> ),
(<div>
<button class="btn btn-outline-warning m-1" onclick={ () => this.cancelProcess(item.uuid) }>
<i class="fas fa-stop-circle"></i>
</button>
{ renderDeleteButton(item, () => this.fetchItems()) }
{ renderSharingButton(item) }
</div>)


Loading…
取消
儲存