From dfe80af6e4c7ae1eea77b3403778dff55cf36b2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Sun, 5 Apr 2015 17:01:18 +0000 Subject: [PATCH 1/7] Fall-back to image name as key when there is no id MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When a container is first started and the image is downloading there is no id set. With this patch we'll check if the container has a id and and is downloading, if so we'll substitute it with the image name and render such. This will fix the react key props warning in the developer console as well as maybe give us some sort of performance boost(?) Signed-off-by: Kristján Oddsson --- src/ContainerList.react.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/ContainerList.react.js b/src/ContainerList.react.js index 1d6d25a034..9b1dcf9cb4 100644 --- a/src/ContainerList.react.js +++ b/src/ContainerList.react.js @@ -9,8 +9,14 @@ var ContainerList = React.createClass({ render: function () { var self = this; var containers = this.props.containers.map(function (container) { + var container_id = container.Id; + if (!container_id && container.State.Downloading) { + // Fall back to the container image name when there is no id. (when the + // image is downloading). + container_id = container.Image; + } return ( - + ); }); var newItem; From 748207797551fed3da91330c490598ac19bda32b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= Date: Sun, 5 Apr 2015 21:14:34 +0000 Subject: [PATCH 2/7] Change variable from snake_case to camelCase. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Kristján Oddsson --- src/ContainerList.react.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ContainerList.react.js b/src/ContainerList.react.js index 9b1dcf9cb4..d2954dc603 100644 --- a/src/ContainerList.react.js +++ b/src/ContainerList.react.js @@ -9,14 +9,14 @@ var ContainerList = React.createClass({ render: function () { var self = this; var containers = this.props.containers.map(function (container) { - var container_id = container.Id; - if (!container_id && container.State.Downloading) { + var containerId = container.Id; + if (!containerId && container.State.Downloading) { // Fall back to the container image name when there is no id. (when the // image is downloading). - container_id = container.Image; + containerId = container.Image; } return ( - + ); }); var newItem; From ec43f48537dea19ed11768d4215826b7bb706415 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Mon, 6 Apr 2015 13:49:31 -0400 Subject: [PATCH 3/7] Update .travis.yml --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8d530885bf..2fd698f0cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,4 +9,4 @@ cache: - node_modules after_success: - which ./node_modules/coveralls/bin/coveralls.js && cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js + - which ./node_modules/coveralls/bin/coveralls.js && cat coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js From 063e923065c59b7e35f9bd40e2c2b96ad7fc84d8 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Mon, 6 Apr 2015 13:58:11 -0400 Subject: [PATCH 4/7] Update .travis.yml --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 2fd698f0cb..dabf931807 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,7 @@ node_js: sudo: false cache: + directories: - resources - node_modules From b6039efc768c29e3c876a2e77ac712ceef9925c4 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Mon, 6 Apr 2015 13:58:47 -0400 Subject: [PATCH 5/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 84d453e802..bb6f6b105e 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![CircleCI](https://img.shields.io/circleci/project/kitematic/kitematic.svg)](https://circleci.com/gh/kitematic/kitematic/tree/master) +[![Build Status](https://travis-ci.org/kitematic/kitematic.svg?branch=master)](https://travis-ci.org/kitematic/kitematic) [![Coverage Status](https://coveralls.io/repos/kitematic/kitematic/badge.svg?branch=master)](https://coveralls.io/r/kitematic/kitematic?branch=master) [![bitHound Score](https://app.bithound.io/kitematic/kitematic/badges/score.svg)](http://app.bithound.io/kitematic/kitematic) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/kitematic/kitematic?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) From 5a0fd8db6191b14792d7de073a72fc829cb442b0 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Tue, 7 Apr 2015 21:13:27 -0400 Subject: [PATCH 6/7] removing circle.yml --- circle.yml | 10 ---------- 1 file changed, 10 deletions(-) delete mode 100644 circle.yml diff --git a/circle.yml b/circle.yml deleted file mode 100644 index 9933147169..0000000000 --- a/circle.yml +++ /dev/null @@ -1,10 +0,0 @@ -machine: - node: - version: 0.10.36 -dependencies: - cache_directories: - - "resources" - - "node_modules" -notify: - webhooks: - - url: https://coveralls.io/webhook From 1b8bff01ccf5551a383d7994a66dc8bd24587f75 Mon Sep 17 00:00:00 2001 From: Jeffrey Morgan Date: Wed, 8 Apr 2015 16:26:20 -0400 Subject: [PATCH 7/7] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bb6f6b105e..cd23272083 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Build Status](https://travis-ci.org/kitematic/kitematic.svg?branch=master)](https://travis-ci.org/kitematic/kitematic) [![Coverage Status](https://coveralls.io/repos/kitematic/kitematic/badge.svg?branch=master)](https://coveralls.io/r/kitematic/kitematic?branch=master) -[![bitHound Score](https://app.bithound.io/kitematic/kitematic/badges/score.svg)](http://app.bithound.io/kitematic/kitematic) +[![bitHound Score](https://www.bithound.io/github/kitematic/kitematic/badges/score.svg)](https://www.bithound.io/github/kitematic/kitematic) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/kitematic/kitematic?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) ![Kitematic Logo](https://cloud.githubusercontent.com/assets/251292/5269258/1b229c3c-7a2f-11e4-96f1-e7baf3c86d73.png)