From 5f647647b2683875bdbed970d955a9e5123284bd Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 4 Sep 2023 10:57:49 +0200 Subject: Merging upstream version 1.42.2. Signed-off-by: Daniel Baumann --- .github/workflows/build.yml | 4 +- CHANGELOG.md | 98 +++--- collectors/freeipmi.plugin/freeipmi_plugin.c | 3 + collectors/plugins.d/pluginsd_parser.c | 195 +++++++----- collectors/proc.plugin/proc_meminfo.c | 4 +- .../systemd-journal.plugin/systemd-journal.c | 3 + contrib/debian/control | 24 +- daemon/static_threads.h | 33 -- database/rrd.h | 4 +- database/rrdhost.c | 3 +- database/sqlite/sqlite_aclk_alert.c | 2 +- exporting/exporting.conf | 1 + exporting/exporting_engine.h | 1 + exporting/prometheus/prometheus.c | 16 +- exporting/read_config.c | 2 + libnetdata/dyn_conf/dyn_conf.c | 64 +++- libnetdata/threads/threads.c | 21 +- libnetdata/threads/threads.h | 34 +++ ml/ml.cc | 3 + netdata.spec.in | 37 +-- packaging/docker/Dockerfile | 2 +- packaging/makeself/curl.version | 1 + packaging/makeself/jobs/20-openssl.install.sh | 11 +- packaging/makeself/jobs/50-bash-5.1.16.install.sh | 2 +- packaging/makeself/jobs/50-curl-7.87.0.install.sh | 62 ---- packaging/makeself/jobs/50-curl.install.sh | 77 +++++ packaging/makeself/jobs/70-netdata-git.install.sh | 6 +- packaging/makeself/openssl.version | 2 +- packaging/version | 2 +- web/api/web_api.c | 3 + web/gui/index.html | 2 +- web/gui/v2/102.625f7fb40793758916f1.chunk.js | 1 - web/gui/v2/1115.6acb1d00b53342cf4a94.chunk.js | 1 + web/gui/v2/1193.3f76ed755c2417f01c88.chunk.js | 1 + web/gui/v2/1282.f65cc3329e7e3eb8e645.js | 1 + web/gui/v2/129.1d087d9f7fb4bfa3cb72.chunk.js | 1 - web/gui/v2/147.d9a3ab5a852935e0e203.chunk.js | 1 - web/gui/v2/161.c33d27d7097fd45f278a.chunk.js | 2 + .../161.c33d27d7097fd45f278a.chunk.js.LICENSE.txt | 15 + web/gui/v2/1655.f1c01cc3ba8b07dd8fae.chunk.js | 1 + web/gui/v2/18.89d32c7ee15496f689f3.chunk.js | 2 - .../18.89d32c7ee15496f689f3.chunk.js.LICENSE.txt | 19 -- web/gui/v2/193.6c0f51af21cfef8bce9d.chunk.js | 1 - web/gui/v2/20.625d62276782f5f021c5.chunk.js | 1 - web/gui/v2/2008.abd553afe7a6bed8cfc0.chunk.js | 1 + web/gui/v2/2097.d9ade1233ce20401ea8c.chunk.js | 1 + web/gui/v2/241.dcc517f9189cb747150e.chunk.js | 1 - web/gui/v2/252.c34ade07cc21e6fd9b8e.chunk.js | 1 - web/gui/v2/264.296e4fe770b1756ed46b.chunk.js | 1 - web/gui/v2/27.23f7ef0669e969b74f95.chunk.js | 2 - .../27.23f7ef0669e969b74f95.chunk.js.LICENSE.txt | 5 - web/gui/v2/27.384da655707f4c3b6153.css | 2 - web/gui/v2/2701.89070793921be1288bb5.css | 2 + web/gui/v2/2701.98a4d24406e365a6ddf2.chunk.js | 1 + web/gui/v2/282.112f65cb06615e413141.chunk.js | 1 - web/gui/v2/2833.78752757c7ac33d196dc.js | 2 + .../v2/2833.78752757c7ac33d196dc.js.LICENSE.txt | 1 + web/gui/v2/2934.47ca322b2e59e64a0dae.chunk.js | 1 + web/gui/v2/3018.6eb82186a4656d2fce5d.chunk.js | 2 + .../3018.6eb82186a4656d2fce5d.chunk.js.LICENSE.txt | 19 ++ web/gui/v2/3032.7b4a2db28af84cd77c29.js | 1 + web/gui/v2/3071.91b1f856187aeafde398.chunk.js | 1 + web/gui/v2/3173.aedc1e477983499117c7.js | 2 + .../v2/3173.aedc1e477983499117c7.js.LICENSE.txt | 64 ++++ web/gui/v2/324.328e79181dbe63b612fa.chunk.js | 1 - web/gui/v2/3241.c7a7e5d69626a9fb46d7.chunk.js | 1 + web/gui/v2/3495.7af81a22f9d135da8cbe.js | 2 + .../v2/3495.7af81a22f9d135da8cbe.js.LICENSE.txt | 20 ++ web/gui/v2/3564.ba0e994ade7f97d72c01.chunk.js | 1 + web/gui/v2/359.aefe439f4f7fb9a02e15.chunk.js | 1 - web/gui/v2/360.a55ccd8aeddca3df6bd0.chunk.js | 1 - web/gui/v2/376.e533843d1907d4e8dafa.js | 2 - web/gui/v2/376.e533843d1907d4e8dafa.js.LICENSE.txt | 160 ---------- web/gui/v2/3981.ccb665950325037c0dda.css | 6 + web/gui/v2/3D_PARTY_LICENSES.txt | 317 ++++++++++++++++++- web/gui/v2/4193.f5c9a2d9750a5bd2762d.chunk.js | 1 + web/gui/v2/43.36c13bf5ecbdd5373881.chunk.js | 1 - web/gui/v2/4324.cbc343a58b942aec5218.chunk.js | 1 + web/gui/v2/447.99c65cf897c2e7a4e174.chunk.js | 1 - web/gui/v2/4480.acae0ad582eb5265622a.js | 1 + web/gui/v2/451.aec55cb715f41fc72a63.chunk.js | 1 - web/gui/v2/4523.e41d6aac9a6433f9efb2.js | 2 + .../v2/4523.e41d6aac9a6433f9efb2.js.LICENSE.txt | 40 +++ web/gui/v2/4532.0b0105ffbdd6db6f5d9a.js | 2 + .../v2/4532.0b0105ffbdd6db6f5d9a.js.LICENSE.txt | 5 + web/gui/v2/4581.a60c1ffca04af99239c9.chunk.js | 1 + web/gui/v2/470.5ab9b3dc905a52581ba0.chunk.js | 1 - web/gui/v2/4744.38c08ef7e8943fa44006.chunk.js | 1 + web/gui/v2/4814.31d804681a19b084daa5.chunk.js | 1 + web/gui/v2/4890.24af5fbe5015c0b06c90.js | 1 + web/gui/v2/4915.245eefea4f250bc84a58.chunk.js | 1 + web/gui/v2/4934.565896e76ef20d10f992.chunk.js | 1 + web/gui/v2/502.517f9b221f4ed676c586.chunk.js | 1 - web/gui/v2/5091.07dfc76b1d5c1623c330.chunk.js | 1 + web/gui/v2/510.ea4a79b1c75b8035f760.chunk.js | 1 - web/gui/v2/514.af9132e943f111b25f1c.chunk.js | 2 - .../514.af9132e943f111b25f1c.chunk.js.LICENSE.txt | 20 -- web/gui/v2/5176.9ecb50692b5be2b8a5e2.js | 2 + .../v2/5176.9ecb50692b5be2b8a5e2.js.LICENSE.txt | 15 + web/gui/v2/5316.0471244afc59c0d0d688.chunk.js | 1 + web/gui/v2/533.7791da896bd0af46ae45.chunk.js | 1 - web/gui/v2/5451.b7da2b924e4d74fa28fc.chunk.js | 1 + web/gui/v2/5575.f2affb99b534dc6b7f3c.chunk.js | 2 + .../5575.f2affb99b534dc6b7f3c.chunk.js.LICENSE.txt | 3 + web/gui/v2/5623.d08ebc475a57a44d926c.js | 1 + web/gui/v2/564.2354fe745e05d75abbf2.chunk.js | 1 - web/gui/v2/575.76dcaacb1c2276f86dea.chunk.js | 2 - .../575.76dcaacb1c2276f86dea.chunk.js.LICENSE.txt | 3 - web/gui/v2/5765.a33732202b95bbb627db.chunk.js | 1 + web/gui/v2/5969.f77624ecac93d1a600f5.chunk.js | 1 + web/gui/v2/597.cb6f23362a28e63af220.chunk.js | 1 - web/gui/v2/597.f721ec431cd86411331e.chunk.js | 1 + web/gui/v2/610.1001494a66c38627ff37.chunk.js | 1 - web/gui/v2/6129.b1dace954d671f303383.chunk.js | 1 + web/gui/v2/6143.43acacdf8b2b70da410f.chunk.js | 1 + web/gui/v2/6252.c8a3dda4559b4b1a290f.chunk.js | 1 + web/gui/v2/6264.900c132d66035feb8143.chunk.js | 1 + web/gui/v2/6502.7c1716799823661c447d.chunk.js | 1 + web/gui/v2/654.67b0714ebd49a65d277c.chunk.js | 1 - web/gui/v2/655.6b819502f310febec992.chunk.js | 1 - web/gui/v2/6610.af47b6cda809af7dc878.chunk.js | 1 + web/gui/v2/6613.384da655707f4c3b6153.css | 2 + web/gui/v2/6613.b8903cda67bd33100ce4.chunk.js | 2 + .../6613.b8903cda67bd33100ce4.chunk.js.LICENSE.txt | 5 + web/gui/v2/663.a89b1206f4b293aabe4b.chunk.js | 1 - web/gui/v2/6654.1a629783ec67ee7b2535.chunk.js | 1 + web/gui/v2/6723.c82b4d5b9c7d8207b985.chunk.js | 1 + web/gui/v2/6723.cc9fa5f3bdc0bf3ab2fc.css | 10 + web/gui/v2/676.4ce73c27b29d5f4672bb.chunk.js | 1 - web/gui/v2/676.ccb665950325037c0dda.css | 6 - web/gui/v2/6817.a41c740ef4ad290ddc09.chunk.js | 1 + web/gui/v2/723.44a07361b47c51d272dd.chunk.js | 1 - web/gui/v2/723.cc9fa5f3bdc0bf3ab2fc.css | 10 - web/gui/v2/7241.dae29a2c5dba9d8b64c6.chunk.js | 1 + web/gui/v2/7359.47dc8a0852f6cefdf8e4.chunk.js | 1 + web/gui/v2/7514.685fae6aee82518a9737.chunk.js | 2 + .../7514.685fae6aee82518a9737.chunk.js.LICENSE.txt | 20 ++ web/gui/v2/765.e7fa6ef71a637cc3ae4d.chunk.js | 1 - web/gui/v2/7707.d32bdcf8038b7eebaa97.js | 2 + .../v2/7707.d32bdcf8038b7eebaa97.js.LICENSE.txt | 9 + web/gui/v2/8086.9d0c359423067e788807.chunk.js | 1 + web/gui/v2/8102.0d5c0d9f32667fc42e0c.chunk.js | 1 + web/gui/v2/814.3332136a855b7f4da0ef.chunk.js | 1 - web/gui/v2/817.cd5bd5294b2afab8578f.chunk.js | 1 - web/gui/v2/8282.85c31db36364366177ab.chunk.js | 1 + web/gui/v2/837.bedee580bb54cbbff07c.chunk.js | 1 - web/gui/v2/8447.37fff40af8864776d155.chunk.js | 1 + web/gui/v2/851.7d3f8a7b3ffc933098b8.chunk.js | 1 - web/gui/v2/86.a471108ca7f6fc7080fe.chunk.js | 1 - web/gui/v2/8663.defe390dbe87f8ebb98f.chunk.js | 1 + web/gui/v2/8837.c7fd14cf3df616fdcc8f.chunk.js | 1 + web/gui/v2/8977.1e728c5c7e9af0e0089b.chunk.js | 1 + web/gui/v2/9020.afb7f9501284f53ab885.chunk.js | 1 + web/gui/v2/915.c5be29433632e593abf9.chunk.js | 1 - web/gui/v2/9201.3b4bde3431aac911f02e.chunk.js | 1 + web/gui/v2/934.627b38e3de836130d875.chunk.js | 1 - web/gui/v2/9360.eda00d2b12ba6fe04e3e.chunk.js | 1 + web/gui/v2/9510.dfc219c382691661c69a.chunk.js | 1 + web/gui/v2/952.8782ae4b4eb5f5d394ba.chunk.js | 2 - .../952.8782ae4b4eb5f5d394ba.chunk.js.LICENSE.txt | 15 - web/gui/v2/969.64ecdcbb7383f4baee16.chunk.js | 1 - web/gui/v2/977.f955167348f6c9037af1.chunk.js | 1 - web/gui/v2/9851.cd13a054c85cef198291.chunk.js | 1 + web/gui/v2/Makefile.am | 143 +++++---- web/gui/v2/agent.html | 2 +- web/gui/v2/allFiles.6.28.0.json | 298 ------------------ web/gui/v2/allFiles.6.29.0.json | 340 +++++++++++++++++++++ web/gui/v2/allFiles.6.json | 244 +++++++++------ web/gui/v2/app.04e10fe5e2e2b4abb9de.js | 1 - web/gui/v2/app.7bf3bd12482ad161443d.js | 1 + web/gui/v2/bundlesManifest.6.json | 19 +- web/gui/v2/editor.2c7891085085940ad860.chunk.js | 1 - web/gui/v2/editor.b20cc786651a0c83801c.chunk.js | 1 + web/gui/v2/index.html | 2 +- web/gui/v2/local-agent.html | 2 +- web/gui/v2/npm.react.dom.5f194c629d90a617d1ac.js | 2 - ...m.react.dom.5f194c629d90a617d1ac.js.LICENSE.txt | 9 - web/gui/v2/npm.react.dom.6431597f0353cbef2a34.js | 2 + ...m.react.dom.6431597f0353cbef2a34.js.LICENSE.txt | 9 + web/gui/v2/runtime.519955e002a87da88924.js | 1 - web/gui/v2/runtime.e3716b90b888609b7a5c.js | 1 + web/gui/v2/sw.js | 2 +- 182 files changed, 1669 insertions(+), 1050 deletions(-) create mode 100644 packaging/makeself/curl.version delete mode 100755 packaging/makeself/jobs/50-curl-7.87.0.install.sh create mode 100755 packaging/makeself/jobs/50-curl.install.sh delete mode 100644 web/gui/v2/102.625f7fb40793758916f1.chunk.js create mode 100644 web/gui/v2/1115.6acb1d00b53342cf4a94.chunk.js create mode 100644 web/gui/v2/1193.3f76ed755c2417f01c88.chunk.js create mode 100644 web/gui/v2/1282.f65cc3329e7e3eb8e645.js delete mode 100644 web/gui/v2/129.1d087d9f7fb4bfa3cb72.chunk.js delete mode 100644 web/gui/v2/147.d9a3ab5a852935e0e203.chunk.js create mode 100644 web/gui/v2/161.c33d27d7097fd45f278a.chunk.js create mode 100644 web/gui/v2/161.c33d27d7097fd45f278a.chunk.js.LICENSE.txt create mode 100644 web/gui/v2/1655.f1c01cc3ba8b07dd8fae.chunk.js delete mode 100644 web/gui/v2/18.89d32c7ee15496f689f3.chunk.js delete mode 100644 web/gui/v2/18.89d32c7ee15496f689f3.chunk.js.LICENSE.txt delete mode 100644 web/gui/v2/193.6c0f51af21cfef8bce9d.chunk.js delete mode 100644 web/gui/v2/20.625d62276782f5f021c5.chunk.js create mode 100644 web/gui/v2/2008.abd553afe7a6bed8cfc0.chunk.js create mode 100644 web/gui/v2/2097.d9ade1233ce20401ea8c.chunk.js delete mode 100644 web/gui/v2/241.dcc517f9189cb747150e.chunk.js delete mode 100644 web/gui/v2/252.c34ade07cc21e6fd9b8e.chunk.js delete mode 100644 web/gui/v2/264.296e4fe770b1756ed46b.chunk.js delete mode 100644 web/gui/v2/27.23f7ef0669e969b74f95.chunk.js delete mode 100644 web/gui/v2/27.23f7ef0669e969b74f95.chunk.js.LICENSE.txt delete mode 100644 web/gui/v2/27.384da655707f4c3b6153.css create mode 100644 web/gui/v2/2701.89070793921be1288bb5.css create mode 100644 web/gui/v2/2701.98a4d24406e365a6ddf2.chunk.js delete mode 100644 web/gui/v2/282.112f65cb06615e413141.chunk.js create mode 100644 web/gui/v2/2833.78752757c7ac33d196dc.js create mode 100644 web/gui/v2/2833.78752757c7ac33d196dc.js.LICENSE.txt create mode 100644 web/gui/v2/2934.47ca322b2e59e64a0dae.chunk.js create mode 100644 web/gui/v2/3018.6eb82186a4656d2fce5d.chunk.js create mode 100644 web/gui/v2/3018.6eb82186a4656d2fce5d.chunk.js.LICENSE.txt create mode 100644 web/gui/v2/3032.7b4a2db28af84cd77c29.js create mode 100644 web/gui/v2/3071.91b1f856187aeafde398.chunk.js create mode 100644 web/gui/v2/3173.aedc1e477983499117c7.js create mode 100644 web/gui/v2/3173.aedc1e477983499117c7.js.LICENSE.txt delete mode 100644 web/gui/v2/324.328e79181dbe63b612fa.chunk.js create mode 100644 web/gui/v2/3241.c7a7e5d69626a9fb46d7.chunk.js create mode 100644 web/gui/v2/3495.7af81a22f9d135da8cbe.js create mode 100644 web/gui/v2/3495.7af81a22f9d135da8cbe.js.LICENSE.txt create mode 100644 web/gui/v2/3564.ba0e994ade7f97d72c01.chunk.js delete mode 100644 web/gui/v2/359.aefe439f4f7fb9a02e15.chunk.js delete mode 100644 web/gui/v2/360.a55ccd8aeddca3df6bd0.chunk.js delete mode 100644 web/gui/v2/376.e533843d1907d4e8dafa.js delete mode 100644 web/gui/v2/376.e533843d1907d4e8dafa.js.LICENSE.txt create mode 100644 web/gui/v2/3981.ccb665950325037c0dda.css create mode 100644 web/gui/v2/4193.f5c9a2d9750a5bd2762d.chunk.js delete mode 100644 web/gui/v2/43.36c13bf5ecbdd5373881.chunk.js create mode 100644 web/gui/v2/4324.cbc343a58b942aec5218.chunk.js delete mode 100644 web/gui/v2/447.99c65cf897c2e7a4e174.chunk.js create mode 100644 web/gui/v2/4480.acae0ad582eb5265622a.js delete mode 100644 web/gui/v2/451.aec55cb715f41fc72a63.chunk.js create mode 100644 web/gui/v2/4523.e41d6aac9a6433f9efb2.js create mode 100644 web/gui/v2/4523.e41d6aac9a6433f9efb2.js.LICENSE.txt create mode 100644 web/gui/v2/4532.0b0105ffbdd6db6f5d9a.js create mode 100644 web/gui/v2/4532.0b0105ffbdd6db6f5d9a.js.LICENSE.txt create mode 100644 web/gui/v2/4581.a60c1ffca04af99239c9.chunk.js delete mode 100644 web/gui/v2/470.5ab9b3dc905a52581ba0.chunk.js create mode 100644 web/gui/v2/4744.38c08ef7e8943fa44006.chunk.js create mode 100644 web/gui/v2/4814.31d804681a19b084daa5.chunk.js create mode 100644 web/gui/v2/4890.24af5fbe5015c0b06c90.js create mode 100644 web/gui/v2/4915.245eefea4f250bc84a58.chunk.js create mode 100644 web/gui/v2/4934.565896e76ef20d10f992.chunk.js delete mode 100644 web/gui/v2/502.517f9b221f4ed676c586.chunk.js create mode 100644 web/gui/v2/5091.07dfc76b1d5c1623c330.chunk.js delete mode 100644 web/gui/v2/510.ea4a79b1c75b8035f760.chunk.js delete mode 100644 web/gui/v2/514.af9132e943f111b25f1c.chunk.js delete mode 100644 web/gui/v2/514.af9132e943f111b25f1c.chunk.js.LICENSE.txt create mode 100644 web/gui/v2/5176.9ecb50692b5be2b8a5e2.js create mode 100644 web/gui/v2/5176.9ecb50692b5be2b8a5e2.js.LICENSE.txt create mode 100644 web/gui/v2/5316.0471244afc59c0d0d688.chunk.js delete mode 100644 web/gui/v2/533.7791da896bd0af46ae45.chunk.js create mode 100644 web/gui/v2/5451.b7da2b924e4d74fa28fc.chunk.js create mode 100644 web/gui/v2/5575.f2affb99b534dc6b7f3c.chunk.js create mode 100644 web/gui/v2/5575.f2affb99b534dc6b7f3c.chunk.js.LICENSE.txt create mode 100644 web/gui/v2/5623.d08ebc475a57a44d926c.js delete mode 100644 web/gui/v2/564.2354fe745e05d75abbf2.chunk.js delete mode 100644 web/gui/v2/575.76dcaacb1c2276f86dea.chunk.js delete mode 100644 web/gui/v2/575.76dcaacb1c2276f86dea.chunk.js.LICENSE.txt create mode 100644 web/gui/v2/5765.a33732202b95bbb627db.chunk.js create mode 100644 web/gui/v2/5969.f77624ecac93d1a600f5.chunk.js delete mode 100644 web/gui/v2/597.cb6f23362a28e63af220.chunk.js create mode 100644 web/gui/v2/597.f721ec431cd86411331e.chunk.js delete mode 100644 web/gui/v2/610.1001494a66c38627ff37.chunk.js create mode 100644 web/gui/v2/6129.b1dace954d671f303383.chunk.js create mode 100644 web/gui/v2/6143.43acacdf8b2b70da410f.chunk.js create mode 100644 web/gui/v2/6252.c8a3dda4559b4b1a290f.chunk.js create mode 100644 web/gui/v2/6264.900c132d66035feb8143.chunk.js create mode 100644 web/gui/v2/6502.7c1716799823661c447d.chunk.js delete mode 100644 web/gui/v2/654.67b0714ebd49a65d277c.chunk.js delete mode 100644 web/gui/v2/655.6b819502f310febec992.chunk.js create mode 100644 web/gui/v2/6610.af47b6cda809af7dc878.chunk.js create mode 100644 web/gui/v2/6613.384da655707f4c3b6153.css create mode 100644 web/gui/v2/6613.b8903cda67bd33100ce4.chunk.js create mode 100644 web/gui/v2/6613.b8903cda67bd33100ce4.chunk.js.LICENSE.txt delete mode 100644 web/gui/v2/663.a89b1206f4b293aabe4b.chunk.js create mode 100644 web/gui/v2/6654.1a629783ec67ee7b2535.chunk.js create mode 100644 web/gui/v2/6723.c82b4d5b9c7d8207b985.chunk.js create mode 100644 web/gui/v2/6723.cc9fa5f3bdc0bf3ab2fc.css delete mode 100644 web/gui/v2/676.4ce73c27b29d5f4672bb.chunk.js delete mode 100644 web/gui/v2/676.ccb665950325037c0dda.css create mode 100644 web/gui/v2/6817.a41c740ef4ad290ddc09.chunk.js delete mode 100644 web/gui/v2/723.44a07361b47c51d272dd.chunk.js delete mode 100644 web/gui/v2/723.cc9fa5f3bdc0bf3ab2fc.css create mode 100644 web/gui/v2/7241.dae29a2c5dba9d8b64c6.chunk.js create mode 100644 web/gui/v2/7359.47dc8a0852f6cefdf8e4.chunk.js create mode 100644 web/gui/v2/7514.685fae6aee82518a9737.chunk.js create mode 100644 web/gui/v2/7514.685fae6aee82518a9737.chunk.js.LICENSE.txt delete mode 100644 web/gui/v2/765.e7fa6ef71a637cc3ae4d.chunk.js create mode 100644 web/gui/v2/7707.d32bdcf8038b7eebaa97.js create mode 100644 web/gui/v2/7707.d32bdcf8038b7eebaa97.js.LICENSE.txt create mode 100644 web/gui/v2/8086.9d0c359423067e788807.chunk.js create mode 100644 web/gui/v2/8102.0d5c0d9f32667fc42e0c.chunk.js delete mode 100644 web/gui/v2/814.3332136a855b7f4da0ef.chunk.js delete mode 100644 web/gui/v2/817.cd5bd5294b2afab8578f.chunk.js create mode 100644 web/gui/v2/8282.85c31db36364366177ab.chunk.js delete mode 100644 web/gui/v2/837.bedee580bb54cbbff07c.chunk.js create mode 100644 web/gui/v2/8447.37fff40af8864776d155.chunk.js delete mode 100644 web/gui/v2/851.7d3f8a7b3ffc933098b8.chunk.js delete mode 100644 web/gui/v2/86.a471108ca7f6fc7080fe.chunk.js create mode 100644 web/gui/v2/8663.defe390dbe87f8ebb98f.chunk.js create mode 100644 web/gui/v2/8837.c7fd14cf3df616fdcc8f.chunk.js create mode 100644 web/gui/v2/8977.1e728c5c7e9af0e0089b.chunk.js create mode 100644 web/gui/v2/9020.afb7f9501284f53ab885.chunk.js delete mode 100644 web/gui/v2/915.c5be29433632e593abf9.chunk.js create mode 100644 web/gui/v2/9201.3b4bde3431aac911f02e.chunk.js delete mode 100644 web/gui/v2/934.627b38e3de836130d875.chunk.js create mode 100644 web/gui/v2/9360.eda00d2b12ba6fe04e3e.chunk.js create mode 100644 web/gui/v2/9510.dfc219c382691661c69a.chunk.js delete mode 100644 web/gui/v2/952.8782ae4b4eb5f5d394ba.chunk.js delete mode 100644 web/gui/v2/952.8782ae4b4eb5f5d394ba.chunk.js.LICENSE.txt delete mode 100644 web/gui/v2/969.64ecdcbb7383f4baee16.chunk.js delete mode 100644 web/gui/v2/977.f955167348f6c9037af1.chunk.js create mode 100644 web/gui/v2/9851.cd13a054c85cef198291.chunk.js delete mode 100644 web/gui/v2/allFiles.6.28.0.json create mode 100644 web/gui/v2/allFiles.6.29.0.json delete mode 100644 web/gui/v2/app.04e10fe5e2e2b4abb9de.js create mode 100644 web/gui/v2/app.7bf3bd12482ad161443d.js delete mode 100644 web/gui/v2/editor.2c7891085085940ad860.chunk.js create mode 100644 web/gui/v2/editor.b20cc786651a0c83801c.chunk.js delete mode 100644 web/gui/v2/npm.react.dom.5f194c629d90a617d1ac.js delete mode 100644 web/gui/v2/npm.react.dom.5f194c629d90a617d1ac.js.LICENSE.txt create mode 100644 web/gui/v2/npm.react.dom.6431597f0353cbef2a34.js create mode 100644 web/gui/v2/npm.react.dom.6431597f0353cbef2a34.js.LICENSE.txt delete mode 100644 web/gui/v2/runtime.519955e002a87da88924.js create mode 100644 web/gui/v2/runtime.e3716b90b888609b7a5c.js diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 012f75ac5..180574a3c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,7 +65,7 @@ jobs: id: channel if: github.event_name == 'workflow_dispatch' && github.event.inputs.type != 'nightly' run: | - sed -i 's/^RELEASE_CHANNEL="nightly" *#/RELEASE_CHANNEL="stable" #/' netdata-installer.sh + sed -i 's/^RELEASE_CHANNEL="nightly"/RELEASE_CHANNEL="stable"/' netdata-installer.sh - name: Build id: build run: | @@ -140,7 +140,7 @@ jobs: id: channel if: github.event_name == 'workflow_dispatch' && github.event.inputs.type != 'nightly' run: | - sed -i 's/^RELEASE_CHANNEL="nightly" *#/RELEASE_CHANNEL="stable" #/' netdata-installer.sh packaging/makeself/install-or-update.sh + sed -i 's/^RELEASE_CHANNEL="nightly"/RELEASE_CHANNEL="stable"/' netdata-installer.sh packaging/makeself/install-or-update.sh - name: Get Cache Key if: github.event_name != 'pull_request' || ! contains(github.event.pull_request.labels.*.name, 'run-ci/no-cache') id: cache-key diff --git a/CHANGELOG.md b/CHANGELOG.md index 503a940e1..1f3a65688 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,16 +1,55 @@ # Changelog -## [v1.42.1](https://github.com/netdata/netdata/tree/v1.42.1) (2023-08-16) +## [v1.42.2](https://github.com/netdata/netdata/tree/v1.42.2) (2023-08-28) -[Full Changelog](https://github.com/netdata/netdata/compare/v1.42.0...v1.42.1) +[Full Changelog](https://github.com/netdata/netdata/compare/v1.42.1...v1.42.2) **Merged pull requests:** +- allow any field to be a facet [\#15880](https://github.com/netdata/netdata/pull/15880) ([ktsaou](https://github.com/ktsaou)) +- Regenerate integrations.js [\#15879](https://github.com/netdata/netdata/pull/15879) ([netdatabot](https://github.com/netdatabot)) +- use the newer XXH3 128bits algorithm, instead of the classic XXH128 [\#15878](https://github.com/netdata/netdata/pull/15878) ([ktsaou](https://github.com/ktsaou)) +- ML add new `delete old models param` to readme [\#15873](https://github.com/netdata/netdata/pull/15873) ([andrewm4894](https://github.com/andrewm4894)) +- Update SQLITE version to 3.42.0 [\#15870](https://github.com/netdata/netdata/pull/15870) ([stelfrag](https://github.com/stelfrag)) +- Regenerate integrations.js [\#15867](https://github.com/netdata/netdata/pull/15867) ([netdatabot](https://github.com/netdatabot)) +- Add a fail reason to pinpoint exactly what went wrong [\#15866](https://github.com/netdata/netdata/pull/15866) ([stelfrag](https://github.com/stelfrag)) +- Add plugin and module information to collector integrations. [\#15864](https://github.com/netdata/netdata/pull/15864) ([Ferroin](https://github.com/Ferroin)) +- Regenerate integrations.js [\#15862](https://github.com/netdata/netdata/pull/15862) ([netdatabot](https://github.com/netdatabot)) +- Explicitly depend on version-matched plugins in native packages. [\#15861](https://github.com/netdata/netdata/pull/15861) ([Ferroin](https://github.com/Ferroin)) +- Apply a label prefix for netdata labels [\#15860](https://github.com/netdata/netdata/pull/15860) ([kevin-fwu](https://github.com/kevin-fwu)) +- fix proc meminfo cached calculation [\#15859](https://github.com/netdata/netdata/pull/15859) ([ilyam8](https://github.com/ilyam8)) +- Fix compilation warnings [\#15858](https://github.com/netdata/netdata/pull/15858) ([stelfrag](https://github.com/stelfrag)) +- packaging cleanup after \#15842 [\#15857](https://github.com/netdata/netdata/pull/15857) ([ilyam8](https://github.com/ilyam8)) +- Add a chart that groups anomaly rate by chart type. [\#15856](https://github.com/netdata/netdata/pull/15856) ([vkalintiris](https://github.com/vkalintiris)) +- fix packaging static build openssl 32bit [\#15855](https://github.com/netdata/netdata/pull/15855) ([ilyam8](https://github.com/ilyam8)) +- fix packaging mark stable static build [\#15854](https://github.com/netdata/netdata/pull/15854) ([ilyam8](https://github.com/ilyam8)) +- Facets histograms [\#15846](https://github.com/netdata/netdata/pull/15846) ([ktsaou](https://github.com/ktsaou)) +- reworked pluginsd caching of RDAs to avoid crashes [\#15845](https://github.com/netdata/netdata/pull/15845) ([ktsaou](https://github.com/ktsaou)) +- Fix static build SSL [\#15842](https://github.com/netdata/netdata/pull/15842) ([ktsaou](https://github.com/ktsaou)) +- bump bundled ui to v6.29.0 [\#15841](https://github.com/netdata/netdata/pull/15841) ([ilyam8](https://github.com/ilyam8)) +- Fix configure: WARNING: unrecognized options: --with-zlib [\#15840](https://github.com/netdata/netdata/pull/15840) ([stelfrag](https://github.com/stelfrag)) +- Fix compilation warning [\#15839](https://github.com/netdata/netdata/pull/15839) ([stelfrag](https://github.com/stelfrag)) +- Fix warning when compiling with -flto [\#15838](https://github.com/netdata/netdata/pull/15838) ([stelfrag](https://github.com/stelfrag)) +- workaround for systems that do not have SD\_JOURNAL\_OS\_ROOT [\#15837](https://github.com/netdata/netdata/pull/15837) ([ktsaou](https://github.com/ktsaou)) +- added ilove.html [\#15836](https://github.com/netdata/netdata/pull/15836) ([ktsaou](https://github.com/ktsaou)) +- Fix CID 382964: Code maintainability issues \(SIZEOF\_MISMATCH\) [\#15833](https://github.com/netdata/netdata/pull/15833) ([stelfrag](https://github.com/stelfrag)) +- Fix coverity 393052: API usage errors \(LOCK\) [\#15832](https://github.com/netdata/netdata/pull/15832) ([stelfrag](https://github.com/stelfrag)) +- systemd-journal in containers [\#15830](https://github.com/netdata/netdata/pull/15830) ([ktsaou](https://github.com/ktsaou)) +- RPM: fixed attrs for conf.d dirs [\#15828](https://github.com/netdata/netdata/pull/15828) ([k0ste](https://github.com/k0ste)) +- Avoid resource leak [\#15827](https://github.com/netdata/netdata/pull/15827) ([stelfrag](https://github.com/stelfrag)) +- Release fd if setsockopt or bind fails [\#15826](https://github.com/netdata/netdata/pull/15826) ([stelfrag](https://github.com/stelfrag)) +- Fix use after free [\#15825](https://github.com/netdata/netdata/pull/15825) ([stelfrag](https://github.com/stelfrag)) +- Improve dyncfg exit [\#15824](https://github.com/netdata/netdata/pull/15824) ([underhood](https://github.com/underhood)) +- Release job message status to avoid memory leak [\#15822](https://github.com/netdata/netdata/pull/15822) ([stelfrag](https://github.com/stelfrag)) +- ML improve init [\#15819](https://github.com/netdata/netdata/pull/15819) ([stelfrag](https://github.com/stelfrag)) +- Update cmakelist [\#15817](https://github.com/netdata/netdata/pull/15817) ([stelfrag](https://github.com/stelfrag)) +- added /api/v2/ilove.svg endpoint [\#15815](https://github.com/netdata/netdata/pull/15815) ([ktsaou](https://github.com/ktsaou)) - systemd-journal fixes [\#15814](https://github.com/netdata/netdata/pull/15814) ([ktsaou](https://github.com/ktsaou)) - fix packaging: link health.log to stdout [\#15813](https://github.com/netdata/netdata/pull/15813) ([ilyam8](https://github.com/ilyam8)) - docs rename alarm to alert [\#15812](https://github.com/netdata/netdata/pull/15812) ([ilyam8](https://github.com/ilyam8)) - bump ui to v6.28.0 [\#15810](https://github.com/netdata/netdata/pull/15810) ([ilyam8](https://github.com/ilyam8)) - return 412 instead of 403 when a bearer token is required [\#15808](https://github.com/netdata/netdata/pull/15808) ([ktsaou](https://github.com/ktsaou)) +- installer setuid fallback for perf and slabinfo plugins [\#15807](https://github.com/netdata/netdata/pull/15807) ([ilyam8](https://github.com/ilyam8)) - fix api v1 mgmt/health [\#15806](https://github.com/netdata/netdata/pull/15806) ([underhood](https://github.com/underhood)) - Fix systemd journal build deps in DEB packages. [\#15805](https://github.com/netdata/netdata/pull/15805) ([Ferroin](https://github.com/Ferroin)) - Clean up python deps for RPM packages. [\#15804](https://github.com/netdata/netdata/pull/15804) ([Ferroin](https://github.com/Ferroin)) @@ -28,6 +67,15 @@ - Update an oversight on the openSUSE 15.5 packages [\#15781](https://github.com/netdata/netdata/pull/15781) ([tkatsoulas](https://github.com/tkatsoulas)) - Bump openssl version of static builds to 1.1.1v [\#15779](https://github.com/netdata/netdata/pull/15779) ([tkatsoulas](https://github.com/tkatsoulas)) - fix: the cleanup was not performed during the kickstart.sh dry run [\#15775](https://github.com/netdata/netdata/pull/15775) ([ilyam8](https://github.com/ilyam8)) +- Increase alert snapshot chunk size [\#15748](https://github.com/netdata/netdata/pull/15748) ([MrZammler](https://github.com/MrZammler)) +- Added CentOS-Stream to distros [\#15742](https://github.com/netdata/netdata/pull/15742) ([k0ste](https://github.com/k0ste)) +- Unconditionally delete very old models. [\#15720](https://github.com/netdata/netdata/pull/15720) ([vkalintiris](https://github.com/vkalintiris)) +- Misc code cleanup [\#15665](https://github.com/netdata/netdata/pull/15665) ([stelfrag](https://github.com/stelfrag)) +- Metadata cleanup improvements [\#15462](https://github.com/netdata/netdata/pull/15462) ([stelfrag](https://github.com/stelfrag)) + +## [v1.42.1](https://github.com/netdata/netdata/tree/v1.42.1) (2023-08-16) + +[Full Changelog](https://github.com/netdata/netdata/compare/v1.42.0...v1.42.1) ## [v1.42.0](https://github.com/netdata/netdata/tree/v1.42.0) (2023-08-09) @@ -283,8 +331,6 @@ - Add linux powercap metrics collector [\#15364](https://github.com/netdata/netdata/pull/15364) ([fhriley](https://github.com/fhriley)) - systemd-journal plugin [\#15363](https://github.com/netdata/netdata/pull/15363) ([ktsaou](https://github.com/ktsaou)) - Hash table charts [\#15323](https://github.com/netdata/netdata/pull/15323) ([thiagoftsm](https://github.com/thiagoftsm)) -- Drop support for native packages of Ubuntu 22.10 [\#15292](https://github.com/netdata/netdata/pull/15292) ([tkatsoulas](https://github.com/tkatsoulas)) -- Fix non-interactive options for apt-get and zypper. [\#15288](https://github.com/netdata/netdata/pull/15288) ([zeylos](https://github.com/zeylos)) ## [v1.41.0](https://github.com/netdata/netdata/tree/v1.41.0) (2023-07-19) @@ -381,50 +427,6 @@ - Rename log Macros \(debug\) [\#15322](https://github.com/netdata/netdata/pull/15322) ([thiagoftsm](https://github.com/thiagoftsm)) - bearer authorization API [\#15321](https://github.com/netdata/netdata/pull/15321) ([ktsaou](https://github.com/ktsaou)) - local-listeners: use host prefix in read\_cmdline [\#15320](https://github.com/netdata/netdata/pull/15320) ([ilyam8](https://github.com/ilyam8)) -- local-listener using libnetdata [\#15319](https://github.com/netdata/netdata/pull/15319) ([ktsaou](https://github.com/ktsaou)) -- avoid memory allocations for alert transitions facets processing [\#15318](https://github.com/netdata/netdata/pull/15318) ([ktsaou](https://github.com/ktsaou)) -- add add summary linking to alert instances \(ati\) when options=summary,values is requested [\#15317](https://github.com/netdata/netdata/pull/15317) ([ktsaou](https://github.com/ktsaou)) -- fix alerts transitions sorting [\#15315](https://github.com/netdata/netdata/pull/15315) ([ktsaou](https://github.com/ktsaou)) -- Keep health log history in seconds [\#15314](https://github.com/netdata/netdata/pull/15314) ([MrZammler](https://github.com/MrZammler)) -- stale vitual hosts [\#15313](https://github.com/netdata/netdata/pull/15313) ([ktsaou](https://github.com/ktsaou)) -- bump go.d.plugin to v0.54.0 [\#15312](https://github.com/netdata/netdata/pull/15312) ([ilyam8](https://github.com/ilyam8)) -- health: respect overriding nc binary for IRC notifications [\#15310](https://github.com/netdata/netdata/pull/15310) ([ilyam8](https://github.com/ilyam8)) -- hide not available for viewers charts when exporting in shell format [\#15309](https://github.com/netdata/netdata/pull/15309) ([ilyam8](https://github.com/ilyam8)) -- move collectors meta to metadata/ [\#15308](https://github.com/netdata/netdata/pull/15308) ([ilyam8](https://github.com/ilyam8)) -- Release acquired dimensions [\#15307](https://github.com/netdata/netdata/pull/15307) ([stelfrag](https://github.com/stelfrag)) -- Check for source field when requesting /api/v1/alarm\_log [\#15306](https://github.com/netdata/netdata/pull/15306) ([MrZammler](https://github.com/MrZammler)) -- ci: disable clang format [\#15305](https://github.com/netdata/netdata/pull/15305) ([ilyam8](https://github.com/ilyam8)) -- Change info to netdata\_log\_info in sqlite\_db\_migration.c [\#15303](https://github.com/netdata/netdata/pull/15303) ([MrZammler](https://github.com/MrZammler)) -- Create integrations JSON schema [\#15302](https://github.com/netdata/netdata/pull/15302) ([Ancairon](https://github.com/Ancairon)) -- Change query to store host system info values [\#15300](https://github.com/netdata/netdata/pull/15300) ([MrZammler](https://github.com/MrZammler)) -- s/info/netdata\_log\_info/ [\#15299](https://github.com/netdata/netdata/pull/15299) ([vkalintiris](https://github.com/vkalintiris)) -- Fix wording issue in Docker README [\#15298](https://github.com/netdata/netdata/pull/15298) ([Ancairon](https://github.com/Ancairon)) -- Update metrics-streaming-and-replication.md [\#15297](https://github.com/netdata/netdata/pull/15297) ([Ancairon](https://github.com/Ancairon)) -- Rename generic `error` function [\#15296](https://github.com/netdata/netdata/pull/15296) ([thiagoftsm](https://github.com/thiagoftsm)) -- Code reorg and cleanup - enrichment of /api/v2 [\#15294](https://github.com/netdata/netdata/pull/15294) ([ktsaou](https://github.com/ktsaou)) -- Optimizations part 3 [\#15293](https://github.com/netdata/netdata/pull/15293) ([ktsaou](https://github.com/ktsaou)) -- docs: update stream.conf "health enabled by default" description [\#15291](https://github.com/netdata/netdata/pull/15291) ([ilyam8](https://github.com/ilyam8)) -- Remove extra parenthesis from doc [\#15290](https://github.com/netdata/netdata/pull/15290) ([Ancairon](https://github.com/Ancairon)) -- merged spaces, war rooms and invite your team to one place [\#15289](https://github.com/netdata/netdata/pull/15289) ([hugovalente-pm](https://github.com/hugovalente-pm)) -- use stat\(\) instead of lstat\(\) [\#15287](https://github.com/netdata/netdata/pull/15287) ([ktsaou](https://github.com/ktsaou)) -- Only try to enable \_FORTIFY\_SOURCE if the user has not disabled optimizations [\#15284](https://github.com/netdata/netdata/pull/15284) ([Ferroin](https://github.com/Ferroin)) -- Send alert chart labels config key to cloud [\#15283](https://github.com/netdata/netdata/pull/15283) ([MrZammler](https://github.com/MrZammler)) -- Fixed mistype for 'send automatic labels' Prometheus option [\#15282](https://github.com/netdata/netdata/pull/15282) ([k0ste](https://github.com/k0ste)) -- Optimizations part 2 [\#15280](https://github.com/netdata/netdata/pull/15280) ([ktsaou](https://github.com/ktsaou)) -- Revert "Optimizations Part 2" [\#15279](https://github.com/netdata/netdata/pull/15279) ([ktsaou](https://github.com/ktsaou)) -- exporting: change priority to synchronous when calculating value [\#15276](https://github.com/netdata/netdata/pull/15276) ([ilyam8](https://github.com/ilyam8)) -- expose CmdLine in apps function [\#15275](https://github.com/netdata/netdata/pull/15275) ([ilyam8](https://github.com/ilyam8)) -- Misc alert fixes [\#15274](https://github.com/netdata/netdata/pull/15274) ([MrZammler](https://github.com/MrZammler)) -- Small readme improvements [\#15270](https://github.com/netdata/netdata/pull/15270) ([andrewm4894](https://github.com/andrewm4894)) -- Optimizations Part 2 [\#15267](https://github.com/netdata/netdata/pull/15267) ([ktsaou](https://github.com/ktsaou)) -- Replace `info` macro with a less generic name [\#15266](https://github.com/netdata/netdata/pull/15266) ([carlocab](https://github.com/carlocab)) -- Yaml template finalization [\#15265](https://github.com/netdata/netdata/pull/15265) ([Ancairon](https://github.com/Ancairon)) -- fix tc.plugin charts labels [\#15262](https://github.com/netdata/netdata/pull/15262) ([ilyam8](https://github.com/ilyam8)) -- Update libbpf version [\#15258](https://github.com/netdata/netdata/pull/15258) ([thiagoftsm](https://github.com/thiagoftsm)) -- rewrite /api/v2/alerts [\#15257](https://github.com/netdata/netdata/pull/15257) ([ktsaou](https://github.com/ktsaou)) -- Fix $\(libh2o\_dir\) not expanded properly sometimes. [\#15253](https://github.com/netdata/netdata/pull/15253) ([Dim-P](https://github.com/Dim-P)) -- use gperf for the pluginsd/streaming parser hashtable [\#15251](https://github.com/netdata/netdata/pull/15251) ([ktsaou](https://github.com/ktsaou)) -- Update pfsense.md package install instructions [\#15250](https://github.com/netdata/netdata/pull/15250) ([MYanello](https://github.com/MYanello)) ## [v1.40.1](https://github.com/netdata/netdata/tree/v1.40.1) (2023-06-27) diff --git a/collectors/freeipmi.plugin/freeipmi_plugin.c b/collectors/freeipmi.plugin/freeipmi_plugin.c index 94b4fed85..56a1c4998 100644 --- a/collectors/freeipmi.plugin/freeipmi_plugin.c +++ b/collectors/freeipmi.plugin/freeipmi_plugin.c @@ -1450,6 +1450,9 @@ int main (int argc, char **argv) { error_log_errors_per_period = 100; error_log_throttle_period = 3600; + // initialize the threads + netdata_threads_init_for_external_plugins(0); // set the default threads stack size here + // ------------------------------------------------------------------------ // parse command line parameters diff --git a/collectors/plugins.d/pluginsd_parser.c b/collectors/plugins.d/pluginsd_parser.c index e7a3c40ec..bc265a3af 100644 --- a/collectors/plugins.d/pluginsd_parser.c +++ b/collectors/plugins.d/pluginsd_parser.c @@ -68,7 +68,7 @@ static ssize_t send_to_plugin(const char *txt, void *data) { return -4; } -static inline RRDHOST *pluginsd_require_host_from_parent(PARSER *parser, const char *cmd) { +static inline RRDHOST *pluginsd_require_scope_host(PARSER *parser, const char *cmd) { RRDHOST *host = parser->user.host; if(unlikely(!host)) @@ -77,7 +77,7 @@ static inline RRDHOST *pluginsd_require_host_from_parent(PARSER *parser, const c return host; } -static inline RRDSET *pluginsd_require_chart_from_parent(PARSER *parser, const char *cmd, const char *parent_cmd) { +static inline RRDSET *pluginsd_require_scope_chart(PARSER *parser, const char *cmd, const char *parent_cmd) { RRDSET *st = parser->user.st; if(unlikely(!st)) @@ -86,7 +86,7 @@ static inline RRDSET *pluginsd_require_chart_from_parent(PARSER *parser, const c return st; } -static inline RRDSET *pluginsd_get_chart_from_parent(PARSER *parser) { +static inline RRDSET *pluginsd_get_scope_chart(PARSER *parser) { return parser->user.st; } @@ -108,20 +108,23 @@ static inline bool pluginsd_unlock_rrdset_data_collection(PARSER *parser) { } void pluginsd_rrdset_cleanup(RRDSET *st) { - for(size_t i = 0; i < st->pluginsd.used ; i++) { - if (st->pluginsd.rda[i]) { - rrddim_acquired_release(st->pluginsd.rda[i]); - st->pluginsd.rda[i] = NULL; - } + spinlock_lock(&st->pluginsd.spinlock); + + for(size_t i = 0; i < st->pluginsd.size ; i++) { + rrddim_acquired_release(st->pluginsd.rda[i]); // can be NULL + st->pluginsd.rda[i] = NULL; } + freez(st->pluginsd.rda); + st->pluginsd.collector_tid = 0; st->pluginsd.rda = NULL; st->pluginsd.size = 0; - st->pluginsd.used = 0; st->pluginsd.pos = 0; + + spinlock_unlock(&st->pluginsd.spinlock); } -static inline void pluginsd_unlock_previous_chart(PARSER *parser, const char *keyword, bool stale) { +static inline void pluginsd_unlock_previous_scope_chart(PARSER *parser, const char *keyword, bool stale) { if(unlikely(pluginsd_unlock_rrdset_data_collection(parser))) { if(stale) netdata_log_error("PLUGINSD: 'host:%s/chart:%s/' stale data collection lock found during %s; it has been unlocked", @@ -142,23 +145,49 @@ static inline void pluginsd_unlock_previous_chart(PARSER *parser, const char *ke } } -static inline void pluginsd_set_chart_from_parent(PARSER *parser, RRDSET *st, const char *keyword) { - pluginsd_unlock_previous_chart(parser, keyword, true); +static inline void pluginsd_clear_scope_chart(PARSER *parser, const char *keyword) { + pluginsd_unlock_previous_scope_chart(parser, keyword, true); + parser->user.st = NULL; +} + +static inline bool pluginsd_set_scope_chart(PARSER *parser, RRDSET *st, const char *keyword) { + RRDSET *old_st = parser->user.st; + pid_t old_collector_tid = (old_st) ? old_st->pluginsd.collector_tid : 0; + pid_t my_collector_tid = gettid(); + + if(unlikely(old_collector_tid)) { + if(old_collector_tid != my_collector_tid) { + error_limit_static_global_var(erl, 1, 0); + error_limit(&erl, "PLUGINSD: keyword %s: 'host:%s/chart:%s' is collected twice (my tid %d, other collector tid %d)", + keyword ? keyword : "UNKNOWN", + rrdhost_hostname(st->rrdhost), rrdset_id(st), + my_collector_tid, old_collector_tid); - if(st) { - size_t dims = dictionary_entries(st->rrddim_root_index); - if(unlikely(st->pluginsd.size < dims)) { - st->pluginsd.rda = reallocz(st->pluginsd.rda, dims * sizeof(RRDDIM_ACQUIRED *)); - st->pluginsd.size = dims; + return false; } - if(st->pluginsd.pos > st->pluginsd.used && st->pluginsd.pos <= st->pluginsd.size) - st->pluginsd.used = st->pluginsd.pos; + old_st->pluginsd.collector_tid = 0; + } - st->pluginsd.pos = 0; + st->pluginsd.collector_tid = my_collector_tid; + + pluginsd_clear_scope_chart(parser, keyword); + + size_t dims = dictionary_entries(st->rrddim_root_index); + if(unlikely(st->pluginsd.size < dims)) { + st->pluginsd.rda = reallocz(st->pluginsd.rda, dims * sizeof(RRDDIM_ACQUIRED *)); + + // initialize the empty slots + for(ssize_t i = (ssize_t)dims - 1; i >= (ssize_t)st->pluginsd.size ;i--) + st->pluginsd.rda[i] = NULL; + + st->pluginsd.size = dims; } + st->pluginsd.pos = 0; parser->user.st = st; + + return true; } static inline RRDDIM *pluginsd_acquire_dimension(RRDHOST *host, RRDSET *st, const char *dimension, const char *cmd) { @@ -168,16 +197,21 @@ static inline RRDDIM *pluginsd_acquire_dimension(RRDHOST *host, RRDSET *st, cons return NULL; } - RRDDIM_ACQUIRED *rda; + if(unlikely(st->pluginsd.pos >= st->pluginsd.size)) + st->pluginsd.pos = 0; - if(likely(st->pluginsd.pos < st->pluginsd.used)) { - rda = st->pluginsd.rda[st->pluginsd.pos]; + RRDDIM_ACQUIRED *rda = st->pluginsd.rda[st->pluginsd.pos]; + + if(likely(rda)) { RRDDIM *rd = rrddim_acquired_to_rrddim(rda); if (likely(rd && string_strcmp(rd->id, dimension) == 0)) { + // we found a cached RDA st->pluginsd.pos++; return rd; } else { + // the collector is sending dimensions in a different order + // release the previous one, to reuse this slot rrddim_acquired_release(rda); st->pluginsd.rda[st->pluginsd.pos] = NULL; } @@ -191,8 +225,7 @@ static inline RRDDIM *pluginsd_acquire_dimension(RRDHOST *host, RRDSET *st, cons return NULL; } - if(likely(st->pluginsd.pos < st->pluginsd.size)) - st->pluginsd.rda[st->pluginsd.pos++] = rda; + st->pluginsd.rda[st->pluginsd.pos++] = rda; return rrddim_acquired_to_rrddim(rda); } @@ -227,15 +260,17 @@ static inline PARSER_RC pluginsd_set(char **words, size_t num_words, PARSER *par char *dimension = get_word(words, num_words, 1); char *value = get_word(words, num_words, 2); - RRDHOST *host = pluginsd_require_host_from_parent(parser, PLUGINSD_KEYWORD_SET); + RRDHOST *host = pluginsd_require_scope_host(parser, PLUGINSD_KEYWORD_SET); if(!host) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); - RRDSET *st = pluginsd_require_chart_from_parent(parser, PLUGINSD_KEYWORD_SET, PLUGINSD_KEYWORD_CHART); + RRDSET *st = pluginsd_require_scope_chart(parser, PLUGINSD_KEYWORD_SET, PLUGINSD_KEYWORD_CHART); if(!st) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); RRDDIM *rd = pluginsd_acquire_dimension(host, st, dimension, PLUGINSD_KEYWORD_SET); if(!rd) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); + st->pluginsd.set = true; + if (unlikely(rrdset_flag_check(st, RRDSET_FLAG_DEBUG))) netdata_log_debug(D_PLUGINSD, "PLUGINSD: 'host:%s/chart:%s/dim:%s' SET is setting value to '%s'", rrdhost_hostname(host), rrdset_id(st), dimension, value && *value ? value : "UNSET"); @@ -250,13 +285,14 @@ static inline PARSER_RC pluginsd_begin(char **words, size_t num_words, PARSER *p char *id = get_word(words, num_words, 1); char *microseconds_txt = get_word(words, num_words, 2); - RRDHOST *host = pluginsd_require_host_from_parent(parser, PLUGINSD_KEYWORD_BEGIN); + RRDHOST *host = pluginsd_require_scope_host(parser, PLUGINSD_KEYWORD_BEGIN); if(!host) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); RRDSET *st = pluginsd_find_chart(host, id, PLUGINSD_KEYWORD_BEGIN); if(!st) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); - pluginsd_set_chart_from_parent(parser, st, PLUGINSD_KEYWORD_BEGIN); + if(!pluginsd_set_scope_chart(parser, st, PLUGINSD_KEYWORD_BEGIN)) + return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); usec_t microseconds = 0; if (microseconds_txt && *microseconds_txt) { @@ -296,16 +332,16 @@ static inline PARSER_RC pluginsd_end(char **words, size_t num_words, PARSER *par UNUSED(words); UNUSED(num_words); - RRDHOST *host = pluginsd_require_host_from_parent(parser, PLUGINSD_KEYWORD_END); + RRDHOST *host = pluginsd_require_scope_host(parser, PLUGINSD_KEYWORD_END); if(!host) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); - RRDSET *st = pluginsd_require_chart_from_parent(parser, PLUGINSD_KEYWORD_END, PLUGINSD_KEYWORD_BEGIN); + RRDSET *st = pluginsd_require_scope_chart(parser, PLUGINSD_KEYWORD_END, PLUGINSD_KEYWORD_BEGIN); if(!st) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); if (unlikely(rrdset_flag_check(st, RRDSET_FLAG_DEBUG))) netdata_log_debug(D_PLUGINSD, "requested an END on chart '%s'", rrdset_id(st)); - pluginsd_set_chart_from_parent(parser, NULL, PLUGINSD_KEYWORD_END); + pluginsd_clear_scope_chart(parser, PLUGINSD_KEYWORD_END); parser->user.data_collections_count++; struct timeval now; @@ -418,7 +454,7 @@ static inline PARSER_RC pluginsd_host_define_end(char **words __maybe_unused, si pluginsd_host_define_cleanup(parser); parser->user.host = host; - pluginsd_set_chart_from_parent(parser, NULL, PLUGINSD_KEYWORD_HOST_DEFINE_END); + pluginsd_clear_scope_chart(parser, PLUGINSD_KEYWORD_HOST_DEFINE_END); rrdhost_flag_clear(host, RRDHOST_FLAG_ORPHAN); rrdcontext_host_child_connected(host); @@ -450,7 +486,7 @@ static inline PARSER_RC pluginsd_host(char **words, size_t num_words, PARSER *pa } static inline PARSER_RC pluginsd_chart(char **words, size_t num_words, PARSER *parser) { - RRDHOST *host = pluginsd_require_host_from_parent(parser, PLUGINSD_KEYWORD_CHART); + RRDHOST *host = pluginsd_require_scope_host(parser, PLUGINSD_KEYWORD_CHART); if(!host) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); char *type = get_word(words, num_words, 1); @@ -554,13 +590,18 @@ static inline PARSER_RC pluginsd_chart(char **words, size_t num_words, PARSER *p rrdset_flag_set(st, RRDSET_FLAG_STORE_FIRST); else rrdset_flag_clear(st, RRDSET_FLAG_STORE_FIRST); - } else { + } + else { rrdset_isnot_obsolete(st); rrdset_flag_clear(st, RRDSET_FLAG_DETAIL); rrdset_flag_clear(st, RRDSET_FLAG_STORE_FIRST); } + + if(!pluginsd_set_scope_chart(parser, st, PLUGINSD_KEYWORD_CHART)) + return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); } - pluginsd_set_chart_from_parent(parser, st, PLUGINSD_KEYWORD_CHART); + else + pluginsd_clear_scope_chart(parser, PLUGINSD_KEYWORD_CHART); return PARSER_RC_OK; } @@ -570,10 +611,10 @@ static inline PARSER_RC pluginsd_chart_definition_end(char **words, size_t num_w const char *last_entry_txt = get_word(words, num_words, 2); const char *wall_clock_time_txt = get_word(words, num_words, 3); - RRDHOST *host = pluginsd_require_host_from_parent(parser, PLUGINSD_KEYWORD_CHART_DEFINITION_END); + RRDHOST *host = pluginsd_require_scope_host(parser, PLUGINSD_KEYWORD_CHART_DEFINITION_END); if(!host) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); - RRDSET *st = pluginsd_require_chart_from_parent(parser, PLUGINSD_KEYWORD_CHART_DEFINITION_END, PLUGINSD_KEYWORD_CHART); + RRDSET *st = pluginsd_require_scope_chart(parser, PLUGINSD_KEYWORD_CHART_DEFINITION_END, PLUGINSD_KEYWORD_CHART); if(!st) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); time_t first_entry_child = (first_entry_txt && *first_entry_txt) ? (time_t)str2ul(first_entry_txt) : 0; @@ -615,10 +656,10 @@ static inline PARSER_RC pluginsd_dimension(char **words, size_t num_words, PARSE char *divisor_s = get_word(words, num_words, 5); char *options = get_word(words, num_words, 6); - RRDHOST *host = pluginsd_require_host_from_parent(parser, PLUGINSD_KEYWORD_DIMENSION); + RRDHOST *host = pluginsd_require_scope_host(parser, PLUGINSD_KEYWORD_DIMENSION); if(!host) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); - RRDSET *st = pluginsd_require_chart_from_parent(parser, PLUGINSD_KEYWORD_DIMENSION, PLUGINSD_KEYWORD_CHART); + RRDSET *st = pluginsd_require_scope_chart(parser, PLUGINSD_KEYWORD_DIMENSION, PLUGINSD_KEYWORD_CHART); if(!st) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); if (unlikely(!id)) @@ -860,10 +901,10 @@ static inline PARSER_RC pluginsd_function(char **words, size_t num_words, PARSER char *timeout_s = get_word(words, num_words, i++); char *help = get_word(words, num_words, i++); - RRDHOST *host = pluginsd_require_host_from_parent(parser, PLUGINSD_KEYWORD_FUNCTION); + RRDHOST *host = pluginsd_require_scope_host(parser, PLUGINSD_KEYWORD_FUNCTION); if(!host) return PARSER_RC_ERROR; - RRDSET *st = (global)?NULL:pluginsd_require_chart_from_parent(parser, PLUGINSD_KEYWORD_FUNCTION, PLUGINSD_KEYWORD_CHART); + RRDSET *st = (global)? NULL: pluginsd_require_scope_chart(parser, PLUGINSD_KEYWORD_FUNCTION, PLUGINSD_KEYWORD_CHART); if(!st) global = true; if (unlikely(!timeout_s || !name || !help || (!global && !st))) { @@ -959,10 +1000,10 @@ static inline PARSER_RC pluginsd_variable(char **words, size_t num_words, PARSER char *value = get_word(words, num_words, 2); NETDATA_DOUBLE v; - RRDHOST *host = pluginsd_require_host_from_parent(parser, PLUGINSD_KEYWORD_VARIABLE); + RRDHOST *host = pluginsd_require_scope_host(parser, PLUGINSD_KEYWORD_VARIABLE); if(!host) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); - RRDSET *st = pluginsd_get_chart_from_parent(parser); + RRDSET *st = pluginsd_get_scope_chart(parser); int global = (st) ? 0 : 1; @@ -1040,7 +1081,7 @@ static inline PARSER_RC pluginsd_variable(char **words, size_t num_words, PARSER static inline PARSER_RC pluginsd_flush(char **words __maybe_unused, size_t num_words __maybe_unused, PARSER *parser) { netdata_log_debug(D_PLUGINSD, "requested a " PLUGINSD_KEYWORD_FLUSH); - pluginsd_set_chart_from_parent(parser, NULL, PLUGINSD_KEYWORD_FLUSH); + pluginsd_clear_scope_chart(parser, PLUGINSD_KEYWORD_FLUSH); parser->user.replay.start_time = 0; parser->user.replay.end_time = 0; parser->user.replay.start_time_ut = 0; @@ -1101,7 +1142,7 @@ static inline PARSER_RC pluginsd_label(char **words, size_t num_words, PARSER *p } static inline PARSER_RC pluginsd_overwrite(char **words __maybe_unused, size_t num_words __maybe_unused, PARSER *parser) { - RRDHOST *host = pluginsd_require_host_from_parent(parser, PLUGINSD_KEYWORD_OVERWRITE); + RRDHOST *host = pluginsd_require_scope_host(parser, PLUGINSD_KEYWORD_OVERWRITE); if(!host) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); netdata_log_debug(D_PLUGINSD, "requested to OVERWRITE host labels"); @@ -1128,7 +1169,7 @@ static inline PARSER_RC pluginsd_clabel(char **words, size_t num_words, PARSER * } if(unlikely(!parser->user.chart_rrdlabels_linked_temporarily)) { - RRDSET *st = pluginsd_get_chart_from_parent(parser); + RRDSET *st = pluginsd_get_scope_chart(parser); parser->user.chart_rrdlabels_linked_temporarily = st->rrdlabels; rrdlabels_unmark_all(parser->user.chart_rrdlabels_linked_temporarily); } @@ -1139,10 +1180,10 @@ static inline PARSER_RC pluginsd_clabel(char **words, size_t num_words, PARSER * } static inline PARSER_RC pluginsd_clabel_commit(char **words __maybe_unused, size_t num_words __maybe_unused, PARSER *parser) { - RRDHOST *host = pluginsd_require_host_from_parent(parser, PLUGINSD_KEYWORD_CLABEL_COMMIT); + RRDHOST *host = pluginsd_require_scope_host(parser, PLUGINSD_KEYWORD_CLABEL_COMMIT); if(!host) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); - RRDSET *st = pluginsd_require_chart_from_parent(parser, PLUGINSD_KEYWORD_CLABEL_COMMIT, PLUGINSD_KEYWORD_BEGIN); + RRDSET *st = pluginsd_require_scope_chart(parser, PLUGINSD_KEYWORD_CLABEL_COMMIT, PLUGINSD_KEYWORD_BEGIN); if(!st) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); netdata_log_debug(D_PLUGINSD, "requested to commit chart labels"); @@ -1167,17 +1208,19 @@ static inline PARSER_RC pluginsd_replay_begin(char **words, size_t num_words, PA char *end_time_str = get_word(words, num_words, 3); char *child_now_str = get_word(words, num_words, 4); - RRDHOST *host = pluginsd_require_host_from_parent(parser, PLUGINSD_KEYWORD_REPLAY_BEGIN); + RRDHOST *host = pluginsd_require_scope_host(parser, PLUGINSD_KEYWORD_REPLAY_BEGIN); if(!host) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); RRDSET *st; if (likely(!id || !*id)) - st = pluginsd_require_chart_from_parent(parser, PLUGINSD_KEYWORD_REPLAY_BEGIN, PLUGINSD_KEYWORD_REPLAY_BEGIN); + st = pluginsd_require_scope_chart(parser, PLUGINSD_KEYWORD_REPLAY_BEGIN, PLUGINSD_KEYWORD_REPLAY_BEGIN); else st = pluginsd_find_chart(host, id, PLUGINSD_KEYWORD_REPLAY_BEGIN); if(!st) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); - pluginsd_set_chart_from_parent(parser, st, PLUGINSD_KEYWORD_REPLAY_BEGIN); + + if(!pluginsd_set_scope_chart(parser, st, PLUGINSD_KEYWORD_REPLAY_BEGIN)) + return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); if(start_time_str && end_time_str) { time_t start_time = (time_t) str2ull_encoded(start_time_str); @@ -1291,10 +1334,10 @@ static inline PARSER_RC pluginsd_replay_set(char **words, size_t num_words, PARS char *value_str = get_word(words, num_words, 2); char *flags_str = get_word(words, num_words, 3); - RRDHOST *host = pluginsd_require_host_from_parent(parser, PLUGINSD_KEYWORD_REPLAY_SET); + RRDHOST *host = pluginsd_require_scope_host(parser, PLUGINSD_KEYWORD_REPLAY_SET); if(!host) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); - RRDSET *st = pluginsd_require_chart_from_parent(parser, PLUGINSD_KEYWORD_REPLAY_SET, PLUGINSD_KEYWORD_REPLAY_BEGIN); + RRDSET *st = pluginsd_require_scope_chart(parser, PLUGINSD_KEYWORD_REPLAY_SET, PLUGINSD_KEYWORD_REPLAY_BEGIN); if(!st) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); if(!parser->user.replay.rset_enabled) { @@ -1309,6 +1352,8 @@ static inline PARSER_RC pluginsd_replay_set(char **words, size_t num_words, PARS RRDDIM *rd = pluginsd_acquire_dimension(host, st, dimension, PLUGINSD_KEYWORD_REPLAY_SET); if(!rd) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); + st->pluginsd.set = true; + if (unlikely(!parser->user.replay.start_time || !parser->user.replay.end_time)) { netdata_log_error("PLUGINSD: 'host:%s/chart:%s/dim:%s' got a %s with invalid timestamps %ld to %ld from a %s. Disabling it.", rrdhost_hostname(host), @@ -1364,12 +1409,18 @@ static inline PARSER_RC pluginsd_replay_rrddim_collection_state(char **words, si char *last_calculated_value_str = get_word(words, num_words, 4); char *last_stored_value_str = get_word(words, num_words, 5); - RRDHOST *host = pluginsd_require_host_from_parent(parser, PLUGINSD_KEYWORD_REPLAY_RRDDIM_STATE); + RRDHOST *host = pluginsd_require_scope_host(parser, PLUGINSD_KEYWORD_REPLAY_RRDDIM_STATE); if(!host) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); - RRDSET *st = pluginsd_require_chart_from_parent(parser, PLUGINSD_KEYWORD_REPLAY_RRDDIM_STATE, PLUGINSD_KEYWORD_REPLAY_BEGIN); + RRDSET *st = pluginsd_require_scope_chart(parser, PLUGINSD_KEYWORD_REPLAY_RRDDIM_STATE, PLUGINSD_KEYWORD_REPLAY_BEGIN); if(!st) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); + if(st->pluginsd.set) { + // reset pos to reuse the same RDAs + st->pluginsd.pos = 0; + st->pluginsd.set = false; + } + RRDDIM *rd = pluginsd_acquire_dimension(host, st, dimension, PLUGINSD_KEYWORD_REPLAY_RRDDIM_STATE); if(!rd) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); @@ -1394,10 +1445,11 @@ static inline PARSER_RC pluginsd_replay_rrdset_collection_state(char **words, si char *last_collected_ut_str = get_word(words, num_words, 1); char *last_updated_ut_str = get_word(words, num_words, 2); - RRDHOST *host = pluginsd_require_host_from_parent(parser, PLUGINSD_KEYWORD_REPLAY_RRDSET_STATE); + RRDHOST *host = pluginsd_require_scope_host(parser, PLUGINSD_KEYWORD_REPLAY_RRDSET_STATE); if(!host) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); - RRDSET *st = pluginsd_require_chart_from_parent(parser, PLUGINSD_KEYWORD_REPLAY_RRDSET_STATE, PLUGINSD_KEYWORD_REPLAY_BEGIN); + RRDSET *st = pluginsd_require_scope_chart(parser, PLUGINSD_KEYWORD_REPLAY_RRDSET_STATE, + PLUGINSD_KEYWORD_REPLAY_BEGIN); if(!st) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); usec_t chart_last_collected_ut = (usec_t)st->last_collected_time.tv_sec * USEC_PER_SEC + (usec_t)st->last_collected_time.tv_usec; @@ -1446,10 +1498,10 @@ static inline PARSER_RC pluginsd_replay_end(char **words, size_t num_words, PARS time_t child_world_time = (child_world_time_txt && *child_world_time_txt) ? (time_t) str2ull_encoded( child_world_time_txt) : now_realtime_sec(); - RRDHOST *host = pluginsd_require_host_from_parent(parser, PLUGINSD_KEYWORD_REPLAY_END); + RRDHOST *host = pluginsd_require_scope_host(parser, PLUGINSD_KEYWORD_REPLAY_END); if(!host) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); - RRDSET *st = pluginsd_require_chart_from_parent(parser, PLUGINSD_KEYWORD_REPLAY_END, PLUGINSD_KEYWORD_REPLAY_BEGIN); + RRDSET *st = pluginsd_require_scope_chart(parser, PLUGINSD_KEYWORD_REPLAY_END, PLUGINSD_KEYWORD_REPLAY_BEGIN); if(!st) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); #ifdef NETDATA_LOG_REPLICATION_REQUESTS @@ -1512,7 +1564,7 @@ static inline PARSER_RC pluginsd_replay_end(char **words, size_t num_words, PARS rrdhost_hostname(host), rrdset_id(st)); #endif - pluginsd_set_chart_from_parent(parser, NULL, PLUGINSD_KEYWORD_REPLAY_END); + pluginsd_clear_scope_chart(parser, PLUGINSD_KEYWORD_REPLAY_END); host->rrdpush_receiver_replication_percent = 100.0; worker_set_metric(WORKER_RECEIVER_JOB_REPLICATION_COMPLETION, host->rrdpush_receiver_replication_percent); @@ -1520,7 +1572,7 @@ static inline PARSER_RC pluginsd_replay_end(char **words, size_t num_words, PARS return PARSER_RC_OK; } - pluginsd_set_chart_from_parent(parser, NULL, PLUGINSD_KEYWORD_REPLAY_END); + pluginsd_clear_scope_chart(parser, PLUGINSD_KEYWORD_REPLAY_END); rrdcontext_updated_retention_rrdset(st); @@ -1541,7 +1593,7 @@ static inline PARSER_RC pluginsd_begin_v2(char **words, size_t num_words, PARSER if(unlikely(!id || !update_every_str || !end_time_str || !wall_clock_time_str)) return PLUGINSD_DISABLE_PLUGIN(parser, PLUGINSD_KEYWORD_BEGIN_V2, "missing parameters"); - RRDHOST *host = pluginsd_require_host_from_parent(parser, PLUGINSD_KEYWORD_BEGIN_V2); + RRDHOST *host = pluginsd_require_scope_host(parser, PLUGINSD_KEYWORD_BEGIN_V2); if(unlikely(!host)) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); timing_step(TIMING_STEP_BEGIN2_PREPARE); @@ -1549,7 +1601,8 @@ static inline PARSER_RC pluginsd_begin_v2(char **words, size_t num_words, PARSER RRDSET *st = pluginsd_find_chart(host, id, PLUGINSD_KEYWORD_BEGIN_V2); if(unlikely(!st)) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); - pluginsd_set_chart_from_parent(parser, st, PLUGINSD_KEYWORD_BEGIN_V2); + if(!pluginsd_set_scope_chart(parser, st, PLUGINSD_KEYWORD_BEGIN_V2)) + return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); if(unlikely(rrdset_flag_check(st, RRDSET_FLAG_OBSOLETE | RRDSET_FLAG_ARCHIVED))) rrdset_isnot_obsolete(st); @@ -1665,10 +1718,10 @@ static inline PARSER_RC pluginsd_set_v2(char **words, size_t num_words, PARSER * if(unlikely(!dimension || !collected_str || !value_str || !flags_str)) return PLUGINSD_DISABLE_PLUGIN(parser, PLUGINSD_KEYWORD_SET_V2, "missing parameters"); - RRDHOST *host = pluginsd_require_host_from_parent(parser, PLUGINSD_KEYWORD_SET_V2); + RRDHOST *host = pluginsd_require_scope_host(parser, PLUGINSD_KEYWORD_SET_V2); if(unlikely(!host)) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); - RRDSET *st = pluginsd_require_chart_from_parent(parser, PLUGINSD_KEYWORD_SET_V2, PLUGINSD_KEYWORD_BEGIN_V2); + RRDSET *st = pluginsd_require_scope_chart(parser, PLUGINSD_KEYWORD_SET_V2, PLUGINSD_KEYWORD_BEGIN_V2); if(unlikely(!st)) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); timing_step(TIMING_STEP_SET2_PREPARE); @@ -1676,6 +1729,8 @@ static inline PARSER_RC pluginsd_set_v2(char **words, size_t num_words, PARSER * RRDDIM *rd = pluginsd_acquire_dimension(host, st, dimension, PLUGINSD_KEYWORD_SET_V2); if(unlikely(!rd)) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); + st->pluginsd.set = true; + if(unlikely(rrddim_flag_check(rd, RRDDIM_FLAG_OBSOLETE | RRDDIM_FLAG_ARCHIVED))) rrddim_isnot_obsolete(st, rd); @@ -1766,16 +1821,16 @@ static inline PARSER_RC pluginsd_set_v2(char **words, size_t num_words, PARSER * void pluginsd_cleanup_v2(PARSER *parser) { // this is called when the thread is stopped while processing - pluginsd_set_chart_from_parent(parser, NULL, "THREAD CLEANUP"); + pluginsd_clear_scope_chart(parser, "THREAD CLEANUP"); } static inline PARSER_RC pluginsd_end_v2(char **words __maybe_unused, size_t num_words __maybe_unused, PARSER *parser) { timing_init(); - RRDHOST *host = pluginsd_require_host_from_parent(parser, PLUGINSD_KEYWORD_END_V2); + RRDHOST *host = pluginsd_require_scope_host(parser, PLUGINSD_KEYWORD_END_V2); if(unlikely(!host)) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); - RRDSET *st = pluginsd_require_chart_from_parent(parser, PLUGINSD_KEYWORD_END_V2, PLUGINSD_KEYWORD_BEGIN_V2); + RRDSET *st = pluginsd_require_scope_chart(parser, PLUGINSD_KEYWORD_END_V2, PLUGINSD_KEYWORD_BEGIN_V2); if(unlikely(!st)) return PLUGINSD_DISABLE_PLUGIN(parser, NULL, NULL); parser->user.data_collections_count++; @@ -1793,7 +1848,7 @@ static inline PARSER_RC pluginsd_end_v2(char **words __maybe_unused, size_t num_ // ------------------------------------------------------------------------ // unblock data collection - pluginsd_unlock_previous_chart(parser, PLUGINSD_KEYWORD_END_V2, false); + pluginsd_unlock_previous_scope_chart(parser, PLUGINSD_KEYWORD_END_V2, false); rrdcontext_collected_rrdset(st); store_metric_collection_completed(); diff --git a/collectors/proc.plugin/proc_meminfo.c b/collectors/proc.plugin/proc_meminfo.c index cd1ba872c..a357cc782 100644 --- a/collectors/proc.plugin/proc_meminfo.c +++ b/collectors/proc.plugin/proc_meminfo.c @@ -230,7 +230,9 @@ int do_proc_meminfo(int update_every, usec_t dt) { } // http://calimeroteknik.free.fr/blag/?article20/really-used-memory-on-gnu-linux - unsigned long long MemCached = Cached + SReclaimable + KReclaimable - Shmem; + // KReclaimable includes SReclaimable, it was added in kernel v4.20 + unsigned long long reclaimable = KReclaimable > 0 ? KReclaimable : SReclaimable; + unsigned long long MemCached = Cached + reclaimable - Shmem; unsigned long long MemUsed = MemTotal - MemFree - MemCached - Buffers; // The Linux kernel doesn't report ZFS ARC usage as cache memory (the ARC is included in the total used system memory) if (!inside_lxc_container) { diff --git a/collectors/systemd-journal.plugin/systemd-journal.c b/collectors/systemd-journal.plugin/systemd-journal.c index 0aaa36044..304ff244a 100644 --- a/collectors/systemd-journal.plugin/systemd-journal.c +++ b/collectors/systemd-journal.plugin/systemd-journal.c @@ -540,6 +540,9 @@ int main(int argc __maybe_unused, char **argv __maybe_unused) { error_log_errors_per_period = 100; error_log_throttle_period = 3600; + // initialize the threads + netdata_threads_init_for_external_plugins(0); // set the default threads stack size here + uids = dictionary_create(0); gids = dictionary_create(0); diff --git a/contrib/debian/control b/contrib/debian/control index 262a93a6c..4f819ac18 100644 --- a/contrib/debian/control +++ b/contrib/debian/control @@ -36,15 +36,15 @@ Architecture: any Depends: openssl, ${misc:Depends}, ${shlibs:Depends}, - netdata-plugin-ebpf [amd64], - netdata-plugin-apps, - netdata-plugin-pythond, - netdata-plugin-go, - netdata-plugin-debugfs, - netdata-plugin-nfacct, - netdata-plugin-chartsd, - netdata-plugin-slabinfo, - netdata-plugin-perf + netdata-plugin-ebpf (= ${source:Version}) [amd64], + netdata-plugin-apps (= ${source:Version}), + netdata-plugin-pythond (= ${source:Version}), + netdata-plugin-go (= ${source:Version}), + netdata-plugin-debugfs (= ${source:Version}), + netdata-plugin-nfacct (= ${source:Version}), + netdata-plugin-chartsd (= ${source:Version}), + netdata-plugin-slabinfo (= ${source:Version}), + netdata-plugin-perf (= ${source:Version}) Pre-Depends: adduser, dpkg (>= 1.17.14), libcap2-bin (>=1:2.0), @@ -53,9 +53,9 @@ Conflicts: netdata-core, netdata-plugins-bash, netdata-plugins-python, netdata-web -Suggests: netdata-plugin-cups, - netdata-plugin-freeipmi -Recommends: netdata-plugin-systemd-journal +Suggests: netdata-plugin-cups (= ${source:Version}), + netdata-plugin-freeipmi (= ${source:Version}) +Recommends: netdata-plugin-systemd-journal (= ${source:Version}) Description: real-time charts for system monitoring Netdata is a daemon that collects data in realtime (per second) and presents a web site to view and analyze them. The presentation diff --git a/daemon/static_threads.h b/daemon/static_threads.h index 9597da704..46195cf46 100644 --- a/daemon/static_threads.h +++ b/daemon/static_threads.h @@ -5,39 +5,6 @@ #include "common.h" -struct netdata_static_thread { - // the name of the thread as it should appear in the logs - char *name; - - // the section of netdata.conf to check if this is enabled or not - char *config_section; - - // the name of the config option to check if it is true or false - char *config_name; - - // the current status of the thread - volatile sig_atomic_t enabled; - - // internal use, to maintain a pointer to the created thread - netdata_thread_t *thread; - - // an initialization function to run before spawning the thread - void (*init_routine) (void); - - // the threaded worker - void *(*start_routine) (void *); - - // the environment variable to create - char *env_name; - - // global variable - bool *global_variable; -}; - -#define NETDATA_MAIN_THREAD_RUNNING CONFIG_BOOLEAN_YES -#define NETDATA_MAIN_THREAD_EXITING (CONFIG_BOOLEAN_YES + 1) -#define NETDATA_MAIN_THREAD_EXITED CONFIG_BOOLEAN_NO - extern const struct netdata_static_thread static_threads_common[]; extern const struct netdata_static_thread static_threads_linux[]; extern const struct netdata_static_thread static_threads_freebsd[]; diff --git a/database/rrd.h b/database/rrd.h index ea211f64e..d64f5904a 100644 --- a/database/rrd.h +++ b/database/rrd.h @@ -891,9 +891,11 @@ struct rrdset { } alerts; struct { + SPINLOCK spinlock; // used only for cleanup + pid_t collector_tid; + bool set; uint32_t pos; uint32_t size; - uint32_t used; RRDDIM_ACQUIRED **rda; } pluginsd; diff --git a/database/rrdhost.c b/database/rrdhost.c index 235d64b1e..bec821ccc 100644 --- a/database/rrdhost.c +++ b/database/rrdhost.c @@ -509,7 +509,8 @@ int is_legacy = 1; if(t != host) { netdata_log_error("Host '%s': cannot add host with machine guid '%s' to index. It already exists as host '%s' with machine guid '%s'.", rrdhost_hostname(host), host->machine_guid, rrdhost_hostname(t), t->machine_guid); - rrdhost_free___while_having_rrd_wrlock(host, true); + if (!is_localhost) + rrdhost_free___while_having_rrd_wrlock(host, true); rrd_unlock(); return NULL; } diff --git a/database/sqlite/sqlite_aclk_alert.c b/database/sqlite/sqlite_aclk_alert.c index f10a866f3..20ca0573d 100644 --- a/database/sqlite/sqlite_aclk_alert.c +++ b/database/sqlite/sqlite_aclk_alert.c @@ -850,7 +850,7 @@ static int have_recent_alarm(RRDHOST *host, uint32_t alarm_id, uint32_t mark) } #endif -#define ALARM_EVENTS_PER_CHUNK 10 +#define ALARM_EVENTS_PER_CHUNK 1000 void aclk_push_alert_snapshot_event(char *node_id __maybe_unused) { #ifdef ENABLE_ACLK diff --git a/exporting/exporting.conf b/exporting/exporting.conf index f2ec56a52..c43b2af9e 100644 --- a/exporting/exporting.conf +++ b/exporting/exporting.conf @@ -12,6 +12,7 @@ # send charts matching = * # send hosts matching = localhost * # prefix = netdata + # netdata label prefix = # An example configuration for graphite, json, opentsdb exporting connectors # [graphite:my_graphite_instance] diff --git a/exporting/exporting_engine.h b/exporting/exporting_engine.h index fb436e933..0b6d87434 100644 --- a/exporting/exporting_engine.h +++ b/exporting/exporting_engine.h @@ -74,6 +74,7 @@ struct instance_config { const char *username; const char *password; const char *prefix; + const char *label_prefix; const char *hostname; int update_every; diff --git a/exporting/prometheus/prometheus.c b/exporting/prometheus/prometheus.c index 9f24ba1b0..90be5d455 100644 --- a/exporting/prometheus/prometheus.c +++ b/exporting/prometheus/prometheus.c @@ -335,6 +335,7 @@ void format_host_labels_prometheus(struct instance *instance, RRDHOST *host) struct format_prometheus_chart_label_callback { BUFFER *labels_buffer; + const char *labels_prefix; }; static int format_prometheus_chart_label_callback(const char *name, const char *value, RRDLABEL_SRC ls, void *data) { @@ -368,7 +369,7 @@ void format_chart_labels_prometheus(struct format_prometheus_chart_label_callbac else { plabel->labels_buffer = buffer_create(1024, NULL); } - buffer_sprintf(plabel->labels_buffer, "chart=\"%s\",dimension=\"%s\",family=\"%s\"", chart, dim, family); + buffer_sprintf(plabel->labels_buffer, "%1$schart=\"%2$s\",%1$sdimension=\"%3$s\",%1$sfamily=\"%4$s\"", plabel->labels_prefix, chart, dim, family); rrdlabels_walkthrough_read(st->rrdlabels, format_prometheus_chart_label_callback, plabel); } @@ -454,6 +455,7 @@ static int print_host_variables_callback(const DICTIONARY_ITEM *item __maybe_unu struct gen_parameters { const char *prefix; + const char *labels_prefix; char *context; char *suffix; @@ -525,12 +527,12 @@ static void generate_as_collected_prom_metric(BUFFER *wb, if (!homogeneous) buffer_sprintf(wb, "_%s", p->dimension); - buffer_sprintf(wb, "%s{chart=\"%s\"", p->suffix, p->chart); + buffer_sprintf(wb, "%s{%schart=\"%s\"", p->suffix, p->labels_prefix, p->chart); if (homogeneous) - buffer_sprintf(wb, ",dimension=\"%s\"", p->dimension); + buffer_sprintf(wb, ",%sdimension=\"%s\"", p->labels_prefix, p->dimension); - buffer_sprintf(wb, ",family=\"%s\"", p->family); + buffer_sprintf(wb, ",%sfamily=\"%s\"", p->labels_prefix, p->family); rrdlabels_walkthrough_read(chart_labels, format_prometheus_chart_label_callback, &local_label); @@ -598,7 +600,7 @@ static void rrd_stats_api_v1_charts_allmetrics_prometheus( char labels[PROMETHEUS_LABELS_MAX + 1] = ""; if (allhosts) { - snprintfz(labels, PROMETHEUS_LABELS_MAX, ",instance=\"%s\"", hostname); + snprintfz(labels, PROMETHEUS_LABELS_MAX, ",%sinstance=\"%s\"", instance->config.label_prefix, hostname); } if (instance->labels_buffer) @@ -624,8 +626,9 @@ static void rrd_stats_api_v1_charts_allmetrics_prometheus( // for each chart RRDSET *st; - static struct format_prometheus_chart_label_callback plabels = { + struct format_prometheus_chart_label_callback plabels = { .labels_buffer = NULL, + .labels_prefix = instance->config.label_prefix, }; STRING *prometheus = string_strdupz("prometheus"); @@ -684,6 +687,7 @@ static void rrd_stats_api_v1_charts_allmetrics_prometheus( struct gen_parameters p; p.prefix = prefix; + p.labels_prefix = instance->config.label_prefix; p.context = context; p.suffix = suffix; p.chart = chart; diff --git a/exporting/read_config.c b/exporting/read_config.c index 210ba3c66..cd8af6bf6 100644 --- a/exporting/read_config.c +++ b/exporting/read_config.c @@ -272,6 +272,8 @@ struct engine *read_exporting_config() prometheus_exporter_instance->config.prefix = prometheus_config_get("prefix", global_exporting_prefix); + prometheus_exporter_instance->config.label_prefix = prometheus_config_get("netdata label prefix", ""); + prometheus_exporter_instance->config.initialized = 1; } diff --git a/libnetdata/dyn_conf/dyn_conf.c b/libnetdata/dyn_conf/dyn_conf.c index 3e098fb7f..00289fdf5 100644 --- a/libnetdata/dyn_conf/dyn_conf.c +++ b/libnetdata/dyn_conf/dyn_conf.c @@ -20,10 +20,19 @@ struct deferred_cfg_send { struct deferred_cfg_send *next; }; +bool dyncfg_shutdown = false; struct deferred_cfg_send *deferred_configs = NULL; pthread_mutex_t deferred_configs_lock = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t deferred_configs_cond = PTHREAD_COND_INITIALIZER; +static void deferred_config_free(struct deferred_cfg_send *dcs) +{ + freez(dcs->plugin_name); + freez(dcs->module_name); + freez(dcs->job_name); + freez(dcs); +} + static void deferred_config_push_back(const char *plugin_name, const char *module_name, const char *job_name) { struct deferred_cfg_send *deferred = callocz(1, sizeof(struct deferred_cfg_send)); @@ -34,6 +43,11 @@ static void deferred_config_push_back(const char *plugin_name, const char *modul deferred->job_name = strdupz(job_name); } pthread_mutex_lock(&deferred_configs_lock); + if (dyncfg_shutdown) { + pthread_mutex_unlock(&deferred_configs_lock); + deferred_config_free(deferred); + return; + } struct deferred_cfg_send *last = deferred_configs; if (last == NULL) deferred_configs = deferred; @@ -46,25 +60,29 @@ static void deferred_config_push_back(const char *plugin_name, const char *modul pthread_mutex_unlock(&deferred_configs_lock); } -static struct deferred_cfg_send *deferred_config_pop() +static void deferred_configs_unlock() +{ + dyncfg_shutdown = true; + // if we get cancelled in pthread_cond_wait + // we will arrive at cancelled cleanup handler + // with mutex locked we need to unlock it + pthread_mutex_unlock(&deferred_configs_lock); +} + +static struct deferred_cfg_send *deferred_config_pop(void *ptr) { pthread_mutex_lock(&deferred_configs_lock); - while (deferred_configs == NULL) + while (deferred_configs == NULL) { + netdata_thread_cleanup_push(deferred_configs_unlock, ptr); pthread_cond_wait(&deferred_configs_cond, &deferred_configs_lock); + netdata_thread_cleanup_pop(0); + } struct deferred_cfg_send *deferred = deferred_configs; deferred_configs = deferred_configs->next; pthread_mutex_unlock(&deferred_configs_lock); return deferred; } -static void deferred_config_free(struct deferred_cfg_send *dcs) -{ - freez(dcs->plugin_name); - freez(dcs->module_name); - freez(dcs->job_name); - freez(dcs); -} - static int _get_list_of_plugins_json_cb(const DICTIONARY_ITEM *item, void *entry, void *data) { UNUSED(item); @@ -870,10 +888,30 @@ int dyn_conf_init(void) return 0; } -void *dyncfg_main(void *in) +static void dyncfg_cleanup(void *ptr) { + struct netdata_static_thread *static_thread = (struct netdata_static_thread *) ptr; + static_thread->enabled = NETDATA_MAIN_THREAD_EXITING; + + netdata_log_info("cleaning up..."); + + pthread_mutex_lock(&deferred_configs_lock); + dyncfg_shutdown = true; + while (deferred_configs != NULL) { + struct deferred_cfg_send *dcs = deferred_configs; + deferred_configs = dcs->next; + deferred_config_free(dcs); + } + pthread_mutex_unlock(&deferred_configs_lock); + + static_thread->enabled = NETDATA_MAIN_THREAD_EXITED; +} + +void *dyncfg_main(void *ptr) { + netdata_thread_cleanup_push(dyncfg_cleanup, ptr); + while (!netdata_exit) { - struct deferred_cfg_send *dcs = deferred_config_pop(); + struct deferred_cfg_send *dcs = deferred_config_pop(ptr); const DICTIONARY_ITEM *plugin_item = dictionary_get_and_acquire_item(plugins_dict, dcs->plugin_name); if (plugin_item == NULL) { error_report("DYNCFG, plugin %s not found", dcs->plugin_name); @@ -905,5 +943,7 @@ void *dyncfg_main(void *in) deferred_config_free(dcs); dictionary_acquired_item_release(plugins_dict, plugin_item); } + + netdata_thread_cleanup_pop(1); return NULL; } diff --git a/libnetdata/threads/threads.c b/libnetdata/threads/threads.c index adce0463c..ae3c7106d 100644 --- a/libnetdata/threads/threads.c +++ b/libnetdata/threads/threads.c @@ -123,10 +123,12 @@ size_t netdata_threads_init(void) { // -------------------------------------------------------------------- // get the required stack size of the threads of netdata - netdata_threads_attr = callocz(1, sizeof(pthread_attr_t)); - i = pthread_attr_init(netdata_threads_attr); - if(i != 0) - fatal("pthread_attr_init() failed with code %d.", i); + if(!netdata_threads_attr) { + netdata_threads_attr = callocz(1, sizeof(pthread_attr_t)); + i = pthread_attr_init(netdata_threads_attr); + if (i != 0) + fatal("pthread_attr_init() failed with code %d.", i); + } size_t stacksize = 0; i = pthread_attr_getstacksize(netdata_threads_attr, &stacksize); @@ -158,6 +160,17 @@ void netdata_threads_init_after_fork(size_t stacksize) { netdata_log_error("Invalid pthread stacksize %zu", stacksize); } +// ---------------------------------------------------------------------------- +// threads init for external plugins + +void netdata_threads_init_for_external_plugins(size_t stacksize) { + size_t default_stacksize = netdata_threads_init(); + if(default_stacksize < 1 * 1024 * 1024) + default_stacksize = 1 * 1024 * 1024; + + netdata_threads_init_after_fork(stacksize ? stacksize : default_stacksize); +} + // ---------------------------------------------------------------------------- // netdata_thread_create diff --git a/libnetdata/threads/threads.h b/libnetdata/threads/threads.h index ad31b8816..acb4e6ba2 100644 --- a/libnetdata/threads/threads.h +++ b/libnetdata/threads/threads.h @@ -20,12 +20,46 @@ typedef enum { typedef pthread_t netdata_thread_t; +struct netdata_static_thread { + // the name of the thread as it should appear in the logs + char *name; + + // the section of netdata.conf to check if this is enabled or not + char *config_section; + + // the name of the config option to check if it is true or false + char *config_name; + + // the current status of the thread + volatile sig_atomic_t enabled; + + // internal use, to maintain a pointer to the created thread + netdata_thread_t *thread; + + // an initialization function to run before spawning the thread + void (*init_routine) (void); + + // the threaded worker + void *(*start_routine) (void *); + + // the environment variable to create + char *env_name; + + // global variable + bool *global_variable; +}; + +#define NETDATA_MAIN_THREAD_RUNNING CONFIG_BOOLEAN_YES +#define NETDATA_MAIN_THREAD_EXITING (CONFIG_BOOLEAN_YES + 1) +#define NETDATA_MAIN_THREAD_EXITED CONFIG_BOOLEAN_NO + #define NETDATA_THREAD_TAG_MAX 100 const char *netdata_thread_tag(void); int netdata_thread_tag_exists(void); size_t netdata_threads_init(void); void netdata_threads_init_after_fork(size_t stacksize); +void netdata_threads_init_for_external_plugins(size_t stacksize); int netdata_thread_create(netdata_thread_t *thread, const char *tag, NETDATA_THREAD_OPTIONS options, void *(*start_routine) (void *), void *arg); diff --git a/ml/ml.cc b/ml/ml.cc index 396967492..75f2e727a 100644 --- a/ml/ml.cc +++ b/ml/ml.cc @@ -1725,6 +1725,9 @@ void ml_stop_threads() Cfg.detection_stop = true; Cfg.training_stop = true; + if (!Cfg.detection_thread) + return; + netdata_thread_cancel(Cfg.detection_thread); netdata_thread_join(Cfg.detection_thread, NULL); diff --git a/netdata.spec.in b/netdata.spec.in index 44501d5d2..c31a8bb1f 100644 --- a/netdata.spec.in +++ b/netdata.spec.in @@ -136,24 +136,24 @@ Requires(pre): /usr/sbin/useradd # makes it impossible to properly test the packages prior to upload, # so we just skip depending on them on CentOS 7. %if 0%{?_have_ebpf} -Requires: netdata-plugin-ebpf -%endif -Requires: netdata-plugin-apps -Requires: netdata-plugin-pythond -Requires: netdata-plugin-go -Requires: netdata-plugin-debugfs -Requires: netdata-plugin-chartsd -Requires: netdata-plugin-slabinfo -Requires: netdata-plugin-perf +Requires: netdata-plugin-ebpf = %{version} +%endif +Requires: netdata-plugin-apps = %{version} +Requires: netdata-plugin-pythond = %{version} +Requires: netdata-plugin-go = %{version} +Requires: netdata-plugin-debugfs = %{version} +Requires: netdata-plugin-chartsd = %{version} +Requires: netdata-plugin-slabinfo = %{version} +Requires: netdata-plugin-perf = %{version} %if 0%{?_have_nfacct} -Requires: netdata-plugin-nfacct +Requires: netdata-plugin-nfacct = %{version} %endif %if 0%{?_have_freeipmi} && 0%{?centos_ver} != 6 && 0%{?centos_ver} != 7 && 0%{?amazon_linux} != 2 -Suggests: netdata-plugin-freeipmi +Suggests: netdata-plugin-freeipmi = %{version} %endif %if 0%{?centos_ver} != 6 && 0%{?centos_ver} != 7 && 0%{?amazon_linux} != 2 -Suggests: netdata-plugin-cups -Recommends: netdata-plugin-systemd-journal +Suggests: netdata-plugin-cups = %{version} +Recommends: netdata-plugin-systemd-journal = %{version} %endif @@ -691,7 +691,7 @@ fi %{_libexecdir}/%{name}/plugins.d/charts.d.plugin %{_libexecdir}/%{name}/plugins.d/charts.d.dryrun-helper.sh %{_libexecdir}/%{name}/charts.d/ -%defattr(0644,root,netdata,0644) +%defattr(0644,root,netdata,0755) %{_libdir}/%{name}/conf.d/charts.d.conf %{_libdir}/%{name}/conf.d/charts.d/ @@ -721,7 +721,7 @@ fi %files plugin-ebpf %defattr(4750,root,netdata,4750) %{_libexecdir}/%{name}/plugins.d/ebpf.plugin -%defattr(0644,root,netdata,0644) +%defattr(0644,root,netdata,0755) %{_libdir}/%{name}/conf.d/ebpf.d.conf %{_libdir}/%{name}/conf.d/ebpf.d @@ -776,7 +776,7 @@ fi %defattr(0750,root,netdata,0750) %{_libexecdir}/%{name}/plugins.d/python.d.plugin %{_libexecdir}/%{name}/python.d -%defattr(0640,root,netdata,0640) +%defattr(0644,root,netdata,0755) %{_libdir}/%{name}/conf.d/python.d.conf %{_libdir}/%{name}/conf.d/python.d @@ -806,7 +806,7 @@ fi # CAP_NET_ADMIN needed for WireGuard collector # CAP_NET_RAW needed for ping collector %caps(cap_net_admin,cap_net_raw=eip) %{_libexecdir}/%{name}/plugins.d/go.d.plugin -%defattr(0644,root,netdata,0644) +%defattr(0644,root,netdata,0755) %{_libdir}/%{name}/conf.d/go.d.conf %{_libdir}/%{name}/conf.d/go.d @@ -829,7 +829,7 @@ fi %defattr(0750,root,netdata,0750) # CAP_DAC_READ_SEARCH and CAP_SYS_PTRACE needed for data collection by the plugin. %caps(cap_dac_read_search,cap_sys_ptrace=ep) %{_libexecdir}/%{name}/plugins.d/apps.plugin -%defattr(0644,root,netdata,0644) +%defattr(0644,root,netdata,0755) %{_libdir}/%{name}/conf.d/apps_groups.conf %package plugin-slabinfo @@ -919,6 +919,7 @@ fi %caps(cap_dac_read_search=ep) %attr(0750,root,netdata) %{_libexecdir}/%{name}/plugins.d/systemd-journal.plugin %changelog +* Mon Aug 21 2023 Austin Hemmelgarn 0.0.0-22 * Thu Aug 03 2023 Austin Hemmelgarn 0.0.0-21 - Added systemd-journal plugin handling * Wed Jun 14 2023 Konstantin Shalygin 0.0.0-20 diff --git a/packaging/docker/Dockerfile b/packaging/docker/Dockerfile index cf6370362..3d05d9d2c 100644 --- a/packaging/docker/Dockerfile +++ b/packaging/docker/Dockerfile @@ -28,7 +28,7 @@ WORKDIR /opt/netdata.git RUN chmod +x netdata-installer.sh && \ cp -rp /deps/* /usr/local/ && \ /bin/echo -e "INSTALL_TYPE='oci'\nPREBUILT_ARCH='$(uname -m)'" > ./system/.install-type && \ - CFLAGS="$(packaging/docker/gen-cflags.sh)" LDFLAGS="-Wl,--gc-sections" ./netdata-installer.sh --dont-wait --dont-start-it --use-system-protobuf \ + CFLAGS="$(packaging/docker/gen-cflags.sh)" LDFLAGS="-Wl,--gc-sections -Wl,-z,stack-size=8388608" ./netdata-installer.sh --dont-wait --dont-start-it --use-system-protobuf \ ${EXTRA_INSTALL_OPTS} --one-time-build --enable-lto "$([ "$RELEASE_CHANNEL" = stable ] && echo --stable-channel)" # files to one directory diff --git a/packaging/makeself/curl.version b/packaging/makeself/curl.version new file mode 100644 index 000000000..7bfa34ed1 --- /dev/null +++ b/packaging/makeself/curl.version @@ -0,0 +1 @@ +curl-8_2_1 diff --git a/packaging/makeself/jobs/20-openssl.install.sh b/packaging/makeself/jobs/20-openssl.install.sh index 35667a51f..04ec2626f 100755 --- a/packaging/makeself/jobs/20-openssl.install.sh +++ b/packaging/makeself/jobs/20-openssl.install.sh @@ -36,13 +36,22 @@ fi cd "${NETDATA_MAKESELF_PATH}/tmp/openssl" || exit 1 if [ "${CACHE_HIT:-0}" -eq 0 ]; then - run ./config -static no-tests --prefix=/openssl-static --openssldir=/opt/netdata/etc/ssl + sed -i "s/disable('static', 'pic', 'threads');/disable('static', 'pic');/" Configure + run ./config -static threads no-tests --prefix=/openssl-static --openssldir=/opt/netdata/etc/ssl run make -j "$(nproc)" fi run make -j "$(nproc)" install_sw +if [ -d "/openssl-static/lib" ]; then + cd "/openssl-static" || exit 1 + ln -s "lib" "lib64" || true + cd - || exit 1 +fi + store_cache openssl "${NETDATA_MAKESELF_PATH}/tmp/openssl" +perl configdata.pm --dump + # shellcheck disable=SC2015 [ "${GITHUB_ACTIONS}" = "true" ] && echo "::endgroup::" || true diff --git a/packaging/makeself/jobs/50-bash-5.1.16.install.sh b/packaging/makeself/jobs/50-bash-5.1.16.install.sh index d9f6e5bb0..f75bb9d2e 100755 --- a/packaging/makeself/jobs/50-bash-5.1.16.install.sh +++ b/packaging/makeself/jobs/50-bash-5.1.16.install.sh @@ -13,7 +13,7 @@ fetch "bash-${version}" "http://ftp.gnu.org/gnu/bash/bash-${version}.tar.gz" \ 5bac17218d3911834520dad13cd1f85ab944e1c09ae1aba55906be1f8192f558 bash export CFLAGS="-pipe" -export PKG_CONFIG_PATH="/openssl-static/lib/pkgconfig" +export PKG_CONFIG_PATH="/openssl-static/lib64/pkgconfig" if [ "${CACHE_HIT:-0}" -eq 0 ]; then run ./configure \ diff --git a/packaging/makeself/jobs/50-curl-7.87.0.install.sh b/packaging/makeself/jobs/50-curl-7.87.0.install.sh deleted file mode 100755 index 84210e958..000000000 --- a/packaging/makeself/jobs/50-curl-7.87.0.install.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/usr/bin/env bash -# SPDX-License-Identifier: GPL-3.0-or-later - -# shellcheck source=packaging/makeself/functions.sh -. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1 - -version="7.87.0" - -# shellcheck disable=SC2015 -[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building cURL" || true - -fetch "curl-${version}" "https://curl.haxx.se/download/curl-${version}.tar.gz" \ - 8a063d664d1c23d35526b87a2bf15514962ffdd8ef7fd40519191b3c23e39548 curl - -export CFLAGS="-I/openssl-static/include -pipe" -export LDFLAGS="-static -L/openssl-static/lib" -export PKG_CONFIG="pkg-config --static" -export PKG_CONFIG_PATH="/openssl-static/lib/pkgconfig" - -if [ "${CACHE_HIT:-0}" -eq 0 ]; then - run autoreconf -fi - - run ./configure \ - --prefix="${NETDATA_INSTALL_PATH}" \ - --enable-optimize \ - --disable-shared \ - --enable-static \ - --enable-http \ - --disable-ldap \ - --disable-ldaps \ - --enable-proxy \ - --disable-dict \ - --disable-telnet \ - --disable-tftp \ - --disable-pop3 \ - --disable-imap \ - --disable-smb \ - --disable-smtp \ - --disable-gopher \ - --enable-ipv6 \ - --enable-cookies \ - --with-ca-fallback \ - --with-openssl \ - --disable-dependency-tracking - - # Curl autoconf does not honour the curl_LDFLAGS environment variable - run sed -i -e "s/LDFLAGS =/LDFLAGS = -all-static/" src/Makefile - - run make clean - run make -j "$(nproc)" -fi - -run make install - -store_cache curl "${NETDATA_MAKESELF_PATH}/tmp/curl-${version}" - -if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then - run strip "${NETDATA_INSTALL_PATH}"/bin/curl -fi - -# shellcheck disable=SC2015 -[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Preparing build environment" || true diff --git a/packaging/makeself/jobs/50-curl.install.sh b/packaging/makeself/jobs/50-curl.install.sh new file mode 100755 index 000000000..b3ed33186 --- /dev/null +++ b/packaging/makeself/jobs/50-curl.install.sh @@ -0,0 +1,77 @@ +#!/usr/bin/env bash +# SPDX-License-Identifier: GPL-3.0-or-later + +# shellcheck source=packaging/makeself/functions.sh +. "$(dirname "${0}")/../functions.sh" "${@}" || exit 1 + +version="$(cat "$(dirname "${0}")/../curl.version")" + +# shellcheck disable=SC2015 +[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Building cURL" || true + +if [ -d "${NETDATA_MAKESELF_PATH}/tmp/curl" ]; then + rm -rf "${NETDATA_MAKESELF_PATH}/tmp/curl" +fi + +cache="${NETDATA_SOURCE_PATH}/artifacts/cache/${BUILDARCH}/curl" + +if [ -d "${cache}" ]; then + echo "Found cached copy of build directory for curl, using it." + cp -a "${cache}/curl" "${NETDATA_MAKESELF_PATH}/tmp/" + CACHE_HIT=1 +else + echo "No cached copy of build directory for curl found, fetching sources instead." + run git clone --branch "${version}" --single-branch --depth 1 'https://github.com/curl/curl.git' "${NETDATA_MAKESELF_PATH}/tmp/curl" + CACHE_HIT=0 +fi + +cd "${NETDATA_MAKESELF_PATH}/tmp/curl" || exit 1 + +export CFLAGS="-I/openssl-static/include -pipe" +export LDFLAGS="-static -L/openssl-static/lib64" +export PKG_CONFIG="pkg-config --static" +export PKG_CONFIG_PATH="/openssl-static/lib64/pkgconfig" + +if [ "${CACHE_HIT:-0}" -eq 0 ]; then + run autoreconf -fi + + run ./configure \ + --prefix="${NETDATA_INSTALL_PATH}" \ + --enable-optimize \ + --disable-shared \ + --enable-static \ + --enable-http \ + --disable-ldap \ + --disable-ldaps \ + --enable-proxy \ + --disable-dict \ + --disable-telnet \ + --disable-tftp \ + --disable-pop3 \ + --disable-imap \ + --disable-smb \ + --disable-smtp \ + --disable-gopher \ + --enable-ipv6 \ + --enable-cookies \ + --with-ca-fallback \ + --with-openssl \ + --disable-dependency-tracking + + # Curl autoconf does not honour the curl_LDFLAGS environment variable + run sed -i -e "s/LDFLAGS =/LDFLAGS = -all-static/" src/Makefile + + run make clean + run make -j "$(nproc)" +fi + +run make install + +store_cache curl "${NETDATA_MAKESELF_PATH}/tmp/curl" + +if [ "${NETDATA_BUILD_WITH_DEBUG}" -eq 0 ]; then + run strip "${NETDATA_INSTALL_PATH}"/bin/curl +fi + +# shellcheck disable=SC2015 +[ "${GITHUB_ACTIONS}" = "true" ] && echo "::group::Preparing build environment" || true diff --git a/packaging/makeself/jobs/70-netdata-git.install.sh b/packaging/makeself/jobs/70-netdata-git.install.sh index c7dd98df2..67b8df103 100755 --- a/packaging/makeself/jobs/70-netdata-git.install.sh +++ b/packaging/makeself/jobs/70-netdata-git.install.sh @@ -12,7 +12,7 @@ else export CFLAGS="-static -O1 -pipe -ggdb -Wall -Wextra -Wformat-signedness -DNETDATA_INTERNAL_CHECKS=1 -I/openssl-static/include -I/libnetfilter-acct-static/include/libnetfilter_acct -I/usr/include/libmnl" fi -export LDFLAGS="-Wl,--gc-sections -static -L/openssl-static/lib -L/libnetfilter-acct-static/lib -lnetfilter_acct -L/usr/lib -lmnl" +export LDFLAGS="-Wl,--gc-sections -Wl,-z,stack-size=$[8 * 1024 * 1024] -static -L/openssl-static/lib64 -L/libnetfilter-acct-static/lib -lnetfilter_acct -L/usr/lib -lmnl" # We export this to 'yes', installer sets this to .environment. # The updater consumes this one, so that it can tell whether it should update a static install or a non-static one @@ -21,11 +21,11 @@ export IS_NETDATA_STATIC_BINARY="yes" # Set eBPF LIBC to "static" to bundle the `-static` variant of the kernel-collector export EBPF_LIBC="static" export PKG_CONFIG="pkg-config --static" -export PKG_CONFIG_PATH="/openssl-static/lib/pkgconfig:/libnetfilter-acct-static/lib/pkgconfig:/usr/lib/pkgconfig" +export PKG_CONFIG_PATH="/openssl-static/lib64/pkgconfig:/libnetfilter-acct-static/lib/pkgconfig:/usr/lib/pkgconfig" # Set correct CMake flags for building against non-System OpenSSL # See: https://github.com/warmcat/libwebsockets/blob/master/READMEs/README.build.md -export CMAKE_FLAGS="-DOPENSSL_ROOT_DIR=/openssl-static -DOPENSSL_LIBRARIES=/openssl-static/lib -DCMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE=/openssl-static -DLWS_OPENSSL_INCLUDE_DIRS=/openssl-static/include -DLWS_OPENSSL_LIBRARIES=/openssl-static/lib/libssl.a;/openssl-static/lib/libcrypto.a" +export CMAKE_FLAGS="-DOPENSSL_ROOT_DIR=/openssl-static -DOPENSSL_LIBRARIES=/openssl-static/lib64 -DCMAKE_INCLUDE_DIRECTORIES_PROJECT_BEFORE=/openssl-static -DLWS_OPENSSL_INCLUDE_DIRS=/openssl-static/include -DLWS_OPENSSL_LIBRARIES=/openssl-static/lib64/libssl.a;/openssl-static/lib64/libcrypto.a" run ./netdata-installer.sh \ --install-prefix "${NETDATA_INSTALL_PARENT}" \ diff --git a/packaging/makeself/openssl.version b/packaging/makeself/openssl.version index 6c101b589..fec11a1db 100644 --- a/packaging/makeself/openssl.version +++ b/packaging/makeself/openssl.version @@ -1 +1 @@ -OpenSSL_1_1_1v +openssl-3.1.2 diff --git a/packaging/version b/packaging/version index dc34105ed..0fcb94381 100644 --- a/packaging/version +++ b/packaging/version @@ -1 +1 @@ -v1.42.1 +v1.42.2 diff --git a/web/api/web_api.c b/web/api/web_api.c index 96ab00390..be6d898b8 100644 --- a/web/api/web_api.c +++ b/web/api/web_api.c @@ -73,6 +73,9 @@ int web_client_api_request_vX(RRDHOST *host, struct web_client *w, char *url_pat return HTTP_RESP_BAD_REQUEST; } + if (api_command != url_path_endpoint) + freez(api_command); + short int code = web_client_check_acl_and_bearer(w, api_commands[i].acl); if(code != HTTP_RESP_OK) { if(code == HTTP_RESP_FORBIDDEN) diff --git a/web/gui/index.html b/web/gui/index.html index b1986599c..d63f04963 100644 --- a/web/gui/index.html +++ b/web/gui/index.html @@ -27,7 +27,7 @@ demoFavourites: {"postgresql":["postgres"],"redis":["redis"],"dns-query":["dns_query"],"http-endpoints":["httpcheck"],"nginx":["web_log","nginx"],"apache":["apache"],"host-reachability":["ping"],"cassandra":["cassandra"],"coredns":["coredns"],"logind":["logind"],"iis":["iis"],"active-directory":["ad"],"windows":["windows","ad","iis","mssql","exchange","netframework"],"docker":["cgroup","docker"]}, webpackPublicPath: "https://app.netdata.cloud", agentApiUrl: searchParams.get("agent") || getBasename(), - version: "6.28.0", + version: "6.29.0", tracking: false, cookieDomain: ".netdata.cloud", onprem: false diff --git a/web/gui/v2/102.625f7fb40793758916f1.chunk.js b/web/gui/v2/102.625f7fb40793758916f1.chunk.js deleted file mode 100644 index 48b4c4733..000000000 --- a/web/gui/v2/102.625f7fb40793758916f1.chunk.js +++ /dev/null @@ -1 +0,0 @@ -!function(){try{var C="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new Error).stack;t&&(C._sentryDebugIds=C._sentryDebugIds||{},C._sentryDebugIds[t]="ec6351ad-ff59-4e59-b8f3-30da5cf93943",C._sentryDebugIdIdentifier="sentry-dbid-ec6351ad-ff59-4e59-b8f3-30da5cf93943")}catch(C){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"1f9bd6d85714735ca8bbf884fbe65fc5566ec047"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[102],{48102:function(C,t,e){e.r(t),e.d(t,{default:function(){return u}});var n=e(29439),i=e(67294),l=e(57509),a=e(92432),o=e(87854),d=e.n(o),r=e(95348),c=e.n(r),p=new(d())({id:"terms.svg",use:"terms.svg-usage",viewBox:"0 0 240 240",content:'\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n'}),f=(c().add(p),p),H=function(){return i.createElement("svg",{height:"240px",width:"240px",viewBox:f.viewBox},i.createElement("use",{xlinkHref:"#".concat(f.id)}))},s=e(78312),V=e(97096),h=function(C){var t=C.checked,e=C.error,n=C.onChange,a=C.tagging,o=C.children;return i.createElement(l.Flex,{alignItems:"center","data-testid":"termsAndConditions"},i.createElement(s.P2,{checked:t,onChange:n,error:e,"data-ga":"signinup::click-checkbox::".concat(a),"data-testid":"termsAndConditions-checkbox"}),o||i.createElement(l.TextBig,null,"By signing up, you agree to the Netdata ",i.createElement(V.w,{tagging:a})," and"," ",i.createElement(V.F,{tagging:a})))},E=e(13477),g=e(46667),u=function(){var C=(0,E.ec)("termsAccepted",{shouldPersist:!0}),t=(0,n.Z)(C,2),e=t[0],o=t[1],d=(0,g.Z)(),r=(0,n.Z)(d,2),c=r[0],p=r[1],f=(0,i.useCallback)((function(){(0,a.L)("","","","","","terms-accept"),o(c)}),[c]);return e?null:i.createElement(l.ConfirmationDialog,{confirmLabel:"Accept","data-ga":"accept-terms-dialog","data-testid":"acceptTermsDialog",handleConfirm:f,hideIcon:!0,hideDecline:!0,isConfirmPositive:!0,isConfirmDisabled:!c,message:i.createElement(l.Flex,{gap:4,alignItems:"center",column:!0},i.createElement(H,null),i.createElement(h,{checked:c,onChange:p,tagging:"modal-view"})),title:"To use Netdata you need to read and accept our terms and conditions"})}},78312:function(C,t,e){e.d(t,{Fg:function(){return o},P2:function(){return r},Sn:function(){return c},U5:function(){return d},Yb:function(){return p},xG:function(){return a}});var n=e(60677),i=e(57509),l=e(16772),a=n.default.div.withConfig({displayName:"styled__SvgContainer",componentId:"sc-16ytcl4-0"})(["width:42px;height:42px;flex-shrink:0;display:flex;justify-content:center;align-items:center;border-radius:2px;background:white;"]),o=n.default.a.withConfig({displayName:"styled__StyledLink",componentId:"sc-16ytcl4-1"})(["display:inline-flex;align-items:center;text-decoration:none;color:",";cursor:pointer;&:hover{text-decoration:underline;color:"," !important;}&:visited{color:",";}> svg{fill:",";padding-right:",";}"],(0,i.getColor)("success"),(0,i.getColor)("success"),(0,i.getColor)("success"),(0,i.getColor)("main"),(0,i.getSizeBy)(1)),d=(0,n.default)(l.Z).withConfig({displayName:"styled__EmailInput",componentId:"sc-16ytcl4-2"})(["label{margin-bottom:0;}> div{display:none;}"]),r=(0,n.default)(i.Checkbox).withConfig({displayName:"styled__StyledCheckbox",componentId:"sc-16ytcl4-3"})(["margin:0 "," 0 0;& div:last-child{border-color:",";}"],(0,i.getSizeBy)(2),(function(C){return C.error&&(0,i.getColor)("error")})),c=(0,n.default)(i.Button).withConfig({displayName:"styled__StyledButton",componentId:"sc-16ytcl4-4"})(["&&{height:44px;}"]),p=(0,n.default)(i.Flex).attrs((function(C){var t=C.gap;return{column:!0,gap:void 0===t?8:t,alignSelf:"center",padding:[0,0,8,0],border:{side:"bottom",color:"disabled"},width:{max:"320px"}}})).withConfig({displayName:"styled__FormContainer",componentId:"sc-16ytcl4-5"})(["width:100%;"])},97096:function(C,t,e){e.d(t,{F:function(){return d},w:function(){return o}});e(92222);var n=e(67294),i=e(78312),l={link:"https://www.netdata.cloud/terms",title:"Terms And Conditions",dataGa:"signinup::click-terms::"},a=function(C){var t=C.link,e=C.title,l=C.dataGa;return function(C){var a=C.tagging;return n.createElement(i.Fg,{href:t,target:"_blank",rel:"noopener noreferrer","data-ga":"".concat(l).concat(a)},e)}},o=a({link:"https://www.netdata.cloud/privacy",title:"Privacy Policy",dataGa:"signinup::click-privacy::"}),d=a(l)}}]); \ No newline at end of file diff --git a/web/gui/v2/1115.6acb1d00b53342cf4a94.chunk.js b/web/gui/v2/1115.6acb1d00b53342cf4a94.chunk.js new file mode 100644 index 000000000..21453c4a6 --- /dev/null +++ b/web/gui/v2/1115.6acb1d00b53342cf4a94.chunk.js @@ -0,0 +1 @@ +!function(){try{var t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},e=(new Error).stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="cd6e45c8-2e6e-41ff-9901-6328f86fba9d",t._sentryDebugIdIdentifier="sentry-dbid-cd6e45c8-2e6e-41ff-9901-6328f86fba9d")}catch(t){}}();var _global="undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:{};_global.SENTRY_RELEASE={id:"6845f9ce010d5a446e5d4a40f17204cb8341a07a"},(self.webpackChunkcloud_frontend=self.webpackChunkcloud_frontend||[]).push([[1115],{2814:function(t,e,n){var r=n(17854),a=n(47293),o=n(1702),i=n(41340),u=n(53111).trim,d=n(81361),c=o("".charAt),s=r.parseFloat,l=r.Symbol,f=l&&l.iterator,h=1/s(d+"-0")!==-1/0||f&&!a((function(){s(Object(f))}));t.exports=h?function(t){var e=u(i(t)),n=s(e);return 0===n&&"-"==c(e,0)?-0:n}:s},38415:function(t,e,n){var r=n(19303),a=n(41340),o=n(84488),i=RangeError;t.exports=function(t){var e=a(o(this)),n="",u=r(t);if(u<0||u==1/0)throw i("Wrong number of repetitions");for(;u>0;(u>>>=1)&&(e+=e))1&u&&(n+=e);return n}},61874:function(t,e,n){var r=n(82109),a=n(2814);r({target:"Number",stat:!0,forced:Number.parseFloat!=a},{parseFloat:a})},52149:function(t,e,n){function r(t,e){if(null==t)throw new TypeError("assign requires that input parameter not be null or undefined");for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}n.d(e,{Z:function(){return r}})},8958:function(t,e,n){n.d(e,{Z:function(){return m}});var r={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},a=function(t,e,n){var a,o=r[t];return a="string"===typeof o?o:1===e?o.one:o.other.replace("{{count}}",e.toString()),null!==n&&void 0!==n&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function o(t){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}var i={date:o({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:o({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:o({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},u={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},d=function(t,e,n,r){return u[t]};function c(t){return function(e,n){var r;if("formatting"===(null!==n&&void 0!==n&&n.context?String(n.context):"standalone")&&t.formattingValues){var a=t.defaultFormattingWidth||t.defaultWidth,o=null!==n&&void 0!==n&&n.width?String(n.width):a;r=t.formattingValues[o]||t.formattingValues[a]}else{var i=t.defaultWidth,u=null!==n&&void 0!==n&&n.width?String(n.width):t.defaultWidth;r=t.values[u]||t.values[i]}return r[t.argumentCallback?t.argumentCallback(e):e]}}var s={ordinalNumber:function(t,e){var n=Number(t),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:c({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:c({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:function(t){return t-1}}),month:c({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:c({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:c({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})};function l(t){return function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.width,a=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],o=e.match(a);if(!o)return null;var i,u=o[0],d=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(d)?function(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{},n=t.match(f.matchPattern);if(!n)return null;var r=n[0],a=t.match(f.parsePattern);if(!a)return null;var o=f.valueCallback?f.valueCallback(a[0]):a[0];return{value:o=e.valueCallback?e.valueCallback(o):o,rest:t.slice(r.length)}}),era:l({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:l({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:function(t){return t+1}}),month:l({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:l({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:l({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},m={code:"en-US",formatDistance:a,formatLong:i,formatRelative:d,localize:s,match:h,options:{weekStartsOn:0,firstWeekContainsDate:1}}},84314:function(t,e,n){n.d(e,{j:function(){return a}});var r={};function a(){return r}},97621:function(t,e){var n=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},r=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},a={p:r,P:function(t,e){var a,o=t.match(/(P+)(p+)?/)||[],i=o[1],u=o[2];if(!u)return n(t,e);switch(i){case"P":a=e.dateTime({width:"short"});break;case"PP":a=e.dateTime({width:"medium"});break;case"PPP":a=e.dateTime({width:"long"});break;default:a=e.dateTime({width:"full"})}return a.replace("{{date}}",n(i,e)).replace("{{time}}",r(u,e))}};e.Z=a},24262:function(t,e,n){function r(t){var e=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return e.setUTCFullYear(t.getFullYear()),t.getTime()-e.getTime()}n.d(e,{Z:function(){return r}})},49702:function(t,e,n){n.d(e,{Z:function(){return d}});var r=n(19013),a=n(66979),o=n(7032),i=n(13882);var u=6048e5;function d(t){(0,i.Z)(1,arguments);var e=(0,r.default)(t),n=(0,a.Z)(e).getTime()-function(t){(0,i.Z)(1,arguments);var e=(0,o.Z)(t),n=new Date(0);return n.setUTCFullYear(e,0,4),n.setUTCHours(0,0,0,0),(0,a.Z)(n)}(e).getTime();return Math.round(n/u)+1}},7032:function(t,e,n){n.d(e,{Z:function(){return i}});var r=n(19013),a=n(13882),o=n(66979);function i(t){(0,a.Z)(1,arguments);var e=(0,r.default)(t),n=e.getUTCFullYear(),i=new Date(0);i.setUTCFullYear(n+1,0,4),i.setUTCHours(0,0,0,0);var u=(0,o.Z)(i),d=new Date(0);d.setUTCFullYear(n,0,4),d.setUTCHours(0,0,0,0);var c=(0,o.Z)(d);return e.getTime()>=u.getTime()?n+1:e.getTime()>=c.getTime()?n:n-1}},23324:function(t,e,n){n.d(e,{Z:function(){return s}});var r=n(19013),a=n(59025),o=n(7651),i=n(13882),u=n(83946),d=n(84314);var c=6048e5;function s(t,e){(0,i.Z)(1,arguments);var n=(0,r.default)(t),s=(0,a.Z)(n,e).getTime()-function(t,e){var n,r,c,s,l,f,h,m;(0,i.Z)(1,arguments);var v=(0,d.j)(),g=(0,u.Z)(null!==(n=null!==(r=null!==(c=null!==(s=null===e||void 0===e?void 0:e.firstWeekContainsDate)&&void 0!==s?s:null===e||void 0===e||null===(l=e.locale)||void 0===l||null===(f=l.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==c?c:v.firstWeekContainsDate)&&void 0!==r?r:null===(h=v.locale)||void 0===h||null===(m=h.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==n?n:1),w=(0,o.Z)(t,e),b=new Date(0);return b.setUTCFullYear(w,0,g),b.setUTCHours(0,0,0,0),(0,a.Z)(b,e)}(n,e).getTime();return Math.round(s/c)+1}},7651:function(t,e,n){n.d(e,{Z:function(){return d}});var r=n(19013),a=n(13882),o=n(59025),i=n(83946),u=n(84314);function d(t,e){var n,d,c,s,l,f,h,m;(0,a.Z)(1,arguments);var v=(0,r.default)(t),g=v.getUTCFullYear(),w=(0,u.j)(),b=(0,i.Z)(null!==(n=null!==(d=null!==(c=null!==(s=null===e||void 0===e?void 0:e.firstWeekContainsDate)&&void 0!==s?s:null===e||void 0===e||null===(l=e.locale)||void 0===l||null===(f=l.options)||void 0===f?void 0:f.firstWeekContainsDate)&&void 0!==c?c:w.firstWeekContainsDate)&&void 0!==d?d:null===(h=w.locale)||void 0===h||null===(m=h.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==n?n:1);if(!(b>=1&&b<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(g+1,0,b),y.setUTCHours(0,0,0,0);var p=(0,o.Z)(y,e),T=new Date(0);T.setUTCFullYear(g,0,b),T.setUTCHours(0,0,0,0);var C=(0,o.Z)(T,e);return v.getTime()>=p.getTime()?g+1:v.getTime()>=C.getTime()?g:g-1}},5267:function(t,e,n){n.d(e,{Do:function(){return i},Iu:function(){return o},qp:function(){return u}});var r=["D","DD"],a=["YY","YYYY"];function o(t){return-1!==r.indexOf(t)}function i(t){return-1!==a.indexOf(t)}function u(t,e,n){if("YYYY"===t)throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("YY"===t)throw new RangeError("Use `yy` instead of `YY` (in `".concat(e,"`) for formatting years to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("D"===t)throw new RangeError("Use `d` instead of `D` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if("DD"===t)throw new RangeError("Use `dd` instead of `DD` (in `".concat(e,"`) for formatting days of the month to the input `").concat(n,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}},13882:function(t,e,n){function r(t,e){if(e.length1?"s":"")+" required, but only "+e.length+" present")}n.d(e,{Z:function(){return r}})},66979:function(t,e,n){n.d(e,{Z:function(){return o}});var r=n(19013),a=n(13882);function o(t){(0,a.Z)(1,arguments);var e=(0,r.default)(t),n=e.getUTCDay(),o=(n<1?7:0)+n-1;return e.setUTCDate(e.getUTCDate()-o),e.setUTCHours(0,0,0,0),e}},59025:function(t,e,n){n.d(e,{Z:function(){return u}});var r=n(19013),a=n(13882),o=n(83946),i=n(84314);function u(t,e){var n,u,d,c,s,l,f,h;(0,a.Z)(1,arguments);var m=(0,i.j)(),v=(0,o.Z)(null!==(n=null!==(u=null!==(d=null!==(c=null===e||void 0===e?void 0:e.weekStartsOn)&&void 0!==c?c:null===e||void 0===e||null===(s=e.locale)||void 0===s||null===(l=s.options)||void 0===l?void 0:l.weekStartsOn)&&void 0!==d?d:m.weekStartsOn)&&void 0!==u?u:null===(f=m.locale)||void 0===f||null===(h=f.options)||void 0===h?void 0:h.weekStartsOn)&&void 0!==n?n:0);if(!(v>=0&&v<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var g=(0,r.default)(t),w=g.getUTCDay(),b=(w0?1:i}},49546:function(t,e,n){n.r(e),n.d(e,{default:function(){return O}});var r=n(12274),a=n(91218),o=n(19013),i=n(13882);var u=n(49702),d=n(7032),c=n(23324),s=n(7651);function l(t,e){for(var n=t<0?"-":"",r=Math.abs(t).toString();r.length0?n:1-n;return l("yy"===e?r%100:r,e.length)},M:function(t,e){var n=t.getUTCMonth();return"M"===e?String(n+1):l(n+1,2)},d:function(t,e){return l(t.getUTCDate(),e.length)},a:function(t,e){var n=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:function(t,e){return l(t.getUTCHours()%12||12,e.length)},H:function(t,e){return l(t.getUTCHours(),e.length)},m:function(t,e){return l(t.getUTCMinutes(),e.length)},s:function(t,e){return l(t.getUTCSeconds(),e.length)},S:function(t,e){var n=e.length,r=t.getUTCMilliseconds();return l(Math.floor(r*Math.pow(10,n-3)),e.length)}},h="midnight",m="noon",v="morning",g="afternoon",w="evening",b="night",y={G:function(t,e,n){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});default:return n.era(r,{width:"wide"})}},y:function(t,e,n){if("yo"===e){var r=t.getUTCFullYear(),a=r>0?r:1-r;return n.ordinalNumber(a,{unit:"year"})}return f.y(t,e)},Y:function(t,e,n,r){var a=(0,s.Z)(t,r),o=a>0?a:1-a;return"YY"===e?l(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):l(o,e.length)},R:function(t,e){return l((0,d.Z)(t),e.length)},u:function(t,e){return l(t.getUTCFullYear(),e.length)},Q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return l(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,n){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return l(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,n){var r=t.getUTCMonth();switch(e){case"M":case"MM":return f.M(t,e);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,n){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return l(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,n,r){var a=(0,c.Z)(t,r);return"wo"===e?n.ordinalNumber(a,{unit:"week"}):l(a,e.length)},I:function(t,e,n){var r=(0,u.Z)(t);return"Io"===e?n.ordinalNumber(r,{unit:"week"}):l(r,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getUTCDate(),{unit:"date"}):f.d(t,e)},D:function(t,e,n){var r=function(t){(0,i.Z)(1,arguments);var e=(0,o.default)(t),n=e.getTime();e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0);var r=n-e.getTime();return Math.floor(r/864e5)+1}(t);return"Do"===e?n.ordinalNumber(r,{unit:"dayOfYear"}):l(r,e.length)},E:function(t,e,n){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,n,r){var a=t.getUTCDay(),o=(a-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return l(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(a,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(a,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(a,{width:"short",context:"formatting"});default:return n.day(a,{width:"wide",context:"formatting"})}},c:function(t,e,n,r){var a=t.getUTCDay(),o=(a-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return l(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(a,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(a,{width:"narrow",context:"standalone"});case"cccccc":return n.day(a,{width:"short",context:"standalone"});default:return n.day(a,{width:"wide",context:"standalone"})}},i:function(t,e,n){var r=t.getUTCDay(),a=0===r?7:r;switch(e){case"i":return String(a);case"ii":return l(a,e.length);case"io":return n.ordinalNumber(a,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,n){var r=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},b:function(t,e,n){var r,a=t.getUTCHours();switch(r=12===a?m:0===a?h:a/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},B:function(t,e,n){var r,a=t.getUTCHours();switch(r=a>=17?w:a>=12?g:a>=4?v:b,e){case"B":case"BB":case"BBB":return n.dayPeriod(r,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(r,{width:"narrow",context:"formatting"});default:return n.dayPeriod(r,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){var r=t.getUTCHours()%12;return 0===r&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return f.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getUTCHours(),{unit:"hour"}):f.H(t,e)},K:function(t,e,n){var r=t.getUTCHours()%12;return"Ko"===e?n.ordinalNumber(r,{unit:"hour"}):l(r,e.length)},k:function(t,e,n){var r=t.getUTCHours();return 0===r&&(r=24),"ko"===e?n.ordinalNumber(r,{unit:"hour"}):l(r,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):f.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):f.s(t,e)},S:function(t,e){return f.S(t,e)},X:function(t,e,n,r){var a=(r._originalDate||t).getTimezoneOffset();if(0===a)return"Z";switch(e){case"X":return T(a);case"XXXX":case"XX":return C(a);default:return C(a,":")}},x:function(t,e,n,r){var a=(r._originalDate||t).getTimezoneOffset();switch(e){case"x":return T(a);case"xxxx":case"xx":return C(a);default:return C(a,":")}},O:function(t,e,n,r){var a=(r._originalDate||t).getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+p(a,":");default:return"GMT"+C(a,":")}},z:function(t,e,n,r){var a=(r._originalDate||t).getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+p(a,":");default:return"GMT"+C(a,":")}},t:function(t,e,n,r){var a=r._originalDate||t;return l(Math.floor(a.getTime()/1e3),e.length)},T:function(t,e,n,r){return l((r._originalDate||t).getTime(),e.length)}};function p(t,e){var n=t>0?"-":"+",r=Math.abs(t),a=Math.floor(r/60),o=r%60;if(0===o)return n+String(a);var i=e||"";return n+String(a)+i+l(o,2)}function T(t,e){return t%60===0?(t>0?"-":"+")+l(Math.abs(t)/60,2):C(t,e)}function C(t,e){var n=e||"",r=t>0?"-":"+",a=Math.abs(t);return r+l(Math.floor(a/60),2)+n+l(a%60,2)}var M=y,D=n(97621),Z=n(24262),k=n(5267),x=n(83946),S=n(84314),U=n(8958),P=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,E=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,W=/^'([^]*?)'?$/,Y=/''/g,N=/[a-zA-Z]/;function O(t,e,n){var u,d,c,s,l,f,h,m,v,g,w,b,y,p,T,C,O,q;(0,i.Z)(2,arguments);var j=String(e),F=(0,S.j)(),H=null!==(u=null!==(d=null===n||void 0===n?void 0:n.locale)&&void 0!==d?d:F.locale)&&void 0!==u?u:U.Z,R=(0,x.Z)(null!==(c=null!==(s=null!==(l=null!==(f=null===n||void 0===n?void 0:n.firstWeekContainsDate)&&void 0!==f?f:null===n||void 0===n||null===(h=n.locale)||void 0===h||null===(m=h.options)||void 0===m?void 0:m.firstWeekContainsDate)&&void 0!==l?l:F.firstWeekContainsDate)&&void 0!==s?s:null===(v=F.locale)||void 0===v||null===(g=v.options)||void 0===g?void 0:g.firstWeekContainsDate)&&void 0!==c?c:1);if(!(R>=1&&R<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var z=(0,x.Z)(null!==(w=null!==(b=null!==(y=null!==(p=null===n||void 0===n?void 0:n.weekStartsOn)&&void 0!==p?p:null===n||void 0===n||null===(T=n.locale)||void 0===T||null===(C=T.options)||void 0===C?void 0:C.weekStartsOn)&&void 0!==y?y:F.weekStartsOn)&&void 0!==b?b:null===(O=F.locale)||void 0===O||null===(q=O.options)||void 0===q?void 0:q.weekStartsOn)&&void 0!==w?w:0);if(!(z>=0&&z<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!H.localize)throw new RangeError("locale must contain localize property");if(!H.formatLong)throw new RangeError("locale must contain formatLong property");var L=(0,o.default)(t);if(!(0,r.default)(L))throw new RangeError("Invalid time value");var A=(0,Z.Z)(L),Q=(0,a.Z)(L,A),G={firstWeekContainsDate:R,weekStartsOn:z,locale:H,_originalDate:L};return j.match(E).map((function(t){var e=t[0];return"p"===e||"P"===e?(0,D.Z[e])(t,H.formatLong):t})).join("").match(P).map((function(r){if("''"===r)return"'";var a=r[0];if("'"===a)return function(t){var e=t.match(W);if(!e)return t;return e[1].replace(Y,"'")}(r);var o=M[a];if(o)return null!==n&&void 0!==n&&n.useAdditionalWeekYearTokens||!(0,k.Do)(r)||(0,k.qp)(r,e,String(t)),null!==n&&void 0!==n&&n.useAdditionalDayOfYearTokens||!(0,k.Iu)(r)||(0,k.qp)(r,e,String(t)),o(Q,r,H.localize,G);if(a.match(N))throw new RangeError("Format string contains an unescaped latin alphabet character `"+a+"`");return r})).join("")}},936:function(t,e,n){n.d(e,{Z:function(){return m}});var r=n(84314),a=n(24262),o=n(49474),i=n(19013),u=n(52149);var d=n(8958),c=n(13882),s=6e4,l=1440,f=30*l,h=365*l;function m(t,e,n){var m,v,g;(0,c.Z)(2,arguments);var w=(0,r.j)(),b=null!==(m=null!==(v=null===n||void 0===n?void 0:n.locale)&&void 0!==v?v:w.locale)&&void 0!==m?m:d.Z;if(!b.formatDistance)throw new RangeError("locale must contain localize.formatDistance property");var y=(0,o.Z)(t,e);if(isNaN(y))throw new RangeError("Invalid time value");var p,T,C,M=(0,u.Z)((p=n,(0,u.Z)({},p)),{addSuffix:Boolean(null===n||void 0===n?void 0:n.addSuffix),comparison:y});y>0?(T=(0,i.default)(e),C=(0,i.default)(t)):(T=(0,i.default)(t),C=(0,i.default)(e));var D,Z=String(null!==(g=null===n||void 0===n?void 0:n.roundingMethod)&&void 0!==g?g:"round");if("floor"===Z)D=Math.floor;else if("ceil"===Z)D=Math.ceil;else{if("round"!==Z)throw new RangeError("roundingMethod must be 'floor', 'ceil' or 'round'");D=Math.round}var k,x=C.getTime()-T.getTime(),S=x/s,U=(x-((0,a.Z)(C)-(0,a.Z)(T)))/s,P=null===n||void 0===n?void 0:n.unit;if("second"===(k=P?String(P):S<1?"second":S<60?"minute":S=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;te.length)&&(t=e.length);for(var n=0,r=new Array(t);n, without drag handlers. This will make this component effectively undraggable. Please attach `onDrag` or `onStop` handlers so you can adjust the `position` of this element."),t}return t=f,r=[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.position,r=t.prevPropsPosition;return!n||r&&n.x===r.x&&n.y===r.y?null:((0,d.default)("Draggable: getDerivedStateFromProps %j",{position:n,prevPropsPosition:r}),{x:n.x,y:n.y,prevPropsPosition:v({},n)})}}],(n=[{key:"componentDidMount",value:function(){"undefined"!==typeof window.SVGElement&&this.findDOMNode()instanceof window.SVGElement&&this.setState({isElementSVG:!0})}},{key:"componentWillUnmount",value:function(){this.setState({dragging:!1})}},{key:"findDOMNode",value:function(){var e,t,n;return null!==(e=null===(t=this.props)||void 0===t||null===(n=t.nodeRef)||void 0===n?void 0:n.current)&&void 0!==e?e:i.default.findDOMNode(this)}},{key:"render",value:function(){var e,t=this.props,n=(t.axis,t.bounds,t.children),r=t.defaultPosition,a=t.defaultClassName,i=t.defaultClassNameDragging,f=t.defaultClassNameDragged,d=t.position,g=t.positionOffset,y=(t.scale,h(t,p)),m={},w=null,S=!Boolean(d)||this.state.dragging,D=d||r,O={x:(0,s.canDragX)(this)&&S?this.state.x:D.x,y:(0,s.canDragY)(this)&&S?this.state.y:D.y};this.state.isElementSVG?w=(0,l.createSVGTransform)(O,g):m=(0,l.createCSSTransform)(O,g);var P=(0,u.default)(n.props.className||"",a,(M(e={},i,this.state.dragging),M(e,f,this.state.dragged),e));return o.createElement(c.default,b({},y,{onStart:this.onDragStart,onDrag:this.onDrag,onStop:this.onDragStop}),o.cloneElement(o.Children.only(n),{className:P,style:v(v({},n.props.style),m),transform:w}))}}])&&D(t.prototype,n),r&&D(t,r),Object.defineProperty(t,"prototype",{writable:!1}),f}(o.Component);t.default=E,M(E,"displayName","Draggable"),M(E,"propTypes",v(v({},c.default.propTypes),{},{axis:a.default.oneOf(["both","x","y","none"]),bounds:a.default.oneOfType([a.default.shape({left:a.default.number,right:a.default.number,top:a.default.number,bottom:a.default.number}),a.default.string,a.default.oneOf([!1])]),defaultClassName:a.default.string,defaultClassNameDragging:a.default.string,defaultClassNameDragged:a.default.string,defaultPosition:a.default.shape({x:a.default.number,y:a.default.number}),positionOffset:a.default.shape({x:a.default.oneOfType([a.default.number,a.default.string]),y:a.default.oneOfType([a.default.number,a.default.string])}),position:a.default.shape({x:a.default.number,y:a.default.number}),className:f.dontSetMe,style:f.dontSetMe,transform:f.dontSetMe})),M(E,"defaultProps",v(v({},c.default.defaultProps),{},{axis:"both",bounds:!1,defaultClassName:"react-draggable",defaultClassNameDragging:"react-draggable-dragging",defaultClassNameDragged:"react-draggable-dragged",defaultPosition:{x:0,y:0},scale:1}))},80783:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var o=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var n=d(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var u=a?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(o,i,u):o[i]=e[i]}o.default=e,n&&n.set(e,o);return o}(n(67294)),a=c(n(45697)),i=c(n(73935)),u=n(81825),l=n(2849),s=n(9280),f=c(n(55904));function c(e){return e&&e.__esModule?e:{default:e}}function d(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(d=function(e){return e?n:t})(e)}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null==n)return;var r,o,a=[],i=!0,u=!1;try{for(n=n.call(e);!(i=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);i=!0);}catch(l){u=!0,o=l}finally{try{i||null==n.return||n.return()}finally{if(u)throw o}}return a}(e,t)||function(e,t){if(!e)return;if("string"===typeof e)return g(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return g(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n not mounted on DragStart!");var r=n.ownerDocument;if(!(e.props.disabled||!(t.target instanceof r.defaultView.Node)||e.props.handle&&!(0,u.matchesSelectorAndParentsTo)(t.target,e.props.handle,n)||e.props.cancel&&(0,u.matchesSelectorAndParentsTo)(t.target,e.props.cancel,n))){"touchstart"===t.type&&t.preventDefault();var o=(0,u.getTouchIdentifier)(t);e.setState({touchIdentifier:o});var a=(0,l.getControlPosition)(t,o,m(e));if(null!=a){var i=a.x,s=a.y,c=(0,l.createCoreData)(m(e),i,s);(0,f.default)("DraggableCore: handleDragStart: %j",c),(0,f.default)("calling",e.props.onStart),!1!==e.props.onStart(t,c)&&!1!==e.mounted&&(e.props.enableUserSelectHack&&(0,u.addUserSelectStyles)(r),e.setState({dragging:!0,lastX:i,lastY:s}),(0,u.addEvent)(r,O.move,e.handleDrag),(0,u.addEvent)(r,O.stop,e.handleDragStop))}}})),w(m(e),"handleDrag",(function(t){var n=(0,l.getControlPosition)(t,e.state.touchIdentifier,m(e));if(null!=n){var r=n.x,o=n.y;if(Array.isArray(e.props.grid)){var a=r-e.state.lastX,i=o-e.state.lastY,u=p((0,l.snapToGrid)(e.props.grid,a,i),2);if(a=u[0],i=u[1],!a&&!i)return;r=e.state.lastX+a,o=e.state.lastY+i}var s=(0,l.createCoreData)(m(e),r,o);if((0,f.default)("DraggableCore: handleDrag: %j",s),!1!==e.props.onDrag(t,s)&&!1!==e.mounted)e.setState({lastX:r,lastY:o});else try{e.handleDragStop(new MouseEvent("mouseup"))}catch(d){var c=document.createEvent("MouseEvents");c.initMouseEvent("mouseup",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),e.handleDragStop(c)}}})),w(m(e),"handleDragStop",(function(t){if(e.state.dragging){var n=(0,l.getControlPosition)(t,e.state.touchIdentifier,m(e));if(null!=n){var r=n.x,o=n.y;if(Array.isArray(e.props.grid)){var a=r-e.state.lastX||0,i=o-e.state.lastY||0,s=p((0,l.snapToGrid)(e.props.grid,a,i),2);a=s[0],i=s[1],r=e.state.lastX+a,o=e.state.lastY+i}var c=(0,l.createCoreData)(m(e),r,o);if(!1===e.props.onStop(t,c)||!1===e.mounted)return!1;var d=e.findDOMNode();d&&e.props.enableUserSelectHack&&(0,u.removeUserSelectStyles)(d.ownerDocument),(0,f.default)("DraggableCore: handleDragStop: %j",c),e.setState({dragging:!1,lastX:NaN,lastY:NaN}),d&&((0,f.default)("DraggableCore: Removing handlers"),(0,u.removeEvent)(d.ownerDocument,O.move,e.handleDrag),(0,u.removeEvent)(d.ownerDocument,O.stop,e.handleDragStop))}}})),w(m(e),"onMouseDown",(function(t){return O=D,e.handleDragStart(t)})),w(m(e),"onMouseUp",(function(t){return O=D,e.handleDragStop(t)})),w(m(e),"onTouchStart",(function(t){return O=S,e.handleDragStart(t)})),w(m(e),"onTouchEnd",(function(t){return O=S,e.handleDragStop(t)})),e}return t=s,(n=[{key:"componentDidMount",value:function(){this.mounted=!0;var e=this.findDOMNode();e&&(0,u.addEvent)(e,S.start,this.onTouchStart,{passive:!1})}},{key:"componentWillUnmount",value:function(){this.mounted=!1;var e=this.findDOMNode();if(e){var t=e.ownerDocument;(0,u.removeEvent)(t,D.move,this.handleDrag),(0,u.removeEvent)(t,S.move,this.handleDrag),(0,u.removeEvent)(t,D.stop,this.handleDragStop),(0,u.removeEvent)(t,S.stop,this.handleDragStop),(0,u.removeEvent)(e,S.start,this.onTouchStart,{passive:!1}),this.props.enableUserSelectHack&&(0,u.removeUserSelectStyles)(t)}}},{key:"findDOMNode",value:function(){var e,t,n;return null!==(e=this.props)&&void 0!==e&&e.nodeRef?null===(t=this.props)||void 0===t||null===(n=t.nodeRef)||void 0===n?void 0:n.current:i.default.findDOMNode(this)}},{key:"render",value:function(){return o.cloneElement(o.Children.only(this.props.children),{onMouseDown:this.onMouseDown,onMouseUp:this.onMouseUp,onTouchEnd:this.onTouchEnd})}}])&&y(t.prototype,n),r&&y(t,r),Object.defineProperty(t,"prototype",{writable:!1}),s}(o.Component);t.default=P,w(P,"displayName","DraggableCore"),w(P,"propTypes",{allowAnyClick:a.default.bool,disabled:a.default.bool,enableUserSelectHack:a.default.bool,offsetParent:function(e,t){if(e[t]&&1!==e[t].nodeType)throw new Error("Draggable's offsetParent must be a DOM Node.")},grid:a.default.arrayOf(a.default.number),handle:a.default.string,cancel:a.default.string,nodeRef:a.default.object,onStart:a.default.func,onDrag:a.default.func,onStop:a.default.func,onMouseDown:a.default.func,scale:a.default.number,className:s.dontSetMe,style:s.dontSetMe,transform:s.dontSetMe}),w(P,"defaultProps",{allowAnyClick:!1,disabled:!1,enableUserSelectHack:!0,onStart:function(){},onDrag:function(){},onStop:function(){},onMouseDown:function(){},scale:1})},61193:function(e,t,n){var r=n(54857),o=r.default,a=r.DraggableCore;e.exports=o,e.exports.default=o,e.exports.DraggableCore=a},81825:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.addClassName=p,t.addEvent=function(e,t,n,r){if(!e)return;var o=l({capture:!0},r);e.addEventListener?e.addEventListener(t,n,o):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n},t.addUserSelectStyles=function(e){if(!e)return;var t=e.getElementById("react-draggable-style-el");t||((t=e.createElement("style")).type="text/css",t.id="react-draggable-style-el",t.innerHTML=".react-draggable-transparent-selection *::-moz-selection {all: inherit;}\n",t.innerHTML+=".react-draggable-transparent-selection *::selection {all: inherit;}\n",e.getElementsByTagName("head")[0].appendChild(t));e.body&&p(e.body,"react-draggable-transparent-selection")},t.createCSSTransform=function(e,t){var n=d(e,t,"px");return s({},(0,a.browserPrefixToKey)("transform",a.default),n)},t.createSVGTransform=function(e,t){return d(e,t,"")},t.getTouch=function(e,t){return e.targetTouches&&(0,o.findInArray)(e.targetTouches,(function(e){return t===e.identifier}))||e.changedTouches&&(0,o.findInArray)(e.changedTouches,(function(e){return t===e.identifier}))},t.getTouchIdentifier=function(e){if(e.targetTouches&&e.targetTouches[0])return e.targetTouches[0].identifier;if(e.changedTouches&&e.changedTouches[0])return e.changedTouches[0].identifier},t.getTranslation=d,t.innerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,o.int)(n.paddingTop),t-=(0,o.int)(n.paddingBottom)},t.innerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t-=(0,o.int)(n.paddingLeft),t-=(0,o.int)(n.paddingRight)},t.matchesSelector=c,t.matchesSelectorAndParentsTo=function(e,t,n){var r=e;do{if(c(r,t))return!0;if(r===n)return!1;r=r.parentNode}while(r);return!1},t.offsetXYFromParent=function(e,t,n){var r=t===t.ownerDocument.body?{left:0,top:0}:t.getBoundingClientRect(),o=(e.clientX+t.scrollLeft-r.left)/n,a=(e.clientY+t.scrollTop-r.top)/n;return{x:o,y:a}},t.outerHeight=function(e){var t=e.clientHeight,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,o.int)(n.borderTopWidth),t+=(0,o.int)(n.borderBottomWidth)},t.outerWidth=function(e){var t=e.clientWidth,n=e.ownerDocument.defaultView.getComputedStyle(e);return t+=(0,o.int)(n.borderLeftWidth),t+=(0,o.int)(n.borderRightWidth)},t.removeClassName=g,t.removeEvent=function(e,t,n,r){if(!e)return;var o=l({capture:!0},r);e.removeEventListener?e.removeEventListener(t,n,o):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},t.removeUserSelectStyles=function(e){if(!e)return;try{if(e.body&&g(e.body,"react-draggable-transparent-selection"),e.selection)e.selection.empty();else{var t=(e.defaultView||window).getSelection();t&&"Caret"!==t.type&&t.removeAllRanges()}}catch(n){}};var o=n(9280),a=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!==typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var o={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&Object.prototype.hasOwnProperty.call(e,u)){var l=a?Object.getOwnPropertyDescriptor(e,u):null;l&&(l.get||l.set)?Object.defineProperty(o,u,l):o[u]=e[u]}o.default=e,n&&n.set(e,o);return o}(n(38650));function i(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t0&&void 0!==arguments[0]?arguments[0]:"transform";if("undefined"===typeof window)return"";var a=null===(e=window.document)||void 0===e||null===(t=e.documentElement)||void 0===t?void 0:t.style;if(!a)return"";if(r in a)return"";for(var i=0;i: Unmounted during event!");return t}},9280:function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.dontSetMe=function(e,t,n){if(e[t])return new Error("Invalid prop ".concat(t," passed to ").concat(n," - do not set this, set it on the child."))},t.findInArray=function(e,t){for(var n=0,r=e.length;ne.x+e.w||t.x+t.we.y+e.h)},getColorShade:function(e,t){(e=String(e).replace(/[^0-9a-f]/gi,"")).length<6&&(e=e[0]+e[0]+e[1]+e[1]+e[2]+e[2]),t=t||0;for(var r="#",i=0;i<3;i++){var n=parseInt(e.substr(2*i,2),16);r+=("00"+(n=Math.round(Math.min(Math.max(0,n+n*t),255)).toString(16))).substr(n.length)}return r},initSegmentColors:function(e){for(var t=e.options.data.content,r=e.options.misc.colors.segments,i=[],n=0;n=t.value?(i.push(e[c]),n+=e[c].value,s++):(e[c].isGrouped=!1,r.push(e[c]))}else if("percentage"===t.valueType){var d=l.getTotalPieSize(e);for(c=0;c99?99:o)<0?0:o;var l=i0&&(l-=u)}a=Math.floor(l/100*o)/2}else a=parseInt(t.pieOuterRadius,10);/%/.test(t.pieInnerRadius)?(o=(o=(o=parseInt(t.pieInnerRadius.replace(/[\D]/,""),10))>99?99:o)<0?0:o,s=Math.floor(a/100*o)):s=parseInt(t.pieInnerRadius,10),e.innerRadius=s,e.outerRadius=a},getTotalPieSize:function(e){for(var t=0,r=0;rt.label.toLowerCase()?1:-1}));break;case"label-desc":t.sort((function(e,t){return e.label.toLowerCase()n.truncation.truncateLength&&(r=e.label.substring(0,n.truncation.truncateLength)+"..."),r})).style("font-size",n.mainLabel.fontSize).style("font-family",n.mainLabel.font).style("font-weight",n.mainLabel.fontWeight).style("fill",(function(t,r){return"segment"===n.mainLabel.color?e.options.colors[r]:n.mainLabel.color})),i.percentage&&o.append("text").attr("id",(function(r,i){return e.cssPrefix+"segmentPercentage"+i+"-"+t})).attr("class",e.cssPrefix+"segmentPercentage-"+t).text((function(e,t){var r=e.percentage;return n.formatter?(a.index=t,a.part="percentage",a.value=e.value,a.label=e.percentage,r=n.formatter(a)):r+="%",r})).style("font-size",n.percentage.fontSize).style("font-family",n.percentage.font).style("font-weight",n.percentage.fontWeight).style("fill",n.percentage.color),i.value&&o.append("text").attr("id",(function(r,i){return e.cssPrefix+"segmentValue"+i+"-"+t})).attr("class",e.cssPrefix+"segmentValue-"+t).text((function(e,t){return a.index=t,a.part="value",a.value=e.value,a.label=e.value,a.realLabel=e.label,n.formatter?n.formatter(a,e.value):e.value})).style("font-size",n.value.fontSize).style("font-family",n.value.font).style("font-weight",n.value.fontWeight).style("fill",n.value.color)},positionLabelElements:function(e,t,r){c["dimensions-"+t]=[],e.__labels[t].each((function(r,i){var n=o.select(this).selectAll("."+e.cssPrefix+"segmentMainLabel-"+t),s=o.select(this).selectAll("."+e.cssPrefix+"segmentPercentage-"+t),a=o.select(this).selectAll("."+e.cssPrefix+"segmentValue-"+t);c["dimensions-"+t].push({mainLabel:null!==n.node()?n.node().getBBox():null,percentage:null!==s.node()?s.node().getBBox():null,value:null!==a.node()?a.node().getBBox():null})}));var i=5,n=c["dimensions-"+t];switch(r){case"label-value1":e.svg.selectAll("."+e.cssPrefix+"segmentValue-"+t).attr("dx",(function(e,t){return n[t].mainLabel.width+i}));break;case"label-value2":e.svg.selectAll("."+e.cssPrefix+"segmentValue-"+t).attr("dy",(function(e,t){return n[t].mainLabel.height}));break;case"label-percentage1":e.svg.selectAll("."+e.cssPrefix+"segmentPercentage-"+t).attr("dx",(function(e,t){return n[t].mainLabel.width+i}));break;case"label-percentage2":e.svg.selectAll("."+e.cssPrefix+"segmentPercentage-"+t).attr("dx",(function(e,t){return n[t].mainLabel.width/2-n[t].percentage.width/2})).attr("dy",(function(e,t){return n[t].mainLabel.height}))}},computeLabelLinePositions:function(e){e.lineCoordGroups=[],e.__labels.outer.each((function(t,r){return c.computeLinePosition(e,r)}))},computeLinePosition:function(e,t){var r,i,n,s,o=f.getSegmentAngle(t,e.options.data.content,e.totalSize,{midpoint:!0}),a=l.rotate(e.pieCenter.x,e.pieCenter.y-e.outerRadius,e.pieCenter.x,e.pieCenter.y,o),u=e.outerLabelGroupData[t].h/5,c=6,d=Math.floor(o/90),p=4;switch(2===d&&180===o&&(d=1),d){case 0:r=e.outerLabelGroupData[t].x-c-(e.outerLabelGroupData[t].x-c-a.x)/2,i=e.outerLabelGroupData[t].y+(a.y-e.outerLabelGroupData[t].y)/p,n=e.outerLabelGroupData[t].x-c,s=e.outerLabelGroupData[t].y-u;break;case 1:r=a.x+(e.outerLabelGroupData[t].x-a.x)/p,i=a.y+(e.outerLabelGroupData[t].y-a.y)/p,n=e.outerLabelGroupData[t].x-c,s=e.outerLabelGroupData[t].y-u;break;case 2:var m=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+c;r=a.x-(a.x-m)/p,i=a.y+(e.outerLabelGroupData[t].y-a.y)/p,n=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+c,s=e.outerLabelGroupData[t].y-u;break;case 3:var g=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+c;r=g+(a.x-g)/p,i=e.outerLabelGroupData[t].y+(a.y-e.outerLabelGroupData[t].y)/p,n=e.outerLabelGroupData[t].x+e.outerLabelGroupData[t].w+c,s=e.outerLabelGroupData[t].y-u}"straight"===e.options.labels.lines.style?e.lineCoordGroups[t]=[{x:a.x,y:a.y},{x:n,y:s}]:e.lineCoordGroups[t]=[{x:a.x,y:a.y},{x:r,y:i},{x:n,y:s}]},addLabelLines:function(e){var t=e.svg.insert("g","."+e.cssPrefix+"pieChart").attr("class",e.cssPrefix+"lineGroups").style("opacity",1).selectAll("."+e.cssPrefix+"lineGroup").data(e.lineCoordGroups).enter().append("g").attr("class",e.cssPrefix+"lineGroup"),r=o.line().curve(o.curveBasis).x((function(e){return e.x})).y((function(e){return e.y}));t.append("path").attr("d",r).attr("stroke",(function(t,r){return"segment"===e.options.labels.lines.color?e.options.colors[r]:e.options.labels.lines.color})).attr("stroke-width",1).attr("fill","none").style("opacity",(function(t,r){var i=e.options.labels.outer.hideWhenLessThanPercentage;return null!==i&&t.percentage0){var c=f.getSegmentAngle(i,e.options.data.content,e.totalSize,{midpoint:!0}),d=l.translate(e.pieCenter.x,e.pieCenter.y,e.innerRadius,c);u.x=d.x,u.y=d.y}var p=s.getDimensions(e.cssPrefix+"labelGroup"+i+"-inner"),m=p.w/2,g=p.h/4;n=u.x+(e.lineCoordGroups[i][0].x-u.x)/1.8,o=u.y+(e.lineCoordGroups[i][0].y-u.y)/1.8,n-=m,o+=g}return"translate("+n+","+o+")"}))},getIncludes:function(e){var t=!1,r=!1,i=!1;switch(e){case"label":t=!0;break;case"value":r=!0;break;case"percentage":i=!0;break;case"label-value1":case"label-value2":t=!0,r=!0;break;case"label-percentage1":case"label-percentage2":t=!0,i=!0}return{mainLabel:t,value:r,percentage:i}},computeOuterLabelCoords:function(e){e.__labels.outer.each((function(t,r){return c.getIdealOuterLabelPositions(e,r)})),c.resolveOuterLabelCollisions(e)},resolveOuterLabelCollisions:function(e){if("none"!==e.options.labels.outer.format){var t=e.options.data.content.length;c.checkConflict(e,0,"clockwise",t),c.checkConflict(e,t-1,"anticlockwise",t)}},checkConflict:function(e,t,r,i){var n,o;if(!(i<=1)){var a=e.outerLabelGroupData[t].hs;if(("clockwise"!==r||"right"===a)&&("anticlockwise"!==r||"left"===a)){var l="clockwise"===r?t+1:t-1,u=e.outerLabelGroupData[t],d=e.outerLabelGroupData[l],f={labelHeights:e.outerLabelGroupData[0].h,center:e.pieCenter,lineLength:e.outerRadius+e.options.labels.outer.pieDistance,heightChange:e.outerLabelGroupData[0].h+1};if("clockwise"===r){for(n=0;n<=t;n++)if(o=e.outerLabelGroupData[n],!c.isLabelHidden(e,n)&&s.rectIntersect(o,d)){c.adjustLabelPos(e,l,u,f);break}}else for(n=i-1;n>=t;n--)if(o=e.outerLabelGroupData[n],!c.isLabelHidden(e,n)&&s.rectIntersect(o,d)){c.adjustLabelPos(e,l,u,f);break}c.checkConflict(e,l,r,i)}}},isLabelHidden:function(e,t){var r=e.options.labels.outer.hideWhenLessThanPercentage;return null!==r&&d.percentageMath.abs(s)?Math.sqrt(i.lineLength*i.lineLength-s*s):Math.sqrt(s*s-i.lineLength*i.lineLength),o="right"===r.hs?i.center.x+n:i.center.x-n-e.outerLabelGroupData[t].w,e.outerLabelGroupData[t].x=o,e.outerLabelGroupData[t].y=a},getIdealOuterLabelPositions:function(e,t){var r=e.svg.select("#"+e.cssPrefix+"labelGroup"+t+"-outer").node();if(r){var i=r.getBBox(),n=f.getSegmentAngle(t,e.options.data.content,e.totalSize,{midpoint:!0}),s=e.pieCenter.x,o=e.pieCenter.y-(e.outerRadius+e.options.labels.outer.pieDistance),a=l.rotate(s,o,e.pieCenter.x,e.pieCenter.y,n),u="right";n>180?(a.x-=i.width+8,u="left"):a.x+=8,e.outerLabelGroupData[t]={x:a.x,y:a.y,w:i.width,h:i.height,hs:u}}}},f={effectMap:{none:o.easeLinear,bounce:o.easeBounce,linear:o.easeLinear,sin:o.easeSin,elastic:o.easeElastic,back:o.easeBack,quad:o.easeQuad,circle:o.easeCircle,exp:o.easeExp},create:function(e){var t=e.pieCenter,r=e.options.colors,i=(e.options.effects.load,e.options.misc.colors.segmentStroke),n=e.svg.insert("g","#"+e.cssPrefix+"title").attr("transform",(function(){return l.getPieTranslateCenter(t)})).attr("class",e.cssPrefix+"pieChart"),s=o.arc().innerRadius(e.innerRadius).outerRadius(e.outerRadius).startAngle(0).endAngle((function(t){return t.value/e.totalSize*2*Math.PI}));n.selectAll("."+e.cssPrefix+"arc").data(e.options.data.content).enter().append("g").attr("class",e.cssPrefix+"arc").append("path").attr("id",(function(t,r){return e.cssPrefix+"segment"+r})).attr("fill",(function(t,i){var n=r[i];return e.options.misc.gradient.enabled&&(n="url(#"+e.cssPrefix+"grad"+i+")"),n})).style("stroke",i).style("stroke-width",1).attr("data-index",(function(e,t){return t})).attr("d",s),e.svg.selectAll("g."+e.cssPrefix+"arc").attr("transform",(function(t,r){var i=0;return r>0&&(i=f.getSegmentAngle(r-1,e.options.data.content,e.totalSize)),"rotate("+i+")"})),e.arc=s},addGradients:function(e){var t=e.svg.append("defs").selectAll("radialGradient").data(e.options.data.content).enter().append("radialGradient").attr("gradientUnits","userSpaceOnUse").attr("cx",0).attr("cy",0).attr("r","120%").attr("id",(function(t,r){return e.cssPrefix+"grad"+r}));t.append("stop").attr("offset","0%").style("stop-color",(function(t,r){return e.options.colors[r]})),t.append("stop").attr("offset",e.options.misc.gradient.percentage+"%").style("stop-color",e.options.misc.gradient.color)},addSegmentEventHandlers:function(e){var t=e.svg.selectAll("."+e.cssPrefix+"arc");(t=t.merge(e.__labels.inner.merge(e.__labels.outer))).on("click",(function(){var t,r=o.select(this);if(r.attr("class")===e.cssPrefix+"arc")t=r.select("path");else{var i=r.attr("data-index");t=o.select("#"+e.cssPrefix+"segment"+i)}var n=t.attr("class")===e.cssPrefix+"expanded";f.onSegmentEvent(e,e.options.callbacks.onClickSegment,t,n),"none"!==e.options.effects.pullOutSegmentOnClick.effect&&(n?f.closeSegment(e,t.node()):f.openSegment(e,t.node()))})),t.on("mouseover",(function(){var t,r,i=o.select(this);if(i.attr("class")===e.cssPrefix+"arc"?t=i.select("path"):(r=i.attr("data-index"),t=o.select("#"+e.cssPrefix+"segment"+r)),e.options.effects.highlightSegmentOnMouseover){r=t.attr("data-index");var n=e.options.colors[r];t.style("fill",s.getColorShade(n,e.options.effects.highlightLuminosity))}e.options.tooltips.enabled&&(r=t.attr("data-index"),m.showTooltip(e,r));var a=t.attr("class")===e.cssPrefix+"expanded";f.onSegmentEvent(e,e.options.callbacks.onMouseoverSegment,t,a)})),t.on("mousemove",(function(){m.moveTooltip(e)})),t.on("mouseout",(function(){var t,r,i=o.select(this);if(i.attr("class")===e.cssPrefix+"arc"?t=i.select("path"):(r=i.attr("data-index"),t=o.select("#"+e.cssPrefix+"segment"+r)),e.options.effects.highlightSegmentOnMouseover){r=t.attr("data-index");var n=e.options.colors[r];e.options.misc.gradient.enabled&&(n="url(#"+e.cssPrefix+"grad"+r+")"),t.style("fill",n)}e.options.tooltips.enabled&&(r=t.attr("data-index"),m.hideTooltip(e,r));var s=t.attr("class")===e.cssPrefix+"expanded";f.onSegmentEvent(e,e.options.callbacks.onMouseoutSegment,t,s)}))},onSegmentEvent:function(e,t,r,i){if(s.isFunction(t)){var n=parseInt(r.attr("data-index"),10);t({segment:r.node(),index:n,expanded:i,data:e.options.data.content[n]})}},openSegment:function(e,t){e.isOpeningSegment||(e.isOpeningSegment=!0,f.maybeCloseOpenSegment(e),o.select(t).transition().ease(f.effectMap[e.options.effects.pullOutSegmentOnClick.effect]).duration(e.options.effects.pullOutSegmentOnClick.speed).attr("transform",(function(t,r){var i=e.arc.centroid(t),n=i[0],s=i[1],o=Math.sqrt(n*n+s*s),a=parseInt(e.options.effects.pullOutSegmentOnClick.size,10);return"translate("+n/o*a+","+s/o*a+")"})).on("end",(function(r,i){e.currentlyOpenSegment=t,e.isOpeningSegment=!1,o.select(t).attr("class",e.cssPrefix+"expanded")})))},maybeCloseOpenSegment:function(e){"undefined"!==typeof e&&e.svg.selectAll("."+e.cssPrefix+"expanded").size()>0&&f.closeSegment(e,e.svg.select("."+e.cssPrefix+"expanded").node())},closeSegment:function(e,t){o.select(t).transition().duration(400).attr("transform","translate(0,0)").on("end",(function(r,i){o.select(t).attr("class",""),e.currentlyOpenSegment=null}))},getCentroid:function(e){var t=e.getBBox();return{x:t.x+t.width/2,y:t.y+t.height/2}},getSegmentAngle:function(e,t,r,i){var n,s=a({compounded:!0,midpoint:!1},i),o=t[e].value;if(s.compounded){n=0;for(var l=0;l<=e;l++)n+=t[l].value}"undefined"===typeof n&&(n=o);var u=n/r*360;return s.midpoint&&(u-=o/r*360/2),u}},p={offscreenCoord:-1e4,addTitle:function(e){e.__title=e.svg.selectAll("."+e.cssPrefix+"title").data([e.options.header.title]).enter().append("text").text((function(e){return e.text})).attr("id",e.cssPrefix+"title").attr("class",e.cssPrefix+"title").attr("x",p.offscreenCoord).attr("y",p.offscreenCoord).attr("text-anchor",(function(){return"top-center"===e.options.header.location||"pie-center"===e.options.header.location?"middle":"left"})).attr("fill",(function(e){return e.color})).style("font-size",(function(e){return e.fontSize})).style("font-weight",(function(e){return e.fontWeight})).style("font-family",(function(e){return e.font}))},positionTitle:function(e){var t,r=e.textComponents,i=e.options.header.location,n=e.options.misc.canvasPadding,s=e.options.size.canvasWidth,o=e.options.header.titleSubtitlePadding;t="top-left"===i?n.left:(s-n.right)/2+n.left,t+=e.options.misc.pieCenterOffset.x;var a=n.top+r.title.h;"pie-center"===i&&(a=e.pieCenter.y,r.subtitle.exists?a=a-(r.title.h+o+r.subtitle.h)/2+r.title.h:a+=r.title.h/4),e.__title.attr("x",t).attr("y",a)},addSubtitle:function(e){var t=e.options.header.location;e.__subtitle=e.svg.selectAll("."+e.cssPrefix+"subtitle").data([e.options.header.subtitle]).enter().append("text").text((function(e){return e.text})).attr("x",p.offscreenCoord).attr("y",p.offscreenCoord).attr("id",e.cssPrefix+"subtitle").attr("class",e.cssPrefix+"subtitle").attr("text-anchor",(function(){return"top-center"===t||"pie-center"===t?"middle":"left"})).attr("fill",(function(e){return e.color})).style("font-size",(function(e){return e.fontSize})).style("font-weight",(function(e){return e.fontWeight})).style("font-family",(function(e){return e.font}))},positionSubtitle:function(e){var t,r=e.options.misc.canvasPadding,i=e.options.size.canvasWidth;t="top-left"===e.options.header.location?r.left:(i-r.right)/2+r.left,t+=e.options.misc.pieCenterOffset.x;var n=p.getHeaderHeight(e);e.__subtitle.attr("x",t).attr("y",n)},addFooter:function(e){e.__footer=e.svg.selectAll("."+e.cssPrefix+"footer").data([e.options.footer]).enter().append("text").text((function(e){return e.text})).attr("x",p.offscreenCoord).attr("y",p.offscreenCoord).attr("id",e.cssPrefix+"footer").attr("class",e.cssPrefix+"footer").attr("text-anchor",(function(){var t="left";return"bottom-center"===e.options.footer.location?t="middle":"bottom-right"===e.options.footer.location&&(t="left"),t})).attr("fill",(function(e){return e.color})).style("font-size",(function(e){return e.fontSize})).style("font-weight",(function(e){return e.fontWeight})).style("font-family",(function(e){return e.font}))},positionFooter:function(e){var t,r=e.options.footer.location,i=e.textComponents.footer.w,n=e.options.size.canvasWidth,s=e.options.size.canvasHeight,o=e.options.misc.canvasPadding;t="bottom-left"===r?o.left:"bottom-right"===r?n-i-o.right:n/2,e.__footer.attr("x",t).attr("y",s-o.bottom)},getHeaderHeight:function(e){var t;if(e.textComponents.title.exists){var r=e.textComponents.title.h+e.options.header.titleSubtitlePadding+e.textComponents.subtitle.h;t="pie-center"===e.options.header.location?e.pieCenter.y-r/2+r:r+e.options.misc.canvasPadding.top}else if("pie-center"===e.options.header.location){var i=e.options.misc.canvasPadding.bottom+e.textComponents.footer.h;t=(e.options.size.canvasHeight-i)/2+e.options.misc.canvasPadding.top+e.textComponents.subtitle.h/2}else t=e.options.misc.canvasPadding.top+e.textComponents.subtitle.h;return t}},m={addTooltips:function(e){var t=e.svg.insert("g").attr("class",e.cssPrefix+"tooltips");t.selectAll("."+e.cssPrefix+"tooltip").data(e.options.data.content).enter().append("g").attr("class",e.cssPrefix+"tooltip").attr("id",(function(t,r){return e.cssPrefix+"tooltip"+r})).style("opacity",0).append("rect").attr("rx",e.options.tooltips.styles.borderRadius).attr("ry",e.options.tooltips.styles.borderRadius).attr("x",-e.options.tooltips.styles.padding).attr("opacity",e.options.tooltips.styles.backgroundOpacity).style("fill",e.options.tooltips.styles.backgroundColor),t.selectAll("."+e.cssPrefix+"tooltip").data(e.options.data.content).append("text").attr("fill",(function(t){return e.options.tooltips.styles.color})).style("font-size",(function(t){return e.options.tooltips.styles.fontSize})).style("font-weight",(function(t){return e.options.tooltips.styles.fontWeight})).style("font-family",(function(t){return e.options.tooltips.styles.font})).text((function(t,r){var i=e.options.tooltips.string;return"caption"===e.options.tooltips.type&&(i=t.caption),m.replacePlaceholders(e,i,r,{label:t.label,value:t.value,percentage:t.percentage})})),t.selectAll("."+e.cssPrefix+"tooltip rect").attr("width",(function(t,r){return s.getDimensions(e.cssPrefix+"tooltip"+r).w+2*e.options.tooltips.styles.padding})).attr("height",(function(t,r){return s.getDimensions(e.cssPrefix+"tooltip"+r).h+2*e.options.tooltips.styles.padding})).attr("y",(function(t,r){return-s.getDimensions(e.cssPrefix+"tooltip"+r).h/2+1}))},showTooltip:function(e,t){var r=e.options.tooltips.styles.fadeInSpeed;m.currentTooltip===t&&(r=1),m.currentTooltip=t,o.select("#"+e.cssPrefix+"tooltip"+t).transition().duration(r).style("opacity",(function(){return 1})),m.moveTooltip(e)},moveTooltip:function(e){o.selectAll("#"+e.cssPrefix+"tooltip"+m.currentTooltip).attr("transform",(function(t){var r=o.pointer(this.parentNode);return"translate("+(r[0]+e.options.tooltips.styles.padding+2)+","+(r[1]-2*e.options.tooltips.styles.padding-2)+")"}))},hideTooltip:function(e,t){o.select("#"+e.cssPrefix+"tooltip"+t).style("opacity",(function(){return 0})),o.select("#"+e.cssPrefix+"tooltip"+m.currentTooltip).attr("transform",(function(t,r){return"translate("+(e.options.size.canvasWidth+1e3)+","+(e.options.size.canvasHeight+1e3)+")"}))},replacePlaceholders:function(e,t,r,i){s.isFunction(e.options.tooltips.placeholderParser)&&e.options.tooltips.placeholderParser(r,i);var n=function(){return function(e){var t=arguments[1];return i.hasOwnProperty(t)?i[arguments[1]]:arguments[0]}};return t.replace(/\{(\w+)\}/g,n(i))}},g=function(s,l){if(this.element=s,"string"===typeof s){var u=s.replace(/^#/,"");this.element=document.getElementById(u)}var c={};a(!0,c,i,l),this.options=c,null!==this.options.misc.cssPrefix?this.cssPrefix=this.options.misc.cssPrefix:(this.cssPrefix="p"+r+"_",r++),n.initialCheck(this)&&(o.select(this.element).attr(e,t),b.call(this),h.call(this))};g.prototype.recreate=function(){n.initialCheck(this)&&(b.call(this),h.call(this))},g.prototype.redraw=function(){this.element.innerHTML="",h.call(this)},g.prototype.destroy=function(){this.element.innerHTML="",o.select(this.element).attr(e,null)},g.prototype.getOpenSegment=function(){var e=this.currentlyOpenSegment;if(null!==e&&"undefined"!==typeof e){var t=parseInt(o.select(e).attr("data-index"),10);return{element:e,index:t,data:this.options.data.content[t]}}return null},g.prototype.openSegment=function(e){(e=parseInt(e,10))<0||e>this.options.data.content.length-1||f.openSegment(this,o.select("#"+this.cssPrefix+"segment"+e).node())},g.prototype.closeSegment=function(){f.maybeCloseOpenSegment(this)},g.prototype.updateProp=function(e,t){switch(e){case"header.title.text":var r=s.processObj(this.options,e);s.processObj(this.options,e,t),o.select("#"+this.cssPrefix+"title").html(t),(""===r&&""!==t||""!==r&&""===t)&&this.redraw();break;case"header.subtitle.text":var i=s.processObj(this.options,e);s.processObj(this.options,e,t),o.select("#"+this.cssPrefix+"subtitle").html(t),(""===i&&""!==t||""!==i&&""===t)&&this.redraw();break;case"callbacks.onload":case"callbacks.onMouseoverSegment":case"callbacks.onMouseoutSegment":case"callbacks.onClickSegment":case"effects.pullOutSegmentOnClick.effect":case"effects.pullOutSegmentOnClick.speed":case"effects.pullOutSegmentOnClick.size":case"effects.highlightSegmentOnMouseover":case"effects.highlightLuminosity":s.processObj(this.options,e,t);break;default:s.processObj(this.options,e,t),this.destroy(),this.recreate()}};var b=function(){this.options.data.content=l.sortPieData(this),this.options.data.smallSegmentGrouping.enabled&&(this.options.data.content=s.applySmallSegmentGrouping(this.options.data.content,this.options.data.smallSegmentGrouping)),this.options.colors=s.initSegmentColors(this),this.totalSize=l.getTotalPieSize(this.options.data.content);for(var e=this.options.labels.percentage.decimalPlaces,t=0;te.getDygraph().getArea().h-10)return"ANNOTATIONS";if(i<15)return"ANOMALY_RATE";for(var n=r[0],s=Math.abs(r[0].canvasy-i),o=1;oe.length)&&(t=e.length);for(var r=0,i=new Array(t);r1&&j.length>1,stackedGraphNaNFill:"none",plotter:c,errorBars:v,axes:{x:o?{ticker:i.default.dateTicker,axisLabelFormatter:t.formatXAxis,axisLabelWidth:60}:{drawAxis:!1},y:l?y(y(y({},P&&{ticker:P}),{},{axisLabelFormatter:A},u&&{axisLabelWidth:u}),{},{pixelsPerLabel:15}):{drawAxis:!1}},ylabel:t.getAttribute("hasYlabel")&&t.getUnitSign({long:!0,withoutConversion:(0,a.isHeatmap)(n)})}},S=function(){var e=h.chart.getThemeAttribute("themeGridColor");return{axisLineColor:e,gridLineColor:e}},M=function(){var e=t.getPayloadDimensionIds(),r=t.getPayload().labels;if(null==e||!e.length||null==r||!r.length)return{visibility:!1};var i=r.length-e.length,n=Array(i>0?i:0).fill(!0),s=t.getAttribute("selectedLegendDimensions");return{visibility:[].concat(g(e.map(s.length?t.isDimensionVisible:function(){return!0})),g(n))}},D=function(){var e=t.getAttributes(),r=e.outOfLimits,i=e.getValueRange,n=e.staticValueRange,s=e.chartType,o=t.getPayload(),l=o.data,u=o.labels,c=t.getDateWindow(),d=r||0===l.length;return{file:d?[[0]]:l,labels:d?["X"]:u,dateWindow:c,valueRange:n||((0,a.isHeatmap)(s)?[0,t.getVisibleDimensionIds().length]:i(t,{dygraph:!0}))}},B=function(){return t.isSparkline()?{drawGrid:!1,drawAxis:!1,ylabel:void 0,yLabelWidth:0,highlightCircleSize:3,fillAlpha:1,strokeWidth:0}:null},E=function(){var e=t.getPayloadDimensionIds();return e.length?{colors:e.map(t.selectDimensionColor)}:{}},T=y(y({},h),{},{getChartWidth:function(){return v?v.getArea().w:h.getChartWidth()},getChartHeight:function(){return v?v.getArea().h:100},getPreceded:function(){if(!v)return-1;if(1e3*t.getFirstEntry()u+c)){i.zoomMoved=!0,i.dragEndX=(0,s.dragGetX_)(e,i);var d=i.dragStartX,f=i.dragEndX;n.clearRect(0,0,o.width,o.height),n.fillStyle="rgba(128,128,128,0.3)",n.fillRect(Math.min(d,f),a.y,Math.abs(f-d),a.h),i.prevEndX=f,r=f}}},o=function n(s,o,a){if(a.isZooming){o.clearZoomRect_(),a.destroy();var l=function(e){return-1===r||Math.abs(t-r)<5?null:[Math.round(e.toDataXCoord(t)/1e3),Math.round(e.toDataXCoord(r)/1e3)].sort((function(e,t){return e-t}))}(o);e.sdk.trigger("highlightEnd",e.chart,l)}e.off("mousemove",i),e.off("mouseup",n)};return e.on("mousedown",(function(s,a,l){e.sdk.trigger("highlightStart",e.chart),l.initializeMouseDown(s,a,l),n.default.startZoom(s,a,l),t=l.dragStartX,r=-1,e.on("mousemove",i).on("mouseup",o)}))}},37108:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(7494))&&i.__esModule?i:{default:i},s=r(72247);t.default=function(e){var t,r,i=function(e,t,i){if(i.isZooming){var n=t.canvas_ctx_,o=t.canvas_,a=o.getBoundingClientRect();if(!(e.pageYa.bottom)){i.zoomMoved=!0,i.dragEndY=(0,s.dragGetY_)(e,i);var l=i.dragStartY,u=i.dragEndY,c=t.getArea();n.clearRect(0,0,o.width,o.height),n.fillStyle="rgba(128,128,128,0.3)",n.fillRect(c.x,Math.min(l,u),c.w,Math.abs(u-l)),i.prevEndY=u,r=u}}},o=function n(s,o,a){if(a.isZooming){o.clearZoomRect_(),a.destroy();var l=-1===r||Math.abs(t-r)<5?null:[o.toDataYCoord(t),o.toDataYCoord(r)].sort((function(e,t){return e-t}));e.sdk.trigger("highlightVerticalEnd",e.chart,l)}e.off("mousemove",i),e.off("mouseup",n)};return e.on("mousedown",(function(s,a,l){e.sdk.trigger("highlightVerticalStart",e.chart),l.initializeMouseDown(s,a,l),n.default.startZoom(s,a,l),t=l.dragStartY,r=-1,e.on("mousemove",i).on("mouseup",o)}))}},1991:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=r(41062),n={warning:"#F9A825",critical:"#FF4136",clear:"#00AB44"};t.default=function(e,t){var r=e.chart.getAttribute("overlays")[t],s=r.when,o=r.status,a=e.getDygraph(),l=a.getArea().h,u=a.hidden_ctx_,c=(0,i.getArea)(a,[s,s]);if(!c)return(0,i.trigger)(e,t);var d=c.from;(0,i.trigger)(e,t,c),u.save(),u.beginPath(),u.moveTo(d-1,0),u.lineTo(d-1,l),u.globalAlpha=1,u.lineWidth=2,u.setLineDash([4,4]),u.strokeStyle=n[o],u.stroke(),u.closePath(),u.restore()}},3288:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=r(41062),n={warning:"#FFF8E1",critical:"#FFEBEF",clear:"#E5F5E8"},s={warning:"#FFC300",critical:"#F59B9B",clear:"#68C47D"},o={warning:"#F9A825",critical:"#FF4136",clear:"#00AB44"};t.default=function(e,t){var r=e.chart.getAttribute("overlays")[t],a=r.whenTriggered,l=r.whenLast,u=void 0===l?Math.floor((new Date).getTime()/1e3):l,c=r.status,d=e.getDygraph(),f=d.getArea().h,p=d.hidden_ctx_,m=(0,i.getArea)(d,[a,u]);if(!m)return(0,i.trigger)(e,t);var g=m.from,b=m.width,h=m.to;(0,i.trigger)(e,t,m),p.save(),p.beginPath(),p.rect(g,0,b,f-1),p.fillStyle=s[c],p.globalAlpha=.1,p.fill();p.beginPath(),p.moveTo(g,0),p.lineTo(g,f),p.globalAlpha=1,p.lineWidth=2,p.setLineDash([4,4]),p.strokeStyle=n[c],p.stroke(),p.beginPath(),p.moveTo(h-2,0),p.lineTo(h-2,f),p.strokeStyle=o[c],p.stroke(),p.closePath(),p.restore()}},41062:function(e,t){"use strict";t.__esModule=!0,t.trigger=t.getArea=void 0;t.getArea=function(e,t){var r=e.xAxisRange(),i=r[0],n=r[1],s=1e3*t[0],o=1e3*t[1];if(on)return null;var a=Math.max(i,s),l=Math.min(n,o),u=e.toDomXCoord(a),c=e.toDomXCoord(l);return{from:u,to:c,width:c-u}};t.trigger=function(e,t,r){return requestAnimationFrame((function(){return e.trigger("overlayedAreaChanged:"+t,r)}))}},4241:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=r(41062);t.default=function(e,t){var r=e.chart.getAttribute("overlays")[t].range;if(r){var n=e.getDygraph(),s=n.getArea().h,o=n.hidden_ctx_,a=(0,i.getArea)(n,r);if(!a)return(0,i.trigger)(e,t);var l=a.from,u=a.width;(0,i.trigger)(e,t,a),o.save(),o.beginPath(),o.rect(l,0,u,s-1),o.fillStyle="rgba(207, 213, 218, 0.12)",o.fill(),o.beginPath(),o.rect(l,0,0,s-1),o.rect(l+u,0,0,s-1),o.fill(),o.setLineDash([2,7]),o.lineWidth=1,o.strokeStyle="#CFD5DA",o.stroke(),o.stroke(),o.closePath(),o.restore()}}},34613:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=(i=r(82415))&&i.__esModule?i:{default:i};t.default=function(e){var t=null,r=function(t){var r=e.chart.getAttribute("overlays")[t].type,i=n.default[r];i&&i(e,t)},i=function(){var t=e.chart.getAttribute("overlays");Object.keys(t).forEach(r)},s=function(){var t=e.getDygraph();t&&t.renderGraph_(!1)},o=function(){t&&(s(),t(),t=null)};return{toggle:function(){var r=e.chart.getAttribute("overlays");if(!Object.keys(r).length)return o();t?s():t=e.on("underlayCallback",i)},destroy:o}}},85362:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=r(41062);t.default=function(e,t){var r=e.getDygraph(),n=r.xAxisRange()[1],s=n/1e3,o=e.chart.getFirstEntry(),a=e.chart.getAttributes(),l=a.outOfLimits,u=a.error;if(l||o&&!(o>s)||u){var c=l||u?[n,n]:[o,o],d=(0,i.getArea)(r,c);(0,i.trigger)(e,t,d)}}},82415:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=a(r(1991)),n=a(r(3288)),s=a(r(4241)),o=a(r(85362));function a(e){return e&&e.__esModule?e:{default:e}}var l={alarm:i.default,alarmRange:n.default,highlight:s.default,proceeded:o.default};t.default=l},9806:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=r(35890);function n(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);r(i||0)?e:i||0:e}),0);r.strokeStyle=r.fillStyle=a(s),r.fillRect(i-o/2,0,o,15),r.strokeRect(i-o/2,0,o,15)}))}}}},43492:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=r(93501);t.default=function(e){return function(t){if(e&&0===t.seriesIndex){var r=e.chart.getVisibleDimensionIds(),n=e.chart.getVisibleDimensionIndexesById(),s=t.dygraph,o=t.drawingContext,a=t.allSeriesPoints,l=s.layout_.setNames,u=1/0;a.forEach((function(e){var t=e[1].canvasx-e[0].canvasx;t1?n.length-1:1));r.fillRect(i,e.canvasy,a/n.length,s-e.canvasy),r.strokeRect(i,e.canvasy,a/n.length,s-e.canvasy)}))}))}}}},60810:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=r(96556);t.default=function(){return function(e){var t=e.drawingContext,r=e.points,n=e.dygraph.toDomYCoord(0);t.fillStyle=(0,i.darkenColor)(e.color);var s=r[1].canvasx-r[0].canvasx,o=Math.floor(2/3*s);r.forEach((function(e){var r=e.canvasx;t.fillRect(r-o/2,e.canvasy,o,n-e.canvasy),t.strokeRect(r-o/2,e.canvasy,o,n-e.canvasy)}))}}},35484:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=r(93501);function n(e){return function(e){if(Array.isArray(e))return s(e)}(e)||function(e){if("undefined"!==typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"===typeof e)return s(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return s(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,i=new Array(t);re.length)&&(t=e.length);for(var r=0,i=new Array(t);rd));l++);for(m>g&&(p*=-1),a=0;a<=c;a++)u=m+a*p,f.push({v:u})}var O=n("axisLabelFormatter");for(a=0;a.08}))),[{label_v:A+k,label:"i"}])}},76081:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i=a(r(26712)),n=a(r(58960)),s=r(24298),o=a(r(93492));function a(e){return e&&e.__esModule?e:{default:e}}function l(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function u(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,i=new Array(t);rt?t:e.clientHeight);e.firstChild.G__height=r,e.firstChild.style.height=r+"px";var i=t;e.firstChild.G__width=i,e.firstChild.style.width=i+"px",p.setOptions({}),p.update(!0),f.trigger("resize")}));var h=t.getAttributes().loaded;r=(0,s.unregister)(t.onAttributeChange("hoverX",b),!h&&t.onceAttributeChange("loaded",b),t.onAttributeChange("theme",(function(){var e=m(),t=e.color,r=e.strokeColor;p.setOptions({strokeColor:r,pointer:{color:t}})})));var y=e.clientWidth,v=.9*(e.clientHeight>y?y:e.clientHeight);e.firstChild.G__height=v,e.firstChild.style.height=v+"px";var _=y;e.firstChild.G__width=_,e.firstChild.style.width=_+"px",p.setOptions({}),f.trigger("resize"),b()}},unmount:function(){r&&r(),c&&c(),p=null,a=null,u=null,f.unmount()},render:b,getMinMax:g})}},63902:function(e,t){"use strict";t.__esModule=!0,t.default=void 0;var r=function(e,t){for(var r in t.prototype)t.hasOwnProperty(r)&&(e[r]=t[r]);function i(){this.constructor=e}return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},i=function(e,t){var r={};for(var i in e)e.hasOwnProperty(i)&&(r[i]=e[i]);for(var n in t)t.hasOwnProperty(n)&&(r[n]=t[n]);return r},n=function(e){return"#"===e.charAt(0)?e.substring(1,7):e};function s(e,t){null==e&&(e=!0),this.clear=null==t||t,e&&u.add(this)}function o(){return o.__super__.constructor.apply(this,arguments)}function a(e){if(this.gauge=e,void 0===this.gauge)throw new Error("The element isn't defined.");this.ctx=this.gauge.ctx,this.canvas=this.gauge.canvas,a.__super__.constructor.call(this,!1,!1),this.setOptions()}function l(e){var t,r;this.canvas=e,l.__super__.constructor.call(this),this.percentColors=null,"undefined"!==typeof G_vmlCanvasManager&&(this.canvas=window.G_vmlCanvasManager.initElement(this.canvas)),this.ctx=this.canvas.getContext("2d"),t=this.canvas.clientHeight,r=this.canvas.clientWidth,this.canvas.height=t,this.canvas.width=r,this.gp=[new a(this)],this.setOptions()}s.prototype.animationSpeed=32,s.prototype.update=function(e){var t;return null==e&&(e=!1),!(!e&&this.displayedValue===this.value)&&(this.ctx&&this.clear&&this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),t=this.value-this.displayedValue,Math.abs(t/this.animationSpeed)<=.001?this.displayedValue=this.value:this.displayedValue=this.displayedValue+t/this.animationSpeed,this.render(),!0)},r(o,s),o.prototype.displayScale=1,o.prototype.forceUpdate=!0,o.prototype.setMinValue=function(e,t){var r,i,n,s,o;if(this.minValue=e,null==t&&(t=!0),t){for(this.displayedValue=this.minValue,o=[],i=0,n=(s=this.gp||[]).length;i.5&&(this.options.angle=.5),this.configDisplayScale(),this},o.prototype.configDisplayScale=function(){var e,t,r,i;return!1===this.options.highDpiSupport?delete this.displayScale:(t=window.devicePixelRatio||1,e=this.ctx.webkitBackingStorePixelRatio||this.ctx.mozBackingStorePixelRatio||this.ctx.msBackingStorePixelRatio||this.ctx.oBackingStorePixelRatio||this.ctx.backingStorePixelRatio||1,this.displayScale=t/e),i=this.canvas.G__width||this.canvas.width,r=this.canvas.G__height||this.canvas.height,this.canvas.width=i*this.displayScale,this.canvas.height=r*this.displayScale,this.canvas.style.width=i+"px",this.canvas.style.height=r+"px",this.canvas.G__width=i,this.canvas.G__height=r,this},o.prototype.parseValue=function(e){return e=parseFloat(e)||Number(e),isFinite(e)?e:0},r(a,s),a.prototype.displayedValue=0,a.prototype.value=0,a.prototype.options={strokeWidth:.035,length:.1,color:"#000000",iconPath:null,iconScale:1,iconAngle:0},a.prototype.img=null,a.prototype.setOptions=function(e){if(null==e&&(e=null),this.options=i(this.options,e),this.length=2*this.gauge.radius*this.gauge.options.radiusScale*this.options.length,this.strokeWidth=this.canvas.height*this.options.strokeWidth,this.maxValue=this.gauge.maxValue,this.minValue=this.gauge.minValue,this.animationSpeed=this.gauge.animationSpeed,this.options.angle=this.gauge.options.angle,this.options.iconPath)return this.img=new Image,this.img.src=this.options.iconPath},a.prototype.render=function(){var e,t,r,i,n,s,o,a,l;if(e=this.gauge.getAngle.call(this,this.displayedValue),a=Math.round(this.length*Math.cos(e)),l=Math.round(this.length*Math.sin(e)),s=Math.round(this.strokeWidth*Math.cos(e-Math.PI/2)),o=Math.round(this.strokeWidth*Math.sin(e-Math.PI/2)),t=Math.round(this.strokeWidth*Math.cos(e+Math.PI/2)),r=Math.round(this.strokeWidth*Math.sin(e+Math.PI/2)),this.ctx.beginPath(),this.ctx.fillStyle=this.options.color,this.ctx.arc(0,0,this.strokeWidth,0,2*Math.PI,!1),this.ctx.fill(),this.ctx.beginPath(),this.ctx.moveTo(s,o),this.ctx.lineTo(a,l),this.ctx.lineTo(t,r),this.ctx.fill(),this.img)return i=Math.round(this.img.width*this.options.iconScale),n=Math.round(this.img.height*this.options.iconScale),this.ctx.save(),this.ctx.translate(a,l),this.ctx.rotate(e+Math.PI/180*(90+this.options.iconAngle)),this.ctx.drawImage(this.img,-i/2,-n/2,i,n),this.ctx.restore()},r(l,o),l.prototype.elem=null,l.prototype.value=[20],l.prototype.maxValue=80,l.prototype.minValue=0,l.prototype.displayedAngle=0,l.prototype.displayedValue=0,l.prototype.lineWidth=40,l.prototype.paddingTop=.1,l.prototype.paddingBottom=.1,l.prototype.percentColors=null,l.prototype.options={colorStart:"#6fadcf",colorStop:void 0,gradientType:0,strokeColor:"#e0e0e0",pointer:{length:.8,strokeWidth:.035,iconScale:1},angle:.15,lineWidth:.44,radiusScale:1,limitMax:!1,limitMin:!1},l.prototype.setOptions=function(e){var t,r,i,n,s;for(null==e&&(e=null),l.__super__.setOptions.call(this,e),this.configPercentColors(),this.extraPadding=0,this.options.angle<0&&(n=Math.PI*(1+this.options.angle),this.extraPadding=Math.sin(n)),this.availableHeight=this.canvas.height*(1-this.paddingTop-this.paddingBottom),this.lineWidth=this.availableHeight*this.options.lineWidth,this.radius=(this.availableHeight-this.lineWidth/2)/(1+this.extraPadding),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height),r=0,i=(s=this.gp).length;r=s;r=0<=s?++i:--i)a=parseInt(n(this.options.percentColors[r][1]).substring(0,2),16),t=parseInt(n(this.options.percentColors[r][1]).substring(2,4),16),e=parseInt(n(this.options.percentColors[r][1]).substring(4,6),16),o.push(this.percentColors[r]={pct:this.options.percentColors[r][0],color:{r:a,g:t,b:e}});return o}},l.prototype.set=function(e){var t,r,i,n,s,o,l,c,d;for(e instanceof Array||(e=[e]),r=i=0,l=e.length-1;0<=l?i<=l:i>=l;r=0<=l?++i:--i)e[r]=this.parseValue(e[r]);if(e.length>this.gp.length)for(r=n=0,c=e.length-this.gp.length;0<=c?nc;r=0<=c?++n:--n)(t=new a(this)).setOptions(this.options.pointer),this.gp.push(t);else e.lengththis.maxValue?this.options.limitMax?d=this.maxValue:this.maxValue=d+1:d=a;n=0<=a?++s:--s)if(e<=this.percentColors[n].pct){!0===t?(l=this.percentColors[n-1]||this.percentColors[0],i=this.percentColors[n],o=(e-l.pct)/(i.pct-l.pct),r={r:Math.floor(l.color.r*(1-o)+i.color.r*o),g:Math.floor(l.color.g*(1-o)+i.color.g*o),b:Math.floor(l.color.b*(1-o)+i.color.b*o)}):r=this.percentColors[n].color;break}return"rgb("+[r.r,r.g,r.b].join(",")+")"},l.prototype.getColorForValue=function(e,t){var r;return r=(e-this.minValue)/(this.maxValue-this.minValue),this.getColorForPercentage(r,t)},l.prototype.renderTicks=function(e,t,r,i){var n,s,o,a,l,u,c,d,f,p,m,g,b,h,y,v,_,O,w,A;if(e!=={}){for(u=e.divisions||0,O=e.subDivisions||0,o=e.divColor||"#fff",h=e.subColor||"#fff",a=e.divLength||.7,v=e.subLength||.2,f=parseFloat(this.maxValue)-parseFloat(this.minValue),p=parseFloat(f)/parseFloat(e.divisions),y=parseFloat(p)/parseFloat(e.subDivisions),n=parseFloat(this.minValue),s=0+y,l=(d=f/400)*(e.divWidth||1),_=d*(e.subWidth||1),g=[],w=c=0,m=u+1;c0?g.push(function(){var e,t,r;for(r=[],e=0,t=O-1;ethis.maxValue&&(a=this.maxValue),p=this.radius*this.options.radiusScale,g.height&&(this.ctx.lineWidth=this.lineWidth*g.height,f=this.lineWidth/2*(g.offset||1-g.height),p=this.radius*this.options.radiusScale+f),this.ctx.strokeStyle=g.strokeStyle,this.ctx.beginPath(),this.ctx.arc(0,0,p,this.getAngle(l),this.getAngle(a),!1),this.ctx.stroke();else void 0!==this.options.customFillStyle?t=this.options.customFillStyle(this):null!==this.percentColors?t=this.getColorForValue(this.displayedValue,this.options.generateGradient):void 0!==this.options.colorStop?((t=0===this.options.gradientType?this.ctx.createRadialGradient(m,r,9,m,r,70):this.ctx.createLinearGradient(0,0,m,0)).addColorStop(0,this.options.colorStart),t.addColorStop(1,this.options.colorStop)):t=this.options.colorStart,this.ctx.strokeStyle=t,this.ctx.beginPath(),this.ctx.arc(m,r,u,(1+this.options.angle)*Math.PI,e,!1),this.ctx.lineWidth=this.lineWidth,this.ctx.stroke(),this.ctx.strokeStyle=this.options.strokeColor,this.ctx.beginPath(),this.ctx.arc(m,r,u,e,(2-this.options.angle)*Math.PI,!1),this.ctx.stroke(),this.ctx.save(),this.ctx.translate(m,r);for(this.options.renderTicks&&this.renderTicks(this.options.renderTicks,m,r,u),this.ctx.restore(),this.ctx.translate(m,r),n=0,o=(d=this.gp).length;n=0;n+=-1)i=a[n],u.elements.splice(i,1);return u.animId=t?null:requestAnimationFrame(u.run)}if(!1===e)return!0===u.animId&&cancelAnimationFrame(u.animId),u.animId=requestAnimationFrame(u.run)}},c=l;t.default=c},1271:function(e,t,r){"use strict";t.__esModule=!0,t.default=void 0;var i,n=r(24298),s=(i=r(58960))&&i.__esModule?i:{default:i};function o(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);t&&(i=i.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,i)}return r}function a(e){for(var t=1;t=0||(n[r]=e[r]);return n}(e,a);return u(u({},o),{},{children:t,active:o.active||o["aria-expanded"],hoverIndicator:i,padding:s})})).withConfig({displayName:"button__Button",componentId:"sc-oqiqxn-0"})(["border:initial;padding:",";height:fit-content;line-height:0;background:",";cursor:pointer;svg{fill:",";stroke:",";}"," &:hover{",";svg{fill:",";stroke:",";}}"],(function(e){return e.padding}),(function(e){var t=e.theme;return e.active?(0,s.getColor)("borderSecondary")({theme:t}):"initial"}),(function(e){var t=e.active,r=e.disabled,i=e.theme;return e.stroked?"none":(0,s.getColor)(d({active:t,disabled:r}))({theme:i})}),(function(e){var t=e.active,r=e.disabled,i=e.theme;return e.stroked?(0,s.getColor)(d({active:t,disabled:r}))({theme:i}):"none"}),(function(e){var t=e.active,r=e.hoverIndicator;return(t||r)&&"\n border-radius: 4px;\n "}),(function(e){var t=e.theme,r=e.hoverIndicator,i=e.disabled;return r&&!i&&"background: "+(0,s.getColor)("mainChartTboxHover")({theme:t})+";"}),(function(e){var t=e.theme,r=e.stroked,i=e.disabled;return r?"none":(0,s.getColor)(d({defaultColor:"text",disabled:i}))({theme:t})}),(function(e){var t=e.theme,r=e.stroked,i=e.disabled;return r?(0,s.getColor)(d({defaultColor:"text",disabled:i}))({theme:t}):"none"})),p=(0,o.withTooltip)(f);t.default=p},3701:function(e,t,r){"use strict";t.__esModule=!0,t.default=t.Button=void 0;var i=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==typeof e&&"function"!==typeof e)return{default:e};var r=u(t);if(r&&r.has(e))return r.get(e);var i={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var o=n?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(i,s,o):i[s]=e[s]}i.default=e,r&&r.set(e,i);return i}(r(67294)),n=l(r(2568)),s=r(10114),o=l(r(71896));t.Button=o.default;var a=["svg","size","width","height"];function l(e){return e&&e.__esModule?e:{default:e}}function u(e){if("function"!==typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(u=function(e){return e?r:t})(e)}function c(){return c=Object.assign?Object.assign.bind():function(e){for(var t=1;t