From 7b507067e9414e5ae070dc015244a70e13c1404b Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Thu, 4 Jun 2015 18:00:11 -0700 Subject: [PATCH 01/29] Fixed bug where react.js would be loaded twice on windows --- index.html | 2 +- src/main.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 src/main.js diff --git a/index.html b/index.html index 69fafdb727..699c7186f0 100644 --- a/index.html +++ b/index.html @@ -6,6 +6,6 @@ Kitematic - + diff --git a/src/main.js b/src/main.js new file mode 100644 index 0000000000..36c3352e9f --- /dev/null +++ b/src/main.js @@ -0,0 +1 @@ +import './app'; From ce2452bffd90efb042b5d7f27f30a2b0c83426c9 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Thu, 4 Jun 2015 18:10:06 -0700 Subject: [PATCH 02/29] Move binary download code to gulp --- gulpfile.js | 95 +++++++++++++++++++++++++++++++++++++++++++++------ util/deps | 46 ------------------------- util/deps.ps1 | 26 -------------- 3 files changed, 84 insertions(+), 83 deletions(-) delete mode 100755 util/deps delete mode 100644 util/deps.ps1 diff --git a/gulpfile.js b/gulpfile.js index b52142baa2..f6d7175b8e 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -14,6 +14,9 @@ var plumber = require('gulp-plumber'); var runSequence = require('run-sequence'); var shell = require('gulp-shell'); var sourcemaps = require('gulp-sourcemaps'); +var execFile = require('child_process').execFile; +var request = require('request'); +var path = require('path'); var dependencies = Object.keys(packagejson.dependencies); var argv = require('minimist')(process.argv.slice(2)); @@ -175,16 +178,86 @@ gulp.task('settings', function () { string_src('settings.json', JSON.stringify(settings)).pipe(gulp.dest('dist/osx/' + options.appFilename.replace(' ', '\ ').replace('(','\(').replace(')','\)') + '/Contents/Resources/app')); }); -gulp.task('download-deps', function () { - if(process.platform === 'win32') { - return gulp.src('').pipe( - shell(['powershell.exe -ExecutionPolicy unrestricted -File util\\deps.ps1']) - ); - } else { - return gulp.src('').pipe( - shell(['./util/deps']) - ); +var version = function (str) { + var match = str.match(/(\d+\.\d+\.\d+)/); + if (match) { + return match[1]; + } else { + return null; + } +}; + +gulp.task('download-docker', function (cb) { + if (process.platform === 'win32' && fs.existsSync(path.join('resources', 'docker.exe'))) { + cb(); + return; + } + + execFile(path.join('resources', 'docker'), ['-v'], function (err, stdout, stderr) { + var currentVersion = version(stdout); + if (currentVersion && currentVersion === packagejson['docker-version']) { + cb(); + return; } + + gutil.log(gutil.colors.green('Downloading Docker')); + + if(process.platform === 'win32') { + request('https://master.dockerproject.com/windows/amd64/docker-1.7.0-dev.exe').pipe(fs.createWriteStream('./resources/docker.exe')).on('end', cb); + } else { + request('https://get.docker.com/builds/Darwin/x86_64/docker-' + packagejson['docker-version'] + '.tgz').pipe(fs.createWriteStream('./resources/docker')).on('end', cb); + } + }); +}); + +gulp.task('download-docker-machine', function (cb) { + execFile(path.join('resources', 'docker-machine'), ['-v'], function (err, stdout, stderr) { + var currentVersion = version(stdout); + if (currentVersion && currentVersion === version(packagejson['docker-machine-version'])) { + cb(); + return; + } + + gutil.log(gutil.colors.green('Downloading Docker Machine')); + + if(process.platform === 'win32') { + request('https://github.com/docker/machine/releases/download/v' + packagejson['docker-machine-version'] + '/docker-machine_windows-amd64.exe') + .pipe(fs.createWriteStream('./resources/docker-machine.exe')).on('end', function () {cb()}); + } else { + request('https://github.com/docker/machine/releases/download/v' + packagejson['docker-machine-version'] + 'docker-machine_darwin-amd64') + .pipe(fs.createWriteStream('./resources/docker-machine')).on('end', function () {cb()}); + } + }); +}); + +gulp.task('download-docker-compose', function (cb) { + execFile(path.join('resources', 'docker-compose'), ['--version'], function (err, stdout, stderr) { + var currentVersion = version(stdout); + if (currentVersion && currentVersion === packagejson['docker-compose-version']) { + cb(); + return; + } + + if(process.platform === 'win32') { + // Todo: install windows version of compose + cb(); + } else { + gutil.log(gutil.colors.green('Downloading Docker Compose')); + request('https://github.com/docker/compose/releases/download/' + packagejson['docker-compose-version'] + '/docker-compose-Darwin-x86_64') + .pipe(fs.createWriteStream('./resources/docker-compose')).on('end', cb); + } + }); +}); + +gulp.task('download-boot2docker-iso', function (cb) { + var b2dFile = path.join('resources', 'boot2docker-' + packagejson['docker-version'] + '.iso'); + if (!fs.existsSync(b2dFile)) { + gutil.log(gutil.colors.green('Downloading Boot2Docker iso')); + request('https://github.com/boot2docker/boot2docker/releases/download/v' + packagejson['docker-version'] + '/boot2docker.iso') + .pipe(fs.createWriteStream(b2dFile)).on('end', cb); + } else { + cb(); + } }); gulp.task('reset', function () { @@ -200,10 +273,10 @@ gulp.task('reset', function () { }); gulp.task('release', function () { - runSequence('download-deps', 'download', 'dist', ['copy', 'images', 'js', 'styles', 'settings'], 'sign', 'zip'); + runSequence('download-docker', 'download-docker-machine', 'download-docker-compose', 'download-boot2docker-iso', 'download', 'dist', ['copy', 'images', 'js', 'styles', 'settings'], 'sign', 'zip'); }); -gulp.task('default', ['download-deps', 'download', 'copy', 'js', 'images', 'styles'], function () { +gulp.task('default', ['download-docker', 'download-docker-machine', 'download-docker-compose', 'download-boot2docker-iso', 'download', 'copy', 'js', 'images', 'styles'], function () { gulp.watch('src/**/*.js', ['js']); gulp.watch('index.html', ['copy']); gulp.watch('styles/**/*.less', ['styles']); diff --git a/util/deps b/util/deps deleted file mode 100755 index a2f364c97a..0000000000 --- a/util/deps +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/bash -DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -BASE=$DIR/.. -DOCKER_VERSION=$(node -pe "JSON.parse(process.argv[1])['docker-version']" "$(cat $BASE/package.json)") -DOCKER_MACHINE_VERSION=$(node -pe "JSON.parse(process.argv[1])['docker-machine-version']" "$(cat $BASE/package.json)") -DOCKER_COMPOSE_VERSION=$(node -pe "JSON.parse(process.argv[1])['docker-compose-version']" "$(cat $BASE/package.json)") -CURRENT_DOCKER_VERSION=$($BASE/resources/docker -v | cut -d ',' -f1 | awk '{print $3}' | cut -d '-' -f1) -CURRENT_DOCKER_MACHINE_VERSION=$($BASE/resources/docker-machine -v | cut -d ',' -f1 | awk '{print $3}' | cut -d '-' -f1) -CURRENT_DOCKER_COMPOSE_VERSION=$($BASE/resources/docker-compose --version | cut -d ',' -f1 | awk '{print $2}' | cut -d '-' -f1) -BOOT2DOCKER_FILE=boot2docker-$DOCKER_VERSION.iso - -pushd $BASE/resources > /dev/null - -if [ "$DOCKER_VERSION" != "$CURRENT_DOCKER_VERSION" ]; then - echo "-----> Downloading Docker CLI..." - rm -rf docker - rm -rf docker-* - curl -L -o docker-$DOCKER_VERSION.tgz https://get.docker.com/builds/Darwin/x86_64/docker-$DOCKER_VERSION.tgz - tar xvzf docker-$DOCKER_VERSION.tgz --strip=3 - rm docker-$DOCKER_VERSION.tgz - chmod +x docker -fi - -if [ "$DOCKER_MACHINE_VERSION" != "$CURRENT_DOCKER_MACHINE_VERSION" ]; then - echo "-----> Downloading Docker Machine CLI..." - rm -rf docker-machine - rm -rf docker-machine-* - curl -L -o docker-machine https://github.com/docker/machine/releases/download/v$DOCKER_MACHINE_VERSION/docker-machine_darwin-amd64 - chmod +x docker-machine -fi - -if [ "$DOCKER_COMPOSE_VERSION" != "$CURRENT_DOCKER_COMPOSE_VERSION" ]; then - echo "-----> Downloading Docker Compose CLI..." - rm -rf docker-compose - curl -L -o docker-compose https://github.com/docker/compose/releases/download/$DOCKER_COMPOSE_VERSION/docker-compose-Darwin-x86_64 - chmod +x docker-compose -fi - -if [ ! -f $BOOT2DOCKER_FILE ]; then - echo "-----> Downloading Boot2Docker iso..." - rm -rf boot2docker-* - curl -L -o $BOOT2DOCKER_FILE https://github.com/boot2docker/boot2docker/releases/download/v$DOCKER_VERSION/boot2docker.iso -fi - - -popd > /dev/null diff --git a/util/deps.ps1 b/util/deps.ps1 deleted file mode 100644 index ba08d6c2ec..0000000000 --- a/util/deps.ps1 +++ /dev/null @@ -1,26 +0,0 @@ -$scriptpath = $MyInvocation.MyCommand.Path -$dir = Split-Path $scriptpath -$BasePath = $dir + '\..\' -$packageJson = get-content ($BasePath + 'package.json') -[System.Reflection.Assembly]::LoadWithPartialName("System.Web.Extensions") > $null -$serializer = New-Object System.Web.Script.Serialization.JavaScriptSerializer -$packageJsonContent = $serializer.DeserializeObject($packageJson) -$webclient = New-Object System.Net.WebClient - -$DOCKER_MACHINE_CLI_VERSION = $packageJsonContent['docker-machine-version'] -$DOCKER_CLI_VERSION = $packageJsonContent['docker-version'] - - -if(-Not (test-path ($BasePath + '\resources\docker'))) { - echo "-----> Downloading Docker CLI..." - $source = "https://master.dockerproject.com/windows/amd64/docker.exe" - $destination = $BasePath + "\resources\docker" - $webclient.DownloadFile($source, $destination) -} - -if(-Not (test-path ($BasePath + '\resources\docker-machine'))) { - echo "-----> Downloading Docker Machine CLI..." - $source = "https://github.com/docker/machine/releases/download/v" + $DOCKER_MACHINE_VERSION+ "/docker-machine_windows-amd64.exe" - $destination = $BasePath + "\resources\docker-machine" - $webclient.DownloadFile($source, $destination) -} From 4d82006b57b9c50e400057e1024bc08d6124a41f Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Thu, 4 Jun 2015 19:08:41 -0700 Subject: [PATCH 03/29] Fixed bug where an error pulling repos would instead show an unrelated 404 error --- src/components/ContainerHome.react.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ContainerHome.react.js b/src/components/ContainerHome.react.js index 6b63bab4b3..18d0f97ffc 100644 --- a/src/components/ContainerHome.react.js +++ b/src/components/ContainerHome.react.js @@ -45,7 +45,7 @@ var ContainerHome = React.createClass({ body = (

An error occurred:

-

{this.props.container.Error.message}

+

{this.props.container.Error}

If you feel that this error is invalid, please file a ticket on our GitHub repo.

From 44412ad26a445b1bdf29e3296edabc2b474cdee1 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Thu, 4 Jun 2015 19:15:22 -0700 Subject: [PATCH 04/29] Use babel-jest to preprocess test files --- jest-unit.json | 12 ++++++------ package.json | 7 ++++--- util/preprocessor.js | 14 -------------- 3 files changed, 10 insertions(+), 23 deletions(-) delete mode 100644 util/preprocessor.js diff --git a/jest-unit.json b/jest-unit.json index 0981c13ebf..bc91f0f679 100644 --- a/jest-unit.json +++ b/jest-unit.json @@ -1,5 +1,5 @@ { - "scriptPreprocessor": "/util/preprocessor.js", + "scriptPreprocessor": "/node_modules/babel-jest", "setupEnvScriptFile": "/util/testenv.js", "setupTestFrameworkScriptFile": "/util/prepare.js", "unmockedModulePathPatterns": [ @@ -9,10 +9,10 @@ "net", "crypto", "babel", - "/node_modules/.*JSONStream", - "/node_modules/object-assign", - "/node_modules/underscore", - "/node_modules/bluebird", - "/node_modules/source-map-support" + "bluebird", + "object-assign", + "underscore", + "source-map-support", + "/node_modules/.*JSONStream" ] } diff --git a/package.json b/package.json index 1d8db74abf..f33814e197 100644 --- a/package.json +++ b/package.json @@ -26,9 +26,9 @@ } ], "docker-version": "1.6.2", - "docker-machine-version": "0.2.0", + "docker-machine-version": "0.3.0-rc1", "docker-compose-version": "1.2.0", - "electron-version": "0.26.0", + "electron-version": "0.27.2", "virtualbox-version": "4.3.28", "virtualbox-filename": "VirtualBox-4.3.28.pkg", "virtualbox-filename-win": "VirtualBox-4.3.28.exe", @@ -57,7 +57,7 @@ "react": "^0.13.1", "react-bootstrap": "^0.20.3", "react-retina-image": "^1.1.2", - "react-router": "^0.13.2", + "react-router": "^0.13.3", "request": "^2.55.0", "request-progress": "^0.3.1", "rimraf": "^2.3.2", @@ -66,6 +66,7 @@ }, "devDependencies": { "babel": "^5.1.10", + "babel-jest": "^5.2.0", "gulp": "^3.8.11", "gulp-babel": "^5.1.0", "gulp-changed": "^1.2.1", diff --git a/util/preprocessor.js b/util/preprocessor.js deleted file mode 100644 index a284c1eacc..0000000000 --- a/util/preprocessor.js +++ /dev/null @@ -1,14 +0,0 @@ -var babel = require('babel'); -var fs = require('fs'); -var crypto = require('crypto'); - -module.exports = { - process: function(src, filename) { - if (filename.indexOf('node_modules') !== -1) { - return src; - } - var compiled = babel.transform(src, {filename: filename, sourceMap: true}); - fs.writeFileSync('/tmp/' + crypto.createHash('md5').update(filename).digest('hex') + '.map', JSON.stringify(compiled.map)); - return compiled.code; - } -}; From 94113feaedaa5dc4697fbbc7c789f5afd62a8c7c Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Thu, 4 Jun 2015 19:16:43 -0700 Subject: [PATCH 05/29] Do not save sourcemaps --- util/prepare.js | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/util/prepare.js b/util/prepare.js index 2aa87fd0a3..d293d5d710 100644 --- a/util/prepare.js +++ b/util/prepare.js @@ -1,14 +1 @@ require.requireActual('babel/polyfill'); -require.requireActual('source-map-support').install({ - retrieveSourceMap: function(filename) { - if (filename.indexOf('node_modules') === -1) { - try { - return { - map: require.requireActual('fs').readFileSync('/tmp/' + require('crypto').createHash('md5').update(filename).digest('hex') + '.map', 'utf8') - }; - } catch (err) { - return undefined; - } - } - } -}); From 47967507dcd488b828ef21cb7d088ed2a6215375 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Thu, 4 Jun 2015 19:25:22 -0700 Subject: [PATCH 06/29] Windows installer --- src/stores/SetupStore.js | 6 +++++- src/utils/DockerMachineUtil.js | 6 +++++- src/utils/DockerUtil.js | 5 +++-- src/utils/Util.js | 14 ++++---------- src/utils/VirtualBoxUtil.js | 6 +----- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/src/stores/SetupStore.js b/src/stores/SetupStore.js index f97a8e7cbb..ddedcb3545 100644 --- a/src/stores/SetupStore.js +++ b/src/stores/SetupStore.js @@ -41,7 +41,11 @@ var _steps = [{ yield virtualBox.killall(); progressCallback(50); // TODO: detect when the installation has started so we can simulate progress try { - yield util.exec(setupUtil.macSudoCmd(setupUtil.installVirtualBoxCmd())); + if (util.isWindows()) { + yield util.exec([path.join(util.supportDir(), virtualBox.filename())]); + } else { + yield util.exec(setupUtil.macSudoCmd(setupUtil.installVirtualBoxCmd())); + } } catch (err) { throw null; } diff --git a/src/utils/DockerMachineUtil.js b/src/utils/DockerMachineUtil.js index 49ac2b399d..0875882d5c 100644 --- a/src/utils/DockerMachineUtil.js +++ b/src/utils/DockerMachineUtil.js @@ -57,7 +57,11 @@ var DockerMachine = { }, create: function () { var dockerversion = util.packagejson()['docker-version']; - return util.exec([this.command(), '-D', 'create', '-d', 'virtualbox', '--virtualbox-boot2docker-url', path.join(process.cwd(), 'resources', 'boot2docker-' + dockerversion + '.iso'), '--virtualbox-memory', '2048', NAME]); + if (util.isWindows()) { + return util.exec([this.command(), '-D', 'create', '-d', 'virtualbox', '--virtualbox-memory', '2048', NAME]); + } else { + return util.exec([this.command(), '-D', 'create', '-d', 'virtualbox', '--virtualbox-boot2docker-url', path.join(process.cwd(), 'resources', 'boot2docker-' + dockerversion + '.iso'), '--virtualbox-memory', '2048', NAME]); + } }, start: function () { return util.exec([this.command(), '-D', 'start', NAME]); diff --git a/src/utils/DockerUtil.js b/src/utils/DockerUtil.js index 1109a381d1..2f951e94a1 100644 --- a/src/utils/DockerUtil.js +++ b/src/utils/DockerUtil.js @@ -170,6 +170,8 @@ export default { localStorage.setItem('placeholders', JSON.stringify(this.placeholders)); this.pullImage(repository, tag, error => { + delete this.placeholders[name]; + localStorage.setItem('placeholders', JSON.stringify(this.placeholders)); if (error) { containerServerActions.error({name, error}); return; @@ -179,8 +181,6 @@ export default { return; } - delete this.placeholders[name]; - localStorage.setItem('placeholders', JSON.stringify(this.placeholders)); this.createContainer(name, {Image: imageName}); }, @@ -374,6 +374,7 @@ export default { var data = JSON.parse(str); if (data.error) { + console.log(data.error); callback(data.error); return; } diff --git a/src/utils/Util.js b/src/utils/Util.js index 8d90f74166..fd4524e4e5 100644 --- a/src/utils/Util.js +++ b/src/utils/Util.js @@ -3,6 +3,8 @@ var Promise = require('bluebird'); var fs = require('fs'); var path = require('path'); var crypto = require('crypto'); +var remote = require('remote'); +var app = remote.require('app'); module.exports = { exec: function (args, options) { @@ -37,18 +39,10 @@ module.exports = { return str.replace(/ /g, '\\ ').replace(/\(/g, '\\(').replace(/\)/g, '\\)'); }, home: function () { - return process.env[this.isWindows() ? 'USERPROFILE' : 'HOME']; + return app.getPath('home'); }, supportDir: function () { - var dirs = ['Library', 'Application\ Support', 'Kitematic']; - var acc = this.home(); - dirs.forEach(function (d) { - acc = path.join(acc, d); - if (!fs.existsSync(acc)) { - fs.mkdirSync(acc); - } - }); - return acc; + return app.getPath('userData'); }, CommandOrCtrl: function () { return this.isWindows() ? 'Ctrl' : 'Command'; diff --git a/src/utils/VirtualBoxUtil.js b/src/utils/VirtualBoxUtil.js index 3bf33432f1..80705cbe78 100644 --- a/src/utils/VirtualBoxUtil.js +++ b/src/utils/VirtualBoxUtil.js @@ -17,11 +17,7 @@ var VirtualBox = { return util.isWindows() ? util.packagejson()['virtualbox-checksum-win'] : util.packagejson()['virtualbox-checksum']; }, url: function () { - if(util.isWindows()) { - return 'http://download.virtualbox.org/virtualbox/4.3.26/VirtualBox-4.3.26-98988-Win.exe'; - } else { - return `https://github.com/kitematic/virtualbox/releases/download/${util.packagejson()['virtualbox-version']}/${this.filename()}`; - } + return `https://github.com/kitematic/virtualbox/releases/download/${util.packagejson()['virtualbox-version']}/${this.filename()}`; }, installed: function () { if(util.isWindows()) { From aa9aa696ff722dabc2d364526161ae97f24123ee Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Thu, 4 Jun 2015 19:47:44 -0700 Subject: [PATCH 07/29] Fix file downloads --- gulpfile.js | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index f6d7175b8e..09b70a92b9 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -203,9 +203,13 @@ gulp.task('download-docker', function (cb) { gutil.log(gutil.colors.green('Downloading Docker')); if(process.platform === 'win32') { - request('https://master.dockerproject.com/windows/amd64/docker-1.7.0-dev.exe').pipe(fs.createWriteStream('./resources/docker.exe')).on('end', cb); + request('https://master.dockerproject.com/windows/amd64/docker-1.7.0-dev.exe').pipe(fs.createWriteStream('./resources/docker.exe')).on('finish', cb); } else { - request('https://get.docker.com/builds/Darwin/x86_64/docker-' + packagejson['docker-version'] + '.tgz').pipe(fs.createWriteStream('./resources/docker')).on('end', cb); + request('https://get.docker.com/builds/Darwin/x86_64/docker-' + packagejson['docker-version']) + .pipe(fs.createWriteStream('./resources/docker')).on('finish', function () { + fs.chmodSync('./resources/docker', 755); + cb(); + }); } }); }); @@ -222,10 +226,13 @@ gulp.task('download-docker-machine', function (cb) { if(process.platform === 'win32') { request('https://github.com/docker/machine/releases/download/v' + packagejson['docker-machine-version'] + '/docker-machine_windows-amd64.exe') - .pipe(fs.createWriteStream('./resources/docker-machine.exe')).on('end', function () {cb()}); + .pipe(fs.createWriteStream('./resources/docker-machine.exe')).on('finish', function () {cb()}); } else { - request('https://github.com/docker/machine/releases/download/v' + packagejson['docker-machine-version'] + 'docker-machine_darwin-amd64') - .pipe(fs.createWriteStream('./resources/docker-machine')).on('end', function () {cb()}); + request('https://github.com/docker/machine/releases/download/v' + packagejson['docker-machine-version'] + '/docker-machine_darwin-amd64') + .pipe(fs.createWriteStream('./resources/docker-machine')).on('finish', function () { + fs.chmodSync('./resources/docker-machine', 755); + cb(); + }); } }); }); @@ -244,7 +251,10 @@ gulp.task('download-docker-compose', function (cb) { } else { gutil.log(gutil.colors.green('Downloading Docker Compose')); request('https://github.com/docker/compose/releases/download/' + packagejson['docker-compose-version'] + '/docker-compose-Darwin-x86_64') - .pipe(fs.createWriteStream('./resources/docker-compose')).on('end', cb); + .pipe(fs.createWriteStream('./resources/docker-compose')).on('finish', function () { + fs.chmodSync('./resources/docker-compose', 755); + cb(); + }); } }); }); @@ -254,7 +264,7 @@ gulp.task('download-boot2docker-iso', function (cb) { if (!fs.existsSync(b2dFile)) { gutil.log(gutil.colors.green('Downloading Boot2Docker iso')); request('https://github.com/boot2docker/boot2docker/releases/download/v' + packagejson['docker-version'] + '/boot2docker.iso') - .pipe(fs.createWriteStream(b2dFile)).on('end', cb); + .pipe(fs.createWriteStream(b2dFile)).on('finish', cb); } else { cb(); } From 7d0d63e5c374251742a7835710458f107f412389 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Thu, 4 Jun 2015 20:13:21 -0700 Subject: [PATCH 08/29] Update CONTRIBUTING.md --- CONTRIBUTING.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cf4dbb202e..e0b8dcc753 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -18,14 +18,21 @@ Before you fil an issue or a pull request, quickly read of the following tips on ### Prerequisites Most of the time, you'll have installed Kitematic before contibuting, but for the -sake of completeness, you can also install [Node.js](https://nodejs.org/) and the latest Xcode from the Apple App Store and then run from your Git clone. +sake of completeness, you can also install [Node.js 0.10.38](https://nodejs.org/dist/v0.10.38/). Running `npm start` will download and install the OS X Docker client, -[Docker machine](https://github.com/docker/machine), +[Docker Machine](https://github.com/docker/machine), [Docker Compose](https://github.com/docker/compose) the [Boot2Docker iso](https://github.com/boot2docker/boot2docker), [Electron](http://electron.atom.io/), and [VirtualBox](https://www.virtualbox.org/) if needed. +### Other Prerequisites (Mac) +- The latest Xcode from the Apple App Store. + +### Other Prerequisites (Windows) +- [Visual Studio 2013 Community](https://www.visualstudio.com/en-us/products/visual-studio-community-vs.aspx) (or similar) +- [Python](https://www.python.org/downloads/release/python-2710/) + ### Getting Started - `npm install` From 42b6271a3429dd3faab03b1c8ecc1d5492c4dd47 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Thu, 4 Jun 2015 20:13:34 -0700 Subject: [PATCH 09/29] Update CONTRIBUTING.md --- CONTRIBUTING.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e0b8dcc753..4efcb24534 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,12 +20,6 @@ Before you fil an issue or a pull request, quickly read of the following tips on Most of the time, you'll have installed Kitematic before contibuting, but for the sake of completeness, you can also install [Node.js 0.10.38](https://nodejs.org/dist/v0.10.38/). -Running `npm start` will download and install the OS X Docker client, -[Docker Machine](https://github.com/docker/machine), [Docker Compose](https://github.com/docker/compose) -the [Boot2Docker iso](https://github.com/boot2docker/boot2docker), -[Electron](http://electron.atom.io/), and [VirtualBox](https://www.virtualbox.org/) -if needed. - ### Other Prerequisites (Mac) - The latest Xcode from the Apple App Store. @@ -35,6 +29,7 @@ if needed. ### Getting Started + - `npm install` To run the app in development: From 9628a00ab25c72880393903067e3b5d4b51bd5aa Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Thu, 4 Jun 2015 20:14:23 -0700 Subject: [PATCH 10/29] Update CONTRIBUTING.md --- CONTRIBUTING.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4efcb24534..8fc1617a3d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -29,13 +29,17 @@ sake of completeness, you can also install [Node.js 0.10.38](https://nodejs.org/ ### Getting Started - - `npm install` To run the app in development: - `npm start` +Running `npm start` will download and install the OS X Docker client, +[Docker Machine](https://github.com/docker/machine), [Docker Compose](https://github.com/docker/compose) +the [Boot2Docker iso](https://github.com/boot2docker/boot2docker), +[Electron](http://electron.atom.io/). + ### Building & Release - `npm run release` From cefd299604de78f34f93c050ed0744abee8fbdde Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Thu, 4 Jun 2015 20:16:13 -0700 Subject: [PATCH 11/29] Fix integration tests --- jest-integration.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jest-integration.json b/jest-integration.json index 1405f9045e..af08d8fd85 100644 --- a/jest-integration.json +++ b/jest-integration.json @@ -1,6 +1,6 @@ { "testDirectoryName": "__integration__", - "scriptPreprocessor": "/util/preprocessor.js", + "scriptPreprocessor": "/node_modules/babel-jest", "setupEnvScriptFile": "/util/testenv.js", "setupTestFrameworkScriptFile": "/util/prepare.js", "unmockedModulePathPatterns": [ From 3a52e1c3f2677e72da547dc3136233fe916d4d4e Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Thu, 4 Jun 2015 22:12:18 -0700 Subject: [PATCH 12/29] Mock the remote module --- __mocks__/remote.js | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 __mocks__/remote.js diff --git a/__mocks__/remote.js b/__mocks__/remote.js new file mode 100644 index 0000000000..b2c2ab1348 --- /dev/null +++ b/__mocks__/remote.js @@ -0,0 +1,4 @@ +module.exports = { + require: jest.genMockFunction(), + match: jest.genMockFunction() +}; From 6f7d9b80e78fc8c82fa7207eff89b1d23023e6d7 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Thu, 4 Jun 2015 23:08:52 -0700 Subject: [PATCH 13/29] Reverting DockerUtil.js --- src/utils/DockerUtil.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils/DockerUtil.js b/src/utils/DockerUtil.js index 2f951e94a1..1109a381d1 100644 --- a/src/utils/DockerUtil.js +++ b/src/utils/DockerUtil.js @@ -170,8 +170,6 @@ export default { localStorage.setItem('placeholders', JSON.stringify(this.placeholders)); this.pullImage(repository, tag, error => { - delete this.placeholders[name]; - localStorage.setItem('placeholders', JSON.stringify(this.placeholders)); if (error) { containerServerActions.error({name, error}); return; @@ -181,6 +179,8 @@ export default { return; } + delete this.placeholders[name]; + localStorage.setItem('placeholders', JSON.stringify(this.placeholders)); this.createContainer(name, {Image: imageName}); }, @@ -374,7 +374,6 @@ export default { var data = JSON.parse(str); if (data.error) { - console.log(data.error); callback(data.error); return; } From 955a43a14dfb232701650c95ebf5094c6fc9709c Mon Sep 17 00:00:00 2001 From: Vojta Bartos Date: Fri, 5 Jun 2015 10:11:04 +0200 Subject: [PATCH 14/29] Fix bug where we want to set custom shell - at container details sub header - tried to access to array like object - added reduce function to make array object --- src/components/ContainerDetailsSubheader.react.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/ContainerDetailsSubheader.react.js b/src/components/ContainerDetailsSubheader.react.js index bc9d4a348d..c34ccd6de8 100644 --- a/src/components/ContainerDetailsSubheader.react.js +++ b/src/components/ContainerDetailsSubheader.react.js @@ -102,7 +102,11 @@ var ContainerDetailsSubheader = React.createClass({ if (!this.disableTerminal()) { metrics.track('Terminaled Into Container'); var container = this.props.container; - var shell = ContainerUtil.env(container).SHELL; + var shell = ContainerUtil.env(container).reduce((envs, env) => { + envs[env[0]] = env[1]; + return envs; + }, {}).SHELL; + if(typeof shell === 'undefined') { shell = 'sh'; } From 3cede9eb748fec69999af27246af3402db5eeab0 Mon Sep 17 00:00:00 2001 From: TeckniX Date: Fri, 5 Jun 2015 11:10:10 -0400 Subject: [PATCH 15/29] Moved Kitematic dir to Documents Signed-off-by: TeckniX --- src/components/ContainerHomeFolders.react.js | 2 +- src/utils/Util.js | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/components/ContainerHomeFolders.react.js b/src/components/ContainerHomeFolders.react.js index 4f769ce766..cc62cd6a87 100644 --- a/src/components/ContainerHomeFolders.react.js +++ b/src/components/ContainerHomeFolders.react.js @@ -25,7 +25,7 @@ var ContainerHomeFolder = React.createClass({ }, (index) => { if (index === 0) { var volumes = _.clone(this.props.container.Volumes); - var newHostVolume = path.join(util.home(), 'Kitematic', this.props.container.Name, containerVolume); + var newHostVolume = path.join(util.home(), util.documents(), 'Kitematic', this.props.container.Name, containerVolume); volumes[containerVolume] = newHostVolume; var binds = _.pairs(volumes).map(function (pair) { if(util.isWindows()) { diff --git a/src/utils/Util.js b/src/utils/Util.js index 8d90f74166..60554439ab 100644 --- a/src/utils/Util.js +++ b/src/utils/Util.js @@ -39,6 +39,9 @@ module.exports = { home: function () { return process.env[this.isWindows() ? 'USERPROFILE' : 'HOME']; }, + documents: function () { + return this.isWindows() ? 'My\ Documents' : 'Documents'; + }, supportDir: function () { var dirs = ['Library', 'Application\ Support', 'Kitematic']; var acc = this.home(); From 4b708f2275ad48ed17c6d5c26e1a406fdfe0f07f Mon Sep 17 00:00:00 2001 From: Vojta Bartos Date: Fri, 5 Jun 2015 19:49:18 +0200 Subject: [PATCH 16/29] Making condition simple - removed checking for undefined, not necessary --- src/components/ContainerDetailsSubheader.react.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ContainerDetailsSubheader.react.js b/src/components/ContainerDetailsSubheader.react.js index c34ccd6de8..72f2f9d1aa 100644 --- a/src/components/ContainerDetailsSubheader.react.js +++ b/src/components/ContainerDetailsSubheader.react.js @@ -107,7 +107,7 @@ var ContainerDetailsSubheader = React.createClass({ return envs; }, {}).SHELL; - if(typeof shell === 'undefined') { + if(!shell) { shell = 'sh'; } machine.ip().then(ip => { From 577858f9a1d6a636dba97816b171cfbce8a6af87 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Fri, 5 Jun 2015 10:56:38 -0700 Subject: [PATCH 17/29] Fixed docs to no longer mention copying binaries --- docs/index.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index 0ddfc9f3b9..60a58533b2 100755 --- a/docs/index.md +++ b/docs/index.md @@ -28,10 +28,9 @@ container! ## Technical Details -Kitematic is a self-contained .app, with a two exceptions: +Kitematic is a self-contained .app, with an exception: - It will install VirtualBox if it's not already installed. -- It copies the `docker` and `docker-machine` binaries to `/usr/local/bin` for convenience. ### Why does Kitematic need my root password? From 1a88216e2e18ba2befa746ffc14fb931f16db011 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Fri, 5 Jun 2015 16:41:43 -0700 Subject: [PATCH 18/29] Windows fonts --- styles/variables.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/styles/variables.less b/styles/variables.less index 83e17a8c3b..dc0624f59e 100644 --- a/styles/variables.less +++ b/styles/variables.less @@ -22,5 +22,5 @@ @color-divider: @gray-lightest; @color-background: #FCFCFC; -@font-regular: "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; -@font-code: Menlo; +@font-regular: "Helvetica Neue", Segoe UI, Arial, "Lucida Grande", sans-serif; +@font-code: Menlo, Consolas; From 103af8b53042b43091ce43dd42197e4982b256d7 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Fri, 5 Jun 2015 16:43:26 -0700 Subject: [PATCH 19/29] Fix windows volume mounting --- src/components/ContainerHomeFolders.react.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/ContainerHomeFolders.react.js b/src/components/ContainerHomeFolders.react.js index 4f769ce766..88196f5022 100644 --- a/src/components/ContainerHomeFolders.react.js +++ b/src/components/ContainerHomeFolders.react.js @@ -63,8 +63,9 @@ var ContainerHomeFolder = React.createClass({ return false; } - var folders = _.map(this.props.container.Volumes, (val, key) => { - var firstFolder = key.split(path.sep)[1]; + console.log(this.props.container.Volumes); + var folders = _.map(_.omit(this.props.container.Volumes, (v, k) => k.indexOf('/Users/') !== -1), (val, key) => { + var firstFolder = key.split('/')[1]; return (
From bf7d3af40229472d2f98178f3eeae56127e9f6c4 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Fri, 5 Jun 2015 21:22:34 -0700 Subject: [PATCH 20/29] Fixed bug with API requests to 1.7 RC2 /containers/create endpoint --- src/utils/DockerUtil.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/utils/DockerUtil.js b/src/utils/DockerUtil.js index 1109a381d1..a3b2424985 100644 --- a/src/utils/DockerUtil.js +++ b/src/utils/DockerUtil.js @@ -103,6 +103,8 @@ export default { containerData.Env = containerData.Config.Env; } + containerData.Volumes = _.mapObject(containerData.Volumes, () => {return {};}); + let existing = this.client.getContainer(name); existing.kill(() => { existing.remove(() => { @@ -203,7 +205,6 @@ export default { containerServerActions.error({name, error}); return; } - existingData.name = existingData.Name || name; if (existingData.Config && existingData.Config.Image) { existingData.Image = existingData.Config.Image; @@ -371,6 +372,7 @@ export default { // data is associated with one layer only (can be identified with id) stream.on('data', str => { + console.log(str); var data = JSON.parse(str); if (data.error) { From cc0bc719fa15cb1adfe8edeed880d2f204516be4 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Fri, 5 Jun 2015 21:23:14 -0700 Subject: [PATCH 21/29] Removing unnecessary print statement --- src/utils/DockerUtil.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/utils/DockerUtil.js b/src/utils/DockerUtil.js index a3b2424985..46dceeb5a1 100644 --- a/src/utils/DockerUtil.js +++ b/src/utils/DockerUtil.js @@ -372,7 +372,6 @@ export default { // data is associated with one layer only (can be identified with id) stream.on('data', str => { - console.log(str); var data = JSON.parse(str); if (data.error) { From 72d4e21a34aeb53216308d6e4868dae96c46733e Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Fri, 5 Jun 2015 21:34:44 -0700 Subject: [PATCH 22/29] Fixed bug where packaging binaries would fail on release --- gulpfile.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gulpfile.js b/gulpfile.js index 09b70a92b9..6099fb736b 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -207,7 +207,7 @@ gulp.task('download-docker', function (cb) { } else { request('https://get.docker.com/builds/Darwin/x86_64/docker-' + packagejson['docker-version']) .pipe(fs.createWriteStream('./resources/docker')).on('finish', function () { - fs.chmodSync('./resources/docker', 755); + fs.chmodSync('./resources/docker', 0755); cb(); }); } @@ -230,7 +230,7 @@ gulp.task('download-docker-machine', function (cb) { } else { request('https://github.com/docker/machine/releases/download/v' + packagejson['docker-machine-version'] + '/docker-machine_darwin-amd64') .pipe(fs.createWriteStream('./resources/docker-machine')).on('finish', function () { - fs.chmodSync('./resources/docker-machine', 755); + fs.chmodSync('./resources/docker-machine', 0755); cb(); }); } @@ -252,7 +252,7 @@ gulp.task('download-docker-compose', function (cb) { gutil.log(gutil.colors.green('Downloading Docker Compose')); request('https://github.com/docker/compose/releases/download/' + packagejson['docker-compose-version'] + '/docker-compose-Darwin-x86_64') .pipe(fs.createWriteStream('./resources/docker-compose')).on('finish', function () { - fs.chmodSync('./resources/docker-compose', 755); + fs.chmodSync('./resources/docker-compose', 0755); cb(); }); } From 95993a7ffbb26edec3456655aaf4667990eb9e84 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Mon, 8 Jun 2015 13:04:31 -0700 Subject: [PATCH 23/29] Fixed bug where error would not show if fetching recommended repos failed --- src/utils/RegHubUtil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/RegHubUtil.js b/src/utils/RegHubUtil.js index 8bad189107..cf00640249 100644 --- a/src/utils/RegHubUtil.js +++ b/src/utils/RegHubUtil.js @@ -56,7 +56,7 @@ module.exports = { recommended: function () { request.get('https://kitematic.com/recommended.json', (error, response, body) => { if (error) { - repositoryServerActions.recommendedError({error}); + repositoryServerActions.error({error}); } let data = JSON.parse(body); From 05e32dc3e584afe4a6b491298c892a68b2538422 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Tue, 9 Jun 2015 17:57:17 -0700 Subject: [PATCH 24/29] Bump machine version to 0.3.0 rc2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f33814e197..88516fdf8d 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ } ], "docker-version": "1.6.2", - "docker-machine-version": "0.3.0-rc1", + "docker-machine-version": "0.3.0-rc2", "docker-compose-version": "1.2.0", "electron-version": "0.27.2", "virtualbox-version": "4.3.28", From c5d8f57b133cb1b2958cdc3a63f2732986cc6afb Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Wed, 10 Jun 2015 10:30:39 -0700 Subject: [PATCH 25/29] Fixes a bug where expired token would not be refreshed --- src/utils/HubUtil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/HubUtil.js b/src/utils/HubUtil.js index f3eb313bbe..e28ad9e785 100644 --- a/src/utils/HubUtil.js +++ b/src/utils/HubUtil.js @@ -62,7 +62,7 @@ module.exports = { let data = JSON.parse(body); // If the JWT has expired, then log in again to get a new JWT - if (data && data.detail === 'Signature has expired.') { + if (data && data.detail.indexOf('expired') !== -1) { let config = this.config(); if (!this.config()) { this.logout(); From e61773d18552fcece0aedb8754416679917d2af3 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Wed, 10 Jun 2015 10:34:19 -0700 Subject: [PATCH 26/29] Bumping version to 0.6.4 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 88516fdf8d..619fe4df3f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Kitematic", - "version": "0.6.3", + "version": "0.6.4", "author": "Kitematic", "description": "Simple Docker Container management for Mac OS X.", "homepage": "https://kitematic.com/", From 307f57416bf56d70eb6519246e8a25f753498f3d Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Wed, 10 Jun 2015 10:40:03 -0700 Subject: [PATCH 27/29] Fix checking for expired token --- src/utils/HubUtil.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/HubUtil.js b/src/utils/HubUtil.js index e28ad9e785..e14ca89ef3 100644 --- a/src/utils/HubUtil.js +++ b/src/utils/HubUtil.js @@ -62,7 +62,7 @@ module.exports = { let data = JSON.parse(body); // If the JWT has expired, then log in again to get a new JWT - if (data && data.detail.indexOf('expired') !== -1) { + if (data && data.detail && data.detail.indexOf('expired') !== -1) { let config = this.config(); if (!this.config()) { this.logout(); From c722a933d6049a163ba25a08426ad23cb2d11ab9 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Wed, 10 Jun 2015 15:40:50 -0700 Subject: [PATCH 28/29] Add stdout to exec errors --- src/utils/Util.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/Util.js b/src/utils/Util.js index 6a1ebdcdd4..47d54b16f4 100644 --- a/src/utils/Util.js +++ b/src/utils/Util.js @@ -13,7 +13,7 @@ module.exports = { exec(args, options, (stderr, stdout, code) => { if (code) { var cmd = Array.isArray(args) ? args.join(' ') : args; - reject(new Error(cmd + ' returned non zero exit code. Stderr: ' + stderr)); + reject(new Error(cmd + ' returned non zero exit code.\n===== Stderr =====\n ' + stderr + '\n===== Stdout =====\n' + stdout)); } else { resolve(stdout); } From 7256065ca1e750e16892eacbfb798ea112b18418 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Wed, 10 Jun 2015 16:20:01 -0700 Subject: [PATCH 29/29] Minor bugfixes --- package.json | 2 +- src/components/Containers.react.js | 2 +- src/menutemplate.js | 15 ++++++++++----- styles/right-panel.less | 8 ++++---- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 619fe4df3f..447b9c1286 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Kitematic", - "version": "0.6.4", + "version": "0.6.5", "author": "Kitematic", "description": "Simple Docker Container management for Mac OS X.", "homepage": "https://kitematic.com/", diff --git a/src/components/Containers.react.js b/src/components/Containers.react.js index b7ef82dcb5..20e7a8b6f2 100644 --- a/src/components/Containers.react.js +++ b/src/components/Containers.react.js @@ -161,7 +161,7 @@ var Containers = React.createClass({

Containers

- +
diff --git a/src/menutemplate.js b/src/menutemplate.js index fd50876516..df41ffa201 100644 --- a/src/menutemplate.js +++ b/src/menutemplate.js @@ -42,25 +42,30 @@ var MenuTemplate = function () { click: function () { metrics.track('Installed Docker Commands'); if (!setupUtil.shouldUpdateBinaries()) { + dialog.showMessageBox({ + message: 'Docker binaries are already installed in /usr/local/bin', + buttons: ['OK'] + }); return; } let copy = setupUtil.needsBinaryFix() ? - util.exec(setupUtil.copyBinariesCmd() + ' && ' + setupUtil.fixBinariesCmd()) : + util.exec(setupUtil.macSudoCmd(setupUtil.copyBinariesCmd() + ' && ' + setupUtil.fixBinariesCmd())) : util.exec(setupUtil.copyBinariesCmd()); copy.then(() => { dialog.showMessageBox({ - message: 'Docker binaries have been copied to /usr/local/bin', + message: 'Docker binaries have been installed under /usr/local/bin', buttons: ['OK'] }); - }).catch(() => {}); + }).catch((err) => { + console.log(err); + }); }, }, { type: 'separator' - }, - { + }, { label: 'Hide Kitematic', accelerator: util.CommandOrCtrl() + '+H', selector: 'hide:' diff --git a/styles/right-panel.less b/styles/right-panel.less index d67a9f9974..1f2844ff1b 100644 --- a/styles/right-panel.less +++ b/styles/right-panel.less @@ -3,11 +3,11 @@ margin: 0; padding: 0; box-sizing: border-box; - flex: 1; + flex: 1 auto; display: flex; flex-direction: column; .details-subheader { - flex: 0 auto; + flex: 0 0; display: flex; flex-direction: row; position: relative; @@ -78,7 +78,7 @@ } } .details-header { - flex: 0 auto; + flex: 0 0; display: flex; flex-direction: row; padding: 18px 24px 24px 24px; @@ -148,7 +148,7 @@ } } .details-panel { - flex: 1; + flex: 1 auto; overflow: auto; background-color: white; }