From 510d6447df83e0c0ad8bc2808b0e713b645812aa Mon Sep 17 00:00:00 2001 From: Filip Barl Date: Tue, 17 Oct 2017 10:45:55 +0200 Subject: [PATCH 01/16] Updated all eslint dependencies. --- client/package.json | 14 +- client/yarn.lock | 815 +++++++++++++++++++++++++++----------------- 2 files changed, 507 insertions(+), 322 deletions(-) diff --git a/client/package.json b/client/package.json index 1bfce232b0..9d39f536aa 100644 --- a/client/package.json +++ b/client/package.json @@ -52,7 +52,7 @@ "autoprefixer": "6.7.7", "babel-cli": "6.24.1", "babel-core": "6.24.1", - "babel-eslint": "7.2.3", + "babel-eslint": "8.0.1", "babel-jest": "19.0.0", "babel-loader": "7.0.0", "babel-plugin-transform-object-rest-spread": "6.23.0", @@ -60,12 +60,12 @@ "babel-preset-react": "6.24.1", "clean-webpack-plugin": "0.1.16", "css-loader": "0.28.1", - "eslint": "3.19.0", - "eslint-config-airbnb": "14.1.0", - "eslint-loader": "1.7.1", - "eslint-plugin-import": "2.2.0", - "eslint-plugin-jsx-a11y": "4.0.0", - "eslint-plugin-react": "6.10.3", + "eslint": "4.9.0", + "eslint-config-airbnb": "16.1.0", + "eslint-loader": "1.9.0", + "eslint-plugin-import": "2.7.0", + "eslint-plugin-jsx-a11y": "6.0.2", + "eslint-plugin-react": "7.4.0", "expect": "1.20.2", "extract-text-webpack-plugin": "2.1.0", "file-loader": "0.11.1", diff --git a/client/yarn.lock b/client/yarn.lock index 9074d831da..76bf3ef07d 100644 --- a/client/yarn.lock +++ b/client/yarn.lock @@ -42,28 +42,36 @@ acorn-jsx@^3.0.0: dependencies: acorn "^3.0.4" -acorn@4.0.4, acorn@^4.0.3, acorn@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.4.tgz#17a8d6a7a6c4ef538b814ec9abac2779293bf30a" - acorn@^3.0.4: version "3.3.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-3.3.0.tgz#45e37fb39e8da3f25baee3ff5369e2bb5f22017a" +acorn@^4.0.3, acorn@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-4.0.4.tgz#17a8d6a7a6c4ef538b814ec9abac2779293bf30a" + acorn@^5.0.0: version "5.0.3" resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.0.3.tgz#c460df08491463f028ccb82eab3730bf01087b3d" +acorn@^5.1.1: + version "5.1.2" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-5.1.2.tgz#911cb53e036807cf0fa778dc5d370fbd864246d7" + add-dom-event-listener@1.x: version "1.0.2" resolved "https://registry.yarnpkg.com/add-dom-event-listener/-/add-dom-event-listener-1.0.2.tgz#8faed2c41008721cf111da1d30d995b85be42bed" dependencies: object-assign "4.x" -ajv-keywords@^1.0.0, ajv-keywords@^1.1.1: +ajv-keywords@^1.1.1: version "1.5.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-1.5.1.tgz#314dd0a4b3368fad3dfcdc54ede6171b886daf3c" +ajv-keywords@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-2.1.0.tgz#a296e17f7bfae7c1ce4f7e0de53d29cb32162df0" + ajv@^4.11.2, ajv@^4.7.0, ajv@^4.9.1: version "4.11.5" resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.5.tgz#b6ee74657b993a01dce44b7944d56f485828d5bd" @@ -71,6 +79,15 @@ ajv@^4.11.2, ajv@^4.7.0, ajv@^4.9.1: co "^4.6.0" json-stable-stringify "^1.0.1" +ajv@^5.2.0, ajv@^5.2.3: + version "5.2.3" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.2.3.tgz#c06f598778c44c6b161abafe3466b81ad1814ed2" + dependencies: + co "^4.6.0" + fast-deep-equal "^1.0.0" + json-schema-traverse "^0.3.0" + json-stable-stringify "^1.0.1" + align-text@^0.1.1, align-text@^0.1.3: version "0.1.4" resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" @@ -87,10 +104,14 @@ amdefine@>=0.0.4: version "1.0.1" resolved "https://registry.yarnpkg.com/amdefine/-/amdefine-1.0.1.tgz#4a5282ac164729e93619bcfd3ad151f817ce91f5" -ansi-escapes@^1.1.0, ansi-escapes@^1.4.0: +ansi-escapes@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" +ansi-escapes@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92" + ansi-html@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e" @@ -99,6 +120,10 @@ ansi-regex@^2.0.0: version "2.1.1" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-2.1.1.tgz#c3b33ab5ee360d86e0e628f0468ae7ef27d654df" +ansi-regex@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -109,6 +134,12 @@ ansi-styles@^3.0.0: dependencies: color-convert "^1.0.0" +ansi-styles@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.0.tgz#c159b8d5be0f9e5a6f346dab94f16ce022161b88" + dependencies: + color-convert "^1.9.0" + anymatch@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-1.3.0.tgz#a3e52fa39168c825ff57b0248126ce5a8ff95507" @@ -152,9 +183,9 @@ argparse@^1.0.7: dependencies: sprintf-js "~1.0.2" -aria-query@^0.3.0: - version "0.3.0" - resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-0.3.0.tgz#cb8a9984e2862711c83c80ade5b8f5ca0de2b467" +aria-query@^0.7.0: + version "0.7.0" + resolved "https://registry.yarnpkg.com/aria-query/-/aria-query-0.7.0.tgz#4af10a1e61573ddea0cf3b99b51c52c05b424d24" dependencies: ast-types-flow "0.0.7" @@ -180,6 +211,13 @@ array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" +array-includes@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.0.3.tgz#184b48f62d92d7452bb31b323165c7f8bd02266d" + dependencies: + define-properties "^1.1.2" + es-abstract "^1.7.0" + array-union@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/array-union/-/array-union-1.0.2.tgz#9a34410e4f4e3da23dea375be5be70f24778ec39" @@ -194,13 +232,6 @@ array-unique@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.2.1.tgz#a1d97ccafcbc2625cc70fadceb36a50c58b01a53" -array.prototype.find@^2.0.1: - version "2.0.3" - resolved "https://registry.yarnpkg.com/array.prototype.find/-/array.prototype.find-2.0.3.tgz#08c3ec33e32ec4bab362a2958e686ae92f59271d" - dependencies: - define-properties "^1.1.2" - es-abstract "^1.7.0" - arrify@^1.0.0, arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -300,6 +331,12 @@ aws4@^1.2.1: version "1.6.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e" +axobject-query@^0.1.0: + version "0.1.0" + resolved "https://registry.yarnpkg.com/axobject-query/-/axobject-query-0.1.0.tgz#62f59dbc59c9f9242759ca349960e7a2fe3c36c0" + dependencies: + ast-types-flow "0.0.7" + babel-cli@6.24.1, babel-cli@^6.18.0: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-cli/-/babel-cli-6.24.1.tgz#207cd705bba61489b2ea41b5312341cf6aca2283" @@ -321,7 +358,15 @@ babel-cli@6.24.1, babel-cli@^6.18.0: optionalDependencies: chokidar "^1.6.1" -babel-code-frame@^6.11.0, babel-code-frame@^6.16.0, babel-code-frame@^6.22.0: +babel-code-frame@7.0.0-beta.0: + version "7.0.0-beta.0" + resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-7.0.0-beta.0.tgz#418a7b5f3f7dc9a4670e61b1158b4c5661bec98d" + dependencies: + chalk "^2.0.0" + esutils "^2.0.2" + js-tokens "^3.0.0" + +babel-code-frame@^6.11.0, babel-code-frame@^6.22.0: version "6.22.0" resolved "https://registry.yarnpkg.com/babel-code-frame/-/babel-code-frame-6.22.0.tgz#027620bee567a88c32561574e7fd0801d33118e4" dependencies: @@ -353,14 +398,14 @@ babel-core@6.24.1, babel-core@^6.0.0, babel-core@^6.24.1: slash "^1.0.0" source-map "^0.5.0" -babel-eslint@7.2.3: - version "7.2.3" - resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-7.2.3.tgz#b2fe2d80126470f5c19442dc757253a897710827" +babel-eslint@8.0.1: + version "8.0.1" + resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-8.0.1.tgz#5d718be7a328625d006022eb293ed3008cbd6346" dependencies: - babel-code-frame "^6.22.0" - babel-traverse "^6.23.1" - babel-types "^6.23.0" - babylon "^6.17.0" + babel-code-frame "7.0.0-beta.0" + babel-traverse "7.0.0-beta.0" + babel-types "7.0.0-beta.0" + babylon "7.0.0-beta.22" babel-generator@^6.18.0, babel-generator@^6.24.1: version "6.24.1" @@ -401,6 +446,15 @@ babel-helper-define-map@^6.24.1: babel-types "^6.24.1" lodash "^4.2.0" +babel-helper-function-name@7.0.0-beta.0: + version "7.0.0-beta.0" + resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-7.0.0-beta.0.tgz#d1b6779b647e5c5c31ebeb05e13b998e4d352d56" + dependencies: + babel-helper-get-function-arity "7.0.0-beta.0" + babel-template "7.0.0-beta.0" + babel-traverse "7.0.0-beta.0" + babel-types "7.0.0-beta.0" + babel-helper-function-name@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9" @@ -411,6 +465,12 @@ babel-helper-function-name@^6.24.1: babel-traverse "^6.24.1" babel-types "^6.24.1" +babel-helper-get-function-arity@7.0.0-beta.0: + version "7.0.0-beta.0" + resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-7.0.0-beta.0.tgz#9d1ab7213bb5efe1ef1638a8ea1489969b5a8b6e" + dependencies: + babel-types "7.0.0-beta.0" + babel-helper-get-function-arity@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d" @@ -474,6 +534,10 @@ babel-loader@7.0.0: loader-utils "^1.0.2" mkdirp "^0.5.1" +babel-messages@7.0.0-beta.0: + version "7.0.0-beta.0" + resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-7.0.0-beta.0.tgz#6df01296e49fc8fbd0637394326a167f36da817b" + babel-messages@^6.23.0: version "6.23.0" resolved "https://registry.yarnpkg.com/babel-messages/-/babel-messages-6.23.0.tgz#f3cdf4703858035b2a2951c6ec5edf6c62f2630e" @@ -885,6 +949,15 @@ babel-runtime@^6.26.0: core-js "^2.4.0" regenerator-runtime "^0.11.0" +babel-template@7.0.0-beta.0: + version "7.0.0-beta.0" + resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-7.0.0-beta.0.tgz#85083cf9e4395d5e48bf5154d7a8d6991cafecfb" + dependencies: + babel-traverse "7.0.0-beta.0" + babel-types "7.0.0-beta.0" + babylon "7.0.0-beta.22" + lodash "^4.2.0" + babel-template@^6.16.0, babel-template@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-template/-/babel-template-6.24.1.tgz#04ae514f1f93b3a2537f2a0f60a5a45fb8308333" @@ -895,7 +968,21 @@ babel-template@^6.16.0, babel-template@^6.24.1: babylon "^6.11.0" lodash "^4.2.0" -babel-traverse@^6.18.0, babel-traverse@^6.23.1, babel-traverse@^6.24.1: +babel-traverse@7.0.0-beta.0: + version "7.0.0-beta.0" + resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-7.0.0-beta.0.tgz#da14be9b762f62a2f060db464eaafdd8cd072a41" + dependencies: + babel-code-frame "7.0.0-beta.0" + babel-helper-function-name "7.0.0-beta.0" + babel-messages "7.0.0-beta.0" + babel-types "7.0.0-beta.0" + babylon "7.0.0-beta.22" + debug "^3.0.1" + globals "^10.0.0" + invariant "^2.2.0" + lodash "^4.2.0" + +babel-traverse@^6.18.0, babel-traverse@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-traverse/-/babel-traverse-6.24.1.tgz#ab36673fd356f9a0948659e7b338d5feadb31695" dependencies: @@ -909,7 +996,15 @@ babel-traverse@^6.18.0, babel-traverse@^6.23.1, babel-traverse@^6.24.1: invariant "^2.2.0" lodash "^4.2.0" -babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.23.0, babel-types@^6.24.1: +babel-types@7.0.0-beta.0: + version "7.0.0-beta.0" + resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-7.0.0-beta.0.tgz#eb8b6e556470e6dcc4aef982d79ad229469b5169" + dependencies: + esutils "^2.0.2" + lodash "^4.2.0" + to-fast-properties "^2.0.0" + +babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.24.1: version "6.24.1" resolved "https://registry.yarnpkg.com/babel-types/-/babel-types-6.24.1.tgz#a136879dc15b3606bda0d90c1fc74304c2ff0975" dependencies: @@ -918,11 +1013,15 @@ babel-types@^6.18.0, babel-types@^6.19.0, babel-types@^6.23.0, babel-types@^6.24 lodash "^4.2.0" to-fast-properties "^1.0.1" +babylon@7.0.0-beta.22: + version "7.0.0-beta.22" + resolved "https://registry.yarnpkg.com/babylon/-/babylon-7.0.0-beta.22.tgz#74f0ad82ed7c7c3cfeab74cf684f815104161b65" + babylon@^6.11.0: version "6.16.1" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.16.1.tgz#30c5a22f481978a9e7f8cdfdf496b11d94b404d3" -babylon@^6.13.0, babylon@^6.15.0, babylon@^6.17.0: +babylon@^6.13.0, babylon@^6.15.0: version "6.17.0" resolved "https://registry.yarnpkg.com/babylon/-/babylon-6.17.0.tgz#37da948878488b9c4e3c4038893fa3314b3fc932" @@ -930,6 +1029,10 @@ balanced-match@^0.4.1, balanced-match@^0.4.2: version "0.4.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-0.4.2.tgz#cb3f3e3c732dc0f01ee70b403f302e61d7709838" +balanced-match@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.0.tgz#89b4d199ab2bee49de164ea02b89ce462d71b767" + base16@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/base16/-/base16-1.0.0.tgz#e297f60d7ec1014a7a971a39ebc8a98c0b681e70" @@ -993,6 +1096,13 @@ brace-expansion@^1.0.0: balanced-match "^0.4.1" concat-map "0.0.1" +brace-expansion@^1.1.7: + version "1.1.8" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.8.tgz#c07b211c7c952ec1f8efd51a77ef0d1d3990a292" + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + braces@^1.8.2: version "1.8.5" resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" @@ -1218,6 +1328,14 @@ chalk@^1.0.0, chalk@^1.1.0, chalk@^1.1.1, chalk@^1.1.3: strip-ansi "^3.0.0" supports-color "^2.0.0" +chalk@^2.0.0, chalk@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.1.0.tgz#ac5becf14fa21b99c6c92ca7a7d7cfd5b17e743e" + dependencies: + ansi-styles "^3.1.0" + escape-string-regexp "^1.0.5" + supports-color "^4.0.0" + chokidar@^1.4.3, chokidar@^1.6.1: version "1.6.1" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-1.6.1.tgz#2f4447ab5e96e50fb3d789fd90d4c72e0e4c70c2" @@ -1269,11 +1387,11 @@ clean-webpack-plugin@0.1.16: dependencies: rimraf "~2.5.1" -cli-cursor@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-1.0.2.tgz#64da3f7d56a54412e59794bd62dc35295e8f2987" +cli-cursor@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/cli-cursor/-/cli-cursor-2.1.0.tgz#b35dac376479facc3e94747d41d0d0f5238ffcb5" dependencies: - restore-cursor "^1.0.1" + restore-cursor "^2.0.0" cli-table@~0.3.1: version "0.3.1" @@ -1329,7 +1447,7 @@ code-point-at@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" -color-convert@^1.0.0, color-convert@^1.3.0: +color-convert@^1.0.0, color-convert@^1.3.0, color-convert@^1.9.0: version "1.9.0" resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.0.tgz#1accf97dd739b983bf994d56fec8f95853641b7a" dependencies: @@ -1420,7 +1538,7 @@ concat-map@0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" -concat-stream@^1.5.2: +concat-stream@^1.6.0: version "1.6.0" resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.0.tgz#0aac662fd52be78964d5532f694784e70110acf7" dependencies: @@ -1537,6 +1655,14 @@ cross-spawn@^3.0.0: lru-cache "^4.0.1" which "^1.2.9" +cross-spawn@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-5.1.0.tgz#e8bd0efee58fcff6f8f94510a0a554bbfa235449" + dependencies: + lru-cache "^4.0.1" + shebang-command "^1.2.0" + which "^1.2.9" + cryptiles@2.x.x: version "2.0.5" resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8" @@ -1764,12 +1890,6 @@ d3-time@1: version "1.0.6" resolved "https://registry.yarnpkg.com/d3-time/-/d3-time-1.0.6.tgz#a55b13d7d15d3a160ae91708232e0835f1d5e945" -d@1: - version "1.0.0" - resolved "https://registry.yarnpkg.com/d/-/d-1.0.0.tgz#754bb5bfe55451da69a58b94d45f4c5b0462d58f" - dependencies: - es5-ext "^0.10.9" - dagre@0.7.4: version "0.7.4" resolved "https://registry.yarnpkg.com/dagre/-/dagre-0.7.4.tgz#de72f0e74a550ce11ce638f0a136fed712398022" @@ -1791,12 +1911,6 @@ date-now@^0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/date-now/-/date-now-0.1.4.tgz#eaf439fd4d4848ad74e5cc7dbef200672b9e345b" -debug@2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/debug/-/debug-2.2.0.tgz#f87057e995b1a1f6ae6a4960664137bc56f039da" - dependencies: - ms "0.7.1" - debug@2.6.1: version "2.6.1" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.1.tgz#79855090ba2c4e3115cc7d8769491d58f0491351" @@ -1815,6 +1929,18 @@ debug@2.6.6, debug@^2.0.0, debug@^2.1.0, debug@^2.1.1, debug@^2.2.0: dependencies: ms "0.7.3" +debug@^2.6.8: + version "2.6.9" + resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" + dependencies: + ms "2.0.0" + +debug@^3.0.1: + version "3.1.0" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" + dependencies: + ms "2.0.0" + decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" @@ -1905,7 +2031,7 @@ diffie-hellman@^5.0.0: miller-rabin "^4.0.0" randombytes "^2.0.0" -doctrine@1.5.0, doctrine@^1.2.2: +doctrine@1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-1.5.0.tgz#379dce730f6166f76cefa4e6707a159b02c5a6fa" dependencies: @@ -2067,58 +2193,6 @@ es-to-primitive@^1.1.1: is-date-object "^1.0.1" is-symbol "^1.0.1" -es5-ext@^0.10.14, es5-ext@^0.10.9, es5-ext@~0.10.14: - version "0.10.15" - resolved "https://registry.yarnpkg.com/es5-ext/-/es5-ext-0.10.15.tgz#c330a5934c1ee21284a7c081a86e5fd937c91ea6" - dependencies: - es6-iterator "2" - es6-symbol "~3.1" - -es6-iterator@2, es6-iterator@^2.0.1, es6-iterator@~2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/es6-iterator/-/es6-iterator-2.0.1.tgz#8e319c9f0453bf575d374940a655920e59ca5512" - dependencies: - d "1" - es5-ext "^0.10.14" - es6-symbol "^3.1" - -es6-map@^0.1.3: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-map/-/es6-map-0.1.5.tgz#9136e0503dcc06a301690f0bb14ff4e364e949f0" - dependencies: - d "1" - es5-ext "~0.10.14" - es6-iterator "~2.0.1" - es6-set "~0.1.5" - es6-symbol "~3.1.1" - event-emitter "~0.3.5" - -es6-set@~0.1.5: - version "0.1.5" - resolved "https://registry.yarnpkg.com/es6-set/-/es6-set-0.1.5.tgz#d2b3ec5d4d800ced818db538d28974db0a73ccb1" - dependencies: - d "1" - es5-ext "~0.10.14" - es6-iterator "~2.0.1" - es6-symbol "3.1.1" - event-emitter "~0.3.5" - -es6-symbol@3.1.1, es6-symbol@^3.1, es6-symbol@^3.1.1, es6-symbol@~3.1, es6-symbol@~3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" - dependencies: - d "1" - es5-ext "~0.10.14" - -es6-weak-map@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/es6-weak-map/-/es6-weak-map-2.0.2.tgz#5e3ab32251ffd1538a1f8e5ffa1357772f92d96f" - dependencies: - d "1" - es5-ext "^0.10.14" - es6-iterator "^2.0.1" - es6-symbol "^3.1.1" - escape-html@~1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" @@ -2138,138 +2212,146 @@ escodegen@^1.6.1: optionalDependencies: source-map "~0.2.0" -escope@^3.6.0: - version "3.6.0" - resolved "https://registry.yarnpkg.com/escope/-/escope-3.6.0.tgz#e01975e812781a163a6dadfdd80398dc64c889c3" +eslint-config-airbnb-base@^12.1.0: + version "12.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-12.1.0.tgz#386441e54a12ccd957b0a92564a4bafebd747944" dependencies: - es6-map "^0.1.3" - es6-weak-map "^2.0.1" - esrecurse "^4.1.0" - estraverse "^4.1.1" - -eslint-config-airbnb-base@^11.1.0: - version "11.1.1" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb-base/-/eslint-config-airbnb-base-11.1.1.tgz#61e9e89e4eb89f474f6913ac817be9fbb59063e0" + eslint-restricted-globals "^0.1.1" -eslint-config-airbnb@14.1.0: - version "14.1.0" - resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-14.1.0.tgz#355d290040bbf8e00bf8b4b19f4b70cbe7c2317f" +eslint-config-airbnb@16.1.0: + version "16.1.0" + resolved "https://registry.yarnpkg.com/eslint-config-airbnb/-/eslint-config-airbnb-16.1.0.tgz#2546bfb02cc9fe92284bf1723ccf2e87bc45ca46" dependencies: - eslint-config-airbnb-base "^11.1.0" + eslint-config-airbnb-base "^12.1.0" -eslint-import-resolver-node@^0.2.0: - version "0.2.3" - resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.2.3.tgz#5add8106e8c928db2cba232bcd9efa846e3da16c" +eslint-import-resolver-node@^0.3.1: + version "0.3.1" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.1.tgz#4422574cde66a9a7b099938ee4d508a199e0e3cc" dependencies: - debug "^2.2.0" - object-assign "^4.0.1" - resolve "^1.1.6" + debug "^2.6.8" + resolve "^1.2.0" -eslint-loader@1.7.1: - version "1.7.1" - resolved "https://registry.yarnpkg.com/eslint-loader/-/eslint-loader-1.7.1.tgz#50b158dd6272dcefb97e984254837f81a5802ce0" +eslint-loader@1.9.0: + version "1.9.0" + resolved "https://registry.yarnpkg.com/eslint-loader/-/eslint-loader-1.9.0.tgz#7e1be9feddca328d3dcfaef1ad49d5beffe83a13" dependencies: - find-cache-dir "^0.1.1" loader-fs-cache "^1.0.0" loader-utils "^1.0.2" object-assign "^4.0.1" object-hash "^1.1.4" rimraf "^2.6.1" -eslint-module-utils@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.0.0.tgz#a6f8c21d901358759cdc35dbac1982ae1ee58bce" +eslint-module-utils@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.1.1.tgz#abaec824177613b8a95b299639e1b6facf473449" dependencies: - debug "2.2.0" + debug "^2.6.8" pkg-dir "^1.0.0" -eslint-plugin-import@2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.2.0.tgz#72ba306fad305d67c4816348a4699a4229ac8b4e" +eslint-plugin-import@2.7.0: + version "2.7.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.7.0.tgz#21de33380b9efb55f5ef6d2e210ec0e07e7fa69f" dependencies: builtin-modules "^1.1.1" contains-path "^0.1.0" - debug "^2.2.0" + debug "^2.6.8" doctrine "1.5.0" - eslint-import-resolver-node "^0.2.0" - eslint-module-utils "^2.0.0" + eslint-import-resolver-node "^0.3.1" + eslint-module-utils "^2.1.1" has "^1.0.1" lodash.cond "^4.3.0" minimatch "^3.0.3" - pkg-up "^1.0.0" + read-pkg-up "^2.0.0" -eslint-plugin-jsx-a11y@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-4.0.0.tgz#779bb0fe7b08da564a422624911de10061e048ee" +eslint-plugin-jsx-a11y@6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.0.2.tgz#659277a758b036c305a7e4a13057c301cd3be73f" dependencies: - aria-query "^0.3.0" + aria-query "^0.7.0" + array-includes "^3.0.3" ast-types-flow "0.0.7" + axobject-query "^0.1.0" damerau-levenshtein "^1.0.0" emoji-regex "^6.1.0" - jsx-ast-utils "^1.0.0" - object-assign "^4.0.1" + jsx-ast-utils "^1.4.0" -eslint-plugin-react@6.10.3: - version "6.10.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-6.10.3.tgz#c5435beb06774e12c7db2f6abaddcbf900cd3f78" +eslint-plugin-react@7.4.0: + version "7.4.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.4.0.tgz#300a95861b9729c087d362dd64abcc351a74364a" dependencies: - array.prototype.find "^2.0.1" - doctrine "^1.2.2" + doctrine "^2.0.0" has "^1.0.1" - jsx-ast-utils "^1.3.4" - object.assign "^4.0.4" + jsx-ast-utils "^2.0.0" + prop-types "^15.5.10" -eslint@3.19.0: - version "3.19.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-3.19.0.tgz#c8fc6201c7f40dd08941b87c085767386a679acc" +eslint-restricted-globals@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/eslint-restricted-globals/-/eslint-restricted-globals-0.1.1.tgz#35f0d5cbc64c2e3ed62e93b4b1a7af05ba7ed4d7" + +eslint-scope@^3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-3.7.1.tgz#3d63c3edfda02e06e01a452ad88caacc7cdcb6e8" dependencies: - babel-code-frame "^6.16.0" - chalk "^1.1.3" - concat-stream "^1.5.2" - debug "^2.1.1" + esrecurse "^4.1.0" + estraverse "^4.1.1" + +eslint@4.9.0: + version "4.9.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-4.9.0.tgz#76879d274068261b191fe0f2f56c74c2f4208e8b" + dependencies: + ajv "^5.2.0" + babel-code-frame "^6.22.0" + chalk "^2.1.0" + concat-stream "^1.6.0" + cross-spawn "^5.1.0" + debug "^3.0.1" doctrine "^2.0.0" - escope "^3.6.0" - espree "^3.4.0" + eslint-scope "^3.7.1" + espree "^3.5.1" esquery "^1.0.0" estraverse "^4.2.0" esutils "^2.0.2" file-entry-cache "^2.0.0" - glob "^7.0.3" - globals "^9.14.0" - ignore "^3.2.0" + functional-red-black-tree "^1.0.1" + glob "^7.1.2" + globals "^9.17.0" + ignore "^3.3.3" imurmurhash "^0.1.4" - inquirer "^0.12.0" - is-my-json-valid "^2.10.0" + inquirer "^3.0.6" is-resolvable "^1.0.0" - js-yaml "^3.5.1" - json-stable-stringify "^1.0.0" + js-yaml "^3.9.1" + json-stable-stringify "^1.0.1" levn "^0.3.0" - lodash "^4.0.0" - mkdirp "^0.5.0" + lodash "^4.17.4" + minimatch "^3.0.2" + mkdirp "^0.5.1" natural-compare "^1.4.0" optionator "^0.8.2" - path-is-inside "^1.0.1" - pluralize "^1.2.1" - progress "^1.1.8" - require-uncached "^1.0.2" - shelljs "^0.7.5" - strip-bom "^3.0.0" + path-is-inside "^1.0.2" + pluralize "^7.0.0" + progress "^2.0.0" + require-uncached "^1.0.3" + semver "^5.3.0" + strip-ansi "^4.0.0" strip-json-comments "~2.0.1" - table "^3.7.8" + table "^4.0.1" text-table "~0.2.0" - user-home "^2.0.0" -espree@^3.4.0: - version "3.4.0" - resolved "https://registry.yarnpkg.com/espree/-/espree-3.4.0.tgz#41656fa5628e042878025ef467e78f125cb86e1d" +espree@^3.5.1: + version "3.5.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-3.5.1.tgz#0c988b8ab46db53100a1954ae4ba995ddd27d87e" dependencies: - acorn "4.0.4" + acorn "^5.1.1" acorn-jsx "^3.0.0" esprima@^2.6.0, esprima@^2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/esprima/-/esprima-2.7.3.tgz#96e3b70d5779f6ad49cd032673d1c312767ba581" +esprima@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.0.tgz#4499eddcd1110e0b218bacf2fa7f7f59f55ca804" + esquery@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.0.0.tgz#cfba8b57d7fba93f17298a8a006a04cda13d80fa" @@ -2303,13 +2385,6 @@ etag@~1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/etag/-/etag-1.8.0.tgz#6f631aef336d6c46362b51764044ce216be3c051" -event-emitter@~0.3.5: - version "0.3.5" - resolved "https://registry.yarnpkg.com/event-emitter/-/event-emitter-0.3.5.tgz#df8c69eef1647923c7157b9ce83840610b02cc39" - dependencies: - d "1" - es5-ext "~0.10.14" - event-stream@^3.3.2: version "3.3.4" resolved "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571" @@ -2342,10 +2417,6 @@ exec-sh@^0.2.0: dependencies: merge "^1.1.3" -exit-hook@^1.0.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/exit-hook/-/exit-hook-1.1.1.tgz#f05ca233b48c05d54fff07765df8507e95c02ff8" - expand-brackets@^0.1.4: version "0.1.5" resolved "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-0.1.5.tgz#df07284e342a807cd733ac5af72411e581d1177b" @@ -2407,6 +2478,14 @@ extend@~3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.0.tgz#5a474353b9f3353ddd8176dfd37b91c83a46f1d4" +external-editor@^2.0.4: + version "2.0.5" + resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.0.5.tgz#52c249a3981b9ba187c7cacf5beb50bf1d91a6bc" + dependencies: + iconv-lite "^0.4.17" + jschardet "^1.4.2" + tmp "^0.0.33" + extglob@^0.3.1: version "0.3.2" resolved "https://registry.yarnpkg.com/extglob/-/extglob-0.3.2.tgz#2e18ff3d2f49ab2765cec9023f011daa8d8349a1" @@ -2426,6 +2505,10 @@ extsprintf@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.0.2.tgz#e1080e0658e300b06294990cc70e1502235fd550" +fast-deep-equal@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.0.0.tgz#96256a3bc975595eb36d82e9929d060d893439ff" + fast-levenshtein@~2.0.4: version "2.0.6" resolved "https://registry.yarnpkg.com/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz#3d8a5c66883a16a30ca8643e851f19baa7797917" @@ -2446,9 +2529,9 @@ fb-watchman@^2.0.0: dependencies: bser "^2.0.0" -fbjs@^0.8.4, fbjs@^0.8.9: - version "0.8.11" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.11.tgz#340b590b8a2278a01ef7467c07a16da9b753db24" +fbjs@^0.8.16, fbjs@^0.8.5: + version "0.8.16" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db" dependencies: core-js "^1.0.0" isomorphic-fetch "^2.1.1" @@ -2458,9 +2541,9 @@ fbjs@^0.8.4, fbjs@^0.8.9: setimmediate "^1.0.5" ua-parser-js "^0.7.9" -fbjs@^0.8.5: - version "0.8.16" - resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.16.tgz#5e67432f550dc41b572bf55847b8aca64e5337db" +fbjs@^0.8.4, fbjs@^0.8.9: + version "0.8.11" + resolved "https://registry.yarnpkg.com/fbjs/-/fbjs-0.8.11.tgz#340b590b8a2278a01ef7467c07a16da9b753db24" dependencies: core-js "^1.0.0" isomorphic-fetch "^2.1.1" @@ -2470,12 +2553,11 @@ fbjs@^0.8.5: setimmediate "^1.0.5" ua-parser-js "^0.7.9" -figures@^1.3.5: - version "1.7.0" - resolved "https://registry.yarnpkg.com/figures/-/figures-1.7.0.tgz#cbe1e3affcf1cd44b80cadfed28dc793a9701d2e" +figures@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/figures/-/figures-2.0.0.tgz#3ab1a2d2a62c8bfb431a0c94cb797a2fce27c962" dependencies: escape-string-regexp "^1.0.5" - object-assign "^4.1.0" file-entry-cache@^2.0.0: version "2.0.0" @@ -2548,7 +2630,7 @@ find-up@^1.0.0: path-exists "^2.0.0" pinkie-promise "^2.0.0" -find-up@^2.1.0: +find-up@^2.0.0, find-up@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/find-up/-/find-up-2.1.0.tgz#45d1b7e506c717ddd482775a2b77920a3c0c57a7" dependencies: @@ -2665,6 +2747,10 @@ function-bind@^1.0.2, function-bind@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.0.tgz#16176714c801798e4e8f2cf7f7529467bb4a5771" +functional-red-black-tree@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" + gauge@~2.7.1: version "2.7.3" resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.3.tgz#1c23855f962f17b3ad3d0dc7443f304542edfe09" @@ -2742,6 +2828,17 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.1.1, glob@~7.1.1: once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + glob@~4.3.0: version "4.3.5" resolved "https://registry.yarnpkg.com/glob/-/glob-4.3.5.tgz#80fbb08ca540f238acce5d11d1e9bc41e75173d3" @@ -2761,10 +2858,18 @@ glob@~5.0.14: once "^1.3.0" path-is-absolute "^1.0.0" -globals@^9.0.0, globals@^9.14.0: +globals@^10.0.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-10.1.0.tgz#4425a1881be0d336b4a823a82a7be725d5dd987c" + +globals@^9.0.0: version "9.16.0" resolved "https://registry.yarnpkg.com/globals/-/globals-9.16.0.tgz#63e903658171ec2d9f51b1d31de5e2b8dc01fb80" +globals@^9.17.0: + version "9.18.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-9.18.0.tgz#aa3896b3e69b487f17e31ed2143d69a8e30c2d8a" + globby@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/globby/-/globby-5.0.0.tgz#ebd84667ca0dbb330b99bcfc68eac2bc54370e0d" @@ -2846,6 +2951,10 @@ has-flag@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-1.0.0.tgz#9d9e793165ce017a00f00418c43f942a7b1d11fa" +has-flag@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-2.0.0.tgz#e8207af1cc7b30d446cc70b734b5e8be18f88d51" + has-unicode@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -3006,6 +3115,10 @@ iconv-lite@0.4.13, iconv-lite@~0.4.13: version "0.4.13" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.13.tgz#1f88aba4ab0b1508e8312acc39345f36e992e2f2" +iconv-lite@^0.4.17: + version "0.4.19" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" + icss-replace-symbols@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.0.2.tgz#cb0b6054eb3af6edc9ab1d62d01933e2d4c8bfa5" @@ -3014,9 +3127,9 @@ ieee754@^1.1.4: version "1.1.8" resolved "https://registry.yarnpkg.com/ieee754/-/ieee754-1.1.8.tgz#be33d40ac10ef1926701f6f08a2d86fbfd1ad3e4" -ignore@^3.2.0: - version "3.2.6" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.2.6.tgz#26e8da0644be0bb4cb39516f6c79f0e0f4ffe48c" +ignore@^3.3.3: + version "3.3.5" + resolved "https://registry.yarnpkg.com/ignore/-/ignore-3.3.5.tgz#c4e715455f6073a8d7e5dae72d2fc9d71663dba6" immutable-devtools@0.0.7: version "0.0.7" @@ -3067,22 +3180,23 @@ ini@~1.3.0: version "1.3.4" resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.4.tgz#0537cb79daf59b59a1a517dff706c86ec039162e" -inquirer@^0.12.0: - version "0.12.0" - resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-0.12.0.tgz#1ef2bfd63504df0bc75785fff8c2c41df12f077e" +inquirer@^3.0.6: + version "3.3.0" + resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.3.0.tgz#9dd2f2ad765dcab1ff0443b491442a20ba227dc9" dependencies: - ansi-escapes "^1.1.0" - ansi-regex "^2.0.0" - chalk "^1.0.0" - cli-cursor "^1.0.1" + ansi-escapes "^3.0.0" + chalk "^2.0.0" + cli-cursor "^2.1.0" cli-width "^2.0.0" - figures "^1.3.5" + external-editor "^2.0.4" + figures "^2.0.0" lodash "^4.3.0" - readline2 "^1.0.1" - run-async "^0.1.0" - rx-lite "^3.1.2" - string-width "^1.0.1" - strip-ansi "^3.0.0" + mute-stream "0.0.7" + run-async "^2.2.0" + rx-lite "^4.0.8" + rx-lite-aggregates "^4.0.8" + string-width "^2.1.0" + strip-ansi "^4.0.0" through "^2.3.6" interpret@^1.0.0: @@ -3215,7 +3329,7 @@ is-glob@^2.0.0, is-glob@^2.0.1: dependencies: is-extglob "^1.0.0" -is-my-json-valid@^2.10.0, is-my-json-valid@^2.12.0: +is-my-json-valid@^2.12.0: version "2.16.0" resolved "https://registry.yarnpkg.com/is-my-json-valid/-/is-my-json-valid-2.16.0.tgz#f079dd9bfdae65ee2038aae8acbc86ab109e3693" dependencies: @@ -3268,6 +3382,10 @@ is-primitive@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/is-primitive/-/is-primitive-2.0.0.tgz#207bab91638499c07b2adf240a41a87210034575" +is-promise@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-promise/-/is-promise-2.1.0.tgz#79a2a9ece7f096e80f36d2b2f3bc16c1ff4bf3fa" + is-property@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/is-property/-/is-property-1.0.2.tgz#57fe1c4e48474edd65b09911f26b1cd4095dda84" @@ -3633,17 +3751,28 @@ js-tokens@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.1.tgz#08e9f132484a2c45a30907e9dc4d5567b7f114d7" -js-yaml@^3.4.3, js-yaml@^3.5.1, js-yaml@^3.7.0, js-yaml@~3.7.0: +js-yaml@^3.4.3, js-yaml@^3.7.0, js-yaml@~3.7.0: version "3.7.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.7.0.tgz#5c967ddd837a9bfdca5f2de84253abe8a1c03b80" dependencies: argparse "^1.0.7" esprima "^2.6.0" +js-yaml@^3.9.1: + version "3.10.0" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.10.0.tgz#2e78441646bd4682e963f22b6e92823c309c62dc" + dependencies: + argparse "^1.0.7" + esprima "^4.0.0" + jsbn@~0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" +jschardet@^1.4.2: + version "1.5.1" + resolved "https://registry.yarnpkg.com/jschardet/-/jschardet-1.5.1.tgz#c519f629f86b3a5bedba58a88d311309eec097f9" + jsdom@^9.11.0: version "9.12.0" resolved "https://registry.yarnpkg.com/jsdom/-/jsdom-9.12.0.tgz#e8c546fffcb06c00d4833ca84410fed7f8a097d4" @@ -3684,11 +3813,15 @@ json-loader@0.5.4, json-loader@^0.5.4: version "0.5.4" resolved "https://registry.yarnpkg.com/json-loader/-/json-loader-0.5.4.tgz#8baa1365a632f58a3c46d20175fc6002c96e37de" +json-schema-traverse@^0.3.0: + version "0.3.1" + resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.3.1.tgz#349a6d44c53a51de89b40805c5d5e59b417d3340" + json-schema@0.2.3: version "0.2.3" resolved "https://registry.yarnpkg.com/json-schema/-/json-schema-0.2.3.tgz#b480c892e59a2f05954ce727bd3f2a4e882f9e13" -json-stable-stringify@^1.0.0, json-stable-stringify@^1.0.1: +json-stable-stringify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz#9a759d39c5f2ff503fd5300646ed445f88c4f9af" dependencies: @@ -3723,11 +3856,15 @@ jsprim@^1.2.2: json-schema "0.2.3" verror "1.3.6" -jsx-ast-utils@^1.0.0, jsx-ast-utils@^1.3.4: - version "1.4.0" - resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.0.tgz#5afe38868f56bc8cc7aeaef0100ba8c75bd12591" +jsx-ast-utils@^1.4.0: + version "1.4.1" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-1.4.1.tgz#3867213e8dd79bf1e8f2300c0cfc1efb182c0df1" + +jsx-ast-utils@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/jsx-ast-utils/-/jsx-ast-utils-2.0.1.tgz#e801b1b39985e20fffc87b40e3748080e2dcac7f" dependencies: - object-assign "^4.1.0" + array-includes "^3.0.3" kind-of@^2.0.1: version "2.0.1" @@ -3786,6 +3923,15 @@ load-json-file@^1.0.0: pinkie-promise "^2.0.0" strip-bom "^2.0.0" +load-json-file@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-2.0.0.tgz#7947e42149af80d696cbf797bcaabcfe1fe29ca8" + dependencies: + graceful-fs "^4.1.2" + parse-json "^2.2.0" + pify "^2.0.0" + strip-bom "^3.0.0" + loader-fs-cache@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/loader-fs-cache/-/loader-fs-cache-1.0.0.tgz#bbfc18ff4d986dcd39b41d0570fd752f08366340" @@ -3894,7 +4040,7 @@ lodash.uniq@^4.3.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" -lodash@4.17.4, lodash@^4.0.0, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0: +lodash@4.17.4, lodash@^4.0.0, lodash@^4.14.0, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.2.0, lodash@^4.2.1, lodash@^4.3.0: version "4.17.4" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.4.tgz#78203a4d1c328ae1d86dca6460e369b57f4055ae" @@ -3918,7 +4064,7 @@ longest@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" -loose-envify@^1.0.0, loose-envify@^1.1.0: +loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.3.1.tgz#d1a8ad33fa9ce0e713d65fdd0ac8b748d478c848" dependencies: @@ -4059,6 +4205,10 @@ mime@1.3.4, mime@1.3.x, mime@^1.3.4: version "1.3.4" resolved "https://registry.yarnpkg.com/mime/-/mime-1.3.4.tgz#115f9e3b6b3daf2959983cb38f149a2d40eb5d53" +mimic-fn@^1.0.0: + version "1.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.1.0.tgz#e667783d92e89dbd342818b5230b9d62a672ad18" + minimalistic-assert@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.0.tgz#702be2dda6b37f4836bcb3f5db56641b64a1d3d3" @@ -4079,6 +4229,12 @@ minimatch@^2.0.1: dependencies: brace-expansion "^1.0.0" +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + dependencies: + brace-expansion "^1.1.7" + minimist@0.0.8, minimist@~0.0.1: version "0.0.8" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" @@ -4108,10 +4264,6 @@ moment@2.18.1: version "2.18.1" resolved "https://registry.yarnpkg.com/moment/-/moment-2.18.1.tgz#c36193dd3ce1c2eed2adb7c802dbbc77a81b1c0f" -ms@0.7.1: - version "0.7.1" - resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.1.tgz#9cd13c03adbff25b65effde7ce864ee952017098" - ms@0.7.2: version "0.7.2" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.2.tgz#ae25cf2512b3885a1d95d7f037868d8431124765" @@ -4120,9 +4272,13 @@ ms@0.7.3: version "0.7.3" resolved "https://registry.yarnpkg.com/ms/-/ms-0.7.3.tgz#708155a5e44e33f5fd0fc53e81d0d40a91be1fff" -mute-stream@0.0.5: - version "0.0.5" - resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.5.tgz#8fbfabb0a98a253d3184331f9e8deb7372fac6c0" +ms@2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" + +mute-stream@0.0.7: + version "0.0.7" + resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" nan@^2.3.0, nan@^2.3.2: version "2.5.1" @@ -4385,18 +4541,10 @@ object-inspect@^1.1.0: version "1.2.1" resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.2.1.tgz#3b62226eb8f6d441751c7d8f22a20ff80ac9dc3f" -object-keys@^1.0.10, object-keys@^1.0.8, object-keys@^1.0.9: +object-keys@^1.0.8, object-keys@^1.0.9: version "1.0.11" resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.0.11.tgz#c54601778ad560f1142ce0e01bcca8b56d13426d" -object.assign@^4.0.4: - version "4.0.4" - resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.0.4.tgz#b1c9cc044ef1b9fe63606fc141abbb32e14730cc" - dependencies: - define-properties "^1.1.2" - function-bind "^1.1.0" - object-keys "^1.0.10" - object.entries@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/object.entries/-/object.entries-1.0.4.tgz#1bf9a4dd2288f5b33f3a993d257661f05d161a5f" @@ -4425,9 +4573,11 @@ once@^1.3.0, once@^1.3.3, once@^1.4.0: dependencies: wrappy "1" -onetime@^1.0.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-1.1.0.tgz#a1f7838f8314c516f05ecefcbc4ccfe04b4ed789" +onetime@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/onetime/-/onetime-2.0.1.tgz#067428230fd67443b2794b22bba528b6867962d4" + dependencies: + mimic-fn "^1.0.0" optimist@^0.6.1: version "0.6.1" @@ -4461,7 +4611,7 @@ os-locale@^1.4.0: dependencies: lcid "^1.0.0" -os-tmpdir@^1.0.0, os-tmpdir@^1.0.1: +os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/os-tmpdir/-/os-tmpdir-1.0.2.tgz#bbe67406c79aa85c5cfec766fe5734555dfa1274" @@ -4561,7 +4711,7 @@ path-is-absolute@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" -path-is-inside@^1.0.1: +path-is-inside@^1.0.1, path-is-inside@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" @@ -4587,6 +4737,12 @@ path-type@^1.0.0: pify "^2.0.0" pinkie-promise "^2.0.0" +path-type@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/path-type/-/path-type-2.0.0.tgz#f012ccb8415b7096fc2daa1054c3d72389594c73" + dependencies: + pify "^2.0.0" + pause-stream@0.0.11: version "0.0.11" resolved "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445" @@ -4636,15 +4792,9 @@ pkg-dir@^1.0.0: dependencies: find-up "^1.0.0" -pkg-up@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/pkg-up/-/pkg-up-1.0.0.tgz#3e08fb461525c4421624a33b9f7e6d0af5b05a26" - dependencies: - find-up "^1.0.0" - -pluralize@^1.2.1: - version "1.2.1" - resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-1.2.1.tgz#d1a21483fd22bb41e58a12fa3421823140897c45" +pluralize@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/pluralize/-/pluralize-7.0.0.tgz#298b89df8b93b0221dbf421ad2b1b1ea23fc6777" polished@^1.7.0: version "1.8.1" @@ -4957,9 +5107,9 @@ process@^0.11.0: version "0.11.9" resolved "https://registry.yarnpkg.com/process/-/process-0.11.9.tgz#7bd5ad21aa6253e7da8682264f1e11d11c0318c1" -progress@^1.1.8: - version "1.1.8" - resolved "https://registry.yarnpkg.com/progress/-/progress-1.1.8.tgz#e260c78f6161cdd9b0e56cc3e0a85de17c7a57be" +progress@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.0.tgz#8a1be366bf8fc23db2bd23f10c6fe920b4389d1f" promise@^7.1.1: version "7.1.1" @@ -4973,6 +5123,14 @@ prop-types@^15.0.0, prop-types@^15.5.4, prop-types@^15.5.6, prop-types@^15.5.7, dependencies: fbjs "^0.8.9" +prop-types@^15.5.10: + version "15.6.0" + resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.6.0.tgz#ceaf083022fc46b4a35f69e13ef75aed0d639856" + dependencies: + fbjs "^0.8.16" + loose-envify "^1.3.1" + object-assign "^4.1.1" + proxy-addr@~1.1.3: version "1.1.3" resolved "https://registry.yarnpkg.com/proxy-addr/-/proxy-addr-1.1.3.tgz#dc97502f5722e888467b3fa2297a7b1ff47df074" @@ -5198,6 +5356,13 @@ read-pkg-up@^1.0.1: find-up "^1.0.0" read-pkg "^1.0.0" +read-pkg-up@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-2.0.0.tgz#6b72a8048984e0c41e79510fd5e9fa99b3b549be" + dependencies: + find-up "^2.0.0" + read-pkg "^2.0.0" + read-pkg@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-1.1.0.tgz#f5ffaa5ecd29cb31c0474bca7d756b6bb29e3f28" @@ -5206,6 +5371,14 @@ read-pkg@^1.0.0: normalize-package-data "^2.3.2" path-type "^1.0.0" +read-pkg@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/read-pkg/-/read-pkg-2.0.0.tgz#8ef1c0623c6a6db0dc6713c4bfac46332b2368f8" + dependencies: + load-json-file "^2.0.0" + normalize-package-data "^2.3.2" + path-type "^2.0.0" + readable-stream@1.0, readable-stream@~1.0.2, readable-stream@~1.0.24, readable-stream@~1.0.26, readable-stream@~1.0.33: version "1.0.34" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.0.34.tgz#125820e34bc842d2f2aaafafe4c2916ee32c157c" @@ -5236,20 +5409,6 @@ readdirp@^2.0.0: readable-stream "^2.0.2" set-immediate-shim "^1.0.1" -readline2@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/readline2/-/readline2-1.0.1.tgz#41059608ffc154757b715d9989d199ffbf372e35" - dependencies: - code-point-at "^1.0.0" - is-fullwidth-code-point "^1.0.0" - mute-stream "0.0.5" - -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - dependencies: - resolve "^1.1.6" - redent@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/redent/-/redent-1.0.0.tgz#cf916ab1fd5f1f16dfb20822dd6ec7f730c2afde" @@ -5478,7 +5637,7 @@ require-main-filename@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" -require-uncached@^1.0.2: +require-uncached@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/require-uncached/-/require-uncached-1.0.3.tgz#4e0d56d6c9662fd31e43011c4b95aa49955421d3" dependencies: @@ -5509,18 +5668,18 @@ resolve@1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.1.7.tgz#203114d82ad2c5ed9e8e0411b3932875e889e97b" -resolve@^1.1.6, resolve@^1.2.0: +resolve@^1.2.0: version "1.3.2" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.3.2.tgz#1f0442c9e0cbb8136e87b9305f932f46c7f28235" dependencies: path-parse "^1.0.5" -restore-cursor@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-1.0.1.tgz#34661f46886327fed2991479152252df92daa541" +restore-cursor@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/restore-cursor/-/restore-cursor-2.0.0.tgz#9f7ee287f82fd326d4fd162923d62129eee0dfaf" dependencies: - exit-hook "^1.0.0" - onetime "^1.0.0" + onetime "^2.0.0" + signal-exit "^3.0.2" right-align@^0.1.1: version "0.1.3" @@ -5544,15 +5703,21 @@ ripemd160@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-1.0.1.tgz#93a4bbd4942bc574b69a8fa57c71de10ecca7d6e" -run-async@^0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/run-async/-/run-async-0.1.0.tgz#c8ad4a5e110661e402a7d21b530e009f25f8e389" +run-async@^2.2.0: + version "2.3.0" + resolved "https://registry.yarnpkg.com/run-async/-/run-async-2.3.0.tgz#0371ab4ae0bdd720d4166d7dfda64ff7a445a6c0" dependencies: - once "^1.3.0" + is-promise "^2.1.0" -rx-lite@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-3.1.2.tgz#19ce502ca572665f3b647b10939f97fd1615f102" +rx-lite-aggregates@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite-aggregates/-/rx-lite-aggregates-4.0.8.tgz#753b87a89a11c95467c4ac1626c4efc4e05c67be" + dependencies: + rx-lite "*" + +rx-lite@*, rx-lite@^4.0.8: + version "4.0.8" + resolved "https://registry.yarnpkg.com/rx-lite/-/rx-lite-4.0.8.tgz#0b1e11af8bc44836f04a6407e92da42467b79444" safe-buffer@^5.0.1: version "5.0.1" @@ -5668,19 +5833,21 @@ shallowequal@^0.2.2: dependencies: lodash.keys "^3.1.2" -shelljs@^0.7.5: - version "0.7.7" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.7.7.tgz#b2f5c77ef97148f4b4f6e22682e10bba8667cff1" +shebang-command@^1.2.0: + version "1.2.0" + resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" + shebang-regex "^1.0.0" + +shebang-regex@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-1.0.0.tgz#da42f49740c0b42db2ca9728571cb190c98efea3" shellwords@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/shellwords/-/shellwords-0.1.0.tgz#66afd47b6a12932d9071cbfd98a52e785cd0ba14" -signal-exit@^3.0.0: +signal-exit@^3.0.0, signal-exit@^3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.2.tgz#b5fdc08f1287ea1178628e415e25132b73646c6d" @@ -5688,9 +5855,11 @@ slash@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55" -slice-ansi@0.0.4: - version "0.0.4" - resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-0.0.4.tgz#edbf8903f66f7ce2f8eafd6ceed65e264c831b35" +slice-ansi@1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/slice-ansi/-/slice-ansi-1.0.0.tgz#044f1a49d8842ff307aad6b505ed178bd950134d" + dependencies: + is-fullwidth-code-point "^2.0.0" sntp@1.x.x: version "1.0.9" @@ -5830,12 +5999,12 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -string-width@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.0.0.tgz#635c5436cc72a6e0c387ceca278d4e2eec52687e" +string-width@^2.1.0, string-width@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" dependencies: is-fullwidth-code-point "^2.0.0" - strip-ansi "^3.0.0" + strip-ansi "^4.0.0" string_decoder@^0.10.25, string_decoder@~0.10.x: version "0.10.31" @@ -5851,6 +6020,12 @@ strip-ansi@^3.0.0, strip-ansi@^3.0.1: dependencies: ansi-regex "^2.0.0" +strip-ansi@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-4.0.0.tgz#a8479022eb1ac368a871389b635262c505ee368f" + dependencies: + ansi-regex "^3.0.0" + strip-bom@3.0.0, strip-bom@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-3.0.0.tgz#2334c18e9c759f7bdd56fdef7e9ae3d588e68ed3" @@ -5905,6 +6080,12 @@ supports-color@^3.1.0, supports-color@^3.1.2, supports-color@^3.2.3: dependencies: has-flag "^1.0.0" +supports-color@^4.0.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-4.4.0.tgz#883f7ddabc165142b2a61427f3352ded195d1a3e" + dependencies: + has-flag "^2.0.0" + svgo@^0.7.0: version "0.7.2" resolved "https://registry.yarnpkg.com/svgo/-/svgo-0.7.2.tgz#9f5772413952135c6fefbf40afe6a4faa88b4bb5" @@ -5925,16 +6106,16 @@ symbol-tree@^3.2.1: version "3.2.2" resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.2.tgz#ae27db38f660a7ae2e1c3b7d1bc290819b8519e6" -table@^3.7.8: - version "3.8.3" - resolved "https://registry.yarnpkg.com/table/-/table-3.8.3.tgz#2bbc542f0fda9861a755d3947fefd8b3f513855f" +table@^4.0.1: + version "4.0.2" + resolved "https://registry.yarnpkg.com/table/-/table-4.0.2.tgz#a33447375391e766ad34d3486e6e2aedc84d2e36" dependencies: - ajv "^4.7.0" - ajv-keywords "^1.0.0" - chalk "^1.1.1" - lodash "^4.0.0" - slice-ansi "0.0.4" - string-width "^2.0.0" + ajv "^5.2.3" + ajv-keywords "^2.1.0" + chalk "^2.1.0" + lodash "^4.17.4" + slice-ansi "1.0.0" + string-width "^2.1.1" tapable@^0.2.5, tapable@~0.2.5: version "0.2.6" @@ -6002,6 +6183,12 @@ tmatch@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/tmatch/-/tmatch-2.0.1.tgz#0c56246f33f30da1b8d3d72895abaf16660f38cf" +tmp@^0.0.33: + version "0.0.33" + resolved "https://registry.yarnpkg.com/tmp/-/tmp-0.0.33.tgz#6d34335889768d21b2bcda0aa277ced3b1bfadf9" + dependencies: + os-tmpdir "~1.0.2" + tmpl@1.0.x: version "1.0.4" resolved "https://registry.yarnpkg.com/tmpl/-/tmpl-1.0.4.tgz#23640dd7b42d00433911140820e5cf440e521dd1" @@ -6014,6 +6201,10 @@ to-fast-properties@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.2.tgz#f3f5c0c3ba7299a7ef99427e44633257ade43320" +to-fast-properties@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" + toposort@^1.0.0: version "1.0.3" resolved "https://registry.yarnpkg.com/toposort/-/toposort-1.0.3.tgz#f02cd8a74bd8be2fc0e98611c3bacb95a171869c" @@ -6143,12 +6334,6 @@ user-home@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/user-home/-/user-home-1.1.1.tgz#2b5be23a32b63a7c9deb8d0f28d485724a3df190" -user-home@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/user-home/-/user-home-2.0.0.tgz#9c70bfd8169bc1dcbf48604e0f04b8b49cde9e9f" - dependencies: - os-homedir "^1.0.0" - util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" From dfe4944ec73cc6d7e4862d3acfd0f741594ebd13 Mon Sep 17 00:00:00 2001 From: Filip Barl Date: Tue, 17 Oct 2017 11:14:39 +0200 Subject: [PATCH 02/16] Fixed indentation. --- client/.eslintrc | 17 +++++++++++++++++ client/app/scripts/actions/app-actions.js | 1 + client/app/scripts/charts/nodes-error.js | 7 ++++--- client/app/scripts/components/cloud-link.js | 2 +- client/app/scripts/components/node-details.js | 4 ++-- client/app/scripts/selectors/zooming.js | 6 +++--- client/app/scripts/utils/web-api-utils.js | 11 ++++++----- 7 files changed, 34 insertions(+), 14 deletions(-) diff --git a/client/.eslintrc b/client/.eslintrc index c6ed99ee78..8923c8db2c 100644 --- a/client/.eslintrc +++ b/client/.eslintrc @@ -36,5 +36,22 @@ "react/prefer-stateless-function": 0, "react/sort-comp": 0, "react/prop-types": 0, + + "function-paren-newline": 0, + "jsx-a11y/anchor-is-valid": 0, + "jsx-a11y/click-events-have-key-events": 0, + "jsx-a11y/label-has-for": 0, + "jsx-a11y/mouse-events-have-key-events": 0, + "jsx-a11y/no-noninteractive-element-interactions": 0, + "no-multi-spaces": 0, + "no-restricted-globals": 0, + "object-curly-newline": 0, + "padded-blocks": 0, + "prefer-destructuring": 0, + "react/default-props-match-prop-types": 0, + "react/jsx-closing-tag-location": 0, + "react/jsx-max-props-per-line": 0, + "react/jsx-wrap-multilines": 0, + "spaced-comment": 0, } } diff --git a/client/app/scripts/actions/app-actions.js b/client/app/scripts/actions/app-actions.js index a1b7ac27c8..1cd740407f 100644 --- a/client/app/scripts/actions/app-actions.js +++ b/client/app/scripts/actions/app-actions.js @@ -778,6 +778,7 @@ export function resetLocalViewState() { return (dispatch) => { dispatch({type: ActionTypes.RESET_LOCAL_VIEW_STATE}); storageSet('scopeViewState', ''); + // eslint-disable-next-line prefer-destructuring window.location.href = window.location.href.split('#')[0]; }; } diff --git a/client/app/scripts/charts/nodes-error.js b/client/app/scripts/charts/nodes-error.js index e6204bfb1a..69b495193b 100644 --- a/client/app/scripts/charts/nodes-error.js +++ b/client/app/scripts/charts/nodes-error.js @@ -1,8 +1,7 @@ import React from 'react'; import classnames from 'classnames'; -export default function NodesError({children, faIconClass, hidden, - mainClassName = 'nodes-chart-error'}) { +const NodesError = ({ children, faIconClass, hidden, mainClassName = 'nodes-chart-error'}) => { const className = classnames(mainClassName, { hide: hidden }); @@ -18,4 +17,6 @@ export default function NodesError({children, faIconClass, hidden, {children} ); -} +}; + +export default NodesError; diff --git a/client/app/scripts/components/cloud-link.js b/client/app/scripts/components/cloud-link.js index 84933e0bd2..1a5b8e455e 100644 --- a/client/app/scripts/components/cloud-link.js +++ b/client/app/scripts/components/cloud-link.js @@ -21,7 +21,7 @@ const CloudLink = ({ alwaysShow, ...props }) => ( - ); +); class LinkWrapper extends React.Component { constructor(props, context) { diff --git a/client/app/scripts/components/node-details.js b/client/app/scripts/components/node-details.js index e951a7bfa2..1e81141267 100644 --- a/client/app/scripts/components/node-details.js +++ b/client/app/scripts/components/node-details.js @@ -87,8 +87,8 @@ class NodeDetails extends React.Component { // caused by a bug having to do with animating the details panel). const spinnerClassName = classNames('fa fa-circle-o-notch', { 'fa-spin': this.props.mounted }); const nodeColor = (node ? - getNodeColorDark(node.get('rank'), label, node.get('pseudo')) : - getNeutralColor()); + getNodeColorDark(node.get('rank'), label, node.get('pseudo')) : + getNeutralColor()); const tools = this.renderTools(); const styles = { header: { diff --git a/client/app/scripts/selectors/zooming.js b/client/app/scripts/selectors/zooming.js index 8f8922bf41..ec354bfac6 100644 --- a/client/app/scripts/selectors/zooming.js +++ b/client/app/scripts/selectors/zooming.js @@ -13,14 +13,14 @@ export const activeTopologyZoomCacheKeyPathSelector = createSelector( state => JSON.stringify(activeTopologyOptionsSelector(state)), ], (isGraphViewMode, viewMode, topologyId, pinnedMetricType, topologyOptions) => ( - isGraphViewMode ? + isGraphViewMode // In graph view, selecting different options/filters produces a different layout. - ['zoomCache', viewMode, topologyId, topologyOptions] : + ? ['zoomCache', viewMode, topologyId, topologyOptions] // Otherwise we're in the resource view where the options are hidden (for now), // but pinning different metrics can result in very different layouts. // TODO: Take `topologyId` into account once the resource // view layouts start differing between the topologies. - ['zoomCache', viewMode, pinnedMetricType] + : ['zoomCache', viewMode, pinnedMetricType] ) ); diff --git a/client/app/scripts/utils/web-api-utils.js b/client/app/scripts/utils/web-api-utils.js index b406b6458b..1305b5a692 100644 --- a/client/app/scripts/utils/web-api-utils.js +++ b/client/app/scripts/utils/web-api-utils.js @@ -197,11 +197,12 @@ function getNodesForTopologies(state, dispatch, topologyIds, topologyOptions = m // fetch sequentially state.get('topologyUrlsById') .filter((_, topologyId) => topologyIds.contains(topologyId)) - .reduce((sequence, topologyUrl, topologyId) => sequence.then(() => { - const optionsQuery = buildUrlQuery(topologyOptions.get(topologyId), state); - return doRequest({ url: `${getApiPath()}${topologyUrl}?${optionsQuery}` }); - }) - .then(json => dispatch(receiveNodesForTopology(json.nodes, topologyId))), + .reduce((sequence, topologyUrl, topologyId) => sequence + .then(() => { + const optionsQuery = buildUrlQuery(topologyOptions.get(topologyId), state); + return doRequest({ url: `${getApiPath()}${topologyUrl}?${optionsQuery}` }); + }) + .then(json => dispatch(receiveNodesForTopology(json.nodes, topologyId))), Promise.resolve()); } From 659c9b13049ebadc3ba5fcc679c73ea345392b39 Mon Sep 17 00:00:00 2001 From: Filip Barl Date: Tue, 17 Oct 2017 11:20:10 +0200 Subject: [PATCH 03/16] Fixed spaced-comment. --- client/.eslintrc | 2 - .../app/scripts/utils/data-generator-utils.js | 4 +- client/server.js | 58 +++++++++---------- 3 files changed, 31 insertions(+), 33 deletions(-) diff --git a/client/.eslintrc b/client/.eslintrc index 8923c8db2c..40a61398c9 100644 --- a/client/.eslintrc +++ b/client/.eslintrc @@ -37,7 +37,6 @@ "react/sort-comp": 0, "react/prop-types": 0, - "function-paren-newline": 0, "jsx-a11y/anchor-is-valid": 0, "jsx-a11y/click-events-have-key-events": 0, "jsx-a11y/label-has-for": 0, @@ -52,6 +51,5 @@ "react/jsx-closing-tag-location": 0, "react/jsx-max-props-per-line": 0, "react/jsx-wrap-multilines": 0, - "spaced-comment": 0, } } diff --git a/client/app/scripts/utils/data-generator-utils.js b/client/app/scripts/utils/data-generator-utils.js index 68a520cfe1..8ecd10b205 100644 --- a/client/app/scripts/utils/data-generator-utils.js +++ b/client/app/scripts/utils/data-generator-utils.js @@ -3,7 +3,7 @@ import { scaleLinear } from 'd3-scale'; import { extent } from 'd3-array'; // Inspired by Lee Byron's test data generator. -/*eslint-disable */ +/* eslint-disable */ function bumpLayer(n, maxValue) { function bump(a) { const x = 1 / (0.1 + Math.random()); @@ -23,7 +23,7 @@ function bumpLayer(n, maxValue) { const s = scaleLinear().domain(extent(values)).range([0, maxValue]); return values.map(s); } -/*eslint-enable */ +/* eslint-enable */ const nodeData = {}; diff --git a/client/server.js b/client/server.js index 886500ad5b..d9557a41e1 100644 --- a/client/server.js +++ b/client/server.js @@ -8,12 +8,12 @@ const app = express(); const BACKEND_HOST = process.env.BACKEND_HOST || 'localhost'; -/** - * - * Proxy requests to: - * - /api -> :4040/api - * - ************************************************************/ +/* +* +* Proxy requests to: +* - /api -> :4040/api +* +*/ const backendProxy = httpProxy.createProxy({ ws: true, @@ -22,24 +22,24 @@ const backendProxy = httpProxy.createProxy({ backendProxy.on('error', err => console.error('Proxy error', err)); app.all('/api*', backendProxy.web.bind(backendProxy)); -/** - * - * Production env serves precompiled content from build/ - * - ************************************************************/ +/* +* +* Production env serves precompiled content from build/ +* +*/ if (process.env.NODE_ENV === 'production') { app.use(express.static('build')); } -/** - * - * Webpack Dev Middleware with Hot Reload - * - * See: https://github.com/webpack/webpack-dev-middleware; - * https://github.com/glenjamin/webpack-hot-middleware - * - *************************************************************/ +/* +* +* Webpack Dev Middleware with Hot Reload +* +* See: https://github.com/webpack/webpack-dev-middleware; +* https://github.com/glenjamin/webpack-hot-middleware +* +*/ if (process.env.NODE_ENV !== 'production') { const webpack = require('webpack'); @@ -60,11 +60,11 @@ if (process.env.NODE_ENV !== 'production') { } -/** - * - * Express server - * - *****************/ +/* +* +* Express server +* +*/ const port = process.env.PORT || 4042; const server = app.listen(port, 'localhost', () => { @@ -76,11 +76,11 @@ const server = app.listen(port, 'localhost', () => { server.on('upgrade', backendProxy.ws.bind(backendProxy)); -/** - * - * Path proxy server - * - *************************************************************/ +/* +* +* Path proxy server +* +*/ const proxyRules = new HttpProxyRules({ rules: { From 58922730f54711967c9c707c710cd04249de781e Mon Sep 17 00:00:00 2001 From: Filip Barl Date: Tue, 17 Oct 2017 11:27:16 +0200 Subject: [PATCH 04/16] Fixed function-paren-newline. --- .../charts/__tests__/nodes-layout-test.js | 21 ++++--- client/app/scripts/charts/edge-container.js | 11 +++- .../scripts/charts/nodes-chart-elements.js | 4 +- .../components/__tests__/node-details-test.js | 26 ++++----- client/app/scripts/components/app.js | 4 +- .../app/scripts/components/debug-toolbar.js | 4 +- client/app/scripts/components/details.js | 4 +- client/app/scripts/components/dev-tools.js | 14 ++--- .../scripts/components/embedded-terminal.js | 4 +- .../__tests__/node-details-table-test.js | 35 +++++------- .../node-details-generic-table.js | 3 +- .../node-details/node-details-table-row.js | 3 +- .../nodes-resources/node-resources-layer.js | 4 +- client/app/scripts/components/nodes.js | 4 +- client/app/scripts/components/plugins.js | 4 +- client/app/scripts/components/status.js | 4 +- client/app/scripts/components/terminal-app.js | 6 +- client/app/scripts/components/terminal.js | 7 ++- client/app/scripts/components/topologies.js | 5 +- .../scripts/components/topology-options.js | 3 +- .../scripts/components/view-mode-selector.js | 6 +- client/app/scripts/main.dev.js | 14 +++-- client/app/scripts/main.js | 12 ++-- client/app/scripts/reducers/root.js | 42 +++++++++----- .../scripts/selectors/resource-view/layout.js | 4 +- client/app/scripts/terminal-main.js | 12 ++-- .../utils/__tests__/search-utils-test.js | 54 ++++++++++++------ .../utils/__tests__/topology-utils-test.js | 9 ++- client/app/scripts/utils/array-utils.js | 3 +- client/app/scripts/utils/file-utils.js | 3 +- client/app/scripts/utils/search-utils.js | 57 ++++++++++++------- client/app/scripts/utils/web-api-utils.js | 22 ++++--- client/server.js | 6 +- 33 files changed, 230 insertions(+), 184 deletions(-) diff --git a/client/app/scripts/charts/__tests__/nodes-layout-test.js b/client/app/scripts/charts/__tests__/nodes-layout-test.js index ab21cee230..ddf83d182f 100644 --- a/client/app/scripts/charts/__tests__/nodes-layout-test.js +++ b/client/app/scripts/charts/__tests__/nodes-layout-test.js @@ -184,7 +184,8 @@ describe('NodesLayout', () => { it('lays out initial nodeset in a rectangle', () => { const result = NodesLayout.doLayout( nodeSets.initial4.nodes, - nodeSets.initial4.edges); + nodeSets.initial4.edges + ); // console.log('initial', result.get('nodes')); nodes = result.nodes.toJS(); @@ -199,7 +200,8 @@ describe('NodesLayout', () => { it('keeps nodes in rectangle after removing one edge', () => { let result = NodesLayout.doLayout( nodeSets.initial4.nodes, - nodeSets.initial4.edges); + nodeSets.initial4.edges + ); options.cachedLayout = result; options.nodeCache = options.nodeCache.merge(result.nodes); @@ -221,7 +223,8 @@ describe('NodesLayout', () => { it('keeps nodes in rectangle after removed edge reappears', () => { let result = NodesLayout.doLayout( nodeSets.initial4.nodes, - nodeSets.initial4.edges); + nodeSets.initial4.edges + ); coords = getNodeCoordinates(result.nodes); options.cachedLayout = result; @@ -252,7 +255,8 @@ describe('NodesLayout', () => { it('keeps nodes in rectangle after node disappears', () => { let result = NodesLayout.doLayout( nodeSets.initial4.nodes, - nodeSets.initial4.edges); + nodeSets.initial4.edges + ); options.cachedLayout = result; options.nodeCache = options.nodeCache.merge(result.nodes); @@ -273,7 +277,8 @@ describe('NodesLayout', () => { it('keeps nodes in rectangle after removed node reappears', () => { let result = NodesLayout.doLayout( nodeSets.initial4.nodes, - nodeSets.initial4.edges); + nodeSets.initial4.edges + ); nodes = result.nodes.toJS(); @@ -313,7 +318,8 @@ describe('NodesLayout', () => { it('renders single nodes in a square', () => { const result = NodesLayout.doLayout( nodeSets.single3.nodes, - nodeSets.single3.edges); + nodeSets.single3.edges + ); nodes = result.nodes.toJS(); @@ -404,7 +410,8 @@ describe('NodesLayout', () => { expect(NodesLayout.hasNewNodesOfExistingRank( nodeSets.rank6.nodes, nodeSets.rank6.edges, - result.nodes)).toBeTruthy(); + result.nodes + )).toBeTruthy(); result = NodesLayout.doLayout( nodeSets.rank6.nodes, diff --git a/client/app/scripts/charts/edge-container.js b/client/app/scripts/charts/edge-container.js index 82f3a7a9f5..8c9b5fb509 100644 --- a/client/app/scripts/charts/edge-container.js +++ b/client/app/scripts/charts/edge-container.js @@ -81,9 +81,14 @@ export default class EdgeContainer extends React.PureComponent { // For the Motion interpolation to work, the waypoints need to be in a map format like // { x0: 11, y0: 22, x1: 33, y1: 44 } that we convert to the array format when rendering. - {({ interpolatedThickness, ...interpolatedWaypoints}) => transformedEdge( - forwardedProps, waypointsMapToArray(fromJS(interpolatedWaypoints)), interpolatedThickness - )} + { + ({ interpolatedThickness, ...interpolatedWaypoints}) => + transformedEdge( + forwardedProps, + waypointsMapToArray(fromJS(interpolatedWaypoints)), + interpolatedThickness + ) + } ); } diff --git a/client/app/scripts/charts/nodes-chart-elements.js b/client/app/scripts/charts/nodes-chart-elements.js index 0c4e622808..9e279a8332 100644 --- a/client/app/scripts/charts/nodes-chart-elements.js +++ b/client/app/scripts/charts/nodes-chart-elements.js @@ -277,6 +277,4 @@ function mapStateToProps(state) { }; } -export default connect( - mapStateToProps -)(NodesChartElements); +export default connect(mapStateToProps)(NodesChartElements); diff --git a/client/app/scripts/components/__tests__/node-details-test.js b/client/app/scripts/components/__tests__/node-details-test.js index 66725fb661..ef6c795fb3 100644 --- a/client/app/scripts/components/__tests__/node-details-test.js +++ b/client/app/scripts/components/__tests__/node-details-test.js @@ -19,28 +19,26 @@ describe('NodeDetails', () => { }); it('shows n/a when node was not found', () => { - const c = TestUtils.renderIntoDocument( - - - + const c = TestUtils.renderIntoDocument( + + ); + const notFound = TestUtils.findRenderedDOMComponentWithClass( + c, + 'node-details-header-notavailable' ); - const notFound = TestUtils.findRenderedDOMComponentWithClass(c, - 'node-details-header-notavailable'); expect(notFound).toBeDefined(); }); it('show label of node with title', () => { nodes = nodes.set(nodeId, Immutable.fromJS({id: nodeId})); details = {label: 'Node 1'}; - const c = TestUtils.renderIntoDocument( - - + - - ); + ); const title = TestUtils.findRenderedDOMComponentWithClass(c, 'node-details-header-label'); expect(title.title).toBe('Node 1'); diff --git a/client/app/scripts/components/app.js b/client/app/scripts/components/app.js index 8a6ebd1671..6f8b6ee053 100644 --- a/client/app/scripts/components/app.js +++ b/client/app/scripts/components/app.js @@ -243,6 +243,4 @@ function mapStateToProps(state) { }; } -export default connect( - mapStateToProps -)(App); +export default connect(mapStateToProps)(App); diff --git a/client/app/scripts/components/debug-toolbar.js b/client/app/scripts/components/debug-toolbar.js index baa3211955..1466411772 100644 --- a/client/app/scripts/components/debug-toolbar.js +++ b/client/app/scripts/components/debug-toolbar.js @@ -385,6 +385,4 @@ function mapStateToProps(state) { } -export default connect( - mapStateToProps -)(DebugToolbar); +export default connect(mapStateToProps)(DebugToolbar); diff --git a/client/app/scripts/components/details.js b/client/app/scripts/components/details.js index 553751062e..130ffe1bb9 100644 --- a/client/app/scripts/components/details.js +++ b/client/app/scripts/components/details.js @@ -27,6 +27,4 @@ function mapStateToProps(state) { }; } -export default connect( - mapStateToProps -)(Details); +export default connect(mapStateToProps)(Details); diff --git a/client/app/scripts/components/dev-tools.js b/client/app/scripts/components/dev-tools.js index 2722a23a4f..068839fd7f 100644 --- a/client/app/scripts/components/dev-tools.js +++ b/client/app/scripts/components/dev-tools.js @@ -3,11 +3,9 @@ import { createDevTools } from 'redux-devtools'; import LogMonitor from 'redux-devtools-log-monitor'; import DockMonitor from 'redux-devtools-dock-monitor'; -export default createDevTools( - - - -); +export default createDevTools( + +); diff --git a/client/app/scripts/components/embedded-terminal.js b/client/app/scripts/components/embedded-terminal.js index 149d5998ef..1d66a19910 100644 --- a/client/app/scripts/components/embedded-terminal.js +++ b/client/app/scripts/components/embedded-terminal.js @@ -70,6 +70,4 @@ function mapStateToProps(state) { }; } -export default connect( - mapStateToProps -)(EmeddedTerminal); +export default connect(mapStateToProps)(EmeddedTerminal); diff --git a/client/app/scripts/components/node-details/__tests__/node-details-table-test.js b/client/app/scripts/components/node-details/__tests__/node-details-table-test.js index b024c95a07..1ac23263be 100644 --- a/client/app/scripts/components/node-details/__tests__/node-details-table-test.js +++ b/client/app/scripts/components/node-details/__tests__/node-details-table-test.js @@ -58,8 +58,7 @@ describe('NodeDetailsTable', () => { // form columnIndex + n * columns.length, where n >= 0. Therefore we take only the values // at the index which divided by columns.length gives a reminder columnIndex. const filteredValues = values.filter((element, index) => - index % columns.length === columnIndex - ); + index % columns.length === columnIndex); // Array comparison expect(filteredValues).toEqual(expectedValues); } @@ -72,16 +71,14 @@ describe('NodeDetailsTable', () => { describe('kubernetes_ip', () => { it('sorts by column', () => { - component = TestUtils.renderIntoDocument( - - + - - ); + ); matchColumnValues('kubernetes_ip', [ '10.44.253.255', @@ -108,16 +105,14 @@ describe('NodeDetailsTable', () => { describe('kubernetes_namespace', () => { it('sorts by column', () => { - component = TestUtils.renderIntoDocument( - - + - - ); + ); matchColumnValues('kubernetes_namespace', ['00000', '1111', '12', '5']); clickColumn('Namespace'); diff --git a/client/app/scripts/components/node-details/node-details-generic-table.js b/client/app/scripts/components/node-details/node-details-generic-table.js index 54e295ad80..d81d2d0f1e 100644 --- a/client/app/scripts/components/node-details/node-details-generic-table.js +++ b/client/app/scripts/components/node-details/node-details-generic-table.js @@ -63,8 +63,7 @@ export default class NodeDetailsGenericTable extends React.Component { // expanded if any of them match the search query; otherwise hide them. if (this.state.limit > 0 && rows.length > this.state.limit) { const hasHiddenMatch = rows.slice(this.state.limit).some(row => - columns.some(column => matches.has(genericTableEntryKey(row, column))) - ); + columns.some(column => matches.has(genericTableEntryKey(row, column)))); if (!hasHiddenMatch) { notShown = rows.length - NODE_DETAILS_DATA_ROWS_DEFAULT_LIMIT; rows = rows.slice(0, this.state.limit); diff --git a/client/app/scripts/components/node-details/node-details-table-row.js b/client/app/scripts/components/node-details/node-details-table-row.js index cd9fca2a03..0e4e748f35 100644 --- a/client/app/scripts/components/node-details/node-details-table-row.js +++ b/client/app/scripts/components/node-details/node-details-table-row.js @@ -71,8 +71,7 @@ function renderValues(node, columns = [], columnStyles = [], timestamp = null, t linkable nodeId={relative.id} {...relative} - /> - ), ' ')} + />), ' ')} ); } diff --git a/client/app/scripts/components/nodes-resources/node-resources-layer.js b/client/app/scripts/components/nodes-resources/node-resources-layer.js index 2a369483ee..cb4eacc632 100644 --- a/client/app/scripts/components/nodes-resources/node-resources-layer.js +++ b/client/app/scripts/components/nodes-resources/node-resources-layer.js @@ -50,6 +50,4 @@ function mapStateToProps(state, props) { }; } -export default connect( - mapStateToProps -)(NodesResourcesLayer); +export default connect(mapStateToProps)(NodesResourcesLayer); diff --git a/client/app/scripts/components/nodes.js b/client/app/scripts/components/nodes.js index 78b4945345..591829c01d 100644 --- a/client/app/scripts/components/nodes.js +++ b/client/app/scripts/components/nodes.js @@ -92,6 +92,4 @@ function mapStateToProps(state) { } -export default connect( - mapStateToProps -)(Nodes); +export default connect(mapStateToProps)(Nodes); diff --git a/client/app/scripts/components/plugins.js b/client/app/scripts/components/plugins.js index e673bc7d27..d5edd3d844 100644 --- a/client/app/scripts/components/plugins.js +++ b/client/app/scripts/components/plugins.js @@ -44,6 +44,4 @@ function mapStateToProps(state) { }; } -export default connect( - mapStateToProps -)(Plugins); +export default connect(mapStateToProps)(Plugins); diff --git a/client/app/scripts/components/status.js b/client/app/scripts/components/status.js index 43c02b8da8..3a0b11288a 100644 --- a/client/app/scripts/components/status.js +++ b/client/app/scripts/components/status.js @@ -54,6 +54,4 @@ function mapStateToProps(state) { }; } -export default connect( - mapStateToProps -)(Status); +export default connect(mapStateToProps)(Status); diff --git a/client/app/scripts/components/terminal-app.js b/client/app/scripts/components/terminal-app.js index c3b00122c2..f07b86d41f 100644 --- a/client/app/scripts/components/terminal-app.js +++ b/client/app/scripts/components/terminal-app.js @@ -13,8 +13,10 @@ class TerminalApp extends React.Component { const paramString = window.location.hash.split('/').pop(); const params = JSON.parse(decodeURIComponent(paramString)); - this.props.receiveControlPipeFromParams(params.pipe.id, params.pipe.raw, - params.pipe.resizeTtyControl); + this.props.receiveControlPipeFromParams( + params.pipe.id, params.pipe.raw, + params.pipe.resizeTtyControl + ); this.state = { title: params.title, diff --git a/client/app/scripts/components/terminal.js b/client/app/scripts/components/terminal.js index 380a9ddb58..4b116652dd 100644 --- a/client/app/scripts/components/terminal.js +++ b/client/app/scripts/components/terminal.js @@ -132,7 +132,9 @@ class Terminal extends React.Component { this.createWebsocket(term); } else { this.reconnectTimeout = setTimeout( - this.createWebsocket.bind(this, term), reconnectTimerInterval); + this.createWebsocket.bind(this, term), + reconnectTimerInterval + ); } } }; @@ -379,8 +381,7 @@ class Terminal extends React.Component { function mapStateToProps(state, ownProps) { const controlStatus = state.get('controlPipes').find(pipe => - pipe.get('nodeId') === ownProps.pipe.get('nodeId') - ); + pipe.get('nodeId') === ownProps.pipe.get('nodeId')); return { controlStatus }; } diff --git a/client/app/scripts/components/topologies.js b/client/app/scripts/components/topologies.js index 0d89befda9..ad2605a8e6 100644 --- a/client/app/scripts/components/topologies.js +++ b/client/app/scripts/components/topologies.js @@ -20,7 +20,6 @@ function basicTopologyInfo(topology, searchMatchCount) { } class Topologies extends React.Component { - constructor(props, context) { super(props, context); this.onTopologyClick = this.onTopologyClick.bind(this); @@ -88,9 +87,7 @@ class Topologies extends React.Component { render() { return (
- {this.props.currentTopology && this.props.topologies.map( - topology => this.renderTopology(topology) - )} + {this.props.currentTopology && this.props.topologies.map(t => this.renderTopology(t))}
); } diff --git a/client/app/scripts/components/topology-options.js b/client/app/scripts/components/topology-options.js index 68fe1549be..046eff2d65 100644 --- a/client/app/scripts/components/topology-options.js +++ b/client/app/scripts/components/topology-options.js @@ -129,8 +129,7 @@ class TopologyOptions extends React.Component { const { options } = this.props; return (
- {options && options.toIndexedSeq().map( - option => this.renderOption(option))} + {options && options.toIndexedSeq().map(option => this.renderOption(option))}
); } diff --git a/client/app/scripts/components/view-mode-selector.js b/client/app/scripts/components/view-mode-selector.js index a4a351afd2..cf2e2825d9 100644 --- a/client/app/scripts/components/view-mode-selector.js +++ b/client/app/scripts/components/view-mode-selector.js @@ -58,8 +58,10 @@ class ViewModeSelector extends React.Component {
{this.renderItem('fa fa-share-alt', 'Graph', GRAPH_VIEW_MODE, this.props.setGraphView)} {this.renderItem('fa fa-table', 'Table', TABLE_VIEW_MODE, this.props.setTableView)} - {this.renderItem('fa fa-bar-chart', 'Resources', RESOURCE_VIEW_MODE, - this.props.setResourceView, hasResourceView)} + {this.renderItem( +'fa fa-bar-chart', 'Resources', RESOURCE_VIEW_MODE, + this.props.setResourceView, hasResourceView +)}
diff --git a/client/app/scripts/main.dev.js b/client/app/scripts/main.dev.js index 3616126fc0..e5debff19c 100644 --- a/client/app/scripts/main.dev.js +++ b/client/app/scripts/main.dev.js @@ -15,12 +15,14 @@ const store = configureStore(); function renderApp() { const App = require('./components/app').default; - ReactDOM.render(( - - - - - ), document.getElementById('app')); + ReactDOM.render( + ( + + + + + ), document.getElementById('app') + ); } renderApp(); diff --git a/client/app/scripts/main.js b/client/app/scripts/main.js index 773a44cbb7..9b6f32df25 100644 --- a/client/app/scripts/main.js +++ b/client/app/scripts/main.js @@ -11,11 +11,13 @@ const store = configureStore(); function renderApp() { const App = require('./components/app').default; - ReactDOM.render(( - - - - ), document.getElementById('app')); + ReactDOM.render( + ( + + + + ), document.getElementById('app') + ); } renderApp(); diff --git a/client/app/scripts/reducers/root.js b/client/app/scripts/reducers/root.js index fc558d1184..6b0804af02 100644 --- a/client/app/scripts/reducers/root.js +++ b/client/app/scripts/reducers/root.js @@ -119,8 +119,10 @@ function processTopologies(state, nextTopologies) { // set `selectType` field for topology and sub_topologies options (recursive). const topologiesWithSelectType = visibleTopologies.map(calcSelectType); // cache URLs by ID - state = state.set('topologyUrlsById', - setTopologyUrlsById(state.get('topologyUrlsById'), topologiesWithSelectType)); + state = state.set( + 'topologyUrlsById', + setTopologyUrlsById(state.get('topologyUrlsById'), topologiesWithSelectType) + ); const topologiesWithFullnames = addTopologyFullname(topologiesWithSelectType); const immNextTopologies = fromJS(topologiesWithFullnames).sortBy(topologySorter); @@ -144,7 +146,8 @@ function setDefaultTopologyOptions(state, topologyList) { } if (defaultOptions.size) { - state = state.setIn(['topologyOptions', topology.get('id')], + state = state.setIn( + ['topologyOptions', topology.get('id')], defaultOptions ); } @@ -157,8 +160,10 @@ function closeNodeDetails(state, nodeId) { if (nodeDetails.size > 0) { const popNodeId = nodeId || nodeDetails.keySeq().last(); // remove pipe if it belongs to the node being closed - state = state.update('controlPipes', - controlPipes => controlPipes.filter(pipe => pipe.get('nodeId') !== popNodeId)); + state = state.update( + 'controlPipes', + controlPipes => controlPipes.filter(pipe => pipe.get('nodeId') !== popNodeId) + ); state = state.deleteIn(['nodeDetails', popNodeId]); } if (state.get('nodeDetails').size === 0 || state.get('selectedNodeId') === nodeId) { @@ -298,7 +303,8 @@ export function rootReducer(state = initialState, action) { if (prevDetailsStackSize > 1 || prevSelectedNodeId !== action.nodeId) { // dont set origin if a node was already selected, suppresses animation const origin = prevSelectedNodeId === null ? action.origin : null; - state = state.setIn(['nodeDetails', action.nodeId], + state = state.setIn( + ['nodeDetails', action.nodeId], { id: action.nodeId, label: action.label, @@ -318,7 +324,8 @@ export function rootReducer(state = initialState, action) { state = state.deleteIn(['nodeDetails', action.nodeId]); state = state.setIn(['nodeDetails', action.nodeId], details); } else { - state = state.setIn(['nodeDetails', action.nodeId], + state = state.setIn( + ['nodeDetails', action.nodeId], { id: action.nodeId, label: action.label, @@ -331,8 +338,10 @@ export function rootReducer(state = initialState, action) { } case ActionTypes.CLICK_SHOW_TOPOLOGY_FOR_NODE: { - state = state.update('nodeDetails', - nodeDetails => nodeDetails.filter((v, k) => k === action.nodeId)); + state = state.update( + 'nodeDetails', + nodeDetails => nodeDetails.filter((v, k) => k === action.nodeId) + ); state = state.update('controlPipes', controlPipes => controlPipes.clear()); state = state.set('selectedNodeId', action.nodeId); @@ -579,11 +588,13 @@ export function rootReducer(state = initialState, action) { return state; } - log('RECEIVE_NODES_DELTA', + log( + 'RECEIVE_NODES_DELTA', 'remove', size(action.delta.remove), 'update', size(action.delta.update), 'add', size(action.delta.add), - 'reset', action.delta.reset); + 'reset', action.delta.reset + ); if (action.delta.reset) { state = state.set('nodes', makeMap()); @@ -700,8 +711,7 @@ export function rootReducer(state = initialState, action) { state = state.update('controlPipes', controlPipes => controlPipes.clear()); } if (action.state.nodeDetails) { - const actionNodeDetails = makeOrderedMap( - action.state.nodeDetails.map(obj => [obj.id, obj])); + const actionNodeDetails = makeOrderedMap(action.state.nodeDetails.map(h => [h.id, h])); // check if detail IDs have changed if (!isDeepEqual(state.get('nodeDetails').keySeq(), actionNodeDetails.keySeq())) { state = state.set('nodeDetails', actionNodeDetails); @@ -709,8 +719,10 @@ export function rootReducer(state = initialState, action) { } else { state = state.update('nodeDetails', nodeDetails => nodeDetails.clear()); } - state = state.set('topologyOptions', - fromJS(action.state.topologyOptions) || state.get('topologyOptions')); + state = state.set( + 'topologyOptions', + fromJS(action.state.topologyOptions) || state.get('topologyOptions') + ); return state; } diff --git a/client/app/scripts/selectors/resource-view/layout.js b/client/app/scripts/selectors/resource-view/layout.js index 615c2944ea..44d41783b0 100644 --- a/client/app/scripts/selectors/resource-view/layout.js +++ b/client/app/scripts/selectors/resource-view/layout.js @@ -85,8 +85,8 @@ const decoratedNodesByTopologySelector = createSelector( const isBaseLayer = (index === 0); const nodeParentDecorator = nodeParentDecoratorByTopologyId(parentLayerTopologyId); - const nodeMetricSummaryDecorator = nodeMetricSummaryDecoratorByType( - pinnedMetricType, showCapacity); + const nodeMetricSummaryDecorator = + nodeMetricSummaryDecoratorByType(pinnedMetricType, showCapacity); // Color the node, deduce its anchor point, dimensions and info about its pinned metric. const decoratedTopologyNodes = (topologyNodes || makeMap()) diff --git a/client/app/scripts/terminal-main.js b/client/app/scripts/terminal-main.js index 08a8bcd275..fb8fd64db5 100644 --- a/client/app/scripts/terminal-main.js +++ b/client/app/scripts/terminal-main.js @@ -11,11 +11,13 @@ const store = configureStore(); function renderApp() { const TerminalApp = require('./components/terminal-app').default; - ReactDOM.render(( - - - - ), document.getElementById('app')); + ReactDOM.render( + ( + + + + ), document.getElementById('app') + ); } renderApp(); diff --git a/client/app/scripts/utils/__tests__/search-utils-test.js b/client/app/scripts/utils/__tests__/search-utils-test.js index d6745db6d7..affaf9cec2 100644 --- a/client/app/scripts/utils/__tests__/search-utils-test.js +++ b/client/app/scripts/utils/__tests__/search-utils-test.js @@ -125,15 +125,19 @@ describe('SearchUtils', () => { it('does not add a non-matching field', () => { let matches = fromJS({}); - matches = fun(matches, ['node1', 'field1'], - 'some value', 'some query', null, 'some label'); + matches = fun( + matches, ['node1', 'field1'], + 'some value', 'some query', null, 'some label' + ); expect(matches.size).toBe(0); }); it('adds a matching field', () => { let matches = fromJS({}); - matches = fun(matches, ['node1', 'field1'], - 'samevalue', 'samevalue', null, 'some label'); + matches = fun( + matches, ['node1', 'field1'], + 'samevalue', 'samevalue', null, 'some label' + ); expect(matches.size).toBe(1); expect(matches.getIn(['node1', 'field1'])).toBeDefined(); const {text, label, start, length} = matches.getIn(['node1', 'field1']); @@ -145,15 +149,19 @@ describe('SearchUtils', () => { it('does not add a field when the prefix does not match the label', () => { let matches = fromJS({}); - matches = fun(matches, ['node1', 'field1'], - 'samevalue', 'samevalue', 'some prefix', 'some label'); + matches = fun( + matches, ['node1', 'field1'], + 'samevalue', 'samevalue', 'some prefix', 'some label' + ); expect(matches.size).toBe(0); }); it('adds a field when the prefix matches the label', () => { let matches = fromJS({}); - matches = fun(matches, ['node1', 'field1'], - 'samevalue', 'samevalue', 'prefix', 'prefixed label'); + matches = fun( + matches, ['node1', 'field1'], + 'samevalue', 'samevalue', 'prefix', 'prefixed label' + ); expect(matches.size).toBe(1); }); }); @@ -163,30 +171,40 @@ describe('SearchUtils', () => { it('does not add a non-matching field', () => { let matches = fromJS({}); - matches = fun(matches, ['node1', 'field1'], - 1, 'metric1', 'metric2', 'lt', 2); + matches = fun( + matches, ['node1', 'field1'], + 1, 'metric1', 'metric2', 'lt', 2 + ); expect(matches.size).toBe(0); }); it('adds a matching field', () => { let matches = fromJS({}); - matches = fun(matches, ['node1', 'field1'], - 1, 'metric1', 'metric1', 'lt', 2); + matches = fun( + matches, ['node1', 'field1'], + 1, 'metric1', 'metric1', 'lt', 2 + ); expect(matches.size).toBe(1); expect(matches.getIn(['node1', 'field1'])).toBeDefined(); const { metric } = matches.getIn(['node1', 'field1']); expect(metric).toBeTruthy(); - matches = fun(matches, ['node2', 'field1'], - 1, 'metric1', 'metric1', 'gt', 0); + matches = fun( + matches, ['node2', 'field1'], + 1, 'metric1', 'metric1', 'gt', 0 + ); expect(matches.size).toBe(2); - matches = fun(matches, ['node3', 'field1'], - 1, 'metric1', 'metric1', 'eq', 1); + matches = fun( + matches, ['node3', 'field1'], + 1, 'metric1', 'metric1', 'eq', 1 + ); expect(matches.size).toBe(3); - matches = fun(matches, ['node3', 'field1'], - 1, 'metric1', 'metric1', 'other', 1); + matches = fun( + matches, ['node3', 'field1'], + 1, 'metric1', 'metric1', 'other', 1 + ); expect(matches.size).toBe(3); }); }); diff --git a/client/app/scripts/utils/__tests__/topology-utils-test.js b/client/app/scripts/utils/__tests__/topology-utils-test.js index 083c031a33..2e11bb22c7 100644 --- a/client/app/scripts/utils/__tests__/topology-utils-test.js +++ b/client/app/scripts/utils/__tests__/topology-utils-test.js @@ -79,7 +79,8 @@ describe('TopologyUtils', () => { it('sets node degrees', () => { nodes = TopologyUtils.updateNodeDegrees( nodeSets.initial4.nodes, - nodeSets.initial4.edges).toJS(); + nodeSets.initial4.edges + ).toJS(); expect(nodes.n1.degree).toEqual(2); expect(nodes.n2.degree).toEqual(1); @@ -88,7 +89,8 @@ describe('TopologyUtils', () => { nodes = TopologyUtils.updateNodeDegrees( nodeSets.removeEdge24.nodes, - nodeSets.removeEdge24.edges).toJS(); + nodeSets.removeEdge24.edges + ).toJS(); expect(nodes.n1.degree).toEqual(2); expect(nodes.n2.degree).toEqual(0); @@ -97,7 +99,8 @@ describe('TopologyUtils', () => { nodes = TopologyUtils.updateNodeDegrees( nodeSets.single3.nodes, - nodeSets.single3.edges).toJS(); + nodeSets.single3.edges + ).toJS(); expect(nodes.n1.degree).toEqual(0); expect(nodes.n2.degree).toEqual(0); diff --git a/client/app/scripts/utils/array-utils.js b/client/app/scripts/utils/array-utils.js index 2ad6218a60..4088b82a33 100644 --- a/client/app/scripts/utils/array-utils.js +++ b/client/app/scripts/utils/array-utils.js @@ -8,8 +8,7 @@ export function uniformSelect(array, size) { } return range(size).map(index => - array[parseInt(index * (array.length / (size - (1 - 1e-9))), 10)] - ); + array[parseInt(index * (array.length / (size - (1 - 1e-9))), 10)]); } export function insertElement(array, index, element) { diff --git a/client/app/scripts/utils/file-utils.js b/client/app/scripts/utils/file-utils.js index d67cfcfc1c..545b52f65d 100644 --- a/client/app/scripts/utils/file-utils.js +++ b/client/app/scripts/utils/file-utils.js @@ -76,7 +76,8 @@ function download(source, name) { filename = `${window.document.title.replace(/[^a-z0-9]/gi, '-').toLowerCase()}-${(+new Date())}`; } - const url = window.URL.createObjectURL(new Blob(source, + const url = window.URL.createObjectURL(new Blob( + source, { type: 'text/xml' } )); diff --git a/client/app/scripts/utils/search-utils.js b/client/app/scripts/utils/search-utils.js index ee1629d619..9beacf548a 100644 --- a/client/app/scripts/utils/search-utils.js +++ b/client/app/scripts/utils/search-utils.js @@ -72,8 +72,10 @@ function findNodeMatch(nodeMatches, keyPath, text, query, prefix, label, truncat if (matches) { const firstMatch = matches[0]; const index = text.search(queryRe); - nodeMatches = nodeMatches.setIn(keyPath, - {text, label, start: index, length: firstMatch.length, truncate}); + nodeMatches = nodeMatches.setIn( + keyPath, + {text, label, start: index, length: firstMatch.length, truncate} + ); } } return nodeMatches; @@ -110,8 +112,10 @@ function findNodeMatchMetric(nodeMatches, keyPath, fieldValue, fieldLabel, metri } } if (matched) { - nodeMatches = nodeMatches.setIn(keyPath, - {fieldLabel, metric: true}); + nodeMatches = nodeMatches.setIn( + keyPath, + {fieldLabel, metric: true} + ); } } return nodeMatches; @@ -125,8 +129,10 @@ export function searchNode(node, { prefix, query, metric, comp, value }) { SEARCH_FIELDS.forEach((field, label) => { const keyPath = [label]; if (node.has(field)) { - nodeMatches = findNodeMatch(nodeMatches, keyPath, node.get(field), - query, prefix, label); + nodeMatches = findNodeMatch( + nodeMatches, keyPath, node.get(field), + query, prefix, label + ); } }); @@ -134,8 +140,10 @@ export function searchNode(node, { prefix, query, metric, comp, value }) { if (node.get('metadata')) { node.get('metadata').forEach((field) => { const keyPath = ['metadata', field.get('id')]; - nodeMatches = findNodeMatch(nodeMatches, keyPath, field.get('value'), - query, prefix, field.get('label'), field.get('truncate')); + nodeMatches = findNodeMatch( + nodeMatches, keyPath, field.get('value'), + query, prefix, field.get('label'), field.get('truncate') + ); }); } @@ -143,8 +151,10 @@ export function searchNode(node, { prefix, query, metric, comp, value }) { if (node.get('parents')) { node.get('parents').forEach((parent) => { const keyPath = ['parents', parent.get('id')]; - nodeMatches = findNodeMatch(nodeMatches, keyPath, parent.get('label'), - query, prefix, parent.get('topologyId')); + nodeMatches = findNodeMatch( + nodeMatches, keyPath, parent.get('label'), + query, prefix, parent.get('topologyId') + ); }); } @@ -153,8 +163,10 @@ export function searchNode(node, { prefix, query, metric, comp, value }) { (propertyList.get('rows') || []).forEach((row) => { const entries = row.get('entries'); const keyPath = ['property-lists', row.get('id')]; - nodeMatches = findNodeMatch(nodeMatches, keyPath, entries.get('value'), - query, prefix, entries.get('label')); + nodeMatches = findNodeMatch( + nodeMatches, keyPath, entries.get('value'), + query, prefix, entries.get('label') + ); }); }); @@ -173,8 +185,10 @@ export function searchNode(node, { prefix, query, metric, comp, value }) { if (metrics) { metrics.forEach((field) => { const keyPath = ['metrics', field.get('id')]; - nodeMatches = findNodeMatchMetric(nodeMatches, keyPath, field.get('value'), - field.get('label'), metric, comp, value); + nodeMatches = findNodeMatchMetric( + nodeMatches, keyPath, field.get('value'), + field.get('label'), metric, comp, value + ); }); } } @@ -259,8 +273,7 @@ export function getSearchableFields(nodes) { // Consider only property lists (and not generic tables). const tableRowLabels = nodes.reduce((labels, node) => ( labels.union(get(node, 'tables').filter(isPropertyList).flatMap(t => (t.get('rows') || makeList) - .map(f => f.getIn(['entries', 'label'])) - )) + .map(f => f.getIn(['entries', 'label'])))) ), makeSet()); const metricLabels = nodes.reduce((labels, node) => ( @@ -282,8 +295,10 @@ export function getSearchableFields(nodes) { */ export function applyPinnedSearches(state) { // clear old filter state - state = state.update('nodes', - nodes => nodes.map(node => node.set('filtered', false))); + state = state.update( + 'nodes', + nodes => nodes.map(node => node.set('filtered', false)) + ); const pinnedSearches = state.get('pinnedSearches'); if (pinnedSearches.size > 0) { @@ -292,10 +307,12 @@ export function applyPinnedSearches(state) { if (parsed) { const nodeMatches = searchTopology(state.get('nodes'), parsed); const filteredNodes = state.get('nodes') - .map(node => node.set('filtered', + .map(node => node.set( + 'filtered', node.get('filtered') // matched by previous pinned search || nodeMatches.size === 0 // no match, filter all nodes - || !nodeMatches.has(node.get('id')))); // filter matches + || !nodeMatches.has(node.get('id')) + )); // filter matches state = state.set('nodes', filteredNodes); } }); diff --git a/client/app/scripts/utils/web-api-utils.js b/client/app/scripts/utils/web-api-utils.js index 1305b5a692..ce16c8861d 100644 --- a/client/app/scripts/utils/web-api-utils.js +++ b/client/app/scripts/utils/web-api-utils.js @@ -167,8 +167,10 @@ function createWebsocket(websocketUrl, getState, dispatch) { firstMessageOnWebsocketAt = new Date(); const timeToFirstMessage = firstMessageOnWebsocketAt - createWebsocketAt; if (timeToFirstMessage > FIRST_RENDER_TOO_LONG_THRESHOLD) { - log('Time (ms) to first nodes render after websocket was created', - firstMessageOnWebsocketAt - createWebsocketAt); + log( + 'Time (ms) to first nodes render after websocket was created', + firstMessageOnWebsocketAt - createWebsocketAt + ); } } }; @@ -197,13 +199,15 @@ function getNodesForTopologies(state, dispatch, topologyIds, topologyOptions = m // fetch sequentially state.get('topologyUrlsById') .filter((_, topologyId) => topologyIds.contains(topologyId)) - .reduce((sequence, topologyUrl, topologyId) => sequence - .then(() => { - const optionsQuery = buildUrlQuery(topologyOptions.get(topologyId), state); - return doRequest({ url: `${getApiPath()}${topologyUrl}?${optionsQuery}` }); - }) - .then(json => dispatch(receiveNodesForTopology(json.nodes, topologyId))), - Promise.resolve()); + .reduce( + (sequence, topologyUrl, topologyId) => sequence + .then(() => { + const optionsQuery = buildUrlQuery(topologyOptions.get(topologyId), state); + return doRequest({ url: `${getApiPath()}${topologyUrl}?${optionsQuery}` }); + }) + .then(json => dispatch(receiveNodesForTopology(json.nodes, topologyId))), + Promise.resolve() + ); } function getNodesOnce(getState, dispatch) { diff --git a/client/server.js b/client/server.js index d9557a41e1..4855bc1b5e 100644 --- a/client/server.js +++ b/client/server.js @@ -100,8 +100,10 @@ const proxyPathServer = http.createServer((req, res) => { return pathProxy.web(req, res, {target}); }).listen(pathProxyPort, 'localhost', () => { const pathProxyHost = proxyPathServer.address().address; - console.log('Scope Proxy Path UI listening at http://%s:%s/scoped/', - pathProxyHost, pathProxyPort); + console.log( + 'Scope Proxy Path UI listening at http://%s:%s/scoped/', + pathProxyHost, pathProxyPort + ); }); proxyPathServer.on('upgrade', (req, socket, head) => { From a369c158a5dc363ebee772acedc3ca5be9c178e7 Mon Sep 17 00:00:00 2001 From: Filip Barl Date: Tue, 17 Oct 2017 17:05:01 +0200 Subject: [PATCH 05/16] Converted some links into buttons. --- client/.eslintrc | 1 - client/app/scripts/components/footer.js | 16 +++++----- .../node-details/node-details-image-status.js | 4 +-- .../components/time-travel-component.js | 8 +++-- .../components/troubleshooting-menu.js | 10 +++--- client/app/scripts/components/zoom-control.js | 8 +++-- client/app/styles/_base.scss | 31 +++++++++++++++++-- 7 files changed, 54 insertions(+), 24 deletions(-) diff --git a/client/.eslintrc b/client/.eslintrc index 40a61398c9..956aef223e 100644 --- a/client/.eslintrc +++ b/client/.eslintrc @@ -37,7 +37,6 @@ "react/sort-comp": 0, "react/prop-types": 0, - "jsx-a11y/anchor-is-valid": 0, "jsx-a11y/click-events-have-key-events": 0, "jsx-a11y/label-has-for": 0, "jsx-a11y/mouse-events-have-key-events": 0, diff --git a/client/app/scripts/components/footer.js b/client/app/scripts/components/footer.js index 82cbf9a3aa..a7a37a5c3c 100644 --- a/client/app/scripts/components/footer.js +++ b/client/app/scripts/components/footer.js @@ -65,25 +65,25 @@ class Footer extends React.Component { diff --git a/client/app/scripts/components/node-details/node-details-image-status.js b/client/app/scripts/components/node-details/node-details-image-status.js index 5ad13701b9..083de02b8e 100644 --- a/client/app/scripts/components/node-details/node-details-image-status.js +++ b/client/app/scripts/components/node-details/node-details-image-status.js @@ -90,11 +90,11 @@ class NodeDetailsImageStatus extends React.PureComponent { Container Image Status {containers && } diff --git a/client/app/scripts/components/time-travel-component.js b/client/app/scripts/components/time-travel-component.js index 6c0d7c8a9b..505cf6a7fd 100644 --- a/client/app/scripts/components/time-travel-component.js +++ b/client/app/scripts/components/time-travel-component.js @@ -145,7 +145,7 @@ const DisabledRange = styled.rect` fill-opacity: 0.15; `; -const TimestampLabel = styled.a` +const TimestampLabel = styled.button` margin-left: 2px; padding: 3px; @@ -155,7 +155,7 @@ const TimestampLabel = styled.a` } `; -const TimelinePanButton = styled.a` +const TimelinePanButton = styled.button` pointer-events: all; padding: 2px; `; @@ -236,7 +236,9 @@ export default class TimeTravelComponent extends React.Component { this.instantUpdateTimestamp = this.instantUpdateTimestamp.bind(this); this.debouncedUpdateTimestamp = debounce( - this.instantUpdateTimestamp.bind(this), TIMELINE_DEBOUNCE_INTERVAL); + this.instantUpdateTimestamp.bind(this), + TIMELINE_DEBOUNCE_INTERVAL + ); } componentDidMount() { diff --git a/client/app/scripts/components/troubleshooting-menu.js b/client/app/scripts/components/troubleshooting-menu.js index 3babf9a7ce..8d2d4dee81 100644 --- a/client/app/scripts/components/troubleshooting-menu.js +++ b/client/app/scripts/components/troubleshooting-menu.js @@ -42,8 +42,7 @@ class DebugMenu extends React.Component {
- + - +
); } diff --git a/client/app/styles/_base.scss b/client/app/styles/_base.scss index 25822eda36..dd13c79925 100644 --- a/client/app/styles/_base.scss +++ b/client/app/styles/_base.scss @@ -109,16 +109,19 @@ a { position: absolute; bottom: 11px; - a { + button { @extend .btn-opacity; + background-color: transparent; border: 1px solid transparent; border-radius: 4px; color: $text-secondary-color; cursor: pointer; + line-height: 20px; padding: 1px 3px; + outline: 0; .fa { - font-size: 150%; + font-size: 125%; position: relative; top: 2px; } @@ -1135,6 +1138,14 @@ a { } } + .node-details-table-node-link { + background-color: transparent; + border: 0; + cursor: pointer; + padding: 0; + outline: 0; + } + .node-details-table-node-link, .node-details-table-node-label, .node-details-table-node-value { @@ -2118,6 +2129,22 @@ a { height: 40px; } + button { + border: 0; + background-color: transparent; + cursor: pointer; + padding: 0; + outline: 0; + } + + button, a { + color: $weave-charcoal-blue; + + &:hover { + color: $text-color; + } + } + .fa { width: 20px; text-align: center; From a07e5dd70a4800c56d7983e7935a84a833557cf8 Mon Sep 17 00:00:00 2001 From: Filip Barl Date: Tue, 17 Oct 2017 17:30:42 +0200 Subject: [PATCH 06/16] Small DOM semantic replacements. --- client/.eslintrc | 3 +-- .../node-details/node-details-table-headers.js | 16 ++++++++-------- client/app/scripts/components/search.js | 4 ++-- client/app/styles/_base.scss | 8 ++++++-- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/client/.eslintrc b/client/.eslintrc index 956aef223e..37c82e8f7e 100644 --- a/client/.eslintrc +++ b/client/.eslintrc @@ -38,9 +38,8 @@ "react/prop-types": 0, "jsx-a11y/click-events-have-key-events": 0, - "jsx-a11y/label-has-for": 0, + "jsx-a11y/mouse-events-have-key-events": 0, - "jsx-a11y/no-noninteractive-element-interactions": 0, "no-multi-spaces": 0, "no-restricted-globals": 0, "object-curly-newline": 0, diff --git a/client/app/scripts/components/node-details/node-details-table-headers.js b/client/app/scripts/components/node-details/node-details-table-headers.js index 9d72a2ce4a..050ae188fe 100644 --- a/client/app/scripts/components/node-details/node-details-table-headers.js +++ b/client/app/scripts/components/node-details/node-details-table-headers.js @@ -38,14 +38,14 @@ export default class NodeDetailsTableHeaders extends React.Component { NODE_DETAILS_TABLE_XS_LABEL[header.id] : header.label; return ( - - {isSortedAsc - && } - {isSortedDesc - && } - {label} + +
+ {isSortedAsc + && } + {isSortedDesc + && } + {label} +
); })} diff --git a/client/app/scripts/components/search.js b/client/app/scripts/components/search.js index d464680554..9641473c64 100644 --- a/client/app/scripts/components/search.js +++ b/client/app/scripts/components/search.js @@ -159,9 +159,9 @@ class Search extends React.Component {
- +
{!showPinnedSearches &&
{getHint(nodes)} Date: Tue, 17 Oct 2017 17:37:34 +0200 Subject: [PATCH 07/16] No restricted globals. --- client/.eslintrc | 4 +--- client/app/scripts/components/cloud-link.js | 2 +- client/app/scripts/components/debug-toolbar.js | 2 +- client/app/scripts/components/matched-text.js | 2 +- .../app/scripts/components/node-details/node-details-table.js | 2 +- client/app/scripts/utils/search-utils.js | 2 +- client/app/scripts/utils/web-api-utils.js | 4 ++-- 7 files changed, 8 insertions(+), 10 deletions(-) diff --git a/client/.eslintrc b/client/.eslintrc index 37c82e8f7e..3e77c74631 100644 --- a/client/.eslintrc +++ b/client/.eslintrc @@ -38,10 +38,8 @@ "react/prop-types": 0, "jsx-a11y/click-events-have-key-events": 0, - "jsx-a11y/mouse-events-have-key-events": 0, - "no-multi-spaces": 0, - "no-restricted-globals": 0, + "object-curly-newline": 0, "padded-blocks": 0, "prefer-destructuring": 0, diff --git a/client/app/scripts/components/cloud-link.js b/client/app/scripts/components/cloud-link.js index 1a5b8e455e..318e385c52 100644 --- a/client/app/scripts/components/cloud-link.js +++ b/client/app/scripts/components/cloud-link.js @@ -44,7 +44,7 @@ class LinkWrapper extends React.Component { if (router && href[0] === '/') { router.push(href); } else { - location.href = href; + window.location.href = href; } } diff --git a/client/app/scripts/components/debug-toolbar.js b/client/app/scripts/components/debug-toolbar.js index 1466411772..536a710a13 100644 --- a/client/app/scripts/components/debug-toolbar.js +++ b/client/app/scripts/components/debug-toolbar.js @@ -117,7 +117,7 @@ function startPerf(delay) { export function showingDebugToolbar() { return (('debugToolbar' in localStorage && JSON.parse(localStorage.debugToolbar)) - || location.pathname.indexOf('debug') > -1); + || window.location.pathname.indexOf('debug') > -1); } diff --git a/client/app/scripts/components/matched-text.js b/client/app/scripts/components/matched-text.js index f26e7ee28d..60d50e681d 100644 --- a/client/app/scripts/components/matched-text.js +++ b/client/app/scripts/components/matched-text.js @@ -10,7 +10,7 @@ const TRUNCATE_ELLIPSIS = '…'; * `('text', {start: 2, length: 1}) => [{text: 'te'}, {text: 'x', match: true}, {text: 't'}]` */ function chunkText(text, { start, length }) { - if (text && !isNaN(start) && !isNaN(length)) { + if (text && !window.isNaN(start) && !window.isNaN(length)) { const chunks = []; // text chunk before match if (start > 0) { diff --git a/client/app/scripts/components/node-details/node-details-table.js b/client/app/scripts/components/node-details/node-details-table.js index 928718385a..cf4f9aac70 100644 --- a/client/app/scripts/components/node-details/node-details-table.js +++ b/client/app/scripts/components/node-details/node-details-table.js @@ -294,7 +294,7 @@ class NodeDetailsTable extends React.Component { NodeDetailsTable.defaultProps = { - nodeIdKey: 'id', // key to identify a node in a row (used for topology links) + nodeIdKey: 'id', // key to identify a node in a row (used for topology links) limit: NODE_DETAILS_DATA_ROWS_DEFAULT_LIMIT, onSortChange: () => {}, sortedDesc: null, diff --git a/client/app/scripts/utils/search-utils.js b/client/app/scripts/utils/search-utils.js index 9beacf548a..c6dad92198 100644 --- a/client/app/scripts/utils/search-utils.js +++ b/client/app/scripts/utils/search-utils.js @@ -235,7 +235,7 @@ export function parseQuery(query) { if (comparisonQuery && comparisonQuery.length === 2) { const value = parseValue(comparisonQuery[1]); const metric = comparisonQuery[0].trim(); - if (!isNaN(value) && metric) { + if (!window.isNaN(value) && metric) { comparison = { metric, value, diff --git a/client/app/scripts/utils/web-api-utils.js b/client/app/scripts/utils/web-api-utils.js index ce16c8861d..6672bb847a 100644 --- a/client/app/scripts/utils/web-api-utils.js +++ b/client/app/scripts/utils/web-api-utils.js @@ -27,7 +27,7 @@ const csrfToken = (() => { // Check for token at window level or parent level (for iframe); /* eslint-disable no-underscore-dangle */ const token = typeof window !== 'undefined' - ? window.__WEAVEWORKS_CSRF_TOKEN || parent.__WEAVEWORKS_CSRF_TOKEN + ? window.__WEAVEWORKS_CSRF_TOKEN || window.parent.__WEAVEWORKS_CSRF_TOKEN : null; /* eslint-enable no-underscore-dangle */ if (!token || token === '$__CSRF_TOKEN_PLACEHOLDER__') { @@ -110,7 +110,7 @@ function topologiesUrl(state) { } export function getWebsocketUrl(host = window.location.host, pathname = window.location.pathname) { - const wsProto = location.protocol === 'https:' ? 'wss' : 'ws'; + const wsProto = window.location.protocol === 'https:' ? 'wss' : 'ws'; return `${wsProto}://${host}${process.env.SCOPE_API_PREFIX || ''}${basePath(pathname)}`; } From 2fcbdb7e16cf0da88a8d79c451a6123a7356fead Mon Sep 17 00:00:00 2001 From: Filip Barl Date: Tue, 17 Oct 2017 17:39:02 +0200 Subject: [PATCH 08/16] Applied autofix for object-curly-newline rule. --- client/.eslintrc | 1 - .../charts/__tests__/nodes-layout-test.js | 8 ++++++-- client/app/scripts/charts/edge-container.js | 4 +++- client/app/scripts/charts/edge.js | 4 +++- client/app/scripts/charts/node-container.js | 4 +++- client/app/scripts/charts/node-shapes.js | 4 +++- client/app/scripts/charts/node.js | 6 ++++-- client/app/scripts/charts/nodes-error.js | 4 +++- client/app/scripts/charts/nodes-grid.js | 10 +++++++--- client/app/scripts/components/app.js | 6 ++++-- client/app/scripts/components/debug-toolbar.js | 4 +++- client/app/scripts/components/footer.js | 4 +++- client/app/scripts/components/help-panel.js | 4 +++- client/app/scripts/components/matched-text.js | 4 +++- client/app/scripts/components/node-details.js | 4 +++- .../node-details/node-details-controls.js | 4 +++- .../node-details-health-link-item.js | 4 +++- .../node-details-table-node-metric-link.js | 4 +++- .../node-details/node-details-table-row.js | 4 +++- .../node-details/node-details-table.js | 6 ++++-- .../nodes-resources/node-resources-layer.js | 4 +++- .../node-resources-metric-box-info.js | 6 ++++-- .../node-resources-metric-box.js | 12 +++++++++--- client/app/scripts/components/nodes.js | 6 ++++-- client/app/scripts/components/plugins.js | 4 +++- client/app/scripts/components/search.js | 10 +++++++--- client/app/scripts/components/show-more.js | 4 +++- client/app/scripts/components/sparkline.js | 4 +++- client/app/scripts/components/status.js | 4 +++- client/app/scripts/components/time-control.js | 6 ++++-- .../app/scripts/components/zoomable-canvas.js | 18 +++++++++++++----- client/app/scripts/constants/styles.js | 12 +++++++++--- .../scripts/reducers/__tests__/root-test.js | 6 ++++-- client/app/scripts/reducers/root.js | 6 ++++-- client/app/scripts/selectors/canvas.js | 4 +++- .../app/scripts/selectors/graph-view/layout.js | 4 +++- .../app/scripts/selectors/graph-view/zoom.js | 12 +++++++++--- .../scripts/selectors/resource-view/zoom.js | 12 +++++++++--- .../utils/__tests__/layouter-utils-test.js | 16 ++++++++++++---- .../scripts/utils/__tests__/math-utils-test.js | 12 +++++++++--- .../utils/__tests__/search-utils-test.js | 4 +++- client/app/scripts/utils/layouter-utils.js | 4 +++- client/app/scripts/utils/node-shape-utils.js | 4 +++- client/app/scripts/utils/search-utils.js | 8 ++++++-- client/app/scripts/utils/transform-utils.js | 12 +++++++++--- 45 files changed, 209 insertions(+), 78 deletions(-) diff --git a/client/.eslintrc b/client/.eslintrc index 3e77c74631..aff00d73f7 100644 --- a/client/.eslintrc +++ b/client/.eslintrc @@ -40,7 +40,6 @@ "jsx-a11y/click-events-have-key-events": 0, "jsx-a11y/mouse-events-have-key-events": 0, - "object-curly-newline": 0, "padded-blocks": 0, "prefer-destructuring": 0, "react/default-props-match-prop-types": 0, diff --git a/client/app/scripts/charts/__tests__/nodes-layout-test.js b/client/app/scripts/charts/__tests__/nodes-layout-test.js index ddf83d182f..b9ff15601f 100644 --- a/client/app/scripts/charts/__tests__/nodes-layout-test.js +++ b/client/app/scripts/charts/__tests__/nodes-layout-test.js @@ -134,13 +134,17 @@ describe('NodesLayout', () => { }, layoutProps: { nodes: fromJS({ - n1: {id: 'n1', label: 'lold', labelMinor: 'lmold', rank: 'rold'}, + n1: { + id: 'n1', label: 'lold', labelMinor: 'lmold', rank: 'rold' + }, }), edges: fromJS({}) }, layoutProps2: { nodes: fromJS({ - n1: {id: 'n1', label: 'lnew', labelMinor: 'lmnew', rank: 'rnew', x: 111, y: 109}, + n1: { + id: 'n1', label: 'lnew', labelMinor: 'lmnew', rank: 'rnew', x: 111, y: 109 + }, }), edges: fromJS({}) } diff --git a/client/app/scripts/charts/edge-container.js b/client/app/scripts/charts/edge-container.js index 8c9b5fb509..49e391d971 100644 --- a/client/app/scripts/charts/edge-container.js +++ b/client/app/scripts/charts/edge-container.js @@ -70,7 +70,9 @@ export default class EdgeContainer extends React.PureComponent { } render() { - const { isAnimated, waypoints, scale, ...forwardedProps } = this.props; + const { + isAnimated, waypoints, scale, ...forwardedProps + } = this.props; const { thickness, waypointsMap } = this.state; if (!isAnimated) { diff --git a/client/app/scripts/charts/edge.js b/client/app/scripts/charts/edge.js index 276f2aa094..86bbd3b2f8 100644 --- a/client/app/scripts/charts/edge.js +++ b/client/app/scripts/charts/edge.js @@ -14,7 +14,9 @@ class Edge extends React.Component { } render() { - const { id, path, highlighted, focused, thickness, source, target } = this.props; + const { + id, path, highlighted, focused, thickness, source, target + } = this.props; const shouldRenderMarker = (focused || highlighted) && (source !== target); const className = classNames('edge', { highlighted }); diff --git a/client/app/scripts/charts/node-container.js b/client/app/scripts/charts/node-container.js index 2d81982338..f8d9c389a1 100644 --- a/client/app/scripts/charts/node-container.js +++ b/client/app/scripts/charts/node-container.js @@ -13,7 +13,9 @@ const transformedNode = (otherProps, { x, y, k }) => ( export default class NodeContainer extends React.PureComponent { render() { - const { dx, dy, isAnimated, scale, ...forwardedProps } = this.props; + const { + dx, dy, isAnimated, scale, ...forwardedProps + } = this.props; if (!isAnimated) { // Show static node for optimized rendering diff --git a/client/app/scripts/charts/node-shapes.js b/client/app/scripts/charts/node-shapes.js index 42d7b3e3d9..2fb22e832e 100644 --- a/client/app/scripts/charts/node-shapes.js +++ b/client/app/scripts/charts/node-shapes.js @@ -23,7 +23,9 @@ import { import { encodeIdAttribute } from '../utils/dom-utils'; -function NodeShape(shapeType, shapeElement, shapeProps, { id, highlighted, color, metric }) { +function NodeShape(shapeType, shapeElement, shapeProps, { + id, highlighted, color, metric +}) { const { height, hasMetric, formattedValue } = getMetricValue(metric); const className = classNames('shape', `shape-${shapeType}`, { metrics: hasMetric }); const metricStyle = { fill: getMetricColor(metric) }; diff --git a/client/app/scripts/charts/node.js b/client/app/scripts/charts/node.js index b186645852..34583ce81d 100644 --- a/client/app/scripts/charts/node.js +++ b/client/app/scripts/charts/node.js @@ -103,8 +103,10 @@ class Node extends React.Component { } render() { - const { focused, highlighted, networks, pseudo, rank, label, transform, - exportingGraph, showingNetworks, stack, id, metric } = this.props; + const { + focused, highlighted, networks, pseudo, rank, label, transform, + exportingGraph, showingNetworks, stack, id, metric + } = this.props; const { hovered } = this.state; const color = getNodeColor(rank, label, pseudo); diff --git a/client/app/scripts/charts/nodes-error.js b/client/app/scripts/charts/nodes-error.js index 69b495193b..5cfa6ab1a4 100644 --- a/client/app/scripts/charts/nodes-error.js +++ b/client/app/scripts/charts/nodes-error.js @@ -1,7 +1,9 @@ import React from 'react'; import classnames from 'classnames'; -const NodesError = ({ children, faIconClass, hidden, mainClassName = 'nodes-chart-error'}) => { +const NodesError = ({ + children, faIconClass, hidden, mainClassName = 'nodes-chart-error' +}) => { const className = classnames(mainClassName, { hide: hidden }); diff --git a/client/app/scripts/charts/nodes-grid.js b/client/app/scripts/charts/nodes-grid.js index aae3abf3f2..4b583284b1 100644 --- a/client/app/scripts/charts/nodes-grid.js +++ b/client/app/scripts/charts/nodes-grid.js @@ -58,7 +58,9 @@ function getColumns(nodes) { } -function renderIdCell({ rank, label, labelMinor, pseudo }) { +function renderIdCell({ + rank, label, labelMinor, pseudo +}) { const showSubLabel = Boolean(pseudo) && labelMinor; const title = showSubLabel ? `${label} (${labelMinor})` : label; const iconStyle = { @@ -101,8 +103,10 @@ class NodesGrid extends React.Component { } render() { - const { nodes, height, gridSortedBy, gridSortedDesc, canvasMargins, - searchNodeMatches, searchQuery } = this.props; + const { + nodes, height, gridSortedBy, gridSortedDesc, canvasMargins, + searchNodeMatches, searchQuery + } = this.props; const cmpStyle = { height, marginTop: canvasMargins.top, diff --git a/client/app/scripts/components/app.js b/client/app/scripts/components/app.js index 6f8b6ee053..08f2f1fe67 100644 --- a/client/app/scripts/components/app.js +++ b/client/app/scripts/components/app.js @@ -170,9 +170,11 @@ class App extends React.Component { } render() { - const { isTableViewMode, isGraphViewMode, isResourceViewMode, showingDetails, + const { + isTableViewMode, isGraphViewMode, isResourceViewMode, showingDetails, showingHelp, showingNetworkSelector, showingTroubleshootingMenu, - timeTravelTransitioning, showingTimeTravel } = this.props; + timeTravelTransitioning, showingTimeTravel + } = this.props; const className = classNames('scope-app', { 'time-travel-open': showingTimeTravel }); const isIframe = window !== window.top; diff --git a/client/app/scripts/components/debug-toolbar.js b/client/app/scripts/components/debug-toolbar.js index 536a710a13..9681d8279a 100644 --- a/client/app/scripts/components/debug-toolbar.js +++ b/client/app/scripts/components/debug-toolbar.js @@ -265,7 +265,9 @@ class DebugToolbar extends React.Component { addInternetNode() { setTimeout(() => { this.asyncDispatch(receiveNodesDelta({ - add: [{id: INTERNET, label: INTERNET, pseudo: true, labelMinor: 'Outgoing packets', shape: 'cloud'}] + add: [{ + id: INTERNET, label: INTERNET, pseudo: true, labelMinor: 'Outgoing packets', shape: 'cloud' + }] })); }, 0); } diff --git a/client/app/scripts/components/footer.js b/client/app/scripts/components/footer.js index a7a37a5c3c..595c2bd783 100644 --- a/client/app/scripts/components/footer.js +++ b/client/app/scripts/components/footer.js @@ -34,7 +34,9 @@ class Footer extends React.Component { } render() { - const { hostname, version, versionUpdate, contrastMode } = this.props; + const { + hostname, version, versionUpdate, contrastMode + } = this.props; const otherContrastModeTitle = contrastMode ? 'Switch to normal contrast' : 'Switch to high contrast'; diff --git a/client/app/scripts/components/help-panel.js b/client/app/scripts/components/help-panel.js index 12b243f53e..8510ee6a91 100644 --- a/client/app/scripts/components/help-panel.js +++ b/client/app/scripts/components/help-panel.js @@ -150,7 +150,9 @@ function renderFieldsPanel(currentTopologyName, searchableFields) { } -function HelpPanel({ currentTopologyName, searchableFields, onClickClose, canvasMargins }) { +function HelpPanel({ + currentTopologyName, searchableFields, onClickClose, canvasMargins +}) { return (
diff --git a/client/app/scripts/components/matched-text.js b/client/app/scripts/components/matched-text.js index 60d50e681d..368af639ef 100644 --- a/client/app/scripts/components/matched-text.js +++ b/client/app/scripts/components/matched-text.js @@ -80,7 +80,9 @@ function truncateChunks(chunks, text, maxLength) { */ export default class MatchedText extends React.PureComponent { render() { - const { match, text, truncate, maxLength } = this.props; + const { + match, text, truncate, maxLength + } = this.props; const showFullValue = !truncate || (match && (match.start + match.length) > truncate); const displayText = showFullValue ? text : text.slice(0, truncate); diff --git a/client/app/scripts/components/node-details.js b/client/app/scripts/components/node-details.js index 1e81141267..fad4a2a3fa 100644 --- a/client/app/scripts/components/node-details.js +++ b/client/app/scripts/components/node-details.js @@ -158,7 +158,9 @@ class NodeDetails extends React.Component { } renderDetails() { - const { details, nodeControlStatus, nodeMatches = makeMap(), topologyId } = this.props; + const { + details, nodeControlStatus, nodeMatches = makeMap(), topologyId + } = this.props; const showControls = details.controls && details.controls.length > 0; const nodeColor = getNodeColorDark(details.rank, details.label, details.pseudo); const {error, pending} = nodeControlStatus ? nodeControlStatus.toJS() : {}; diff --git a/client/app/scripts/components/node-details/node-details-controls.js b/client/app/scripts/components/node-details/node-details-controls.js index 9c6d828c7b..4604512de5 100644 --- a/client/app/scripts/components/node-details/node-details-controls.js +++ b/client/app/scripts/components/node-details/node-details-controls.js @@ -3,7 +3,9 @@ import { sortBy } from 'lodash'; import NodeDetailsControlButton from './node-details-control-button'; -export default function NodeDetailsControls({controls, error, nodeId, pending}) { +export default function NodeDetailsControls({ + controls, error, nodeId, pending +}) { let spinnerClassName = 'fa fa-circle-o-notch fa-spin'; if (pending) { spinnerClassName += ' node-details-controls-spinner'; diff --git a/client/app/scripts/components/node-details/node-details-health-link-item.js b/client/app/scripts/components/node-details/node-details-health-link-item.js index 45a45b4fd2..6757dd61e0 100644 --- a/client/app/scripts/components/node-details/node-details-health-link-item.js +++ b/client/app/scripts/components/node-details/node-details-health-link-item.js @@ -63,7 +63,9 @@ class NodeDetailsHealthLinkItem extends React.Component { } render() { - const { id, url, pausedAt, ...props } = this.props; + const { + id, url, pausedAt, ...props + } = this.props; const metricColor = getMetricColor(id); const labelColor = this.state.hovered && !props.valueEmpty && darkenColor(metricColor); diff --git a/client/app/scripts/components/node-details/node-details-table-node-metric-link.js b/client/app/scripts/components/node-details/node-details-table-node-metric-link.js index 2b6251867a..3749fce826 100644 --- a/client/app/scripts/components/node-details/node-details-table-node-metric-link.js +++ b/client/app/scripts/components/node-details/node-details-table-node-metric-link.js @@ -17,7 +17,9 @@ class NodeDetailsTableNodeMetricLink extends React.Component { } render() { - const { url, style, value, valueEmpty } = this.props; + const { + url, style, value, valueEmpty + } = this.props; return ( h.id === sortedBy); diff --git a/client/app/scripts/components/nodes-resources/node-resources-layer.js b/client/app/scripts/components/nodes-resources/node-resources-layer.js index cb4eacc632..96a47f7aa5 100644 --- a/client/app/scripts/components/nodes-resources/node-resources-layer.js +++ b/client/app/scripts/components/nodes-resources/node-resources-layer.js @@ -12,7 +12,9 @@ import { class NodesResourcesLayer extends React.Component { render() { - const { layerVerticalPosition, topologyId, transform, layoutNodes } = this.props; + const { + layerVerticalPosition, topologyId, transform, layoutNodes + } = this.props; return ( diff --git a/client/app/scripts/components/nodes-resources/node-resources-metric-box-info.js b/client/app/scripts/components/nodes-resources/node-resources-metric-box-info.js index e2bbfb5a6b..b4e405080b 100644 --- a/client/app/scripts/components/nodes-resources/node-resources-metric-box-info.js +++ b/client/app/scripts/components/nodes-resources/node-resources-metric-box-info.js @@ -3,8 +3,10 @@ import React from 'react'; export default class NodeResourcesMetricBoxInfo extends React.Component { humanizedMetricInfo() { - const { humanizedTotalCapacity, humanizedAbsoluteConsumption, - humanizedRelativeConsumption, showCapacity, format } = this.props.metricSummary.toJS(); + const { + humanizedTotalCapacity, humanizedAbsoluteConsumption, + humanizedRelativeConsumption, showCapacity, format + } = this.props.metricSummary.toJS(); const showExtendedInfo = showCapacity && format !== 'percent'; return ( diff --git a/client/app/scripts/components/nodes-resources/node-resources-metric-box.js b/client/app/scripts/components/nodes-resources/node-resources-metric-box.js index fa48632dbb..dfde7eccf5 100644 --- a/client/app/scripts/components/nodes-resources/node-resources-metric-box.js +++ b/client/app/scripts/components/nodes-resources/node-resources-metric-box.js @@ -28,7 +28,9 @@ import { // down to this component, so a lot of stuff gets rerendered/recalculated on every zoom action. // On the other hand, this enables us to easily leave out the nodes that are not in the viewport. const transformedDimensions = (props) => { - const { width, height, x, y } = applyTransform(props.transform, props); + const { + width, height, x, y + } = applyTransform(props.transform, props); // Trim the beginning of the resource box just after the layer topology // name to the left and the viewport width to the right. That enables us @@ -79,7 +81,9 @@ class NodeResourcesMetricBox extends React.Component { } defaultRectProps(relativeHeight = 1) { - const { x, y, width, height } = this.state; + const { + x, y, width, height + } = this.state; const translateY = height * (1 - relativeHeight); return { transform: `translate(0, ${translateY})`, @@ -94,7 +98,9 @@ class NodeResourcesMetricBox extends React.Component { render() { const { x, y, width } = this.state; - const { id, selectedNodeId, label, color, metricSummary } = this.props; + const { + id, selectedNodeId, label, color, metricSummary + } = this.props; const { showCapacity, relativeConsumption, type } = metricSummary.toJS(); const opacity = (selectedNodeId && selectedNodeId !== id) ? 0.35 : 1; diff --git a/client/app/scripts/components/nodes.js b/client/app/scripts/components/nodes.js index 591829c01d..e5933858ca 100644 --- a/client/app/scripts/components/nodes.js +++ b/client/app/scripts/components/nodes.js @@ -52,8 +52,10 @@ class Nodes extends React.Component { } render() { - const { topologiesLoaded, nodesLoaded, topologies, currentTopology, isGraphViewMode, - isTableViewMode, isResourceViewMode } = this.props; + const { + topologiesLoaded, nodesLoaded, topologies, currentTopology, isGraphViewMode, + isTableViewMode, isResourceViewMode + } = this.props; // TODO: Rename view mode components. return ( diff --git a/client/app/scripts/components/plugins.js b/client/app/scripts/components/plugins.js index d5edd3d844..b5e6bd1d72 100644 --- a/client/app/scripts/components/plugins.js +++ b/client/app/scripts/components/plugins.js @@ -5,7 +5,9 @@ import classNames from 'classnames'; import Tooltip from './tooltip'; -const Plugin = ({id, label, description, status}) => { +const Plugin = ({ + id, label, description, status +}) => { const error = status !== 'ok'; const className = classNames({ error }); const tip = (Description: {description}
Status: {status}
); diff --git a/client/app/scripts/components/search.js b/client/app/scripts/components/search.js index 9641473c64..1965b42160 100644 --- a/client/app/scripts/components/search.js +++ b/client/app/scripts/components/search.js @@ -126,8 +126,10 @@ class Search extends React.Component { } render() { - const { nodes, pinnedSearches, searchFocused, searchMatchCountByTopology, - isResourceViewMode, searchQuery, topologiesLoaded, inputId = 'search' } = this.props; + const { + nodes, pinnedSearches, searchFocused, searchMatchCountByTopology, + isResourceViewMode, searchQuery, topologiesLoaded, inputId = 'search' + } = this.props; const hidden = !topologiesLoaded || isResourceViewMode; const disabled = this.props.isTopologyNodeCountZero && !hidden; const matchCount = searchMatchCountByTopology @@ -188,5 +190,7 @@ export default connect( searchQuery: state.get('searchQuery'), searchMatchCountByTopology: searchMatchCountByTopologySelector(state), }), - { blurSearch, doSearch, focusSearch, pinSearch, toggleHelp } + { + blurSearch, doSearch, focusSearch, pinSearch, toggleHelp + } )(Search); diff --git a/client/app/scripts/components/show-more.js b/client/app/scripts/components/show-more.js index e22f97abc9..15868ef625 100644 --- a/client/app/scripts/components/show-more.js +++ b/client/app/scripts/components/show-more.js @@ -12,7 +12,9 @@ export default class ShowMore extends React.PureComponent { } render() { - const { collection, notShown, expanded, hideNumber } = this.props; + const { + collection, notShown, expanded, hideNumber + } = this.props; const showLimitAction = collection && (expanded || notShown > 0); const limitActionText = !hideNumber && !expanded && notShown > 0 ? `+${notShown}` : ''; const limitActionIcon = !expanded && notShown > 0 ? 'fa fa-caret-down' : 'fa fa-caret-up'; diff --git a/client/app/scripts/components/sparkline.js b/client/app/scripts/components/sparkline.js index 898bd5f41e..154d7ba6fc 100644 --- a/client/app/scripts/components/sparkline.js +++ b/client/app/scripts/components/sparkline.js @@ -75,7 +75,9 @@ export default class Sparkline extends React.Component { const title = `Last ${Math.round((lastDate - firstDate) / 1000)} seconds, ` + `${data.length} samples, min: ${min}, max: ${max}, mean: ${mean}`; - return {title, lastX, lastY, data}; + return { + title, lastX, lastY, data + }; } getEmptyGraphData() { diff --git a/client/app/scripts/components/status.js b/client/app/scripts/components/status.js index 3a0b11288a..b331fbbc48 100644 --- a/client/app/scripts/components/status.js +++ b/client/app/scripts/components/status.js @@ -6,7 +6,9 @@ import { isPausedSelector } from '../selectors/time-travel'; class Status extends React.Component { render() { - const { errorUrl, topologiesLoaded, filteredNodeCount, topology, websocketClosed } = this.props; + const { + errorUrl, topologiesLoaded, filteredNodeCount, topology, websocketClosed + } = this.props; let title = ''; let text = 'Trying to reconnect...'; diff --git a/client/app/scripts/components/time-control.js b/client/app/scripts/components/time-control.js index 62edd37ae0..9e33c3e7cc 100644 --- a/client/app/scripts/components/time-control.js +++ b/client/app/scripts/components/time-control.js @@ -61,8 +61,10 @@ class TimeControl extends React.Component { } render() { - const { showingTimeTravel, pausedAt, timeTravelTransitioning, topologiesLoaded, - hasHistoricReports } = this.props; + const { + showingTimeTravel, pausedAt, timeTravelTransitioning, topologiesLoaded, + hasHistoricReports + } = this.props; const isPausedNow = pausedAt && !showingTimeTravel; const isTimeTravelling = showingTimeTravel; diff --git a/client/app/scripts/components/zoomable-canvas.js b/client/app/scripts/components/zoomable-canvas.js index 12dee90d5e..0a4f9fbcb2 100644 --- a/client/app/scripts/components/zoomable-canvas.js +++ b/client/app/scripts/components/zoomable-canvas.js @@ -88,7 +88,9 @@ class ZoomableCanvas extends React.Component { handleZoomControlAction(scale) { // Get the center of the SVG and zoom around it. - const { top, bottom, left, right } = this.svg.node().getBoundingClientRect(); + const { + top, bottom, left, right + } = this.svg.node().getBoundingClientRect(); const centerOfCanvas = { x: (left + right) / 2, y: (top + bottom) / 2, @@ -164,7 +166,8 @@ class ZoomableCanvas extends React.Component { handlePan() { let state = this.state; // Apply the translation respecting the boundaries. - state = this.clampedTranslation({ ...state, + state = this.clampedTranslation({ + ...state, translateX: this.state.translateX + d3Event.dx, translateY: this.state.translateY + d3Event.dy, }); @@ -185,8 +188,12 @@ class ZoomableCanvas extends React.Component { } clampedTranslation(state) { - const { width, height, canvasMargins, boundContent, layoutLimits } = this.props; - const { contentMinX, contentMaxX, contentMinY, contentMaxY } = layoutLimits.toJS(); + const { + width, height, canvasMargins, boundContent, layoutLimits + } = this.props; + const { + contentMinX, contentMaxX, contentMinY, contentMaxY + } = layoutLimits.toJS(); if (boundContent) { // If the content is required to be bounded in any way, the translation will @@ -239,7 +246,8 @@ class ZoomableCanvas extends React.Component { // translation limits). Adapted from: // https://github.com/d3/d3-zoom/blob/807f02c7a5fe496fbd08cc3417b62905a8ce95fa/src/zoom.js#L251 const inversePosition = inverseTransform(this.state, position); - state = this.clampedTranslation({ ...state, + state = this.clampedTranslation({ + ...state, translateX: position.x - (inversePosition.x * scaleX), translateY: position.y - (inversePosition.y * scaleY), }); diff --git a/client/app/scripts/constants/styles.js b/client/app/scripts/constants/styles.js index 9d312ac9c0..54781bacd1 100644 --- a/client/app/scripts/constants/styles.js +++ b/client/app/scripts/constants/styles.js @@ -38,9 +38,15 @@ export const NODE_BASE_SIZE = 100; export const EDGE_WAYPOINTS_CAP = 10; export const CANVAS_MARGINS = { - [GRAPH_VIEW_MODE]: { top: 160, left: 80, right: 80, bottom: 150 }, - [TABLE_VIEW_MODE]: { top: 220, left: 40, right: 40, bottom: 30 }, - [RESOURCE_VIEW_MODE]: { top: 140, left: 210, right: 40, bottom: 150 }, + [GRAPH_VIEW_MODE]: { + top: 160, left: 80, right: 80, bottom: 150 + }, + [TABLE_VIEW_MODE]: { + top: 220, left: 40, right: 40, bottom: 30 + }, + [RESOURCE_VIEW_MODE]: { + top: 140, left: 210, right: 40, bottom: 150 + }, }; // Node details table constants diff --git a/client/app/scripts/reducers/__tests__/root-test.js b/client/app/scripts/reducers/__tests__/root-test.js index 831f464a2f..99cb27b928 100644 --- a/client/app/scripts/reducers/__tests__/root-test.js +++ b/client/app/scripts/reducers/__tests__/root-test.js @@ -427,7 +427,8 @@ describe('RootReducer', () => { RouteAction.state = { topologyId: 'topo1', selectedNodeId: null, - topologyOptions: {topo1: {option1: 'on'}}}; + topologyOptions: {topo1: {option1: 'on'}} + }; let nextState = initialState; nextState = reducer(nextState, RouteAction); @@ -445,7 +446,8 @@ describe('RootReducer', () => { RouteAction.state = { topologyId: 'topo1', selectedNodeId: null, - topologyOptions: null}; + topologyOptions: null + }; let nextState = initialState; nextState = reducer(nextState, RouteAction); nextState = reducer(nextState, ReceiveTopologiesAction); diff --git a/client/app/scripts/reducers/root.js b/client/app/scripts/reducers/root.js index 6b0804af02..c669fa6dc2 100644 --- a/client/app/scripts/reducers/root.js +++ b/client/app/scripts/reducers/root.js @@ -560,7 +560,8 @@ export function rootReducer(state = initialState, action) { // disregard if node is not selected anymore if (state.hasIn(['nodeDetails', action.details.id])) { - state = state.updateIn(['nodeDetails', action.details.id], obj => ({ ...obj, + state = state.updateIn(['nodeDetails', action.details.id], obj => ({ + ...obj, notFound: false, timestamp: action.requestTimestamp, details: action.details, @@ -636,7 +637,8 @@ export function rootReducer(state = initialState, action) { case ActionTypes.RECEIVE_NOT_FOUND: { if (state.hasIn(['nodeDetails', action.nodeId])) { - state = state.updateIn(['nodeDetails', action.nodeId], obj => ({ ...obj, + state = state.updateIn(['nodeDetails', action.nodeId], obj => ({ + ...obj, timestamp: action.requestTimestamp, notFound: true, })); diff --git a/client/app/scripts/selectors/canvas.js b/client/app/scripts/selectors/canvas.js index 4cd864d3c3..39854af4e1 100644 --- a/client/app/scripts/selectors/canvas.js +++ b/client/app/scripts/selectors/canvas.js @@ -11,7 +11,9 @@ export const canvasMarginsSelector = createSelector( [ state => state.get('topologyViewMode'), ], - viewMode => CANVAS_MARGINS[viewMode] || { top: 0, left: 0, right: 0, bottom: 0 } + viewMode => CANVAS_MARGINS[viewMode] || { + top: 0, left: 0, right: 0, bottom: 0 + } ); export const canvasWidthSelector = createSelector( diff --git a/client/app/scripts/selectors/graph-view/layout.js b/client/app/scripts/selectors/graph-view/layout.js index 399564f5a1..176324f252 100644 --- a/client/app/scripts/selectors/graph-view/layout.js +++ b/client/app/scripts/selectors/graph-view/layout.js @@ -28,7 +28,9 @@ const translationToViewportCenterSelector = createSelector( graphZoomStateSelector, ], (centerX, centerY, zoomState) => { - const { scaleX, scaleY, translateX, translateY } = zoomState.toJS(); + const { + scaleX, scaleY, translateX, translateY + } = zoomState.toJS(); return { x: (-translateX + centerX) / scaleX, y: (-translateY + centerY) / scaleY, diff --git a/client/app/scripts/selectors/graph-view/zoom.js b/client/app/scripts/selectors/graph-view/zoom.js index c9fcee2194..3b2164c222 100644 --- a/client/app/scripts/selectors/graph-view/zoom.js +++ b/client/app/scripts/selectors/graph-view/zoom.js @@ -22,7 +22,9 @@ const graphBoundingRectangleSelector = createSelector( const xMax = graphNodes.map(n => n.get('x') + NODE_BASE_SIZE).max(); const yMax = graphNodes.map(n => n.get('y') + NODE_BASE_SIZE).max(); - return makeMap({ xMin, yMin, xMax, yMax }); + return makeMap({ + xMin, yMin, xMax, yMax + }); } ); @@ -37,7 +39,9 @@ export const graphDefaultZoomSelector = createSelector( (boundingRectangle, canvasMargins, width, height) => { if (!boundingRectangle) return makeMap(); - const { xMin, xMax, yMin, yMax } = boundingRectangle.toJS(); + const { + xMin, xMax, yMin, yMax + } = boundingRectangle.toJS(); const xFactor = width / (xMax - xMin); const yFactor = height / (yMax - yMin); @@ -65,7 +69,9 @@ export const graphLimitsSelector = createSelector( (boundingRectangle) => { if (!boundingRectangle) return makeMap(); - const { xMin, xMax, yMin, yMax } = boundingRectangle.toJS(); + const { + xMin, xMax, yMin, yMax + } = boundingRectangle.toJS(); return makeMap({ minScale: MIN_SCALE, diff --git a/client/app/scripts/selectors/resource-view/zoom.js b/client/app/scripts/selectors/resource-view/zoom.js index 41c1bb8e42..58a7616b44 100644 --- a/client/app/scripts/selectors/resource-view/zoom.js +++ b/client/app/scripts/selectors/resource-view/zoom.js @@ -32,7 +32,9 @@ const resourceNodesBoundingRectangleSelector = createSelector( const xMax = flattenedNodes.map(n => n.get('offset') + n.get('width')).max(); const yMax = verticalPositions.toList().max() + RESOURCES_LAYER_HEIGHT; - return makeMap({ xMin, xMax, yMin, yMax }); + return makeMap({ + xMin, xMax, yMin, yMax + }); } ); @@ -47,7 +49,9 @@ export const resourcesDefaultZoomSelector = createSelector( (boundingRectangle, canvasMargins, width, height) => { if (!boundingRectangle) return makeMap(); - const { xMin, xMax, yMin, yMax } = boundingRectangle.toJS(); + const { + xMin, xMax, yMin, yMax + } = boundingRectangle.toJS(); // The default scale takes all the available horizontal space and 70% of the vertical space. const scaleX = (width / (xMax - xMin)) * 1.0; @@ -76,7 +80,9 @@ export const resourcesLimitsSelector = createSelector( (defaultZoom, boundingRectangle, minNodeWidth, width) => { if (defaultZoom.isEmpty()) return makeMap(); - const { xMin, xMax, yMin, yMax } = boundingRectangle.toJS(); + const { + xMin, xMax, yMin, yMax + } = boundingRectangle.toJS(); return makeMap({ // Maximal zoom is such that the smallest box takes the whole canvas. diff --git a/client/app/scripts/utils/__tests__/layouter-utils-test.js b/client/app/scripts/utils/__tests__/layouter-utils-test.js index e0ed8fc2d3..1edc11dd3f 100644 --- a/client/app/scripts/utils/__tests__/layouter-utils-test.js +++ b/client/app/scripts/utils/__tests__/layouter-utils-test.js @@ -15,10 +15,18 @@ describe('LayouterUtils', () => { c: {} }); expect(initEdgesFromNodes(input).toJS()).toEqual({ - [edge('a', 'b')]: { id: edge('a', 'b'), source: 'a', target: 'b', value: 1 }, - [edge('a', 'c')]: { id: edge('a', 'c'), source: 'a', target: 'c', value: 1 }, - [edge('b', 'a')]: { id: edge('b', 'a'), source: 'b', target: 'a', value: 1 }, - [edge('b', 'b')]: { id: edge('b', 'b'), source: 'b', target: 'b', value: 1 }, + [edge('a', 'b')]: { + id: edge('a', 'b'), source: 'a', target: 'b', value: 1 + }, + [edge('a', 'c')]: { + id: edge('a', 'c'), source: 'a', target: 'c', value: 1 + }, + [edge('b', 'a')]: { + id: edge('b', 'a'), source: 'b', target: 'a', value: 1 + }, + [edge('b', 'b')]: { + id: edge('b', 'b'), source: 'b', target: 'b', value: 1 + }, }); }); }); diff --git a/client/app/scripts/utils/__tests__/math-utils-test.js b/client/app/scripts/utils/__tests__/math-utils-test.js index 70481c0395..7faa160ef1 100644 --- a/client/app/scripts/utils/__tests__/math-utils-test.js +++ b/client/app/scripts/utils/__tests__/math-utils-test.js @@ -37,9 +37,15 @@ describe('MathUtils', () => { expect(f(fromJS({...entryA, ...entryB}))).toBe(30); expect(f(fromJS({...entryA, ...entryC}))).toBe(40); expect(f(fromJS({...entryB, ...entryC}))).toBe(50); - expect(f(fromJS({...entryA, ...entryB, ...entryC, ...entryD}))).toBe(30); - expect(f(fromJS({...entryA, ...entryB, ...entryC, ...entryD, ...entryE}))).toBe(1); - expect(f(fromJS({...entryA, ...entryB, ...entryC, ...entryD, ...entryF}))).toBe(0); + expect(f(fromJS({ + ...entryA, ...entryB, ...entryC, ...entryD + }))).toBe(30); + expect(f(fromJS({ + ...entryA, ...entryB, ...entryC, ...entryD, ...entryE + }))).toBe(1); + expect(f(fromJS({ + ...entryA, ...entryB, ...entryC, ...entryD, ...entryF + }))).toBe(0); }); }); }); diff --git a/client/app/scripts/utils/__tests__/search-utils-test.js b/client/app/scripts/utils/__tests__/search-utils-test.js index affaf9cec2..61d09ff9e3 100644 --- a/client/app/scripts/utils/__tests__/search-utils-test.js +++ b/client/app/scripts/utils/__tests__/search-utils-test.js @@ -140,7 +140,9 @@ describe('SearchUtils', () => { ); expect(matches.size).toBe(1); expect(matches.getIn(['node1', 'field1'])).toBeDefined(); - const {text, label, start, length} = matches.getIn(['node1', 'field1']); + const { + text, label, start, length + } = matches.getIn(['node1', 'field1']); expect(text).toBe('samevalue'); expect(label).toBe('some label'); expect(start).toBe(0); diff --git a/client/app/scripts/utils/layouter-utils.js b/client/app/scripts/utils/layouter-utils.js index a3a5ce5234..cbae050f38 100644 --- a/client/app/scripts/utils/layouter-utils.js +++ b/client/app/scripts/utils/layouter-utils.js @@ -26,7 +26,9 @@ export function initEdgesFromNodes(nodes) { // The direction source->target is important since dagre takes // directionality into account when calculating the layout. const edgeId = constructEdgeId(source, target); - const edge = makeMap({ id: edgeId, value: 1, source, target }); + const edge = makeMap({ + id: edgeId, value: 1, source, target + }); edges = edges.set(edgeId, edge); } }); diff --git a/client/app/scripts/utils/node-shape-utils.js b/client/app/scripts/utils/node-shape-utils.js index 1f3f4c2550..77f36e3052 100644 --- a/client/app/scripts/utils/node-shape-utils.js +++ b/client/app/scripts/utils/node-shape-utils.js @@ -22,7 +22,9 @@ function curvedUnitPolygonPath(n) { export const circleShapeProps = { r: 1 }; export const triangleShapeProps = { d: curvedUnitPolygonPath(3) }; -export const squareShapeProps = { width: 1.8, height: 1.8, rx: 0.4, ry: 0.4, x: -0.9, y: -0.9 }; +export const squareShapeProps = { + width: 1.8, height: 1.8, rx: 0.4, ry: 0.4, x: -0.9, y: -0.9 +}; export const pentagonShapeProps = { d: curvedUnitPolygonPath(5) }; export const hexagonShapeProps = { d: curvedUnitPolygonPath(6) }; export const heptagonShapeProps = { d: curvedUnitPolygonPath(7) }; diff --git a/client/app/scripts/utils/search-utils.js b/client/app/scripts/utils/search-utils.js index c6dad92198..80c98593d4 100644 --- a/client/app/scripts/utils/search-utils.js +++ b/client/app/scripts/utils/search-utils.js @@ -74,7 +74,9 @@ function findNodeMatch(nodeMatches, keyPath, text, query, prefix, label, truncat const index = text.search(queryRe); nodeMatches = nodeMatches.setIn( keyPath, - {text, label, start: index, length: firstMatch.length, truncate} + { + text, label, start: index, length: firstMatch.length, truncate + } ); } } @@ -121,7 +123,9 @@ function findNodeMatchMetric(nodeMatches, keyPath, fieldValue, fieldLabel, metri return nodeMatches; } -export function searchNode(node, { prefix, query, metric, comp, value }) { +export function searchNode(node, { + prefix, query, metric, comp, value +}) { let nodeMatches = makeMap(); if (query) { diff --git a/client/app/scripts/utils/transform-utils.js b/client/app/scripts/utils/transform-utils.js index cc1834dd64..68d5721154 100644 --- a/client/app/scripts/utils/transform-utils.js +++ b/client/app/scripts/utils/transform-utils.js @@ -4,7 +4,9 @@ const applyTranslateY = ({ scaleY = 1, translateY = 0 }, y) => (y * scaleY) + tr const applyScaleX = ({ scaleX = 1 }, width) => width * scaleX; const applyScaleY = ({ scaleY = 1 }, height) => height * scaleY; -export const applyTransform = (transform, { width = 0, height = 0, x, y }) => ({ +export const applyTransform = (transform, { + width = 0, height = 0, x, y +}) => ({ x: applyTranslateX(transform, x), y: applyTranslateY(transform, y), width: applyScaleX(transform, width), @@ -17,7 +19,9 @@ const inverseTranslateY = ({ scaleY = 1, translateY = 0 }, y) => (y - translateY const inverseScaleX = ({ scaleX = 1 }, width) => width / scaleX; const inverseScaleY = ({ scaleY = 1 }, height) => height / scaleY; -export const inverseTransform = (transform, { width = 0, height = 0, x, y }) => ({ +export const inverseTransform = (transform, { + width = 0, height = 0, x, y +}) => ({ x: inverseTranslateX(transform, x), y: inverseTranslateY(transform, y), width: inverseScaleX(transform, width), @@ -25,6 +29,8 @@ export const inverseTransform = (transform, { width = 0, height = 0, x, y }) => }); -export const transformToString = ({ translateX = 0, translateY = 0, scaleX = 1, scaleY = 1 }) => ( +export const transformToString = ({ + translateX = 0, translateY = 0, scaleX = 1, scaleY = 1 +}) => ( `translate(${translateX},${translateY}) scale(${scaleX},${scaleY})` ); From dbea4208835201387bf3b143f5bc166682abfc3a Mon Sep 17 00:00:00 2001 From: Filip Barl Date: Tue, 17 Oct 2017 17:40:56 +0200 Subject: [PATCH 09/16] Autofix for padded-blocks. --- client/.eslintrc | 1 - client/app/scripts/charts/edge.js | 1 - client/app/scripts/charts/nodes-grid.js | 1 - client/app/scripts/components/debug-toolbar.js | 1 - client/app/scripts/components/details-card.js | 1 - client/app/scripts/components/embedded-terminal.js | 1 - client/app/scripts/components/loading.js | 2 -- client/app/scripts/components/network-selector-item.js | 1 - client/app/scripts/components/networks-selector.js | 1 - .../components/node-details/node-details-health-link-item.js | 1 - .../app/scripts/components/node-details/node-details-health.js | 1 - .../scripts/components/node-details/node-details-relatives.js | 1 - client/app/scripts/components/search-item.js | 1 - client/app/scripts/components/search.js | 1 - client/app/scripts/components/terminal-app.js | 1 - client/app/scripts/components/topology-option-action.js | 1 - client/app/scripts/components/warning.js | 1 - client/app/scripts/hoc/metric-feeder.js | 1 - 18 files changed, 19 deletions(-) diff --git a/client/.eslintrc b/client/.eslintrc index aff00d73f7..7559a9fc4e 100644 --- a/client/.eslintrc +++ b/client/.eslintrc @@ -40,7 +40,6 @@ "jsx-a11y/click-events-have-key-events": 0, "jsx-a11y/mouse-events-have-key-events": 0, - "padded-blocks": 0, "prefer-destructuring": 0, "react/default-props-match-prop-types": 0, "react/jsx-closing-tag-location": 0, diff --git a/client/app/scripts/charts/edge.js b/client/app/scripts/charts/edge.js index 86bbd3b2f8..cbf0a85b86 100644 --- a/client/app/scripts/charts/edge.js +++ b/client/app/scripts/charts/edge.js @@ -6,7 +6,6 @@ import { enterEdge, leaveEdge } from '../actions/app-actions'; import { encodeIdAttribute, decodeIdAttribute } from '../utils/dom-utils'; class Edge extends React.Component { - constructor(props, context) { super(props, context); this.handleMouseEnter = this.handleMouseEnter.bind(this); diff --git a/client/app/scripts/charts/nodes-grid.js b/client/app/scripts/charts/nodes-grid.js index 4b583284b1..a54e8745cf 100644 --- a/client/app/scripts/charts/nodes-grid.js +++ b/client/app/scripts/charts/nodes-grid.js @@ -81,7 +81,6 @@ function renderIdCell({ class NodesGrid extends React.Component { - constructor(props, context) { super(props, context); diff --git a/client/app/scripts/components/debug-toolbar.js b/client/app/scripts/components/debug-toolbar.js index 9681d8279a..7f02b961f4 100644 --- a/client/app/scripts/components/debug-toolbar.js +++ b/client/app/scripts/components/debug-toolbar.js @@ -151,7 +151,6 @@ function setAppState(fn) { class DebugToolbar extends React.Component { - constructor(props, context) { super(props, context); this.onChange = this.onChange.bind(this); diff --git a/client/app/scripts/components/details-card.js b/client/app/scripts/components/details-card.js index 1ae3d6c7c1..106b24007b 100644 --- a/client/app/scripts/components/details-card.js +++ b/client/app/scripts/components/details-card.js @@ -10,7 +10,6 @@ import { } from '../constants/styles'; class DetailsCard extends React.Component { - constructor(props, context) { super(props, context); this.state = { diff --git a/client/app/scripts/components/embedded-terminal.js b/client/app/scripts/components/embedded-terminal.js index 1d66a19910..6593578d5c 100644 --- a/client/app/scripts/components/embedded-terminal.js +++ b/client/app/scripts/components/embedded-terminal.js @@ -6,7 +6,6 @@ import { DETAILS_PANEL_WIDTH, DETAILS_PANEL_MARGINS } from '../constants/styles' import Terminal from './terminal'; class EmeddedTerminal extends React.Component { - constructor(props, context) { super(props, context); this.state = { diff --git a/client/app/scripts/components/loading.js b/client/app/scripts/components/loading.js index 259b586423..506fd98ce0 100644 --- a/client/app/scripts/components/loading.js +++ b/client/app/scripts/components/loading.js @@ -36,7 +36,6 @@ function renderTemplate(nodeType, template) { export class Loading extends React.Component { - constructor(props, context) { super(props, context); @@ -54,5 +53,4 @@ export class Loading extends React.Component { ); } - } diff --git a/client/app/scripts/components/network-selector-item.js b/client/app/scripts/components/network-selector-item.js index 44043402e0..97b7e2b34d 100644 --- a/client/app/scripts/components/network-selector-item.js +++ b/client/app/scripts/components/network-selector-item.js @@ -6,7 +6,6 @@ import { selectNetwork, pinNetwork, unpinNetwork } from '../actions/app-actions' import { getNetworkColor } from '../utils/color-utils'; class NetworkSelectorItem extends React.Component { - constructor(props, context) { super(props, context); diff --git a/client/app/scripts/components/networks-selector.js b/client/app/scripts/components/networks-selector.js index aebe06f878..d8d45617a9 100644 --- a/client/app/scripts/components/networks-selector.js +++ b/client/app/scripts/components/networks-selector.js @@ -7,7 +7,6 @@ import { availableNetworksSelector } from '../selectors/node-networks'; import NetworkSelectorItem from './network-selector-item'; class NetworkSelector extends React.Component { - constructor(props, context) { super(props, context); this.onClick = this.onClick.bind(this); diff --git a/client/app/scripts/components/node-details/node-details-health-link-item.js b/client/app/scripts/components/node-details/node-details-health-link-item.js index 6757dd61e0..abe08915e9 100644 --- a/client/app/scripts/components/node-details/node-details-health-link-item.js +++ b/client/app/scripts/components/node-details/node-details-health-link-item.js @@ -38,7 +38,6 @@ export function appendTime(url, time) { } class NodeDetailsHealthLinkItem extends React.Component { - constructor(props) { super(props); this.state = { diff --git a/client/app/scripts/components/node-details/node-details-health.js b/client/app/scripts/components/node-details/node-details-health.js index 8d763656de..e83bf78b35 100644 --- a/client/app/scripts/components/node-details/node-details-health.js +++ b/client/app/scripts/components/node-details/node-details-health.js @@ -4,7 +4,6 @@ import ShowMore from '../show-more'; import NodeDetailsHealthLinkItem from './node-details-health-link-item'; export default class NodeDetailsHealth extends React.Component { - constructor(props, context) { super(props, context); this.state = { diff --git a/client/app/scripts/components/node-details/node-details-relatives.js b/client/app/scripts/components/node-details/node-details-relatives.js index 3004011fd5..0968b4237e 100644 --- a/client/app/scripts/components/node-details/node-details-relatives.js +++ b/client/app/scripts/components/node-details/node-details-relatives.js @@ -5,7 +5,6 @@ import { NODE_DETAILS_DATA_ROWS_DEFAULT_LIMIT } from '../../constants/limits'; import NodeDetailsRelativesLink from './node-details-relatives-link'; export default class NodeDetailsRelatives extends React.Component { - constructor(props, context) { super(props, context); this.state = { diff --git a/client/app/scripts/components/search-item.js b/client/app/scripts/components/search-item.js index 518ffa11c9..fc5e42ba65 100644 --- a/client/app/scripts/components/search-item.js +++ b/client/app/scripts/components/search-item.js @@ -4,7 +4,6 @@ import { connect } from 'react-redux'; import { unpinSearch } from '../actions/app-actions'; class SearchItem extends React.Component { - constructor(props, context) { super(props, context); this.handleClick = this.handleClick.bind(this); diff --git a/client/app/scripts/components/search.js b/client/app/scripts/components/search.js index 1965b42160..1a07ae6d2b 100644 --- a/client/app/scripts/components/search.js +++ b/client/app/scripts/components/search.js @@ -46,7 +46,6 @@ function getHint(nodes) { class Search extends React.Component { - constructor(props, context) { super(props, context); this.handleBlur = this.handleBlur.bind(this); diff --git a/client/app/scripts/components/terminal-app.js b/client/app/scripts/components/terminal-app.js index f07b86d41f..4875eb5611 100644 --- a/client/app/scripts/components/terminal-app.js +++ b/client/app/scripts/components/terminal-app.js @@ -7,7 +7,6 @@ import { receiveControlPipeFromParams, hitEsc } from '../actions/app-actions'; const ESC_KEY_CODE = 27; class TerminalApp extends React.Component { - constructor(props, context) { super(props, context); diff --git a/client/app/scripts/components/topology-option-action.js b/client/app/scripts/components/topology-option-action.js index 1bb090d385..5fa63504f3 100644 --- a/client/app/scripts/components/topology-option-action.js +++ b/client/app/scripts/components/topology-option-action.js @@ -1,7 +1,6 @@ import React from 'react'; export default class TopologyOptionAction extends React.Component { - constructor(props, context) { super(props, context); this.onClick = this.onClick.bind(this); diff --git a/client/app/scripts/components/warning.js b/client/app/scripts/components/warning.js index 161c68d5ab..a198636402 100644 --- a/client/app/scripts/components/warning.js +++ b/client/app/scripts/components/warning.js @@ -3,7 +3,6 @@ import classnames from 'classnames'; class Warning extends React.Component { - constructor(props, context) { super(props, context); this.handleClick = this.handleClick.bind(this); diff --git a/client/app/scripts/hoc/metric-feeder.js b/client/app/scripts/hoc/metric-feeder.js index c2167fd660..f54f1713a4 100644 --- a/client/app/scripts/hoc/metric-feeder.js +++ b/client/app/scripts/hoc/metric-feeder.js @@ -23,7 +23,6 @@ const WINDOW_LENGTH = 60; * This component also keeps a historic max of all samples it sees over time. */ export default ComposedComponent => class extends React.Component { - constructor(props, context) { super(props, context); From c26914087fc7165d2e98cc9a6587b29ef74325c8 Mon Sep 17 00:00:00 2001 From: Filip Barl Date: Tue, 17 Oct 2017 17:49:15 +0200 Subject: [PATCH 10/16] Use destructuring instead of deep assignment whenever possible. --- client/.eslintrc | 1 - client/app/scripts/charts/nodes-layout.js | 2 +- client/app/scripts/components/metric-selector-item.js | 2 +- client/app/scripts/components/network-selector-item.js | 2 +- .../node-details/node-details-property-list.js | 2 +- client/app/scripts/components/search.js | 3 +-- client/app/scripts/components/sparkline.js | 2 +- client/app/scripts/components/zoomable-canvas.js | 2 +- client/app/scripts/hoc/metric-feeder.js | 2 +- client/app/scripts/reducers/__tests__/root-test.js | 10 ++++------ client/app/scripts/utils/metric-utils.js | 4 ++-- 11 files changed, 14 insertions(+), 18 deletions(-) diff --git a/client/.eslintrc b/client/.eslintrc index 7559a9fc4e..32c031ec78 100644 --- a/client/.eslintrc +++ b/client/.eslintrc @@ -40,7 +40,6 @@ "jsx-a11y/click-events-have-key-events": 0, "jsx-a11y/mouse-events-have-key-events": 0, - "prefer-destructuring": 0, "react/default-props-match-prop-types": 0, "react/jsx-closing-tag-location": 0, "react/jsx-max-props-per-line": 0, diff --git a/client/app/scripts/charts/nodes-layout.js b/client/app/scripts/charts/nodes-layout.js index 6c2c725e0b..7ec58a0845 100644 --- a/client/app/scripts/charts/nodes-layout.js +++ b/client/app/scripts/charts/nodes-layout.js @@ -88,7 +88,7 @@ function layoutSingleNodes(layout, opts) { const graphWidth = layout.graphWidth || layout.width; const aspectRatio = graphHeight ? graphWidth / graphHeight : 1; - let nodes = layout.nodes; + let { nodes } = layout; // 0-degree nodes const singleNodes = nodes.filter(node => node.get('degree') === 0); diff --git a/client/app/scripts/components/metric-selector-item.js b/client/app/scripts/components/metric-selector-item.js index de51f90187..fa0d3ce636 100644 --- a/client/app/scripts/components/metric-selector-item.js +++ b/client/app/scripts/components/metric-selector-item.js @@ -31,7 +31,7 @@ class MetricSelectorItem extends React.Component { onMouseClick() { const metricType = this.props.metric.get('label'); - const pinnedMetricType = this.props.pinnedMetricType; + const { pinnedMetricType } = this.props; if (metricType !== pinnedMetricType) { this.trackEvent('scope.metric.selector.pin.click'); diff --git a/client/app/scripts/components/network-selector-item.js b/client/app/scripts/components/network-selector-item.js index 97b7e2b34d..2ad27a298b 100644 --- a/client/app/scripts/components/network-selector-item.js +++ b/client/app/scripts/components/network-selector-item.js @@ -20,7 +20,7 @@ class NetworkSelectorItem extends React.Component { onMouseClick() { const k = this.props.network.get('id'); - const pinnedNetwork = this.props.pinnedNetwork; + const { pinnedNetwork } = this.props; if (k === pinnedNetwork) { this.props.unpinNetwork(k); diff --git a/client/app/scripts/components/node-details/node-details-property-list.js b/client/app/scripts/components/node-details/node-details-property-list.js index 4375248ca3..04c8ad91a7 100644 --- a/client/app/scripts/components/node-details/node-details-property-list.js +++ b/client/app/scripts/components/node-details/node-details-property-list.js @@ -30,7 +30,7 @@ export default class NodeDetailsPropertyList extends React.Component { render() { const { controls, matches = makeMap() } = this.props; - let rows = this.props.rows; + let { rows } = this.props; let notShown = 0; const limited = rows && this.state.limit > 0 && rows.length > this.state.limit; const expanded = this.state.limit === 0; diff --git a/client/app/scripts/components/search.js b/client/app/scripts/components/search.js index 1a07ae6d2b..67fc452b72 100644 --- a/client/app/scripts/components/search.js +++ b/client/app/scripts/components/search.js @@ -30,8 +30,7 @@ function getHint(nodes) { const node = nodes.filter(n => !n.get('pseudo') && n.has('metadata')).last(); if (node) { - label = shortenHintLabel(node.get('label')) - .split('.')[0]; + [label] = shortenHintLabel(node.get('label')).split('.'); if (node.get('metadata')) { const metadataField = node.get('metadata').first(); metadataLabel = shortenHintLabel(slugify(metadataField.get('label'))) diff --git a/client/app/scripts/components/sparkline.js b/client/app/scripts/components/sparkline.js index 154d7ba6fc..a7c59bf84c 100644 --- a/client/app/scripts/components/sparkline.js +++ b/client/app/scripts/components/sparkline.js @@ -38,7 +38,7 @@ export default class Sparkline extends React.Component { getGraphData() { // data is of shape [{date, value}, ...] and is sorted by date (ASC) - let data = this.props.data; + let { data } = this.props; this.initRanges(true); diff --git a/client/app/scripts/components/zoomable-canvas.js b/client/app/scripts/components/zoomable-canvas.js index 0a4f9fbcb2..d8c172b6d5 100644 --- a/client/app/scripts/components/zoomable-canvas.js +++ b/client/app/scripts/components/zoomable-canvas.js @@ -164,7 +164,7 @@ class ZoomableCanvas extends React.Component { } handlePan() { - let state = this.state; + let { state } = this; // Apply the translation respecting the boundaries. state = this.clampedTranslation({ ...state, diff --git a/client/app/scripts/hoc/metric-feeder.js b/client/app/scripts/hoc/metric-feeder.js index f54f1713a4..f845d1f249 100644 --- a/client/app/scripts/hoc/metric-feeder.js +++ b/client/app/scripts/hoc/metric-feeder.js @@ -57,7 +57,7 @@ export default ComposedComponent => class extends React.Component { updateBuffer(props) { // merge new samples into buffer - let buffer = this.state.buffer; + let { buffer } = this.state; const nextSamples = makeOrderedMap(props.samples.map(d => [d.date, d.value])); // need to sort again after merge, some new data may have different times for old values buffer = buffer.merge(nextSamples).sortBy(sortDate); diff --git a/client/app/scripts/reducers/__tests__/root-test.js b/client/app/scripts/reducers/__tests__/root-test.js index 99cb27b928..be87a50bc7 100644 --- a/client/app/scripts/reducers/__tests__/root-test.js +++ b/client/app/scripts/reducers/__tests__/root-test.js @@ -10,15 +10,13 @@ import { highlightedEdgeIdsSelector } from '../../selectors/graph-view/decorator describe('RootReducer', () => { const ActionTypes = require('../../constants/action-types').default; const reducer = require('../root').default; - const initialState = require('../root').initialState; + const { initialState } = require('../root'); const topologyUtils = require('../../utils/topology-utils'); const topologySelectors = require('../../selectors/topology'); // TODO maybe extract those to topology-utils tests? - const activeTopologyOptionsSelector = topologySelectors.activeTopologyOptionsSelector; - const getAdjacentNodes = topologyUtils.getAdjacentNodes; - const isNodesDisplayEmpty = topologyUtils.isNodesDisplayEmpty; - const isTopologyNodeCountZero = topologyUtils.isTopologyNodeCountZero; - const getUrlState = require('../../utils/router-utils').getUrlState; + const { activeTopologyOptionsSelector } = topologySelectors; + const { getAdjacentNodes, isNodesDisplayEmpty, isTopologyNodeCountZero } = topologyUtils; + const { getUrlState } = require('../../utils/router-utils'); // fixtures diff --git a/client/app/scripts/utils/metric-utils.js b/client/app/scripts/utils/metric-utils.js index e14547d628..85bc716333 100644 --- a/client/app/scripts/utils/metric-utils.js +++ b/client/app/scripts/utils/metric-utils.js @@ -26,10 +26,10 @@ export function getMetricValue(metric) { return {height: 0, value: null, formattedValue: 'n/a'}; } const m = metric.toJS(); - const value = m.value; + const { value } = m; let valuePercentage = value === 0 ? 0 : value / m.max; - let max = m.max; + let { max } = m; if (includes(['load1', 'load5', 'load15'], m.id)) { valuePercentage = loadScale(value); max = null; From ef2f32dc9943df2433d89b8dc7f42d11b136ecd4 Mon Sep 17 00:00:00 2001 From: Filip Barl Date: Tue, 17 Oct 2017 17:54:50 +0200 Subject: [PATCH 11/16] Declared Sparkline PropTypes. --- client/.eslintrc | 1 - client/app/scripts/components/sparkline.js | 12 +++++++++--- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/client/.eslintrc b/client/.eslintrc index 32c031ec78..4d6729d8f5 100644 --- a/client/.eslintrc +++ b/client/.eslintrc @@ -40,7 +40,6 @@ "jsx-a11y/click-events-have-key-events": 0, "jsx-a11y/mouse-events-have-key-events": 0, - "react/default-props-match-prop-types": 0, "react/jsx-closing-tag-location": 0, "react/jsx-max-props-per-line": 0, "react/jsx-wrap-multilines": 0, diff --git a/client/app/scripts/components/sparkline.js b/client/app/scripts/components/sparkline.js index a7c59bf84c..d75a2d3161 100644 --- a/client/app/scripts/components/sparkline.js +++ b/client/app/scripts/components/sparkline.js @@ -33,7 +33,7 @@ export default class Sparkline extends React.Component { this.x.range([MARGIN, this.props.width - circleSpace]); this.y.range([this.props.height - circleSpace, circleSpace]); - this.line.curve(this.props.curve); + this.line.curve(curveLinear); } getGraphData() { @@ -130,7 +130,14 @@ export default class Sparkline extends React.Component { } Sparkline.propTypes = { - data: PropTypes.arrayOf(PropTypes.object) + width: PropTypes.number, + height: PropTypes.number, + strokeColor: PropTypes.string, + strokeWidth: PropTypes.number, + hoverColor: PropTypes.string, + circleRadius: PropTypes.number, + hovered: PropTypes.bool, + data: PropTypes.arrayOf(PropTypes.object), }; Sparkline.defaultProps = { @@ -139,7 +146,6 @@ Sparkline.defaultProps = { strokeColor: '#7d7da8', strokeWidth: 0.5, hoverColor: '#7d7da8', - curve: curveLinear, circleRadius: 1.75, hovered: false, data: [], From d81e50d418620ae2549f4a448b8fcdf4e43ad21b Mon Sep 17 00:00:00 2001 From: Filip Barl Date: Tue, 17 Oct 2017 18:07:02 +0200 Subject: [PATCH 12/16] Fix DOM closing tag location. --- client/.eslintrc | 1 - .../components/__tests__/node-details-test.js | 24 +++--- client/app/scripts/components/app.js | 8 +- client/app/scripts/components/dev-tools.js | 14 ++-- client/app/scripts/components/footer.js | 16 ++-- client/app/scripts/components/help-panel.js | 13 ++- .../app/scripts/components/matched-results.js | 8 +- .../app/scripts/components/metric-selector.js | 18 +++-- client/app/scripts/components/node-details.js | 81 +++++++++++-------- .../__tests__/node-details-table-test.js | 36 +++++---- .../node-details/node-details-controls.js | 10 ++- .../node-details/node-details-relatives.js | 12 +-- .../node-resources-metric-box-info.js | 8 +- client/app/scripts/components/search.js | 12 +-- client/app/scripts/components/time-control.js | 35 ++++---- 15 files changed, 171 insertions(+), 125 deletions(-) diff --git a/client/.eslintrc b/client/.eslintrc index 4d6729d8f5..6e26e27c57 100644 --- a/client/.eslintrc +++ b/client/.eslintrc @@ -40,7 +40,6 @@ "jsx-a11y/click-events-have-key-events": 0, "jsx-a11y/mouse-events-have-key-events": 0, - "react/jsx-closing-tag-location": 0, "react/jsx-max-props-per-line": 0, "react/jsx-wrap-multilines": 0, } diff --git a/client/app/scripts/components/__tests__/node-details-test.js b/client/app/scripts/components/__tests__/node-details-test.js index ef6c795fb3..dc481ffa39 100644 --- a/client/app/scripts/components/__tests__/node-details-test.js +++ b/client/app/scripts/components/__tests__/node-details-test.js @@ -19,9 +19,11 @@ describe('NodeDetails', () => { }); it('shows n/a when node was not found', () => { - const c = TestUtils.renderIntoDocument( - - ); + const c = TestUtils.renderIntoDocument(( + + + + )); const notFound = TestUtils.findRenderedDOMComponentWithClass( c, 'node-details-header-notavailable' @@ -32,13 +34,15 @@ describe('NodeDetails', () => { it('show label of node with title', () => { nodes = nodes.set(nodeId, Immutable.fromJS({id: nodeId})); details = {label: 'Node 1'}; - const c = TestUtils.renderIntoDocument( - - ); + const c = TestUtils.renderIntoDocument(( + + + + )); const title = TestUtils.findRenderedDOMComponentWithClass(c, 'node-details-header-label'); expect(title.title).toBe('Node 1'); diff --git a/client/app/scripts/components/app.js b/client/app/scripts/components/app.js index 08f2f1fe67..ceca9925e4 100644 --- a/client/app/scripts/components/app.js +++ b/client/app/scripts/components/app.js @@ -194,9 +194,11 @@ class App extends React.Component {
- {!isIframe && - - } + {!isIframe && + + + + }
diff --git a/client/app/scripts/components/dev-tools.js b/client/app/scripts/components/dev-tools.js index 068839fd7f..65604d0405 100644 --- a/client/app/scripts/components/dev-tools.js +++ b/client/app/scripts/components/dev-tools.js @@ -3,9 +3,11 @@ import { createDevTools } from 'redux-devtools'; import LogMonitor from 'redux-devtools-log-monitor'; import DockMonitor from 'redux-devtools-dock-monitor'; -export default createDevTools( - -); +export default createDevTools(( + + + +)); diff --git a/client/app/scripts/components/footer.js b/client/app/scripts/components/footer.js index 595c2bd783..57713e0a90 100644 --- a/client/app/scripts/components/footer.js +++ b/client/app/scripts/components/footer.js @@ -49,13 +49,15 @@ class Footer extends React.Component { return (
- {versionUpdate && - Update available: {versionUpdate.get('version')} - } + {versionUpdate && + + Update available: {versionUpdate.get('version')} + + } Version {version} on diff --git a/client/app/scripts/components/help-panel.js b/client/app/scripts/components/help-panel.js index 8510ee6a91..c9e69fffb3 100644 --- a/client/app/scripts/components/help-panel.js +++ b/client/app/scripts/components/help-panel.js @@ -116,14 +116,21 @@ function renderSearchPanel() { function renderFieldsPanel(currentTopologyName, searchableFields) { - const none = None; + const none = ( + None + ); + const currentTopology = ( + + {currentTopologyName} + + ); + return (

Fields and Metrics

Searchable fields and metrics in the
- currently selected - {currentTopologyName} topology: + currently selected {currentTopology} topology:

diff --git a/client/app/scripts/components/matched-results.js b/client/app/scripts/components/matched-results.js index 295d9820f1..eb91e58c86 100644 --- a/client/app/scripts/components/matched-results.js +++ b/client/app/scripts/components/matched-results.js @@ -41,9 +41,11 @@ export default class MatchedResults extends React.PureComponent { return (
{matches.keySeq().take(SHOW_ROW_COUNT).map(fieldId => Match(matches.get(fieldId)))} - {moreFieldMatches &&
- {`${moreFieldMatches.size} more matches`} -
} + {moreFieldMatches && +
+ {`${moreFieldMatches.size} more matches`} +
+ }
); } diff --git a/client/app/scripts/components/metric-selector.js b/client/app/scripts/components/metric-selector.js index d16ad22d80..bca5589d96 100644 --- a/client/app/scripts/components/metric-selector.js +++ b/client/app/scripts/components/metric-selector.js @@ -22,14 +22,16 @@ class MetricSelector extends React.Component { return (
- {hasMetrics &&
- {availableMetrics.map(metric => ( - - ))} -
} + {hasMetrics && +
+ {availableMetrics.map(metric => ( + + ))} +
+ }
); } diff --git a/client/app/scripts/components/node-details.js b/client/app/scripts/components/node-details.js index fad4a2a3fa..7b3d1bd33a 100644 --- a/client/app/scripts/components/node-details.js +++ b/client/app/scripts/components/node-details.js @@ -63,12 +63,14 @@ class NodeDetails extends React.Component { return (
- {showSwitchTopology && - Show in {this.props.topologyId.replace(/-/g, ' ')} - } + {showSwitchTopology && + + Show in {this.props.topologyId.replace(/-/g, ' ')} + + }
- {showControls &&
- -
} + {showControls && +
+ +
+ }
- {details.metrics &&
-
Status
- -
} - {details.metadata &&
-
Info
- -
} + {details.metrics && +
+
Status
+ +
+ } + {details.metadata && +
+
Info
+ +
+ } {details.connections && details.connections.filter(cs => cs.connections.length > 0) - .map(connections => (
- -
+ .map(connections => ( +
+ +
))} {details.children && details.children.map(children => ( @@ -233,10 +242,12 @@ class NodeDetails extends React.Component {
{table.label && table.label.length > 0 && table.label} - {table.truncationCount > 0 && - - } + {table.truncationCount > 0 && + + + + }
{this.renderTable(table)}
diff --git a/client/app/scripts/components/node-details/__tests__/node-details-table-test.js b/client/app/scripts/components/node-details/__tests__/node-details-table-test.js index 1ac23263be..acd8ba3661 100644 --- a/client/app/scripts/components/node-details/__tests__/node-details-table-test.js +++ b/client/app/scripts/components/node-details/__tests__/node-details-table-test.js @@ -71,14 +71,16 @@ describe('NodeDetailsTable', () => { describe('kubernetes_ip', () => { it('sorts by column', () => { - component = TestUtils.renderIntoDocument( - - ); + component = TestUtils.renderIntoDocument(( + + + + )); matchColumnValues('kubernetes_ip', [ '10.44.253.255', @@ -105,14 +107,16 @@ describe('NodeDetailsTable', () => { describe('kubernetes_namespace', () => { it('sorts by column', () => { - component = TestUtils.renderIntoDocument( - - ); + component = TestUtils.renderIntoDocument(( + + + + )); matchColumnValues('kubernetes_namespace', ['00000', '1111', '12', '5']); clickColumn('Namespace'); diff --git a/client/app/scripts/components/node-details/node-details-controls.js b/client/app/scripts/components/node-details/node-details-controls.js index 4604512de5..aecd6d1c5a 100644 --- a/client/app/scripts/components/node-details/node-details-controls.js +++ b/client/app/scripts/components/node-details/node-details-controls.js @@ -15,10 +15,12 @@ export default function NodeDetailsControls({ return (
- {error &&
- - {error} -
} + {error && +
+ + {error} +
+ } {sortBy(controls, 'rank').map(control => )} diff --git a/client/app/scripts/components/node-details/node-details-relatives.js b/client/app/scripts/components/node-details/node-details-relatives.js index 0968b4237e..ec9d6dedf1 100644 --- a/client/app/scripts/components/node-details/node-details-relatives.js +++ b/client/app/scripts/components/node-details/node-details-relatives.js @@ -38,11 +38,13 @@ export default class NodeDetailsRelatives extends React.Component { key={relative.id} match={matches.get(relative.id)} {...relative} />))} - {showLimitAction && - {limitActionText} - } + {showLimitAction && + + {limitActionText} + + }
); } diff --git a/client/app/scripts/components/nodes-resources/node-resources-metric-box-info.js b/client/app/scripts/components/nodes-resources/node-resources-metric-box-info.js index b4e405080b..e165401678 100644 --- a/client/app/scripts/components/nodes-resources/node-resources-metric-box-info.js +++ b/client/app/scripts/components/nodes-resources/node-resources-metric-box-info.js @@ -14,9 +14,11 @@ export default class NodeResourcesMetricBoxInfo extends React.Component { {showExtendedInfo ? humanizedRelativeConsumption : humanizedAbsoluteConsumption} used - {showExtendedInfo && {' - '} - ({humanizedAbsoluteConsumption} / {humanizedTotalCapacity}) - } + {showExtendedInfo && + + {' - '}({humanizedAbsoluteConsumption} / {humanizedTotalCapacity}) + + } ); } diff --git a/client/app/scripts/components/search.js b/client/app/scripts/components/search.js index 67fc452b72..afe60f28c0 100644 --- a/client/app/scripts/components/search.js +++ b/client/app/scripts/components/search.js @@ -163,11 +163,13 @@ class Search extends React.Component { Search
- {!showPinnedSearches &&
- {getHint(nodes)} -
} + {!showPinnedSearches && +
+ {getHint(nodes)} +
+ }
); diff --git a/client/app/scripts/components/time-control.js b/client/app/scripts/components/time-control.js index 9e33c3e7cc..976dc1ab36 100644 --- a/client/app/scripts/components/time-control.js +++ b/client/app/scripts/components/time-control.js @@ -94,24 +94,27 @@ class TimeControl extends React.Component { {isPausedNow && } {isPausedNow ? 'Paused' : 'Pause'} - {hasHistoricReports && - {isTimeTravelling && } - Time Travel - } + {hasHistoricReports && + + {isTimeTravelling && } + Time Travel + + }
- {(isPausedNow || isTimeTravelling) && - Showing state from {moment(pausedAt).fromNow()} - } - {isRunningNow && timeTravelTransitioning && - Resuming the live state - } + {(isPausedNow || isTimeTravelling) && + + Showing state from {moment(pausedAt).fromNow()} + + } + {isRunningNow && timeTravelTransitioning && + Resuming the live state + }
); } From 230aea32cf7edc730ff3544de6959b3ae2a523a6 Mon Sep 17 00:00:00 2001 From: Filip Barl Date: Tue, 17 Oct 2017 18:09:19 +0200 Subject: [PATCH 13/16] Autofix jsx-max-props-per-line. --- client/.eslintrc | 1 - client/app/scripts/charts/edge.js | 3 +- .../scripts/charts/nodes-chart-elements.js | 11 ++++-- .../components/__tests__/node-details-test.js | 3 +- client/app/scripts/components/details.js | 7 +++- client/app/scripts/components/footer.js | 6 ++- client/app/scripts/components/logo.js | 39 ++++++++++++------- .../app/scripts/components/matched-results.js | 3 +- client/app/scripts/components/node-details.js | 6 ++- .../node-details/node-details-controls.js | 5 ++- .../node-details-generic-table.js | 10 +++-- .../node-details/node-details-health-item.js | 8 +++- .../node-details/node-details-health.js | 7 +++- .../node-details/node-details-info.js | 6 ++- .../node-details-property-list.js | 13 +++++-- .../node-details-relatives-link.js | 6 ++- .../node-details-table-node-link.js | 6 ++- .../node-details/node-details-table-row.js | 5 ++- .../app/scripts/components/nodes-resources.js | 3 +- .../node-resources-metric-box.js | 6 ++- client/app/scripts/components/search.js | 14 +++++-- client/app/scripts/components/sparkline.js | 16 ++++++-- client/app/scripts/components/terminal.js | 3 +- .../components/time-travel-component.js | 4 +- client/app/scripts/components/topologies.js | 9 ++++- .../components/troubleshooting-menu.js | 6 ++- 26 files changed, 144 insertions(+), 62 deletions(-) diff --git a/client/.eslintrc b/client/.eslintrc index 6e26e27c57..afef0bdbcf 100644 --- a/client/.eslintrc +++ b/client/.eslintrc @@ -40,7 +40,6 @@ "jsx-a11y/click-events-have-key-events": 0, "jsx-a11y/mouse-events-have-key-events": 0, - "react/jsx-max-props-per-line": 0, "react/jsx-wrap-multilines": 0, } } diff --git a/client/app/scripts/charts/edge.js b/client/app/scripts/charts/edge.js index cbf0a85b86..dc8d27d9d3 100644 --- a/client/app/scripts/charts/edge.js +++ b/client/app/scripts/charts/edge.js @@ -21,7 +21,8 @@ class Edge extends React.Component { return ( diff --git a/client/app/scripts/charts/nodes-chart-elements.js b/client/app/scripts/charts/nodes-chart-elements.js index 9e279a8332..dfcf6c071c 100644 --- a/client/app/scripts/charts/nodes-chart-elements.js +++ b/client/app/scripts/charts/nodes-chart-elements.js @@ -196,9 +196,14 @@ class NodesChartElements extends React.Component { const scale = (this.props.selectedScale || 1) * 100000; return ( ); } diff --git a/client/app/scripts/components/__tests__/node-details-test.js b/client/app/scripts/components/__tests__/node-details-test.js index dc481ffa39..8bbc99089b 100644 --- a/client/app/scripts/components/__tests__/node-details-test.js +++ b/client/app/scripts/components/__tests__/node-details-test.js @@ -39,7 +39,8 @@ describe('NodeDetails', () => { )); diff --git a/client/app/scripts/components/details.js b/client/app/scripts/components/details.js index 130ffe1bb9..b9eb99b757 100644 --- a/client/app/scripts/components/details.js +++ b/client/app/scripts/components/details.js @@ -11,8 +11,11 @@ class Details extends React.Component {
{details.toIndexedSeq().map((obj, index) => ( ))}
diff --git a/client/app/scripts/components/footer.js b/client/app/scripts/components/footer.js index 57713e0a90..e31d833d9d 100644 --- a/client/app/scripts/components/footer.js +++ b/client/app/scripts/components/footer.js @@ -54,7 +54,8 @@ class Footer extends React.Component { className="footer-versionupdate" title={versionUpdateTitle} href={versionUpdate.get('downloadUrl')} - target="_blank" rel="noopener noreferrer"> + target="_blank" + rel="noopener noreferrer"> Update available: {versionUpdate.get('version')} } @@ -80,7 +81,8 @@ class Footer extends React.Component {
diff --git a/client/app/scripts/components/node-details.js b/client/app/scripts/components/node-details.js index 7b3d1bd33a..4f6bdb4fba 100644 --- a/client/app/scripts/components/node-details.js +++ b/client/app/scripts/components/node-details.js @@ -276,14 +276,16 @@ class NodeDetails extends React.Component { if (isGenericTable(table)) { return ( ); } else if (isPropertyList(table)) { return ( ); diff --git a/client/app/scripts/components/node-details/node-details-controls.js b/client/app/scripts/components/node-details/node-details-controls.js index aecd6d1c5a..198351f3ed 100644 --- a/client/app/scripts/components/node-details/node-details-controls.js +++ b/client/app/scripts/components/node-details/node-details-controls.js @@ -23,7 +23,10 @@ export default function NodeDetailsControls({ } {sortBy(controls, 'rank').map(control => )} + nodeId={nodeId} + control={control} + pending={pending} + key={control.id} />)} {controls && }
diff --git a/client/app/scripts/components/node-details/node-details-generic-table.js b/client/app/scripts/components/node-details/node-details-generic-table.js index d81d2d0f1e..7d82394b92 100644 --- a/client/app/scripts/components/node-details/node-details-generic-table.js +++ b/client/app/scripts/components/node-details/node-details-generic-table.js @@ -91,7 +91,9 @@ export default class NodeDetailsGenericTable extends React.Component { return ( + title={value} + key={column.id} + style={styles[index]}> ); @@ -101,8 +103,10 @@ export default class NodeDetailsGenericTable extends React.Component {
); diff --git a/client/app/scripts/components/node-details/node-details-health-item.js b/client/app/scripts/components/node-details/node-details-health-item.js index be6a205ef0..7738dcf5f6 100644 --- a/client/app/scripts/components/node-details/node-details-health-item.js +++ b/client/app/scripts/components/node-details/node-details-health-item.js @@ -10,8 +10,12 @@ function NodeDetailsHealthItem(props) { {!props.valueEmpty &&
{formatMetric(props.value, props)}
}
diff --git a/client/app/scripts/components/node-details/node-details-health.js b/client/app/scripts/components/node-details/node-details-health.js index e83bf78b35..aebebd5fd6 100644 --- a/client/app/scripts/components/node-details/node-details-health.js +++ b/client/app/scripts/components/node-details/node-details-health.js @@ -52,8 +52,11 @@ export default class NodeDetailsHealth extends React.Component { />)}
); diff --git a/client/app/scripts/components/node-details/node-details-info.js b/client/app/scripts/components/node-details/node-details-info.js index ad0a888c2a..1434c98d95 100644 --- a/client/app/scripts/components/node-details/node-details-info.js +++ b/client/app/scripts/components/node-details/node-details-info.js @@ -57,8 +57,10 @@ class NodeDetailsInfo extends React.Component { ); })} + handleClick={this.handleClickMore} + collection={this.props.rows} + expanded={this.state.expanded} + notShown={notShown} /> ); } diff --git a/client/app/scripts/components/node-details/node-details-property-list.js b/client/app/scripts/components/node-details/node-details-property-list.js index 04c8ad91a7..e6d305c987 100644 --- a/client/app/scripts/components/node-details/node-details-property-list.js +++ b/client/app/scripts/components/node-details/node-details-property-list.js @@ -10,7 +10,9 @@ import ShowMore from '../show-more'; const Controls = controls => (
{sortBy(controls, 'rank').map(control => )} + nodeId={control.nodeId} + control={control} + key={control.id} />)}
); @@ -50,7 +52,8 @@ export default class NodeDetailsPropertyList extends React.Component {
+ title={field.entries.label} + key={field.id}> {field.entries.label}
))} + handleClick={this.handleLimitClick} + collection={this.props.rows} + expanded={expanded} + notShown={notShown} />
); } diff --git a/client/app/scripts/components/node-details/node-details-relatives-link.js b/client/app/scripts/components/node-details/node-details-relatives-link.js index 2510637673..2750fb86ed 100644 --- a/client/app/scripts/components/node-details/node-details-relatives-link.js +++ b/client/app/scripts/components/node-details/node-details-relatives-link.js @@ -35,8 +35,10 @@ class NodeDetailsRelativesLink extends React.Component { const title = `View in ${this.props.topologyId}: ${this.props.label}`; return ( + className="node-details-relatives-link" + title={title} + onClick={this.handleClick} + ref={this.saveNodeRef}> ); diff --git a/client/app/scripts/components/node-details/node-details-table-node-link.js b/client/app/scripts/components/node-details/node-details-table-node-link.js index 1ba3cec15b..0ecd15aeb0 100644 --- a/client/app/scripts/components/node-details/node-details-table-node-link.js +++ b/client/app/scripts/components/node-details/node-details-table-node-link.js @@ -38,8 +38,10 @@ class NodeDetailsTableNodeLink extends React.Component { if (linkable) { return ( {label} diff --git a/client/app/scripts/components/node-details/node-details-table-row.js b/client/app/scripts/components/node-details/node-details-table-row.js index 177ff4a9cb..f424098499 100644 --- a/client/app/scripts/components/node-details/node-details-table-row.js +++ b/client/app/scripts/components/node-details/node-details-table-row.js @@ -78,7 +78,10 @@ function renderValues(node, columns = [], columnStyles = [], timestamp = null, t // valueType === 'metrics' return ( + style={style} + key={field.id} + topologyId={topologyId} + {...field} /> ); } // empty cell to complete the row for proper hover diff --git a/client/app/scripts/components/nodes-resources.js b/client/app/scripts/components/nodes-resources.js index 8912d29da1..af889a3b95 100644 --- a/client/app/scripts/components/nodes-resources.js +++ b/client/app/scripts/components/nodes-resources.js @@ -42,7 +42,8 @@ class NodesResources extends React.Component {
{transform => this.renderLayers(transform)} diff --git a/client/app/scripts/components/nodes-resources/node-resources-metric-box.js b/client/app/scripts/components/nodes-resources/node-resources-metric-box.js index dfde7eccf5..533ba3e541 100644 --- a/client/app/scripts/components/nodes-resources/node-resources-metric-box.js +++ b/client/app/scripts/components/nodes-resources/node-resources-metric-box.js @@ -117,8 +117,10 @@ class NodeResourcesMetricBox extends React.Component { return ( + className="node-resources-metric-box" + style={{ opacity }} + onClick={this.handleClick} + ref={this.saveNodeRef}> {label} - {type} usage at {resourceUsageTooltipInfo} {showCapacity && } diff --git a/client/app/scripts/components/search.js b/client/app/scripts/components/search.js index afe60f28c0..6fc8bc2c99 100644 --- a/client/app/scripts/components/search.js +++ b/client/app/scripts/components/search.js @@ -152,10 +152,16 @@ class Search extends React.Component { {showPinnedSearches && pinnedSearches.toIndexedSeq() .map(query => )} + className="search-input-field" + type="text" + id={inputId} + value={value} + onChange={this.handleChange} + onKeyUp={this.handleKeyUp} + onFocus={this.handleFocus} + onBlur={this.handleBlur} + disabled={disabled} + ref={this.saveQueryInputRef} />
diff --git a/client/app/scripts/components/sparkline.js b/client/app/scripts/components/sparkline.js index d75a2d3161..2160b7085a 100644 --- a/client/app/scripts/components/sparkline.js +++ b/client/app/scripts/components/sparkline.js @@ -115,13 +115,21 @@ export default class Sparkline extends React.Component {
{hasData && }
diff --git a/client/app/scripts/components/terminal.js b/client/app/scripts/components/terminal.js index 4b116652dd..c5fa5e2845 100644 --- a/client/app/scripts/components/terminal.js +++ b/client/app/scripts/components/terminal.js @@ -293,7 +293,8 @@ class Terminal extends React.Component { Pop out
{this.getControlStatusIcon()} diff --git a/client/app/scripts/components/time-travel-component.js b/client/app/scripts/components/time-travel-component.js index 505cf6a7fd..f9a33f3b44 100644 --- a/client/app/scripts/components/time-travel-component.js +++ b/client/app/scripts/components/time-travel-component.js @@ -500,7 +500,9 @@ export default class TimeTravelComponent extends React.Component { {this.renderDisabledShadow(timelineTransform)} diff --git a/client/app/scripts/components/topologies.js b/client/app/scripts/components/topologies.js index ad2605a8e6..d75439db84 100644 --- a/client/app/scripts/components/topologies.js +++ b/client/app/scripts/components/topologies.js @@ -47,7 +47,10 @@ class Topologies extends React.Component { return (
this.onTopologyClick(ev, subTopology)}>
{subTopology.get('name')} @@ -70,7 +73,9 @@ class Topologies extends React.Component { return (
this.onTopologyClick(ev, topology)}>
{topology.get('name')} diff --git a/client/app/scripts/components/troubleshooting-menu.js b/client/app/scripts/components/troubleshooting-menu.js index 8d2d4dee81..2a62b07bfd 100644 --- a/client/app/scripts/components/troubleshooting-menu.js +++ b/client/app/scripts/components/troubleshooting-menu.js @@ -65,9 +65,11 @@ class DebugMenu extends React.Component {
Report a bug From 982711f9af404256cb02741ec8710d235bb9a00a Mon Sep 17 00:00:00 2001 From: Filip Barl Date: Tue, 17 Oct 2017 18:10:34 +0200 Subject: [PATCH 14/16] Wrap multiline JSX DOM. --- client/.eslintrc | 2 -- .../components/node-details/node-details-controls.js | 4 ++-- .../components/node-details/node-details-health.js | 8 ++++---- .../components/node-details/node-details-property-list.js | 4 ++-- .../components/node-details/node-details-table-row.js | 4 ++-- 5 files changed, 10 insertions(+), 12 deletions(-) diff --git a/client/.eslintrc b/client/.eslintrc index afef0bdbcf..e622effa6d 100644 --- a/client/.eslintrc +++ b/client/.eslintrc @@ -39,7 +39,5 @@ "jsx-a11y/click-events-have-key-events": 0, "jsx-a11y/mouse-events-have-key-events": 0, - - "react/jsx-wrap-multilines": 0, } } diff --git a/client/app/scripts/components/node-details/node-details-controls.js b/client/app/scripts/components/node-details/node-details-controls.js index 198351f3ed..f639ac39c9 100644 --- a/client/app/scripts/components/node-details/node-details-controls.js +++ b/client/app/scripts/components/node-details/node-details-controls.js @@ -22,11 +22,11 @@ export default function NodeDetailsControls({
} - {sortBy(controls, 'rank').map(control => ()} + key={control.id} />))} {controls && }
diff --git a/client/app/scripts/components/node-details/node-details-health.js b/client/app/scripts/components/node-details/node-details-health.js index aebebd5fd6..e73b2b0d5b 100644 --- a/client/app/scripts/components/node-details/node-details-health.js +++ b/client/app/scripts/components/node-details/node-details-health.js @@ -38,18 +38,18 @@ export default class NodeDetailsHealth extends React.Component { return (
- {shownWithData.map(item => ()} + />))}
- {shownEmpty.map(item => ()} + />))}
(
- {sortBy(controls, 'rank').map(control => ()} + key={control.id} />))}
); diff --git a/client/app/scripts/components/node-details/node-details-table-row.js b/client/app/scripts/components/node-details/node-details-table-row.js index f424098499..ed157ab3f8 100644 --- a/client/app/scripts/components/node-details/node-details-table-row.js +++ b/client/app/scripts/components/node-details/node-details-table-row.js @@ -66,12 +66,12 @@ function renderValues(node, columns = [], columnStyles = [], timestamp = null, t style={style} key={field.id}> {intersperse(field.relatives.map(relative => - ), ' ')} + />)), ' ')} ); } From ce97b009da491be0cfa8060df0ce8400675cd0ef Mon Sep 17 00:00:00 2001 From: Filip Barl Date: Tue, 17 Oct 2017 19:16:05 +0200 Subject: [PATCH 15/16] Fixed Time Travel component styles. --- .../scripts/components/time-travel-component.js | 17 +++++++++++++++-- client/app/styles/_base.scss | 3 --- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/client/app/scripts/components/time-travel-component.js b/client/app/scripts/components/time-travel-component.js index f9a33f3b44..3fa8c53bd7 100644 --- a/client/app/scripts/components/time-travel-component.js +++ b/client/app/scripts/components/time-travel-component.js @@ -145,7 +145,20 @@ const DisabledRange = styled.rect` fill-opacity: 0.15; `; -const TimestampLabel = styled.button` +const ShallowButton = styled.button` + background-color: transparent; + border: 0; + color: ${props => props.theme.colors.primary.lavender}; + cursor: pointer; + padding: 0; + outline: 0; + + &:hover { + color: ${props => props.theme.colors.primary.charcoal}; + } +`; + +const TimestampLabel = ShallowButton.extend` margin-left: 2px; padding: 3px; @@ -155,7 +168,7 @@ const TimestampLabel = styled.button` } `; -const TimelinePanButton = styled.button` +const TimelinePanButton = ShallowButton.extend` pointer-events: all; padding: 2px; `; diff --git a/client/app/styles/_base.scss b/client/app/styles/_base.scss index e59252ead0..015c271d4f 100644 --- a/client/app/styles/_base.scss +++ b/client/app/styles/_base.scss @@ -9,9 +9,6 @@ url("../../node_modules/materialize-css/fonts/roboto/Roboto-Regular.ttf"); } -// TODO: Remove this line once Service UI CONFIGURE button stops being added to Scope. -.scope-wrapper .setup-nav-button { display: none; } - a { text-decoration: none; } From 90c120d8d9510382cd4f9b88dea635ff76e32139 Mon Sep 17 00:00:00 2001 From: Filip Barl Date: Tue, 17 Oct 2017 21:05:19 +0200 Subject: [PATCH 16/16] Fixed the failing tests. --- .../node-details/__tests__/node-details-table-test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/app/scripts/components/node-details/__tests__/node-details-table-test.js b/client/app/scripts/components/node-details/__tests__/node-details-table-test.js index acd8ba3661..7d6aeec89e 100644 --- a/client/app/scripts/components/node-details/__tests__/node-details-table-test.js +++ b/client/app/scripts/components/node-details/__tests__/node-details-table-test.js @@ -66,7 +66,7 @@ describe('NodeDetailsTable', () => { function clickColumn(title) { const node = TestUtils.scryRenderedDOMComponentsWithTag(component, 'td') .find(d => d.title === title); - TestUtils.Simulate.click(node); + TestUtils.Simulate.click(node.children[0]); } describe('kubernetes_ip', () => {