diff --git a/app/ContainerListItem.react.js b/app/ContainerListItem.react.js
deleted file mode 100644
index 6ff3251262..0000000000
--- a/app/ContainerListItem.react.js
+++ /dev/null
@@ -1,84 +0,0 @@
-var async = require('async');
-var _ = require('underscore');
-var $ = require('jquery');
-var React = require('react/addons');
-var Router = require('react-router');
-var Modal = require('react-bootstrap/Modal');
-var RetinaImage = require('react-retina-image');
-var ModalTrigger = require('react-bootstrap/ModalTrigger');
-var ContainerModal = require('./ContainerModal.react');
-var Header = require('./Header.react');
-var docker = require('./docker');
-
-var ContainerListItem = React.createClass({
- componentWillMount: function () {
- this._start = Date.now();
- },
- handleItemMouseEnter: function () {
- var $action = $(this.getDOMNode()).find('.action');
- $action.show();
- },
- handleItemMouseLeave: function () {
- var $action = $(this.getDOMNode()).find('.action');
- $action.hide();
- },
- render: function () {
- var self = this;
- var container = this.props.container;
- var downloadingImage = null, downloading = false;
- var env = container.Config.Env;
- if (env.length) {
- var obj = _.object(env.map(function (e) {
- return e.split('=');
- }));
- if (obj.KITEMATIC_DOWNLOADING) {
- downloading = true;
- }
- downloadingImage = obj.KITEMATIC_DOWNLOADING_IMAGE || null;
- }
-
- var imageName = downloadingImage || container.Config.Image;
-
- // Synchronize all animations
- var style = {
- WebkitAnimationDelay: (self._start - Date.now()) + 'ms'
- };
-
- var state;
- if (downloading) {
- state =
;
- } else if (container.State.Running && !container.State.Paused) {
- state = ;
- } else if (container.State.Restarting) {
- state = ;
- } else if (container.State.Paused) {
- state = ;
- } else if (container.State.ExitCode) {
- // state = ;
- state = ;
- } else {
- state = ;
- }
-
- return (
-
-
- {state}
-
-
- {container.Name}
-
-
- {imageName}
-
-
-
-
-
-
-
- );
- }
-});
-
-module.exports = ContainerListItem;
diff --git a/browser/main.js b/browser/main.js
index ee51d8d578..a25aaa702d 100644
--- a/browser/main.js
+++ b/browser/main.js
@@ -1,7 +1,3 @@
-var child_process = require('child_process');
-var net = require('net');
-var os = require('os');
-var fs = require('fs');
var path = require('path');
var exec = require('exec');
@@ -23,6 +19,16 @@ if (argv.integration) {
process.env.TEST_TYPE = 'test';
}
+var mainWindow = new BrowserWindow({
+ width: 1000,
+ height: 700,
+ 'min-width': 1000,
+ 'min-height': 700,
+ resizable: true,
+ frame: false,
+ show: false
+});
+
app.on('activate-with-no-open-windows', function () {
if (mainWindow) {
mainWindow.show();
@@ -31,23 +37,14 @@ app.on('activate-with-no-open-windows', function () {
});
app.on('ready', function() {
- mainWindow = new BrowserWindow({
- width: 1000,
- height: 700,
- 'min-width': 1000,
- 'min-height': 700,
- resizable: true,
- frame: false,
- show: false
- });
if (argv.test) {
mainWindow.loadUrl('file://' + __dirname + '/../tests/tests.html');
} else {
mainWindow.loadUrl('file://' + __dirname + '/../build/index.html');
- app.on('will-quit', function (e) {
+ app.on('will-quit', function () {
if (saveVMOnQuit) {
- exec('VBoxManage controlvm boot2docker-vm savestate', function (stderr, stdout, code) {});
+ exec('VBoxManage controlvm boot2docker-vm savestate', function () {});
}
});
}
@@ -67,7 +64,7 @@ app.on('ready', function() {
if (process.env.NODE_ENV !== 'development' && !argv.test) {
autoUpdater.setFeedUrl('https://updates.kitematic.com/releases/latest?version=' + app.getVersion());
- autoUpdater.on('checking-for-update', function (e) {
+ autoUpdater.on('checking-for-update', function () {
console.log('Checking for update...');
});
@@ -76,12 +73,13 @@ app.on('ready', function() {
console.log(e);
});
- autoUpdater.on('update-not-available', function (e) {
+ autoUpdater.on('update-not-available', function () {
console.log('Update not available.');
});
autoUpdater.on('update-downloaded', function (e, releaseNotes, releaseName, releaseDate, updateURL) {
console.log('Update downloaded.');
+ console.log(releaseNotes, releaseName, releaseDate, updateURL);
mainWindow.webContents.send('notify', 'window:update-available');
});
diff --git a/lint.sh b/lint.sh
new file mode 100644
index 0000000000..ce9d6e33cb
--- /dev/null
+++ b/lint.sh
@@ -0,0 +1 @@
+jsxhint src/**/* && jsxhint browser/**/*