| ... | @@ -19,6 +19,7 @@ export default class pipelinesMediator { |
... | @@ -19,6 +19,7 @@ export default class pipelinesMediator { |
|
|
this.poll = new Poll({
|
|
this.poll = new Poll({
|
|
|
resource: this.service,
|
|
resource: this.service,
|
|
|
method: 'getPipeline',
|
|
method: 'getPipeline',
|
|
|
|
data: this.store.state.expandedPipelines ? this.getExpandedParameters() : undefined,
|
|
|
successCallback: this.successCallback.bind(this),
|
|
successCallback: this.successCallback.bind(this),
|
|
|
errorCallback: this.errorCallback.bind(this),
|
|
errorCallback: this.errorCallback.bind(this),
|
|
|
});
|
|
});
|
| ... | @@ -56,6 +57,19 @@ export default class pipelinesMediator { |
... | @@ -56,6 +57,19 @@ export default class pipelinesMediator { |
|
|
.getPipeline()
|
|
.getPipeline()
|
|
|
.then(response => this.successCallback(response))
|
|
.then(response => this.successCallback(response))
|
|
|
.catch(() => this.errorCallback())
|
|
.catch(() => this.errorCallback())
|
|
|
.finally(() => this.poll.restart());
|
|
.finally(() =>
|
|
|
|
this.poll.restart(
|
|
|
|
this.store.state.expandedPipelines ? this.getExpandedParameters() : undefined,
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Backend expects paramets in the following format: `expanded[]=id&expanded[]=id`
|
|
|
|
*/
|
|
|
|
getExpandedParameters() {
|
|
|
|
return {
|
|
|
|
expanded: this.store.state.expandedPipelines,
|
|
|
|
};
|
|
|
}
|
|
}
|
|
|
} |
|
} |