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!
Преглед изворни кода

Renamed wbApplyRequestOrdering to more universal wpApplyPromiseOrdering.

master
Stanislaw Adaszewski пре 4 година
родитељ
комит
e19c17708a
3 измењених фајлова са 9 додато и 5 уклоњено
  1. +3
    -1
      frontend/src/js/component/wb-arvados-crumbs.js
  2. +4
    -2
      frontend/src/js/misc/make-arvados-request.js
  3. +2
    -2
      frontend/src/js/misc/wb-apply-promise-ordering.js

+ 3
- 1
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() {


+ 4
- 2
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;
}


frontend/src/js/misc/wb-apply-request-ordering.js → 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;

Loading…
Откажи
Сачувај