mirror of
https://gitlab.silvrtree.co.uk/martind2000/nci.git
synced 2025-01-12 11:35:07 +00:00
30 lines
602 B
JavaScript
30 lines
602 B
JavaScript
'use strict';
|
|
|
|
define([
|
|
'react',
|
|
'reflux',
|
|
'app/stores/terminal',
|
|
'templates/app/components/terminal/terminal'
|
|
], function(React, Reflux, terminalStore, template) {
|
|
var Component = React.createClass({
|
|
mixins: [Reflux.ListenerMixin],
|
|
componentDidMount: function() {
|
|
this.listenTo(terminalStore, this.updateItems);
|
|
},
|
|
updateItems: function(data) {
|
|
// listen just our console update
|
|
if (data.buildId === this.props.build) {
|
|
this.setState({data: data});
|
|
}
|
|
},
|
|
render: template,
|
|
getInitialState: function() {
|
|
return {
|
|
data: ''
|
|
};
|
|
}
|
|
});
|
|
|
|
return Component;
|
|
});
|