Fixed karoke + pipeline data bloat (#397)

* `this` is now bound for _onSseEvent
* pipeline data now no longer inlines activies
This commit is contained in:
Ivan Meredith 2016-08-09 16:31:08 +12:00 committed by GitHub
parent 74826326fb
commit 05ac87f86f
3 changed files with 5 additions and 6 deletions

View File

@ -44,7 +44,8 @@ export class RunDetailsPipeline extends Component {
this.state = { followAlong: props && props.result && props.result.state !== 'FINISHED' };
this.listener = {};
this._handleKeys = this._handleKeys.bind(this);
this.onScrollHandler = this.onScrollHandler.bind(this);
this._onScrollHandler = this._onScrollHandler.bind(this);
this._onSseEvent = this._onSseEvent.bind(this);
}
componentWillMount() {
@ -151,14 +152,14 @@ export class RunDetailsPipeline extends Component {
// need to register handler to step out of karaoke mode
// we bail out on scroll up
onScrollHandler(elem) {
_onScrollHandler(elem) {
if (elem.deltaY < 0 && this.state.followAlong) {
this.setState({ followAlong: false });
}
}
// Listen for pipeline flow node events.
// We filter them only for steps and the end event all other we let pass
// Listen for pipeline flow node events.
// We filter them only for steps and the end event all other we let pass
_onSseEvent(event) {
const { fetchNodes, fetchSteps } = this.props;
const jenkinsEvent = event.jenkins_event;

View File

@ -351,7 +351,6 @@ public class MultiBranchPipelineImpl extends BlueMultiBranchPipeline {
}
}
@Exported(inline = true)
@Navigable
public Container<Resource> getActivities() {
return Containers.fromResource(getLink(), Lists.newArrayList(Iterators.concat(getQueue().iterator(), getRuns().iterator())));

View File

@ -185,7 +185,6 @@ public class PipelineImpl extends BluePipeline {
}
@Exported(inline = true)
@Navigable
public Container<Resource> getActivities() {
return Containers.fromResource(getLink(),Lists.newArrayList(Iterators.concat(getQueue().iterator(), getRuns().iterator())));