From 2fc1c43c4e36cbeeebbe091d090842b17fae8544 Mon Sep 17 00:00:00 2001 From: Jacek Kolasa Date: Fri, 11 Feb 2022 10:38:32 +0100 Subject: [PATCH] Protobuf support notification (#356) * add notification in header when node is not prepared for protobuf and new arch incoming soon * update netdata-ui * update netdata-ui with icon filename fix (for jest) * netdata-ui@1.7.42 (updated warning pill color) * set date for proto-buf support requirement to 1st of March * uppercase * update link to new arch docs * 2.20.18 --- package-lock.json | 280 +++++++++++++++++---- package.json | 4 +- src/components/header/index.js | 2 + src/components/header/protoBuf/dropdown.js | 15 ++ src/components/header/protoBuf/index.js | 78 ++++++ src/domains/global/selectors.ts | 4 + 6 files changed, 327 insertions(+), 56 deletions(-) create mode 100644 src/components/header/protoBuf/dropdown.js create mode 100644 src/components/header/protoBuf/index.js diff --git a/package-lock.json b/package-lock.json index 0cd7c6d1..a56c764c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@netdata/dashboard", - "version": "2.20.17", + "version": "2.20.18", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -1064,18 +1064,18 @@ "integrity": "sha512-ij4wRiunFfaJxjB0BdrYHIH8FxBJpOwNPhhAcunlmPdXudL1WQV1qoP9un6JsEBAgQH+7UXyyjh0g7jTxXK6tg==" }, "@elastic/react-search-ui": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@elastic/react-search-ui/-/react-search-ui-1.8.0.tgz", - "integrity": "sha512-DVf4cLPgsK+juXJyCackyaBOyZfIKixgyeNw43rXZZ/Vj767xz+IuchvoyqpbVgFNjNcK17pHWAjkmbEOgmG7w==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@elastic/react-search-ui/-/react-search-ui-1.9.0.tgz", + "integrity": "sha512-OBk5j3uWDwA1XTb6TcG0e91sCWh5OMTF3MHCBgOtCL7VEfkmiLH+uYtecWUL+tBwn6SgHektD5xANdiGBKVT+A==", "requires": { - "@elastic/react-search-ui-views": "1.8.0", - "@elastic/search-ui": "1.8.0" + "@elastic/react-search-ui-views": "1.9.0", + "@elastic/search-ui": "1.9.0" } }, "@elastic/react-search-ui-views": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@elastic/react-search-ui-views/-/react-search-ui-views-1.8.0.tgz", - "integrity": "sha512-MEBPeAo2ub+N+PUbtkSLreVNjMdfHHeNPvCEc3JmeLNGX9VlBrTocbkUiIgIpgovgMjUwwu5VgugOghEAyZeeA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@elastic/react-search-ui-views/-/react-search-ui-views-1.9.0.tgz", + "integrity": "sha512-QvQKNfEktfRRsyE167A9bzOGqN23qNIKwudpNQzpDdoIh4oQl21sMyfwHMatyCw2Xk4hBkam2xtoSiiN9/unRg==", "requires": { "downshift": "^3.2.10", "rc-pagination": "^1.20.1", @@ -1083,9 +1083,9 @@ } }, "@elastic/search-ui": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@elastic/search-ui/-/search-ui-1.8.0.tgz", - "integrity": "sha512-QT/PMZKxYyf9W89JJy2t0o87+6kcou+pUPYH1oG8rYXo7hx6kqsnQvAy6gRuX99byV0Y+r2NOMJSxklPbtLsEA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@elastic/search-ui/-/search-ui-1.9.0.tgz", + "integrity": "sha512-Ha7Y0cjduEcGOxCFkXVJRzdh3kEWNfIyT4vy+mPponR3my0JaHivJj16wg4H3MFbZuBY9Mstqp00zOwQrsCwhQ==", "requires": { "date-fns": "^1.30.1", "deep-equal": "^1.0.1", @@ -1099,9 +1099,9 @@ "integrity": "sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==" }, "qs": { - "version": "6.10.1", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz", - "integrity": "sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==", + "version": "6.10.3", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.3.tgz", + "integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==", "requires": { "side-channel": "^1.0.4" } @@ -1109,9 +1109,9 @@ } }, "@elastic/search-ui-site-search-connector": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/@elastic/search-ui-site-search-connector/-/search-ui-site-search-connector-1.8.0.tgz", - "integrity": "sha512-9TVLQn2PqeUvVLXZJqua8grkudmw5yWTAlk/wCtzvOqYFIJiSqeVHnjOIvlOED95Js+ltV/PdrRvu48548uD4Q==" + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/@elastic/search-ui-site-search-connector/-/search-ui-site-search-connector-1.9.0.tgz", + "integrity": "sha512-lV5IE9BtvkMhZfTwcx6OgN/WsDpwIWTRgRUWChNucZOff4wvBUbC0TPmsiHwpq5ITjsqagQCzKhRIf6sgULA2A==" }, "@emotion/babel-utils": { "version": "0.6.10", @@ -1830,14 +1830,16 @@ } }, "@netdata/netdata-ui": { - "version": "1.7.21", - "resolved": "https://registry.npmjs.org/@netdata/netdata-ui/-/netdata-ui-1.7.21.tgz", - "integrity": "sha512-KtoFurBpaagGkuj5TLY1oHZUP21qhbiewkPc0AxhpVZ+JpEWmy6GelFvSMaoi8bAo0k21HE50XtYMWH3WfcM8w==", + "version": "1.7.42", + "resolved": "https://registry.npmjs.org/@netdata/netdata-ui/-/netdata-ui-1.7.42.tgz", + "integrity": "sha512-Yo2H60LX+A2dJtX8f7GER2cOxWwbaWTbIdnopHzSST9WIOB7fQpg3Ojv+HMZW9aKu7qEcfabPj5AiGOA4YbSmg==", "requires": { "@elastic/react-search-ui": "^1.5.1", "@elastic/search-ui-site-search-connector": "^1.5.1", "@netdata/react-filter-box": "^1.0.0", "@prismicio/client": "^5.1.0", + "@styled-system/css": "^5.1.5", + "@testing-library/user-event": "^13.5.0", "axios": "^0.21.1", "polished": "^4.0.3", "ramda": "^0.27.1", @@ -1845,7 +1847,8 @@ "react-portal": "^4.2.0", "react-table": "^7.2.1", "react-use": "^15.3.4", - "react-window": "^1.8.5" + "react-window": "^1.8.5", + "styled-system": "^5.1.5" }, "dependencies": { "@types/js-cookie": { @@ -1859,9 +1862,9 @@ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" }, "ramda": { - "version": "0.27.1", - "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.1.tgz", - "integrity": "sha512-PgIdVpn5y5Yns8vqb8FzBUEYn98V3xcPgawAkkgj0YJ0qDsnHCiNmZYfOGMgOvoB0eWFLpYbhxUR3mxfDIMvpw==" + "version": "0.27.2", + "resolved": "https://registry.npmjs.org/ramda/-/ramda-0.27.2.tgz", + "integrity": "sha512-SbiLPU40JuJniHexQSAgad32hfwd+DRUdwF2PlVuI5RZD0/vahUco7R8vD86J/tcEKKF9vZrUVwgtmGCqlCKyA==" }, "react-use": { "version": "15.3.8", @@ -1927,9 +1930,9 @@ "integrity": "sha512-xDu17cEfh7Kid/d95kB6tZsLOmSWKCZKtprnhVepjsSaCij+lM3mItSJDuuHDMbCWTh8Ejmebwb+KONcCJ0eXQ==" }, "@prismicio/client": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@prismicio/client/-/client-5.1.0.tgz", - "integrity": "sha512-LCb+arVVxJOoPM+8qfLCC/Dqse7mh+Q1k3oo5W5Uzu7vVO+vtc7CUYHxgCDkvekakYHc9407kwWu65ErZw+CPQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@prismicio/client/-/client-5.1.1.tgz", + "integrity": "sha512-0wtQrPZCATBmgLklQYgjSrmz3YtMP+5lHakv30MUVyUez2LVoukhVJWTj1uXwsOz2Yh2xLkAp+PHqTOiUvaM/Q==", "requires": { "cross-fetch": "^3.0.6" } @@ -2192,6 +2195,108 @@ "integrity": "sha512-vTCdPp/T/Q3oSqwHmZ5Kpa9oI7iLtGl3RQaA/NyLHikvcrPxACkkKVr/XzkSPJWXHRhKGzVvb0urJsbMlRxi1Q==", "dev": true }, + "@styled-system/background": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/background/-/background-5.1.2.tgz", + "integrity": "sha512-jtwH2C/U6ssuGSvwTN3ri/IyjdHb8W9X/g8Y0JLcrH02G+BW3OS8kZdHphF1/YyRklnrKrBT2ngwGUK6aqqV3A==", + "requires": { + "@styled-system/core": "^5.1.2" + } + }, + "@styled-system/border": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@styled-system/border/-/border-5.1.5.tgz", + "integrity": "sha512-JvddhNrnhGigtzWRCVuAHepniyVi6hBlimxWDVAdcTuk7aRn9BYJUwfHslURtwYFsF5FoEs8Zmr1oZq2M1AP0A==", + "requires": { + "@styled-system/core": "^5.1.2" + } + }, + "@styled-system/color": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/color/-/color-5.1.2.tgz", + "integrity": "sha512-1kCkeKDZkt4GYkuFNKc7vJQMcOmTl3bJY3YBUs7fCNM6mMYJeT1pViQ2LwBSBJytj3AB0o4IdLBoepgSgGl5MA==", + "requires": { + "@styled-system/core": "^5.1.2" + } + }, + "@styled-system/core": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/core/-/core-5.1.2.tgz", + "integrity": "sha512-XclBDdNIy7OPOsN4HBsawG2eiWfCcuFt6gxKn1x4QfMIgeO6TOlA2pZZ5GWZtIhCUqEPTgIBta6JXsGyCkLBYw==", + "requires": { + "object-assign": "^4.1.1" + } + }, + "@styled-system/css": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@styled-system/css/-/css-5.1.5.tgz", + "integrity": "sha512-XkORZdS5kypzcBotAMPBoeckDs9aSZVkvrAlq5K3xP8IMAUek+x2O4NtwoSgkYkWWzVBu6DGdFZLR790QWGG+A==" + }, + "@styled-system/flexbox": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/flexbox/-/flexbox-5.1.2.tgz", + "integrity": "sha512-6hHV52+eUk654Y1J2v77B8iLeBNtc+SA3R4necsu2VVinSD7+XY5PCCEzBFaWs42dtOEDIa2lMrgL0YBC01mDQ==", + "requires": { + "@styled-system/core": "^5.1.2" + } + }, + "@styled-system/grid": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/grid/-/grid-5.1.2.tgz", + "integrity": "sha512-K3YiV1KyHHzgdNuNlaw8oW2ktMuGga99o1e/NAfTEi5Zsa7JXxzwEnVSDSBdJC+z6R8WYTCYRQC6bkVFcvdTeg==", + "requires": { + "@styled-system/core": "^5.1.2" + } + }, + "@styled-system/layout": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/layout/-/layout-5.1.2.tgz", + "integrity": "sha512-wUhkMBqSeacPFhoE9S6UF3fsMEKFv91gF4AdDWp0Aym1yeMPpqz9l9qS/6vjSsDPF7zOb5cOKC3tcKKOMuDCPw==", + "requires": { + "@styled-system/core": "^5.1.2" + } + }, + "@styled-system/position": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/position/-/position-5.1.2.tgz", + "integrity": "sha512-60IZfMXEOOZe3l1mCu6sj/2NAyUmES2kR9Kzp7s2D3P4qKsZWxD1Se1+wJvevb+1TP+ZMkGPEYYXRyU8M1aF5A==", + "requires": { + "@styled-system/core": "^5.1.2" + } + }, + "@styled-system/shadow": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/shadow/-/shadow-5.1.2.tgz", + "integrity": "sha512-wqniqYb7XuZM7K7C0d1Euxc4eGtqEe/lvM0WjuAFsQVImiq6KGT7s7is+0bNI8O4Dwg27jyu4Lfqo/oIQXNzAg==", + "requires": { + "@styled-system/core": "^5.1.2" + } + }, + "@styled-system/space": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/space/-/space-5.1.2.tgz", + "integrity": "sha512-+zzYpR8uvfhcAbaPXhH8QgDAV//flxqxSjHiS9cDFQQUSznXMQmxJegbhcdEF7/eNnJgHeIXv1jmny78kipgBA==", + "requires": { + "@styled-system/core": "^5.1.2" + } + }, + "@styled-system/typography": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/@styled-system/typography/-/typography-5.1.2.tgz", + "integrity": "sha512-BxbVUnN8N7hJ4aaPOd7wEsudeT7CxarR+2hns8XCX1zp0DFfbWw4xYa/olA0oQaqx7F1hzDg+eRaGzAJbF+jOg==", + "requires": { + "@styled-system/core": "^5.1.2" + } + }, + "@styled-system/variant": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/@styled-system/variant/-/variant-5.1.5.tgz", + "integrity": "sha512-Yn8hXAFoWIro8+Q5J8YJd/mP85Teiut3fsGVR9CAxwgNfIAiqlYxsk5iHU7VHJks/0KjL4ATSjmbtCDC/4l1qw==", + "requires": { + "@styled-system/core": "^5.1.2", + "@styled-system/css": "^5.1.5" + } + }, "@svgr/babel-plugin-add-jsx-attribute": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-4.2.0.tgz", @@ -2373,6 +2478,29 @@ } } }, + "@testing-library/user-event": { + "version": "13.5.0", + "resolved": "https://registry.npmjs.org/@testing-library/user-event/-/user-event-13.5.0.tgz", + "integrity": "sha512-5Kwtbo3Y/NowpkbRuSepbyMFkZmHgD+vPzYB/RJ4oxt5Gj/avFFBYjhw27cqSVPVw/3a67NK1PbiIr9k4Gwmdg==", + "requires": { + "@babel/runtime": "^7.12.5" + }, + "dependencies": { + "@babel/runtime": { + "version": "7.17.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.2.tgz", + "integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==", + "requires": { + "regenerator-runtime": "^0.13.4" + } + }, + "regenerator-runtime": { + "version": "0.13.9", + "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", + "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==" + } + } + }, "@types/babel__core": { "version": "7.1.3", "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.1.3.tgz", @@ -5469,9 +5597,9 @@ "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" }, "codemirror": { - "version": "5.64.0", - "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.64.0.tgz", - "integrity": "sha512-fqr6CtDQdJ6iNMbD8NX2gH2G876nNDk+TO1rrYkgWnqQdO3O1Xa9tK6q+psqhJJgE5SpbaDcgdfLmukoUVE8pg==" + "version": "5.65.1", + "resolved": "https://registry.npmjs.org/codemirror/-/codemirror-5.65.1.tgz", + "integrity": "sha512-s6aac+DD+4O2u1aBmdxhB7yz2XU7tG3snOyQ05Kxifahz7hoxnfxIRHxiCSEv3TUC38dIVH8G+lZH9UWSfGQxA==" }, "collection-visit": { "version": "1.0.0", @@ -6527,11 +6655,11 @@ } }, "cross-fetch": { - "version": "3.1.4", - "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.4.tgz", - "integrity": "sha512-1eAtFWdIubi6T4XPy6ei9iUFoKpUkIF971QLN8lIvvvwueI65+Nw5haMNKUwfJxabqlIIDODJKGrQ66gxC0PbQ==", + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/cross-fetch/-/cross-fetch-3.1.5.tgz", + "integrity": "sha512-lvb1SBsI0Z7GDwmuid+mU3kWVBwTVUbe7S0H52yaaAdQOXq2YktTCZdlAcNKFzE6QtRz0snpw9bNiPeOIkkQvw==", "requires": { - "node-fetch": "2.6.1" + "node-fetch": "2.6.7" } }, "cross-spawn": { @@ -12699,9 +12827,33 @@ } }, "node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==" + "version": "2.6.7", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz", + "integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==", + "requires": { + "whatwg-url": "^5.0.0" + }, + "dependencies": { + "tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o=" + }, + "webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE=" + }, + "whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=", + "requires": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + } + } }, "node-forge": { "version": "0.9.0", @@ -13746,17 +13898,17 @@ } }, "polished": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/polished/-/polished-4.1.3.tgz", - "integrity": "sha512-ocPAcVBUOryJEKe0z2KLd1l9EBa1r5mSwlKpExmrLzsnIzJo4axsoU9O2BjOTkDGDT4mZ0WFE5XKTlR3nLnZOA==", + "version": "4.1.4", + "resolved": "https://registry.npmjs.org/polished/-/polished-4.1.4.tgz", + "integrity": "sha512-Nq5Mbza+Auo7N3sQb1QMFaQiDO+4UexWuSGR7Cjb4Sw11SZIJcrrFtiZ+L0jT9MBsUsxDboHVASbCLbE1rnECg==", "requires": { - "@babel/runtime": "^7.14.0" + "@babel/runtime": "^7.16.7" }, "dependencies": { "@babel/runtime": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", - "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "version": "7.17.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.2.tgz", + "integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -15279,17 +15431,17 @@ }, "dependencies": { "@babel/runtime": { - "version": "7.16.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.16.3.tgz", - "integrity": "sha512-WBwekcqacdY2e9AF/Q7WLFUWmdJGJTkbjqTjoMDgXkVZ3ZRUvOPsLb5KdwISoQVsbP+DQzVZW4Zhci0DvpbNTQ==", + "version": "7.17.2", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.2.tgz", + "integrity": "sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==", "requires": { "regenerator-runtime": "^0.13.4" } }, "@types/react-redux": { - "version": "7.1.20", - "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.20.tgz", - "integrity": "sha512-q42es4c8iIeTgcnB+yJgRTTzftv3eYYvCZOh1Ckn2eX/3o5TdsQYKUWpLoLuGlcY/p+VAhV9IOEZJcWk/vfkXw==", + "version": "7.1.22", + "resolved": "https://registry.npmjs.org/@types/react-redux/-/react-redux-7.1.22.tgz", + "integrity": "sha512-GxIA1kM7ClU73I6wg9IRTVwSO9GS+SAKZKe0Enj+82HMU6aoESFU2HNAdNi3+J53IaOHPiUfT3kSG4L828joDQ==", "requires": { "@types/hoist-non-react-statics": "^3.3.0", "@types/react": "*", @@ -16853,9 +17005,9 @@ }, "dependencies": { "object-inspect": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", - "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==" + "version": "1.12.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==" } } }, @@ -17624,6 +17776,26 @@ "schema-utils": "^2.0.1" } }, + "styled-system": { + "version": "5.1.5", + "resolved": "https://registry.npmjs.org/styled-system/-/styled-system-5.1.5.tgz", + "integrity": "sha512-7VoD0o2R3RKzOzPK0jYrVnS8iJdfkKsQJNiLRDjikOpQVqQHns/DXWaPZOH4tIKkhAT7I6wIsy9FWTWh2X3q+A==", + "requires": { + "@styled-system/background": "^5.1.2", + "@styled-system/border": "^5.1.5", + "@styled-system/color": "^5.1.2", + "@styled-system/core": "^5.1.2", + "@styled-system/flexbox": "^5.1.2", + "@styled-system/grid": "^5.1.2", + "@styled-system/layout": "^5.1.2", + "@styled-system/position": "^5.1.2", + "@styled-system/shadow": "^5.1.2", + "@styled-system/space": "^5.1.2", + "@styled-system/typography": "^5.1.2", + "@styled-system/variant": "^5.1.5", + "object-assign": "^4.1.1" + } + }, "stylehacks": { "version": "4.0.3", "resolved": "https://registry.npmjs.org/stylehacks/-/stylehacks-4.0.3.tgz", diff --git a/package.json b/package.json index ffa428c0..8bc3da9c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@netdata/dashboard", - "version": "2.20.17", + "version": "2.20.18", "homepage": ".", "main": "./lib/src/index-npm.js", "files": [ @@ -18,7 +18,7 @@ "@material/list": "^4.0.0", "@material/menu": "^2.3.0", "@material/menu-surface": "^1.0.0", - "@netdata/netdata-ui": "^1.7.21", + "@netdata/netdata-ui": "^1.7.42", "@rmwc/icon": "^5.7.2", "@rmwc/list": "^5.7.2", "@rmwc/menu": "^5.7.2", diff --git a/src/components/header/index.js b/src/components/header/index.js index 8bf5e6d3..48be3038 100644 --- a/src/components/header/index.js +++ b/src/components/header/index.js @@ -3,6 +3,7 @@ import styled from "styled-components" import { Flex } from "@netdata/netdata-ui" import Node from "./node" import Options from "./options" +import ProtoBuf from "./protoBuf" import Version from "./version" import GlobalControls from "./globalControls" import Alarms from "./alarms" @@ -31,6 +32,7 @@ const Header = () => ( + diff --git a/src/components/header/protoBuf/dropdown.js b/src/components/header/protoBuf/dropdown.js new file mode 100644 index 00000000..39f663bd --- /dev/null +++ b/src/components/header/protoBuf/dropdown.js @@ -0,0 +1,15 @@ +import styled from "styled-components" +import { Flex } from "@netdata/netdata-ui" + +const Dropdown = styled(Flex).attrs({ + padding: [4], + background: "dropdown", + round: 1, + overflow: { vertical: "auto" }, + margin: [4, 0, 0], + width: 110, +})` + box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); +` + +export default Dropdown diff --git a/src/components/header/protoBuf/index.js b/src/components/header/protoBuf/index.js new file mode 100644 index 00000000..d5ab7e6a --- /dev/null +++ b/src/components/header/protoBuf/index.js @@ -0,0 +1,78 @@ +import styled from "styled-components" +import React, { useRef } from "react" +import { useMedia, useToggle } from "react-use" +import { Drop, Flex, Icon, Pill, Text } from "@netdata/netdata-ui" +import { useSelector } from "store/redux-separate-context" +import { selectLacksProtoBufSupport } from "domains/global/selectors" + +import Dropdown from "./dropdown" + +const PillContainer = styled(Flex)` + white-space: nowrap; +` + +const Link = styled(Text).attrs({ as: "a", color: "success", target: "_blank" })`` + +const breakpoint = "(min-width: 1400px)" + +const ProtoBuf = () => { + const [isOpen, toggle] = useToggle() + const lacksProtoBufSupport = useSelector(selectLacksProtoBufSupport) + + const ref = useRef() + + const isLargeEnough = useMedia(breakpoint) + + const close = () => { + toggle(false) + } + if (!lacksProtoBufSupport) return null + + return ( + + + + {isLargeEnough ? "NOT MONITORED IN CLOUD" : ""} + + + {ref.current && isOpen && ( + + + + + + + + + + + It will not be possible to monitor this node from Netdata Cloud after 1st of + March.

+ This node does not have proto-buf support. In order to learn how to apply + proto-buf support to your nodes{" "} + + read our documentation. + +
+
If you are not interested in monitoring this node from Netdata Cloud, you + can{" "} + + unclaim it. + +
+
+
+
+
+ )} +
+ ) +} + +export default ProtoBuf diff --git a/src/domains/global/selectors.ts b/src/domains/global/selectors.ts index 5f50de42..dc3b57c4 100644 --- a/src/domains/global/selectors.ts +++ b/src/domains/global/selectors.ts @@ -90,6 +90,10 @@ export const selectIsCloudEnabled = createSelector( ) export const selectHasFetchedInfo = createSelector(selectRegistry, prop("hasFetchedInfo")) export const selectFullInfoPayload = createSelector(selectRegistry, prop("fullInfoPayload")) +export const selectLacksProtoBufSupport = createSelector( + selectFullInfoPayload, + info => info["agent-claimed"] && !info["aclk-ng-new-cloud-protocol"] +) export const selectHasStartedAlarms = createSelector( selectGlobal,