Merge pull request #182 from kitematic/fix-volumes

Fix volume changing in container settings
This commit is contained in:
Jeffrey Morgan 2015-02-16 20:05:58 -08:00
commit d33ecb68d9
6 changed files with 24 additions and 18 deletions

View File

@ -34,7 +34,11 @@ gulp.task('js', function () {
.pipe(babel({blacklist: ['regenerator']}))
.pipe(gulpif(options.dev || options.test, sourcemaps.write('.')))
.pipe(gulp.dest((options.dev || options.test) ? './build' : './dist/osx/' + options.filename + '/Contents/Resources/app/build'))
.pipe(gulpif(options.dev, livereload()));
.pipe(gulpif(options.dev, livereload()))
.pipe(plumber(function(error) {
gutil.log(gutil.colors.red('Error (' + error.plugin + '): ' + error.message));
this.emit('end');
}));
});
gulp.task('images', function() {

View File

@ -25,17 +25,17 @@
}
],
"jest": {
"scriptPreprocessor": "preprocessor.js",
"scriptPreprocessor": "<rootDir>/preprocessor.js",
"unmockedModulePathPatterns": [
"tty",
"net",
"crypto",
"stream",
"object-assign",
"underscore",
"node_modules/react",
"node_modules/bluebird",
"node_modules/6to5"
"<rootDir>/node_modules/object-assign",
"<rootDir>/node_modules/underscore",
"<rootDir>/node_modules/react",
"<rootDir>/node_modules/bluebird",
"<rootDir>/node_modules/babel"
]
},
"docker-version": "1.5.0",
@ -50,7 +50,7 @@
"async": "^0.9.0",
"babel": "^4.0.1",
"bluebird": "^2.9.6",
"bugsnag-js": "git+https://git@github.com/bugsnag/bugsnag-js",
"bugsnag-js": "^2.4.7",
"dockerode": "2.0.4",
"download": "^4.0.0",
"exec": "0.1.2",

View File

@ -29,6 +29,7 @@ var ContainerListItem = React.createClass({
});
}
}.bind(this));
return false;
},
render: function () {
var self = this;

View File

@ -91,10 +91,15 @@ var ContainerStore = assign(Object.create(EventEmitter.prototype), {
callback(err);
return;
}
var binds = [];
var binds = containerData.Binds || [];
if (data.Config.Volumes) {
_.each(data.Config.Volumes, function (value, key) {
binds.push(path.join(process.env.HOME, 'Kitematic', containerData.name, key)+ ':' + key);
var existingBind = _.find(binds, b => {
return b.indexOf(':' + key) !== -1;
});
if (!existingBind) {
binds.push(path.join(process.env.HOME, 'Kitematic', containerData.name, key)+ ':' + key);
}
});
}
docker.client().createContainer(containerData, function (err, container) {

View File

@ -29,7 +29,6 @@ var ImageCard = React.createClass({
var $tagOverlay = $(this.getDOMNode()).find('.tag-overlay');
$tagOverlay.fadeIn(300);
$.get('https://registry.hub.docker.com/v1/repositories/' + name + '/tags', function (result) {
console.log(result);
this.setState({
tags: result
});

View File

@ -911,7 +911,8 @@
flex: 1 auto;
flex-direction: row;
.settings-menu {
min-width: 160px;
min-width: 180px;
flex: 0 auto;
ul {
position: fixed;
margin: 0;
@ -958,8 +959,8 @@
}
}
.settings-panel {
padding-left: 40px;
width: 100%;
padding-left: 20px;
flex: 1 auto;
overflow-x: hidden;
.settings-section {
margin-bottom: 40px;
@ -1084,13 +1085,11 @@
.label-left {
flex: 0 auto;
margin-right: 30px;
width: 30%;
}
.label-right {
flex: 1 auto;
display: inline-block;
margin-left: 10px;
width: 60%;
}
}
.table-values {
@ -1099,14 +1098,12 @@
flex-direction: row;
margin: 8px 0;
.value-left {
width: 30%;
flex: 0 auto;
padding: 0px;
}
.value-right {
flex: 1 auto;
-webkit-user-select: text;
width: 60%;
padding: 0px;
}
.btn {