diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5c885f559f..3fe22bdc17 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -53,6 +53,10 @@ We're thrilled to receive pull requests of any kind. Anything from bug fix, test That said, please let us know what you're planning to do! For large changes always create a proposal. Maintainers will love to give you advice on building it and it keeps the app's design coherent. +### Pull Request Requirements: +- Tests +- [Signed Off](https://github.com/docker/docker/blob/master/CONTRIBUTING.md#sign-your-work) + ## Code Guidelines ### Javascript diff --git a/images/button-restart.png b/images/button-restart.png index 69f030d3ec..0cf9ae43ce 100644 Binary files a/images/button-restart.png and b/images/button-restart.png differ diff --git a/images/button-restart@2x.png b/images/button-restart@2x.png index c710010d35..bb62729cb3 100644 Binary files a/images/button-restart@2x.png and b/images/button-restart@2x.png differ diff --git a/images/button-terminal.png b/images/button-terminal.png index e64a22aa5e..cfcedd974f 100644 Binary files a/images/button-terminal.png and b/images/button-terminal.png differ diff --git a/images/button-terminal@2x.png b/images/button-terminal@2x.png index be2c92fa24..658786d3f6 100644 Binary files a/images/button-terminal@2x.png and b/images/button-terminal@2x.png differ diff --git a/images/button-view.png b/images/button-view.png index 4d67f928f4..0eb0c2e5bd 100644 Binary files a/images/button-view.png and b/images/button-view.png differ diff --git a/images/button-view@2x.png b/images/button-view@2x.png index a445545558..9a9e206961 100644 Binary files a/images/button-view@2x.png and b/images/button-view@2x.png differ diff --git a/package.json b/package.json index e657c0d092..060c0a72e6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Kitematic", - "version": "0.5.11", + "version": "0.5.13", "author": "Kitematic", "description": "Simple Docker Container management for Mac OS X.", "homepage": "https://kitematic.com/", @@ -42,10 +42,10 @@ "docker-version": "1.5.0", "docker-machine-version": "0.1.0-kitematic-0.5.10", "atom-shell-version": "0.21.3", - "virtualbox-version": "4.3.24", - "virtualbox-filename": "VirtualBox-4.3.24.pkg", + "virtualbox-version": "4.3.26", + "virtualbox-filename": "VirtualBox-4.3.26.pkg", "virtualbox-filename-win": "VirtualBox-4.3.26.exe", - "virtualbox-checksum": "100eee21df3808fc1b1e461e86f10b6d2a748935c5f31bc665f4ff0777e44a0b", + "virtualbox-checksum": "668f61c95efe37f8fc65cafe95b866fba64e37f2492dfc1e2b44a7ac3dcafa3b", "virtualbox-checksum-win": "9cb265babf307d825f5178693af95ffca077f80ae22cf43868c3538c159123ff", "dependencies": { "ansi-to-html": "0.3.0", diff --git a/src/ContainerHomeFolders.react.js b/src/ContainerHomeFolders.react.js index e20b95e1fd..aa1218f4a6 100644 --- a/src/ContainerHomeFolders.react.js +++ b/src/ContainerHomeFolders.react.js @@ -2,20 +2,46 @@ var _ = require('underscore'); var React = require('react/addons'); var RetinaImage = require('react-retina-image'); var path = require('path'); -var exec = require('exec'); +var shell = require('shell'); +var util = require('./Util'); var metrics = require('./Metrics'); var Router = require('react-router'); -var util = require('./Util'); +var ContainerStore = require('./ContainerStore'); var ContainerHomeFolder = React.createClass({ mixins: [Router.State, Router.Navigation], - handleClickFolder: function (path) { + handleClickFolder: function (hostVolume, containerVolume) { metrics.track('Opened Volume Directory', { from: 'home' }); - util.openPathOrUrl(path, function (err) { - if (err) { throw err; } - }); + + if (hostVolume.indexOf(process.env.HOME) === -1) { + var volumes = _.clone(this.props.container.Volumes); + var newHostVolume = path.join(util.home(), 'Kitematic', this.props.container.Name, containerVolume); + volumes[containerVolume] = newHostVolume; + var binds = _.pairs(volumes).map(function (pair) { + if(util.isWindows()) { + var home = util.home(); + home = home.charAt(0).toLowerCase() + home.slice(1); + home = '/' + home.replace(':', '').replace(/\\/g, '/'); + var fullPath = path.join(home, 'Kitematic', pair[1], pair[0]); + fullPath = fullPath.replace(/\\/g, '/'); + return fullPath + ':' + pair[0]; + } + return pair[1] + ':' + pair[0]; + }); + ContainerStore.updateContainer(this.props.container.Name, { + Binds: binds + }, function (err) { + if (err) { + console.log(err); + return; + } + shell.showItemInFolder(newHostVolume); + }); + } else { + shell.showItemInFolder(hostVolume); + } }, handleClickChangeFolders: function () { metrics.track('Viewed Volume Settings', { @@ -24,24 +50,21 @@ var ContainerHomeFolder = React.createClass({ this.transitionTo('containerSettingsVolumes', {name: this.getParams().name}); }, render: function () { - var folders; - if (this.props.container) { - var self = this; - folders = _.map(self.props.container.Volumes, function (val, key) { - var firstFolder = key.split(path.sep)[1]; - if (!val || val.indexOf(process.env.HOME) === -1) { - return; - } else { - return ( -