From e19c17708ad766c9da48413f6eb07febca4b3432 Mon Sep 17 00:00:00 2001 From: Stanislaw Adaszewski Date: Thu, 6 Feb 2020 08:01:22 +0100 Subject: [PATCH] Renamed wbApplyRequestOrdering to more universal wpApplyPromiseOrdering. --- frontend/src/js/component/wb-arvados-crumbs.js | 4 +++- frontend/src/js/misc/make-arvados-request.js | 6 ++++-- ...ply-request-ordering.js => wb-apply-promise-ordering.js} | 4 ++-- 3 files changed, 9 insertions(+), 5 deletions(-) rename frontend/src/js/misc/{wb-apply-request-ordering.js => wb-apply-promise-ordering.js} (91%) diff --git a/frontend/src/js/component/wb-arvados-crumbs.js b/frontend/src/js/component/wb-arvados-crumbs.js index f4612f1..233be8e 100644 --- a/frontend/src/js/component/wb-arvados-crumbs.js +++ b/frontend/src/js/component/wb-arvados-crumbs.js @@ -16,7 +16,9 @@ class WBArvadosCrumbs extends Component { let { arvHost, arvToken } = this.props.app.state; let prom = fetchObjectParents(arvHost, arvToken, this.props.uuid); - prom = prom.then(parents => this.setState({ 'items': parents })); + prom = prom.then(parents => { + this.setState({ 'items': parents }); + }); } componentDidMount() { diff --git a/frontend/src/js/misc/make-arvados-request.js b/frontend/src/js/misc/make-arvados-request.js index 0ce66a0..7ed69a5 100644 --- a/frontend/src/js/misc/make-arvados-request.js +++ b/frontend/src/js/misc/make-arvados-request.js @@ -1,4 +1,6 @@ -import wbApplyRequestOrdering from 'wb-apply-request-ordering'; +import wbApplyPromiseOrdering from 'wb-apply-promise-ordering'; + +const requestPromiseOrdering = {}; function makeArvadosRequest(arvHost, arvToken, endpoint, params={}) { const defaultParams = { @@ -37,7 +39,7 @@ function makeArvadosRequest(arvHost, arvToken, endpoint, params={}) { xhr.send(data); }); - // prom = wbApplyRequestOrdering(prom); + prom = wbApplyPromiseOrdering(prom, requestPromiseOrdering); return prom; } diff --git a/frontend/src/js/misc/wb-apply-request-ordering.js b/frontend/src/js/misc/wb-apply-promise-ordering.js similarity index 91% rename from frontend/src/js/misc/wb-apply-request-ordering.js rename to frontend/src/js/misc/wb-apply-promise-ordering.js index 860fd77..161b0db 100644 --- a/frontend/src/js/misc/wb-apply-request-ordering.js +++ b/frontend/src/js/misc/wb-apply-promise-ordering.js @@ -1,6 +1,6 @@ const defaultOrderRegistry = {}; -function wbApplyRequestOrdering(prom, orderRegistry) { +function wbApplyPromiseOrdering(prom, orderRegistry) { let orderId; if (!orderRegistry) @@ -63,4 +63,4 @@ function wbApplyRequestOrdering(prom, orderRegistry) { return prom; } -export default wbApplyRequestOrdering; +export default wbApplyPromiseOrdering;