diff --git a/static/js/app/components/builds/list.js b/static/js/app/components/builds/list.js
deleted file mode 100644
index 361528d..0000000
--- a/static/js/app/components/builds/list.js
+++ /dev/null
@@ -1,39 +0,0 @@
-'use strict';
-
-define([
- 'react',
- 'reflux',
- 'underscore',
- './item',
- 'app/actions/build',
- 'app/stores/builds',
- 'templates/app/components/builds/list'
-], function(React, Reflux, _, Item, BuildActions, buildsStore, template) {
- template = template.locals({
- Item: Item
- });
-
- var Component = React.createClass({
- mixins: [
- Reflux.connectFilter(buildsStore, 'items', function(items) {
- var projectName = this.props.projectName;
- if (projectName) {
- return _(items).filter(function(item) {
- return item.project && item.project.name === projectName;
- });
- } else {
- return items;
- }
- })
- ],
- onShowMoreBuilds: function(projectName) {
- BuildActions.readAll({
- projectName: projectName,
- limit: this.state.items.length + 20
- });
- },
- render: template
- });
-
- return Component;
-});
diff --git a/static/js/app/components/builds/view.js b/static/js/app/components/builds/view.js
deleted file mode 100644
index 0531024..0000000
--- a/static/js/app/components/builds/view.js
+++ /dev/null
@@ -1,66 +0,0 @@
-'use strict';
-
-define([
- 'react',
- 'react-router',
- 'reflux',
- 'app/actions/build',
- 'app/stores/build',
- 'app/components/terminal/terminal',
- 'app/components/buildSidebar/index',
- 'templates/app/components/builds/view',
- 'app/components/common/index'
-], function(
- React, Router, Reflux, BuildActions, buildStore, TerminalComponent,
- BuildSidebar, template, CommonComponents
-) {
- template = template.locals({
- DateTime: CommonComponents.DateTime,
- Duration: CommonComponents.Duration,
- Scm: CommonComponents.Scm,
- Terminal: TerminalComponent,
- Link: Router.Link,
- BuildSidebar: BuildSidebar
- });
-
- var Component = React.createClass({
- mixins: [Reflux.ListenerMixin],
- statics: {
- willTransitionTo: function(transition, params, query) {
- BuildActions.read(Number(params.id));
- }
- },
- componentDidMount: function() {
- this.listenTo(buildStore, this.updateBuild);
- },
- componentWillReceiveProps: function(nextProps) {
- // reset console status when go from build page to another build
- // page (did mount and mount not called in this case)
- if (Number(nextProps.params.id) !== this.state.build.id) {
- this.setState({showConsole: this.getInitialState().showConsole});
- }
- },
- updateBuild: function(build) {
- if (build) {
- BuildActions.readAll({projectName: build.project.name});
- }
- this.setState({build: build});
- },
- render: template,
- getInitialState: function() {
- return {
- build: null,
- showConsole: false
- };
- },
- toggleConsole: function() {
- var consoleState = !this.state.showConsole;
- if (consoleState) {
- BuildActions.readTerminalOutput(this.state.build);
- }
- this.setState({showConsole: consoleState});
- }
- });
-
- return Component;
-});
diff --git a/static/js/app/components/terminal/terminal.js b/static/js/app/components/terminal/terminal.js
deleted file mode 100644
index 83ca011..0000000
--- a/static/js/app/components/terminal/terminal.js
+++ /dev/null
@@ -1,131 +0,0 @@
-'use strict';
-
-define([
- 'underscore',
- 'react',
- 'reflux',
- 'app/stores/terminal',
- 'app/stores/build',
- 'ansi_up',
- 'templates/app/components/terminal/terminal'
-], function(
- _,
- React,
- Reflux,
- terminalStore,
- buildStore,
- ansiUp,
- template
-) {
- var Component = React.createClass({
- mixins: [Reflux.ListenerMixin],
-
- shouldScrollBottom: true,
- data: [],
- linesCount: 0,
-
- componentDidMount: function() {
- this.listenTo(terminalStore, this.updateItems);
- var node = document.getElementsByClassName('terminal')[0];
- this.initialScrollPosition = node.getBoundingClientRect().top;
- if (this.props.showPreloader) {
- this.getTerminal().insertAdjacentHTML('afterend',
- ''
- );
-
- this.listenTo(buildStore, function(build) {
- if (build.completed) {
- this.removePreloader();
- }
- });
- }
-
- window.onscroll = this.onScroll;
- },
- removePreloader: function() {
- var preloader = document.getElementsByClassName(
- 'terminal_preloader'
- )[0];
- preloader.parentNode.removeChild(preloader);
- },
- componentWillUnmount: function() {
- window.onscroll = null;
- },
- prepareRow: function(row) {
- return ansiUp.ansi_to_html(row.replace('\r', ''));
- },
- prepareOutput: function(output) {
- var self = this;
- return output.map(function(row) {
- return self.prepareRow(row);
- });
- },
- getTerminal: function() {
- return document.getElementsByClassName('terminal')[0];
- },
- getBody: function() {
- return document.getElementsByTagName('body')[0];
- },
- onScroll: function() {
- var node = this.getTerminal(),
- body = this.getBody();
-
- this.shouldScrollBottom = window.innerHeight + body.scrollTop >=
- node.offsetHeight + this.initialScrollPosition;
- },
- ensureScrollPosition: function() {
- if (this.shouldScrollBottom) {
- var node = this.getTerminal(),
- body = this.getBody();
-
- body.scrollTop = this.initialScrollPosition + node.offsetHeight;
- }
- },
- makeCodeLineContent: function(line) {
- return '' + '' +
- '