From 6d9a8de3ed4ac7c7aa4905252833d3b785ba25e7 Mon Sep 17 00:00:00 2001 From: TeckniX Date: Mon, 4 May 2015 13:56:53 -0400 Subject: [PATCH 1/4] Fixed stop button showing on initial start Signed-off-by: TeckniX --- 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 556f9bc3b2..6129de5c01 100644 --- a/src/components/ContainerDetailsSubheader.react.js +++ b/src/components/ContainerDetailsSubheader.react.js @@ -59,7 +59,7 @@ var ContainerDetailsSubheader = React.createClass({ if (!this.props.container) { return false; } - return (this.props.container.State.Downloading || this.props.container.State.ExitCode); + return (this.props.container.State.Downloading || this.props.container.State.ExitCode || !this.props.container.State.Running); }, disableStart: function () { if (!this.props.container) { From cdb120d40baf0defd29a82c3dc41794a8b865d31 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Tue, 5 May 2015 09:59:39 -0700 Subject: [PATCH 2/4] Update CONTRIBUTING.md --- CONTRIBUTING.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 209f81f62e..5270bcabfc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -36,7 +36,7 @@ To run the app in development: **Note: This architecture is work in progress and doesn't reflect the current state of the app, yet!** -Kitematic is an application built using [electron](https://github.com/atom/electron) and is powered by the [Docker Engine](https://github.com/docker/docker). While it's work in progress, the goal is to make Kitematic a high-performance, portable Javascript ES6 application built with React and Reflux. It adopts a single data flow pattern: +Kitematic is an application built using [electron](https://github.com/atom/electron) and is powered by the [Docker Engine](https://github.com/docker/docker). While it's work in progress, the goal is to make Kitematic a high-performance, portable Javascript ES6 application built with React and Flux (using [alt](https://github.com/goatslacker/alt). It adopts a single data flow pattern: ``` ╔═════════╗ ╔════════╗ ╔═════════════════╗ @@ -46,14 +46,17 @@ Kitematic is an application built using [electron](https://github.com/atom/elect └──────────────────────────────────────┘ ``` -As explained in the [Reflux docs](https://github.com/spoike/refluxjs), there are three primary types of objects: -- **Actions**: The main logic workhorses of the application. These objects interact with the Docker API and other endpoints to fetch new data and flowing it into the stores, which in turn create events that cause views to update. +There are three primary types of objects: +- **Actions**: Interact with the system (Docker Engine, Docker Machine, Registries, Hub, etc) - **Views**: Views make up the UI, and trigger available actions. - **Stores**: Stores store the state of the application. +and since Kitematic has a large amount of interaction with outside systems, we've added utils: +- **Utils**: Utils interact with APIs, outside systems, CLI tools and generate. They are called by user-generated actions and in return, also create actions based on API return values, CLI output etc. + ### Guidelines -- Avoid asynchronous code in Stores or Views. Instead, put code involving callbacks, promises or generators in actions. +- Avoid asynchronous code in Actions, Stores or Views. Instead, put code involving callbacks, promises or generators in utils or actions. ## GitHub Issues From c75bc2188e76717af1cf01f15572bfac69ddde93 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Fri, 8 May 2015 20:53:31 -0700 Subject: [PATCH 3/4] version bump --- package.json | 4 ++-- src/components/Containers.react.js | 2 -- src/stores/SetupStore.js | 5 ++++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 920c0e3df5..e0ea500094 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Kitematic", - "version": "0.5.23", + "version": "0.5.24", "author": "Kitematic", "description": "Simple Docker Container management for Mac OS X.", "homepage": "https://kitematic.com/", @@ -47,7 +47,7 @@ "/node_modules/source-map-support" ] }, - "docker-version": "1.6.0", + "docker-version": "1.6.1", "docker-machine-version": "0.2.0", "electron-version": "0.24.0", "virtualbox-version": "4.3.26", diff --git a/src/components/Containers.react.js b/src/components/Containers.react.js index 25e603c5f1..97a48806e5 100644 --- a/src/components/Containers.react.js +++ b/src/components/Containers.react.js @@ -71,8 +71,6 @@ var Containers = React.createClass({ this.context.router.transitionTo('containerHome', {name: name}); } else if (status === 'pending' && ContainerStore.pending()) { this.context.router.transitionTo('pull'); - } else if (status === 'destroy') { - this.onDestroy(); } }, handleScroll: function (e) { diff --git a/src/stores/SetupStore.js b/src/stores/SetupStore.js index 3ba6dd9e84..1263c2e920 100644 --- a/src/stores/SetupStore.js +++ b/src/stores/SetupStore.js @@ -63,7 +63,10 @@ var _steps = [{ run: Promise.coroutine(function* (progressCallback) { setupUtil.simulateProgress(this.seconds, progressCallback); var exists = yield machine.exists(); - if (!exists) { + if (!exists || (yield machine.state()) === 'Error') { + if ((yield machine.state()) === 'Error') { + yield machine.rm(); + } yield machine.create(); if(util.isWindows()) { let home = util.home(); From c826d0891742b61ef3ae0f2204f1b0fb37a83d35 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Sat, 9 May 2015 09:18:53 -0700 Subject: [PATCH 4/4] Fix bug where machine would not exist --- package.json | 2 +- src/stores/SetupStore.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e0ea500094..eb6f6d2f5c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "Kitematic", - "version": "0.5.24", + "version": "0.5.25", "author": "Kitematic", "description": "Simple Docker Container management for Mac OS X.", "homepage": "https://kitematic.com/", diff --git a/src/stores/SetupStore.js b/src/stores/SetupStore.js index 1263c2e920..3930bc47fc 100644 --- a/src/stores/SetupStore.js +++ b/src/stores/SetupStore.js @@ -64,7 +64,7 @@ var _steps = [{ setupUtil.simulateProgress(this.seconds, progressCallback); var exists = yield machine.exists(); if (!exists || (yield machine.state()) === 'Error') { - if ((yield machine.state()) === 'Error') { + if (exists && (yield machine.state()) === 'Error') { yield machine.rm(); } yield machine.create();