From 81661aa6d47efd7cb68e8963949cae3b76936af5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 30 Apr 2021 22:09:23 +0000 Subject: [PATCH 001/325] Bump rexml from 3.2.4 to 3.2.5 in /old_docs Bumps [rexml](https://github.com/ruby/rexml) from 3.2.4 to 3.2.5. - [Release notes](https://github.com/ruby/rexml/releases) - [Changelog](https://github.com/ruby/rexml/blob/master/NEWS.md) - [Commits](https://github.com/ruby/rexml/compare/v3.2.4...v3.2.5) Signed-off-by: dependabot[bot] --- old_docs/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/old_docs/Gemfile.lock b/old_docs/Gemfile.lock index fdad181e..afe4a43d 100644 --- a/old_docs/Gemfile.lock +++ b/old_docs/Gemfile.lock @@ -221,7 +221,7 @@ GEM rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) - rexml (3.2.4) + rexml (3.2.5) rouge (3.23.0) ruby-enum (0.8.0) i18n From 17d68628473faddd9df1066f5a851249d2c52e19 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 21 May 2021 00:42:03 +0000 Subject: [PATCH 002/325] Bump nokogiri from 1.10.10 to 1.11.4 in /old_docs Bumps [nokogiri](https://github.com/sparklemotion/nokogiri) from 1.10.10 to 1.11.4. - [Release notes](https://github.com/sparklemotion/nokogiri/releases) - [Changelog](https://github.com/sparklemotion/nokogiri/blob/main/CHANGELOG.md) - [Commits](https://github.com/sparklemotion/nokogiri/compare/v1.10.10...v1.11.4) Signed-off-by: dependabot[bot] --- old_docs/Gemfile.lock | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/old_docs/Gemfile.lock b/old_docs/Gemfile.lock index fdad181e..f37c4e66 100644 --- a/old_docs/Gemfile.lock +++ b/old_docs/Gemfile.lock @@ -203,21 +203,23 @@ GEM rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) mercenary (0.3.6) - mini_portile2 (2.4.0) + mini_portile2 (2.5.1) minima (2.5.1) jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) jekyll-seo-tag (~> 2.1) minitest (5.14.2) multipart-post (2.1.1) - nokogiri (1.10.10) - mini_portile2 (~> 2.4.0) + nokogiri (1.11.4) + mini_portile2 (~> 2.5.0) + racc (~> 1.4) octokit (4.19.0) faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) pathutil (0.16.2) forwardable-extended (~> 2.6) public_suffix (3.1.1) + racc (1.5.2) rb-fsevent (0.10.4) rb-inotify (0.10.1) ffi (~> 1.0) From 889c01298635ca2ded3a69643dbbd27feaee46a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 11 Jun 2021 05:38:46 +0000 Subject: [PATCH 003/325] Bump black from 21.5b2 to 21.6b0 Bumps [black](https://github.com/psf/black) from 21.5b2 to 21.6b0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/commits) --- updated-dependencies: - dependency-name: black dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- poetry.lock | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 7ff9353a..135df3e6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -105,7 +105,7 @@ typecheck = ["mypy"] [[package]] name = "black" -version = "21.5b2" +version = "21.6b0" description = "The uncompromising code formatter." category = "dev" optional = false @@ -1190,8 +1190,8 @@ bcrypt = [ {file = "bcrypt-3.2.0.tar.gz", hash = "sha256:5b93c1726e50a93a033c36e5ca7fdcd29a5c7395af50a6892f5d9e7c6cfbfb29"}, ] black = [ - {file = "black-21.5b2-py3-none-any.whl", hash = "sha256:e5cf21ebdffc7a9b29d73912b6a6a9a4df4ce70220d523c21647da2eae0751ef"}, - {file = "black-21.5b2.tar.gz", hash = "sha256:1fc0e0a2c8ae7d269dfcf0c60a89afa299664f3e811395d40b1922dff8f854b5"}, + {file = "black-21.6b0-py3-none-any.whl", hash = "sha256:dfb8c5a069012b2ab1e972e7b908f5fb42b6bbabcba0a788b86dc05067c7d9c7"}, + {file = "black-21.6b0.tar.gz", hash = "sha256:dc132348a88d103016726fe360cb9ede02cecf99b76e3660ce6c596be132ce04"}, ] boto3 = [ {file = "boto3-1.17.88-py2.py3-none-any.whl", hash = "sha256:13afcc5e2fcc5e4f9eab1ee46a769cf738a259dcd45f71ee79255f18973e4584"}, @@ -1222,24 +1222,36 @@ cffi = [ {file = "cffi-1.14.5-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:48e1c69bbacfc3d932221851b39d49e81567a4d4aac3b21258d9c24578280058"}, {file = "cffi-1.14.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:69e395c24fc60aad6bb4fa7e583698ea6cc684648e1ffb7fe85e3c1ca131a7d5"}, {file = "cffi-1.14.5-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:9e93e79c2551ff263400e1e4be085a1210e12073a31c2011dbbda14bda0c6132"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:24ec4ff2c5c0c8f9c6b87d5bb53555bf267e1e6f70e52e5a9740d32861d36b6f"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c3f39fa737542161d8b0d680df2ec249334cd70a8f420f71c9304bd83c3cbed"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:681d07b0d1e3c462dd15585ef5e33cb021321588bebd910124ef4f4fb71aef55"}, {file = "cffi-1.14.5-cp36-cp36m-win32.whl", hash = "sha256:58e3f59d583d413809d60779492342801d6e82fefb89c86a38e040c16883be53"}, {file = "cffi-1.14.5-cp36-cp36m-win_amd64.whl", hash = "sha256:005a36f41773e148deac64b08f233873a4d0c18b053d37da83f6af4d9087b813"}, {file = "cffi-1.14.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2894f2df484ff56d717bead0a5c2abb6b9d2bf26d6960c4604d5c48bbc30ee73"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:0857f0ae312d855239a55c81ef453ee8fd24136eaba8e87a2eceba644c0d4c06"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:cd2868886d547469123fadc46eac7ea5253ea7fcb139f12e1dfc2bbd406427d1"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:35f27e6eb43380fa080dccf676dece30bef72e4a67617ffda586641cd4508d49"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:06d7cd1abac2ffd92e65c0609661866709b4b2d82dd15f611e602b9b188b0b69"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0f861a89e0043afec2a51fd177a567005847973be86f709bbb044d7f42fc4e05"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cc5a8e069b9ebfa22e26d0e6b97d6f9781302fe7f4f2b8776c3e1daea35f1adc"}, {file = "cffi-1.14.5-cp37-cp37m-win32.whl", hash = "sha256:9ff227395193126d82e60319a673a037d5de84633f11279e336f9c0f189ecc62"}, {file = "cffi-1.14.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9cf8022fb8d07a97c178b02327b284521c7708d7c71a9c9c355c178ac4bbd3d4"}, {file = "cffi-1.14.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8b198cec6c72df5289c05b05b8b0969819783f9418e0409865dac47288d2a053"}, {file = "cffi-1.14.5-cp38-cp38-manylinux1_i686.whl", hash = "sha256:ad17025d226ee5beec591b52800c11680fca3df50b8b29fe51d882576e039ee0"}, {file = "cffi-1.14.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:6c97d7350133666fbb5cf4abdc1178c812cb205dc6f41d174a7b0f18fb93337e"}, {file = "cffi-1.14.5-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:8ae6299f6c68de06f136f1f9e69458eae58f1dacf10af5c17353eae03aa0d827"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:04c468b622ed31d408fea2346bec5bbffba2cc44226302a0de1ade9f5ea3d373"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:06db6321b7a68b2bd6df96d08a5adadc1fa0e8f419226e25b2a5fbf6ccc7350f"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:293e7ea41280cb28c6fcaaa0b1aa1f533b8ce060b9e701d78511e1e6c4a1de76"}, {file = "cffi-1.14.5-cp38-cp38-win32.whl", hash = "sha256:b85eb46a81787c50650f2392b9b4ef23e1f126313b9e0e9013b35c15e4288e2e"}, {file = "cffi-1.14.5-cp38-cp38-win_amd64.whl", hash = "sha256:1f436816fc868b098b0d63b8920de7d208c90a67212546d02f84fe78a9c26396"}, {file = "cffi-1.14.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1071534bbbf8cbb31b498d5d9db0f274f2f7a865adca4ae429e147ba40f73dea"}, {file = "cffi-1.14.5-cp39-cp39-manylinux1_i686.whl", hash = "sha256:9de2e279153a443c656f2defd67769e6d1e4163952b3c622dcea5b08a6405322"}, {file = "cffi-1.14.5-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:6e4714cc64f474e4d6e37cfff31a814b509a35cb17de4fb1999907575684479c"}, {file = "cffi-1.14.5-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:158d0d15119b4b7ff6b926536763dc0714313aa59e320ddf787502c70c4d4bee"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1bf1ac1984eaa7675ca8d5745a8cb87ef7abecb5592178406e55858d411eadc0"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:df5052c5d867c1ea0b311fb7c3cd28b19df469c056f7fdcfe88c7473aa63e333"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:24a570cd11895b60829e941f2613a4f79df1a27344cbbb82164ef2e0116f09c7"}, {file = "cffi-1.14.5-cp39-cp39-win32.whl", hash = "sha256:afb29c1ba2e5a3736f1c301d9d0abe3ec8b86957d04ddfa9d7a6a42b9367e396"}, {file = "cffi-1.14.5-cp39-cp39-win_amd64.whl", hash = "sha256:f2d45f97ab6bb54753eab54fffe75aaf3de4ff2341c9daee1987ee1837636f1d"}, {file = "cffi-1.14.5.tar.gz", hash = "sha256:fd78e5fee591709f32ef6edb9a015b4aa1a5022598e36227500c8f4e02328d9c"}, @@ -1647,18 +1659,26 @@ pyyaml = [ {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541"}, {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"}, {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc"}, {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6"}, {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, From 6437d891280465c644042363ab9545d8e9533c02 Mon Sep 17 00:00:00 2001 From: James Seward Date: Sat, 19 Jun 2021 13:04:28 +0100 Subject: [PATCH 004/325] Update mypy and fix build errors False positives seem to show up with this version if some type stub libraries are missing. --- poetry.lock | 132 +++++++++++++++++++++++++++++++++++++++---------- pyproject.toml | 3 ++ 2 files changed, 110 insertions(+), 25 deletions(-) diff --git a/poetry.lock b/poetry.lock index 7ff9353a..819d4c89 100644 --- a/poetry.lock +++ b/poetry.lock @@ -453,7 +453,7 @@ python-versions = "*" [[package]] name = "mypy" -version = "0.812" +version = "0.902" description = "Optional static typing for Python" category = "dev" optional = false @@ -461,11 +461,13 @@ python-versions = ">=3.5" [package.dependencies] mypy-extensions = ">=0.4.3,<0.5.0" -typed-ast = ">=1.4.0,<1.5.0" +toml = "*" +typed-ast = {version = ">=1.4.0,<1.5.0", markers = "python_version < \"3.8\""} typing-extensions = ">=3.7.4" [package.extras] dmypy = ["psutil (>=4.0)"] +python2 = ["typed-ast (>=1.4.0,<1.5.0)"] [[package]] name = "mypy-extensions" @@ -1081,6 +1083,61 @@ category = "dev" optional = false python-versions = "*" +[[package]] +name = "types-cryptography" +version = "3.3.3" +description = "Typing stubs for cryptography" +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +types-enum34 = "*" +types-ipaddress = "*" + +[[package]] +name = "types-enum34" +version = "0.1.6" +description = "Typing stubs for enum34" +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "types-ipaddress" +version = "0.1.3" +description = "Typing stubs for ipaddress" +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "types-paramiko" +version = "0.1.7" +description = "Typing stubs for paramiko" +category = "dev" +optional = false +python-versions = "*" + +[package.dependencies] +types-cryptography = "*" + +[[package]] +name = "types-python-dateutil" +version = "0.1.4" +description = "Typing stubs for python-dateutil" +category = "dev" +optional = false +python-versions = "*" + +[[package]] +name = "types-requests" +version = "0.1.12" +description = "Typing stubs for requests" +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "typing-extensions" version = "3.10.0.0" @@ -1145,7 +1202,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pyt [metadata] lock-version = "1.1" python-versions = "^3.6.2" -content-hash = "cbeec8af3d5a44ef3fa09ea6fe13de1da57be108eb4e6a2c626947653f31cf98" +content-hash = "29f7723d69c5c6a9b6648bbdef7f94e857399532a6eb576941d0ea50531e1320" [metadata.files] alabaster = [ @@ -1462,28 +1519,29 @@ mccabe = [ {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, ] mypy = [ - {file = "mypy-0.812-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:a26f8ec704e5a7423c8824d425086705e381b4f1dfdef6e3a1edab7ba174ec49"}, - {file = "mypy-0.812-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:28fb5479c494b1bab244620685e2eb3c3f988d71fd5d64cc753195e8ed53df7c"}, - {file = "mypy-0.812-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:9743c91088d396c1a5a3c9978354b61b0382b4e3c440ce83cf77994a43e8c521"}, - {file = "mypy-0.812-cp35-cp35m-win_amd64.whl", hash = "sha256:d7da2e1d5f558c37d6e8c1246f1aec1e7349e4913d8fb3cb289a35de573fe2eb"}, - {file = "mypy-0.812-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:4eec37370483331d13514c3f55f446fc5248d6373e7029a29ecb7b7494851e7a"}, - {file = "mypy-0.812-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:d65cc1df038ef55a99e617431f0553cd77763869eebdf9042403e16089fe746c"}, - {file = "mypy-0.812-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:61a3d5b97955422964be6b3baf05ff2ce7f26f52c85dd88db11d5e03e146a3a6"}, - {file = "mypy-0.812-cp36-cp36m-win_amd64.whl", hash = "sha256:25adde9b862f8f9aac9d2d11971f226bd4c8fbaa89fb76bdadb267ef22d10064"}, - {file = "mypy-0.812-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:552a815579aa1e995f39fd05dde6cd378e191b063f031f2acfe73ce9fb7f9e56"}, - {file = "mypy-0.812-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:499c798053cdebcaa916eef8cd733e5584b5909f789de856b482cd7d069bdad8"}, - {file = "mypy-0.812-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:5873888fff1c7cf5b71efbe80e0e73153fe9212fafdf8e44adfe4c20ec9f82d7"}, - {file = "mypy-0.812-cp37-cp37m-win_amd64.whl", hash = "sha256:9f94aac67a2045ec719ffe6111df543bac7874cee01f41928f6969756e030564"}, - {file = "mypy-0.812-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d23e0ea196702d918b60c8288561e722bf437d82cb7ef2edcd98cfa38905d506"}, - {file = "mypy-0.812-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:674e822aa665b9fd75130c6c5f5ed9564a38c6cea6a6432ce47eafb68ee578c5"}, - {file = "mypy-0.812-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:abf7e0c3cf117c44d9285cc6128856106183938c68fd4944763003decdcfeb66"}, - {file = "mypy-0.812-cp38-cp38-win_amd64.whl", hash = "sha256:0d0a87c0e7e3a9becdfbe936c981d32e5ee0ccda3e0f07e1ef2c3d1a817cf73e"}, - {file = "mypy-0.812-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:7ce3175801d0ae5fdfa79b4f0cfed08807af4d075b402b7e294e6aa72af9aa2a"}, - {file = "mypy-0.812-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:b09669bcda124e83708f34a94606e01b614fa71931d356c1f1a5297ba11f110a"}, - {file = "mypy-0.812-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:33f159443db0829d16f0a8d83d94df3109bb6dd801975fe86bacb9bf71628e97"}, - {file = "mypy-0.812-cp39-cp39-win_amd64.whl", hash = "sha256:3f2aca7f68580dc2508289c729bd49ee929a436208d2b2b6aab15745a70a57df"}, - {file = "mypy-0.812-py3-none-any.whl", hash = "sha256:2f9b3407c58347a452fc0736861593e105139b905cca7d097e413453a1d650b4"}, - {file = "mypy-0.812.tar.gz", hash = "sha256:cd07039aa5df222037005b08fbbfd69b3ab0b0bd7a07d7906de75ae52c4e3119"}, + {file = "mypy-0.902-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:3f12705eabdd274b98f676e3e5a89f247ea86dc1af48a2d5a2b080abac4e1243"}, + {file = "mypy-0.902-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:2f9fedc1f186697fda191e634ac1d02f03d4c260212ccb018fabbb6d4b03eee8"}, + {file = "mypy-0.902-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:0756529da2dd4d53d26096b7969ce0a47997123261a5432b48cc6848a2cb0bd4"}, + {file = "mypy-0.902-cp35-cp35m-win_amd64.whl", hash = "sha256:68a098c104ae2b75e946b107ef69dd8398d54cb52ad57580dfb9fc78f7f997f0"}, + {file = "mypy-0.902-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cd01c599cf9f897b6b6c6b5d8b182557fb7d99326bcdf5d449a0fbbb4ccee4b9"}, + {file = "mypy-0.902-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:e89880168c67cf4fde4506b80ee42f1537ad66ad366c101d388b3fd7d7ce2afd"}, + {file = "mypy-0.902-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:ebe2bc9cb638475f5d39068d2dbe8ae1d605bb8d8d3ff281c695df1670ab3987"}, + {file = "mypy-0.902-cp36-cp36m-win_amd64.whl", hash = "sha256:f89bfda7f0f66b789792ab64ce0978e4a991a0e4dd6197349d0767b0f1095b21"}, + {file = "mypy-0.902-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:746e0b0101b8efec34902810047f26a8c80e1efbb4fc554956d848c05ef85d76"}, + {file = "mypy-0.902-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:0190fb77e93ce971954c9e54ea61de2802065174e5e990c9d4c1d0f54fbeeca2"}, + {file = "mypy-0.902-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:b5dfcd22c6bab08dfeded8d5b44bdcb68c6f1ab261861e35c470b89074f78a70"}, + {file = "mypy-0.902-cp37-cp37m-win_amd64.whl", hash = "sha256:b5ba1f0d5f9087e03bf5958c28d421a03a4c1ad260bf81556195dffeccd979c4"}, + {file = "mypy-0.902-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9ef5355eaaf7a23ab157c21a44c614365238a7bdb3552ec3b80c393697d974e1"}, + {file = "mypy-0.902-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:517e7528d1be7e187a5db7f0a3e479747307c1b897d9706b1c662014faba3116"}, + {file = "mypy-0.902-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:fd634bc17b1e2d6ce716f0e43446d0d61cdadb1efcad5c56ca211c22b246ebc8"}, + {file = "mypy-0.902-cp38-cp38-win_amd64.whl", hash = "sha256:fc4d63da57ef0e8cd4ab45131f3fe5c286ce7dd7f032650d0fbc239c6190e167"}, + {file = "mypy-0.902-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:353aac2ce41ddeaf7599f1c73fed2b75750bef3b44b6ad12985a991bc002a0da"}, + {file = "mypy-0.902-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ae94c31bb556ddb2310e4f913b706696ccbd43c62d3331cd3511caef466871d2"}, + {file = "mypy-0.902-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:8be7bbd091886bde9fcafed8dd089a766fa76eb223135fe5c9e9798f78023a20"}, + {file = "mypy-0.902-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:4efc67b9b3e2fddbe395700f91d5b8deb5980bfaaccb77b306310bd0b9e002eb"}, + {file = "mypy-0.902-cp39-cp39-win_amd64.whl", hash = "sha256:9f1d74eeb3f58c7bd3f3f92b8f63cb1678466a55e2c4612bf36909105d0724ab"}, + {file = "mypy-0.902-py3-none-any.whl", hash = "sha256:a26d0e53e90815c765f91966442775cf03b8a7514a4e960de7b5320208b07269"}, + {file = "mypy-0.902.tar.gz", hash = "sha256:9236c21194fde5df1b4d8ebc2ef2c1f2a5dc7f18bcbea54274937cae2e20a01c"}, ] mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, @@ -1821,6 +1879,30 @@ typed-ast = [ {file = "typed_ast-1.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:9c6d1a54552b5330bc657b7ef0eae25d00ba7ffe85d9ea8ae6540d2197a3788c"}, {file = "typed_ast-1.4.3.tar.gz", hash = "sha256:fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65"}, ] +types-cryptography = [ + {file = "types-cryptography-3.3.3.tar.gz", hash = "sha256:de2b12e971023b25bd96b7da251dc747ea5b4670a998f9160153d96e4f918f0b"}, + {file = "types_cryptography-3.3.3-py2.py3-none-any.whl", hash = "sha256:524afedb2e7f3fa4b22bd164efb82809a75ff960cc5d40a2fa9b7c2cda228fab"}, +] +types-enum34 = [ + {file = "types-enum34-0.1.6.tar.gz", hash = "sha256:93b1bfeb3654b0745f37b6d8e1b3a1d4141b371464e58ca577075fb086bd97d4"}, + {file = "types_enum34-0.1.6-py2.py3-none-any.whl", hash = "sha256:893675130c66f1af3ff5a6f20b9c358a425873664dd2fae417f4dabd57077ab8"}, +] +types-ipaddress = [ + {file = "types-ipaddress-0.1.3.tar.gz", hash = "sha256:df1d9ea04e16315ae34b77bc0ccd39b2fefd8eb45192ba85972a4e186369782c"}, + {file = "types_ipaddress-0.1.3-py2.py3-none-any.whl", hash = "sha256:f1a08a0a635910f7be2d1cb3b8ec49ccc4f5969d9a8553e278f3d072fa6a9465"}, +] +types-paramiko = [ + {file = "types-paramiko-0.1.7.tar.gz", hash = "sha256:51ce59aea222c47d0590e2b8d8cefbc5aeb469d8bf6368e4f06ad3c61c932c72"}, + {file = "types_paramiko-0.1.7-py2.py3-none-any.whl", hash = "sha256:9fb9f3a363c99ae735148a7ce3c28adbe8f87797ec3c8cce3103899acbdebfa8"}, +] +types-python-dateutil = [ + {file = "types-python-dateutil-0.1.4.tar.gz", hash = "sha256:e6486ca27b6dde73e0ec079a9e1b03e208766e6bc7f1e08964a7e9104a5c7d7a"}, + {file = "types_python_dateutil-0.1.4-py2.py3-none-any.whl", hash = "sha256:39bfe0bde61fc673b8fa28167bd78622d976210f791971b9f3e10877cbf119a4"}, +] +types-requests = [ + {file = "types-requests-0.1.12.tar.gz", hash = "sha256:08323ce2be816c4c107ef605e66369cb26dfda99d278dd502ee32bbf37f9a285"}, + {file = "types_requests-0.1.12-py2.py3-none-any.whl", hash = "sha256:59b218da05de6eb58e0ab9d096af5e258359365cdf52cf3a1206a8ea87244301"}, +] typing-extensions = [ {file = "typing_extensions-3.10.0.0-py2-none-any.whl", hash = "sha256:0ac0f89795dd19de6b97debb0c6af1c70987fd80a2d62d1958f7e56fcc31b497"}, {file = "typing_extensions-3.10.0.0-py3-none-any.whl", hash = "sha256:779383f6086d90c99ae41cf0ff39aac8a7937a9283ce0a414e5dd782f4c94a84"}, diff --git a/pyproject.toml b/pyproject.toml index 6de1f974..17ef84cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,6 +63,9 @@ sphinx-rtd-theme = "^0.5.1" pytest-cov = "^2.12.1" tox = "^3.23.1" tox-poetry = "^0.4.0" +types-paramiko = "^0.1.7" +types-python-dateutil = "^0.1.4" +types-requests = "^0.1.12" [build-system] requires = ["poetry-core>=1.0.0", "setuptools"] From fe23432c8aa6b8811a1cb8ce2fca6bc3814a84b6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 25 Jun 2021 12:13:07 +0000 Subject: [PATCH 005/325] Bump arrow from 1.1.0 to 1.1.1 Bumps [arrow](https://github.com/arrow-py/arrow) from 1.1.0 to 1.1.1. - [Release notes](https://github.com/arrow-py/arrow/releases) - [Changelog](https://github.com/arrow-py/arrow/blob/master/CHANGELOG.rst) - [Commits](https://github.com/arrow-py/arrow/compare/1.1.0...1.1.1) --- updated-dependencies: - dependency-name: arrow dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index be028c15..61bf20c6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -16,7 +16,7 @@ python-versions = "*" [[package]] name = "arrow" -version = "1.1.0" +version = "1.1.1" description = "Better dates & times for Python" category = "main" optional = false @@ -1214,8 +1214,8 @@ appdirs = [ {file = "appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41"}, ] arrow = [ - {file = "arrow-1.1.0-py3-none-any.whl", hash = "sha256:8cbe6a629b1c54ae11b52d6d9e70890089241958f63bc59467e277e34b7a5378"}, - {file = "arrow-1.1.0.tar.gz", hash = "sha256:b8fe13abf3517abab315e09350c903902d1447bd311afbc17547ba1cb3ff5bd8"}, + {file = "arrow-1.1.1-py3-none-any.whl", hash = "sha256:77a60a4db5766d900a2085ce9074c5c7b8e2c99afeaa98ad627637ff6f292510"}, + {file = "arrow-1.1.1.tar.gz", hash = "sha256:dee7602f6c60e3ec510095b5e301441bc56288cb8f51def14dcb3079f623823a"}, ] astroid = [ {file = "astroid-2.5.6-py3-none-any.whl", hash = "sha256:4db03ab5fc3340cf619dbc25e42c2cc3755154ce6009469766d7143d1fc2ee4e"}, From ef503db82024d8675e6bfa2b05cd872be3a5407b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 2 Jul 2021 12:08:30 +0000 Subject: [PATCH 006/325] Bump pylint from 2.8.3 to 2.9.3 Bumps [pylint](https://github.com/PyCQA/pylint) from 2.8.3 to 2.9.3. - [Release notes](https://github.com/PyCQA/pylint/releases) - [Changelog](https://github.com/PyCQA/pylint/blob/main/ChangeLog) - [Commits](https://github.com/PyCQA/pylint/compare/v2.8.3...v2.9.3) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 17 +++++++++-------- pyproject.toml | 2 +- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/poetry.lock b/poetry.lock index be028c15..7c8cc0e4 100644 --- a/poetry.lock +++ b/poetry.lock @@ -28,7 +28,7 @@ typing-extensions = {version = "*", markers = "python_version < \"3.8\""} [[package]] name = "astroid" -version = "2.5.6" +version = "2.6.2" description = "An abstract syntax tree for Python with inference support." category = "dev" optional = false @@ -37,6 +37,7 @@ python-versions = "~=3.6" [package.dependencies] lazy-object-proxy = ">=1.4.0" typed-ast = {version = ">=1.4.0,<1.5", markers = "implementation_name == \"cpython\" and python_version < \"3.8\""} +typing-extensions = {version = ">=3.7.4", markers = "python_version < \"3.8\""} wrapt = ">=1.11,<1.13" [[package]] @@ -647,14 +648,14 @@ test = ["pytest (>=4.0.1,<5.0.0)", "pytest-cov (>=2.6.0,<3.0.0)", "pytest-runner [[package]] name = "pylint" -version = "2.8.3" +version = "2.9.3" description = "python code static checker" category = "dev" optional = false python-versions = "~=3.6" [package.dependencies] -astroid = "2.5.6" +astroid = ">=2.6.2,<2.7" colorama = {version = "*", markers = "sys_platform == \"win32\""} isort = ">=4.2.5,<6" mccabe = ">=0.6,<0.7" @@ -1202,7 +1203,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pyt [metadata] lock-version = "1.1" python-versions = "^3.6.2" -content-hash = "29f7723d69c5c6a9b6648bbdef7f94e857399532a6eb576941d0ea50531e1320" +content-hash = "5ed7451f4d2125d7c221008692ee8c7260e1cf81512cbdc5b6cc867dfe9b0ba6" [metadata.files] alabaster = [ @@ -1218,8 +1219,8 @@ arrow = [ {file = "arrow-1.1.0.tar.gz", hash = "sha256:b8fe13abf3517abab315e09350c903902d1447bd311afbc17547ba1cb3ff5bd8"}, ] astroid = [ - {file = "astroid-2.5.6-py3-none-any.whl", hash = "sha256:4db03ab5fc3340cf619dbc25e42c2cc3755154ce6009469766d7143d1fc2ee4e"}, - {file = "astroid-2.5.6.tar.gz", hash = "sha256:8a398dfce302c13f14bab13e2b14fe385d32b73f4e4853b9bdfb64598baa1975"}, + {file = "astroid-2.6.2-py3-none-any.whl", hash = "sha256:606b2911d10c3dcf35e58d2ee5c97360e8477d7b9f3efc3f24811c93e6fc2cd9"}, + {file = "astroid-2.6.2.tar.gz", hash = "sha256:38b95085e9d92e2ca06cf8b35c12a74fa81da395a6f9e65803742e6509c05892"}, ] atomicwrites = [ {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, @@ -1648,8 +1649,8 @@ pyjwt = [ {file = "PyJWT-1.7.1.tar.gz", hash = "sha256:8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96"}, ] pylint = [ - {file = "pylint-2.8.3-py3-none-any.whl", hash = "sha256:792b38ff30903884e4a9eab814ee3523731abd3c463f3ba48d7b627e87013484"}, - {file = "pylint-2.8.3.tar.gz", hash = "sha256:0a049c5d47b629d9070c3932d13bff482b12119b6a241a93bc460b0be16953c8"}, + {file = "pylint-2.9.3-py3-none-any.whl", hash = "sha256:5d46330e6b8886c31b5e3aba5ff48c10f4aa5e76cbf9002c6544306221e63fbc"}, + {file = "pylint-2.9.3.tar.gz", hash = "sha256:23a1dc8b30459d78e9ff25942c61bb936108ccbe29dd9e71c01dc8274961709a"}, ] pynacl = [ {file = "PyNaCl-1.4.0-cp27-cp27m-macosx_10_10_x86_64.whl", hash = "sha256:ea6841bc3a76fa4942ce00f3bda7d436fda21e2d91602b9e21b7ca9ecab8f3ff"}, diff --git a/pyproject.toml b/pyproject.toml index 17ef84cc..1dcf65ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -57,7 +57,7 @@ mypy = "*" bandit = "*" freezegun = "*" pytest = "*" -pylint = "^2.8.3" +pylint = "^2.9.3" Sphinx = "^4.0.2" sphinx-rtd-theme = "^0.5.1" pytest-cov = "^2.12.1" From 97eabb76835e08f1ff81cb44dd1c3ac0c5b4dd8c Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 9 Jul 2021 12:07:03 +0000 Subject: [PATCH 007/325] Bump ping3 from 2.7.0 to 2.8.1 Bumps [ping3](https://github.com/kyan001/ping3) from 2.7.0 to 2.8.1. - [Release notes](https://github.com/kyan001/ping3/releases) - [Commits](https://github.com/kyan001/ping3/commits/v2.8.1) --- updated-dependencies: - dependency-name: ping3 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index be028c15..69d81b32 100644 --- a/poetry.lock +++ b/poetry.lock @@ -549,7 +549,7 @@ python-versions = ">=2.6" [[package]] name = "ping3" -version = "2.7.0" +version = "2.8.1" description = "A pure python3 version of ICMP ping implementation using raw socket." category = "main" optional = false @@ -1583,8 +1583,8 @@ pbr = [ {file = "pbr-5.6.0.tar.gz", hash = "sha256:42df03e7797b796625b1029c0400279c7c34fd7df24a7d7818a1abb5b38710dd"}, ] ping3 = [ - {file = "ping3-2.7.0-py3-none-any.whl", hash = "sha256:1a564ec5fac325b622c0fdaf15da9f2623764bba0ae3244ec1ddb89e0de8c2f5"}, - {file = "ping3-2.7.0.tar.gz", hash = "sha256:afb72038e18fd2b57651a3488a7cbb34b83f6bb6d3676ba37b249394c6dcb84b"}, + {file = "ping3-2.8.1-py3-none-any.whl", hash = "sha256:c8b1974212151163fef306adfb2c59cb422ab29166562f3b1d6910b12494b720"}, + {file = "ping3-2.8.1.tar.gz", hash = "sha256:9033a398a82efb84614f7c88d8855d5cedc6a6546a9c3bbc00e99cf96f597e5e"}, ] pluggy = [ {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, From acd064fed79ed1528016d79998334ccd7f8dc3c3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 10 Jul 2021 20:25:26 +0000 Subject: [PATCH 008/325] Bump types-requests from 0.1.12 to 2.25.0 Bumps [types-requests](https://github.com/python/typeshed) from 0.1.12 to 2.25.0. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- poetry.lock | 8 ++++---- pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index 7c8cc0e4..d47d1df7 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1133,7 +1133,7 @@ python-versions = "*" [[package]] name = "types-requests" -version = "0.1.12" +version = "2.25.0" description = "Typing stubs for requests" category = "dev" optional = false @@ -1203,7 +1203,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pyt [metadata] lock-version = "1.1" python-versions = "^3.6.2" -content-hash = "5ed7451f4d2125d7c221008692ee8c7260e1cf81512cbdc5b6cc867dfe9b0ba6" +content-hash = "f3b50cd6eec103ed028167e89dd22d272b937993dd0cdc150d4b5f48fad78bdc" [metadata.files] alabaster = [ @@ -1921,8 +1921,8 @@ types-python-dateutil = [ {file = "types_python_dateutil-0.1.4-py2.py3-none-any.whl", hash = "sha256:39bfe0bde61fc673b8fa28167bd78622d976210f791971b9f3e10877cbf119a4"}, ] types-requests = [ - {file = "types-requests-0.1.12.tar.gz", hash = "sha256:08323ce2be816c4c107ef605e66369cb26dfda99d278dd502ee32bbf37f9a285"}, - {file = "types_requests-0.1.12-py2.py3-none-any.whl", hash = "sha256:59b218da05de6eb58e0ab9d096af5e258359365cdf52cf3a1206a8ea87244301"}, + {file = "types-requests-2.25.0.tar.gz", hash = "sha256:ee0d0c507210141b7d5b8639cc43eaa726084178775db2a5fb06fbf85c185808"}, + {file = "types_requests-2.25.0-py3-none-any.whl", hash = "sha256:fa5c1e5e832ff6193507d8da7e1159281383908ee193a2f4b37bc08140b51844"}, ] typing-extensions = [ {file = "typing_extensions-3.10.0.0-py2-none-any.whl", hash = "sha256:0ac0f89795dd19de6b97debb0c6af1c70987fd80a2d62d1958f7e56fcc31b497"}, diff --git a/pyproject.toml b/pyproject.toml index 1dcf65ce..abb1a54b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -65,7 +65,7 @@ tox = "^3.23.1" tox-poetry = "^0.4.0" types-paramiko = "^0.1.7" types-python-dateutil = "^0.1.4" -types-requests = "^0.1.12" +types-requests = "^2.25.0" [build-system] requires = ["poetry-core>=1.0.0", "setuptools"] From e35f8136b58b435c95d8593be9decb34a2e5dd70 Mon Sep 17 00:00:00 2001 From: James Seward Date: Sat, 10 Jul 2021 21:15:20 +0100 Subject: [PATCH 009/325] Bump dev version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index abb1a54b..5b2c41a6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "simplemonitor" -version = "1.11.0" +version = "1.12.0+dev" description = "A simple network and host monitor" license = "BSD-3-Clause" authors = ["James Seward "] From 90b1d4d17eab8f54edd7cfdeb09ee996d1f70edb Mon Sep 17 00:00:00 2001 From: James Seward Date: Sat, 10 Jul 2021 21:55:55 +0100 Subject: [PATCH 010/325] Bump mypy and add stubs for openssl --- poetry.lock | 91 ++++++++++++++++++++++++-------------------------- pyproject.toml | 1 + 2 files changed, 44 insertions(+), 48 deletions(-) diff --git a/poetry.lock b/poetry.lock index 470163dc..367cab98 100644 --- a/poetry.lock +++ b/poetry.lock @@ -454,7 +454,7 @@ python-versions = "*" [[package]] name = "mypy" -version = "0.902" +version = "0.910" description = "Optional static typing for Python" category = "dev" optional = false @@ -1088,7 +1088,7 @@ python-versions = "*" name = "types-cryptography" version = "3.3.3" description = "Typing stubs for cryptography" -category = "dev" +category = "main" optional = false python-versions = "*" @@ -1100,7 +1100,7 @@ types-ipaddress = "*" name = "types-enum34" version = "0.1.6" description = "Typing stubs for enum34" -category = "dev" +category = "main" optional = false python-versions = "*" @@ -1108,7 +1108,7 @@ python-versions = "*" name = "types-ipaddress" version = "0.1.3" description = "Typing stubs for ipaddress" -category = "dev" +category = "main" optional = false python-versions = "*" @@ -1123,6 +1123,17 @@ python-versions = "*" [package.dependencies] types-cryptography = "*" +[[package]] +name = "types-pyopenssl" +version = "20.0.3" +description = "Typing stubs for pyOpenSSL" +category = "main" +optional = false +python-versions = "*" + +[package.dependencies] +types-cryptography = "*" + [[package]] name = "types-python-dateutil" version = "0.1.4" @@ -1203,7 +1214,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pyt [metadata] lock-version = "1.1" python-versions = "^3.6.2" -content-hash = "f3b50cd6eec103ed028167e89dd22d272b937993dd0cdc150d4b5f48fad78bdc" +content-hash = "096337711813817c93231589e8dc79589c75cdfe69e69e0408ed6aa39b109193" [metadata.files] alabaster = [ @@ -1280,36 +1291,24 @@ cffi = [ {file = "cffi-1.14.5-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:48e1c69bbacfc3d932221851b39d49e81567a4d4aac3b21258d9c24578280058"}, {file = "cffi-1.14.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:69e395c24fc60aad6bb4fa7e583698ea6cc684648e1ffb7fe85e3c1ca131a7d5"}, {file = "cffi-1.14.5-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:9e93e79c2551ff263400e1e4be085a1210e12073a31c2011dbbda14bda0c6132"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:24ec4ff2c5c0c8f9c6b87d5bb53555bf267e1e6f70e52e5a9740d32861d36b6f"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c3f39fa737542161d8b0d680df2ec249334cd70a8f420f71c9304bd83c3cbed"}, - {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:681d07b0d1e3c462dd15585ef5e33cb021321588bebd910124ef4f4fb71aef55"}, {file = "cffi-1.14.5-cp36-cp36m-win32.whl", hash = "sha256:58e3f59d583d413809d60779492342801d6e82fefb89c86a38e040c16883be53"}, {file = "cffi-1.14.5-cp36-cp36m-win_amd64.whl", hash = "sha256:005a36f41773e148deac64b08f233873a4d0c18b053d37da83f6af4d9087b813"}, {file = "cffi-1.14.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2894f2df484ff56d717bead0a5c2abb6b9d2bf26d6960c4604d5c48bbc30ee73"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:0857f0ae312d855239a55c81ef453ee8fd24136eaba8e87a2eceba644c0d4c06"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:cd2868886d547469123fadc46eac7ea5253ea7fcb139f12e1dfc2bbd406427d1"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:35f27e6eb43380fa080dccf676dece30bef72e4a67617ffda586641cd4508d49"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:06d7cd1abac2ffd92e65c0609661866709b4b2d82dd15f611e602b9b188b0b69"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0f861a89e0043afec2a51fd177a567005847973be86f709bbb044d7f42fc4e05"}, - {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cc5a8e069b9ebfa22e26d0e6b97d6f9781302fe7f4f2b8776c3e1daea35f1adc"}, {file = "cffi-1.14.5-cp37-cp37m-win32.whl", hash = "sha256:9ff227395193126d82e60319a673a037d5de84633f11279e336f9c0f189ecc62"}, {file = "cffi-1.14.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9cf8022fb8d07a97c178b02327b284521c7708d7c71a9c9c355c178ac4bbd3d4"}, {file = "cffi-1.14.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8b198cec6c72df5289c05b05b8b0969819783f9418e0409865dac47288d2a053"}, {file = "cffi-1.14.5-cp38-cp38-manylinux1_i686.whl", hash = "sha256:ad17025d226ee5beec591b52800c11680fca3df50b8b29fe51d882576e039ee0"}, {file = "cffi-1.14.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:6c97d7350133666fbb5cf4abdc1178c812cb205dc6f41d174a7b0f18fb93337e"}, {file = "cffi-1.14.5-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:8ae6299f6c68de06f136f1f9e69458eae58f1dacf10af5c17353eae03aa0d827"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:04c468b622ed31d408fea2346bec5bbffba2cc44226302a0de1ade9f5ea3d373"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:06db6321b7a68b2bd6df96d08a5adadc1fa0e8f419226e25b2a5fbf6ccc7350f"}, - {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:293e7ea41280cb28c6fcaaa0b1aa1f533b8ce060b9e701d78511e1e6c4a1de76"}, {file = "cffi-1.14.5-cp38-cp38-win32.whl", hash = "sha256:b85eb46a81787c50650f2392b9b4ef23e1f126313b9e0e9013b35c15e4288e2e"}, {file = "cffi-1.14.5-cp38-cp38-win_amd64.whl", hash = "sha256:1f436816fc868b098b0d63b8920de7d208c90a67212546d02f84fe78a9c26396"}, {file = "cffi-1.14.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1071534bbbf8cbb31b498d5d9db0f274f2f7a865adca4ae429e147ba40f73dea"}, {file = "cffi-1.14.5-cp39-cp39-manylinux1_i686.whl", hash = "sha256:9de2e279153a443c656f2defd67769e6d1e4163952b3c622dcea5b08a6405322"}, {file = "cffi-1.14.5-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:6e4714cc64f474e4d6e37cfff31a814b509a35cb17de4fb1999907575684479c"}, {file = "cffi-1.14.5-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:158d0d15119b4b7ff6b926536763dc0714313aa59e320ddf787502c70c4d4bee"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1bf1ac1984eaa7675ca8d5745a8cb87ef7abecb5592178406e55858d411eadc0"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:df5052c5d867c1ea0b311fb7c3cd28b19df469c056f7fdcfe88c7473aa63e333"}, - {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:24a570cd11895b60829e941f2613a4f79df1a27344cbbb82164ef2e0116f09c7"}, {file = "cffi-1.14.5-cp39-cp39-win32.whl", hash = "sha256:afb29c1ba2e5a3736f1c301d9d0abe3ec8b86957d04ddfa9d7a6a42b9367e396"}, {file = "cffi-1.14.5-cp39-cp39-win_amd64.whl", hash = "sha256:f2d45f97ab6bb54753eab54fffe75aaf3de4ff2341c9daee1987ee1837636f1d"}, {file = "cffi-1.14.5.tar.gz", hash = "sha256:fd78e5fee591709f32ef6edb9a015b4aa1a5022598e36227500c8f4e02328d9c"}, @@ -1532,29 +1531,29 @@ mccabe = [ {file = "mccabe-0.6.1.tar.gz", hash = "sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"}, ] mypy = [ - {file = "mypy-0.902-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:3f12705eabdd274b98f676e3e5a89f247ea86dc1af48a2d5a2b080abac4e1243"}, - {file = "mypy-0.902-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:2f9fedc1f186697fda191e634ac1d02f03d4c260212ccb018fabbb6d4b03eee8"}, - {file = "mypy-0.902-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:0756529da2dd4d53d26096b7969ce0a47997123261a5432b48cc6848a2cb0bd4"}, - {file = "mypy-0.902-cp35-cp35m-win_amd64.whl", hash = "sha256:68a098c104ae2b75e946b107ef69dd8398d54cb52ad57580dfb9fc78f7f997f0"}, - {file = "mypy-0.902-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cd01c599cf9f897b6b6c6b5d8b182557fb7d99326bcdf5d449a0fbbb4ccee4b9"}, - {file = "mypy-0.902-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:e89880168c67cf4fde4506b80ee42f1537ad66ad366c101d388b3fd7d7ce2afd"}, - {file = "mypy-0.902-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:ebe2bc9cb638475f5d39068d2dbe8ae1d605bb8d8d3ff281c695df1670ab3987"}, - {file = "mypy-0.902-cp36-cp36m-win_amd64.whl", hash = "sha256:f89bfda7f0f66b789792ab64ce0978e4a991a0e4dd6197349d0767b0f1095b21"}, - {file = "mypy-0.902-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:746e0b0101b8efec34902810047f26a8c80e1efbb4fc554956d848c05ef85d76"}, - {file = "mypy-0.902-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:0190fb77e93ce971954c9e54ea61de2802065174e5e990c9d4c1d0f54fbeeca2"}, - {file = "mypy-0.902-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:b5dfcd22c6bab08dfeded8d5b44bdcb68c6f1ab261861e35c470b89074f78a70"}, - {file = "mypy-0.902-cp37-cp37m-win_amd64.whl", hash = "sha256:b5ba1f0d5f9087e03bf5958c28d421a03a4c1ad260bf81556195dffeccd979c4"}, - {file = "mypy-0.902-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9ef5355eaaf7a23ab157c21a44c614365238a7bdb3552ec3b80c393697d974e1"}, - {file = "mypy-0.902-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:517e7528d1be7e187a5db7f0a3e479747307c1b897d9706b1c662014faba3116"}, - {file = "mypy-0.902-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:fd634bc17b1e2d6ce716f0e43446d0d61cdadb1efcad5c56ca211c22b246ebc8"}, - {file = "mypy-0.902-cp38-cp38-win_amd64.whl", hash = "sha256:fc4d63da57ef0e8cd4ab45131f3fe5c286ce7dd7f032650d0fbc239c6190e167"}, - {file = "mypy-0.902-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:353aac2ce41ddeaf7599f1c73fed2b75750bef3b44b6ad12985a991bc002a0da"}, - {file = "mypy-0.902-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ae94c31bb556ddb2310e4f913b706696ccbd43c62d3331cd3511caef466871d2"}, - {file = "mypy-0.902-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:8be7bbd091886bde9fcafed8dd089a766fa76eb223135fe5c9e9798f78023a20"}, - {file = "mypy-0.902-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:4efc67b9b3e2fddbe395700f91d5b8deb5980bfaaccb77b306310bd0b9e002eb"}, - {file = "mypy-0.902-cp39-cp39-win_amd64.whl", hash = "sha256:9f1d74eeb3f58c7bd3f3f92b8f63cb1678466a55e2c4612bf36909105d0724ab"}, - {file = "mypy-0.902-py3-none-any.whl", hash = "sha256:a26d0e53e90815c765f91966442775cf03b8a7514a4e960de7b5320208b07269"}, - {file = "mypy-0.902.tar.gz", hash = "sha256:9236c21194fde5df1b4d8ebc2ef2c1f2a5dc7f18bcbea54274937cae2e20a01c"}, + {file = "mypy-0.910-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:a155d80ea6cee511a3694b108c4494a39f42de11ee4e61e72bc424c490e46457"}, + {file = "mypy-0.910-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:b94e4b785e304a04ea0828759172a15add27088520dc7e49ceade7834275bedb"}, + {file = "mypy-0.910-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:088cd9c7904b4ad80bec811053272986611b84221835e079be5bcad029e79dd9"}, + {file = "mypy-0.910-cp35-cp35m-win_amd64.whl", hash = "sha256:adaeee09bfde366d2c13fe6093a7df5df83c9a2ba98638c7d76b010694db760e"}, + {file = "mypy-0.910-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:ecd2c3fe726758037234c93df7e98deb257fd15c24c9180dacf1ef829da5f921"}, + {file = "mypy-0.910-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:d9dd839eb0dc1bbe866a288ba3c1afc33a202015d2ad83b31e875b5905a079b6"}, + {file = "mypy-0.910-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:3e382b29f8e0ccf19a2df2b29a167591245df90c0b5a2542249873b5c1d78212"}, + {file = "mypy-0.910-cp36-cp36m-win_amd64.whl", hash = "sha256:53fd2eb27a8ee2892614370896956af2ff61254c275aaee4c230ae771cadd885"}, + {file = "mypy-0.910-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b6fb13123aeef4a3abbcfd7e71773ff3ff1526a7d3dc538f3929a49b42be03f0"}, + {file = "mypy-0.910-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e4dab234478e3bd3ce83bac4193b2ecd9cf94e720ddd95ce69840273bf44f6de"}, + {file = "mypy-0.910-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:7df1ead20c81371ccd6091fa3e2878559b5c4d4caadaf1a484cf88d93ca06703"}, + {file = "mypy-0.910-cp37-cp37m-win_amd64.whl", hash = "sha256:0aadfb2d3935988ec3815952e44058a3100499f5be5b28c34ac9d79f002a4a9a"}, + {file = "mypy-0.910-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:ec4e0cd079db280b6bdabdc807047ff3e199f334050db5cbb91ba3e959a67504"}, + {file = "mypy-0.910-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:119bed3832d961f3a880787bf621634ba042cb8dc850a7429f643508eeac97b9"}, + {file = "mypy-0.910-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:866c41f28cee548475f146aa4d39a51cf3b6a84246969f3759cb3e9c742fc072"}, + {file = "mypy-0.910-cp38-cp38-win_amd64.whl", hash = "sha256:ceb6e0a6e27fb364fb3853389607cf7eb3a126ad335790fa1e14ed02fba50811"}, + {file = "mypy-0.910-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1a85e280d4d217150ce8cb1a6dddffd14e753a4e0c3cf90baabb32cefa41b59e"}, + {file = "mypy-0.910-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:42c266ced41b65ed40a282c575705325fa7991af370036d3f134518336636f5b"}, + {file = "mypy-0.910-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:3c4b8ca36877fc75339253721f69603a9c7fdb5d4d5a95a1a1b899d8b86a4de2"}, + {file = "mypy-0.910-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:c0df2d30ed496a08de5daed2a9ea807d07c21ae0ab23acf541ab88c24b26ab97"}, + {file = "mypy-0.910-cp39-cp39-win_amd64.whl", hash = "sha256:c6c2602dffb74867498f86e6129fd52a2770c48b7cd3ece77ada4fa38f94eba8"}, + {file = "mypy-0.910-py3-none-any.whl", hash = "sha256:ef565033fa5a958e62796867b1df10c40263ea9ded87164d67572834e57a174d"}, + {file = "mypy-0.910.tar.gz", hash = "sha256:704098302473cb31a218f1775a873b376b30b4c18229421e9e9dc8916fd16150"}, ] mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, @@ -1718,26 +1717,18 @@ pyyaml = [ {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, - {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347"}, - {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541"}, {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, - {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa"}, - {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"}, {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, - {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247"}, - {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc"}, {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, - {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122"}, - {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6"}, {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, @@ -1916,6 +1907,10 @@ types-paramiko = [ {file = "types-paramiko-0.1.7.tar.gz", hash = "sha256:51ce59aea222c47d0590e2b8d8cefbc5aeb469d8bf6368e4f06ad3c61c932c72"}, {file = "types_paramiko-0.1.7-py2.py3-none-any.whl", hash = "sha256:9fb9f3a363c99ae735148a7ce3c28adbe8f87797ec3c8cce3103899acbdebfa8"}, ] +types-pyopenssl = [ + {file = "types-pyOpenSSL-20.0.3.tar.gz", hash = "sha256:177e102b9e68986ca7b2b6aea11f6ee5b9c5e0f9c89dcaa8d28b31527571f625"}, + {file = "types_pyOpenSSL-20.0.3-py3-none-any.whl", hash = "sha256:c51286c23e26e4c67d1e9d1e1ce2efd2d5386c32c15dc90a977290b79e16532a"}, +] types-python-dateutil = [ {file = "types-python-dateutil-0.1.4.tar.gz", hash = "sha256:e6486ca27b6dde73e0ec079a9e1b03e208766e6bc7f1e08964a7e9104a5c7d7a"}, {file = "types_python_dateutil-0.1.4-py2.py3-none-any.whl", hash = "sha256:39bfe0bde61fc673b8fa28167bd78622d976210f791971b9f3e10877cbf119a4"}, diff --git a/pyproject.toml b/pyproject.toml index 5b2c41a6..f7838a67 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,6 +47,7 @@ twilio = "^6.58.0" ring-doorbell = ">=0.6.0" pyarlo = "^0.2.4" paramiko = "^2.7.2" +types-pyOpenSSL = "^20.0.3" [tool.poetry.dev-dependencies] "flake8" = "*" From f45b9d107137cd2c2bf4e5680f092ab708388626 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 13 Jul 2021 17:39:12 +0000 Subject: [PATCH 011/325] Bump addressable from 2.7.0 to 2.8.0 in /old_docs Bumps [addressable](https://github.com/sporkmonger/addressable) from 2.7.0 to 2.8.0. - [Release notes](https://github.com/sporkmonger/addressable/releases) - [Changelog](https://github.com/sporkmonger/addressable/blob/main/CHANGELOG.md) - [Commits](https://github.com/sporkmonger/addressable/compare/addressable-2.7.0...addressable-2.8.0) --- updated-dependencies: - dependency-name: addressable dependency-type: indirect ... Signed-off-by: dependabot[bot] --- old_docs/Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/old_docs/Gemfile.lock b/old_docs/Gemfile.lock index d9ae04b2..a3aa56d4 100644 --- a/old_docs/Gemfile.lock +++ b/old_docs/Gemfile.lock @@ -7,7 +7,7 @@ GEM minitest (~> 5.1) tzinfo (~> 1.1) zeitwerk (~> 2.2, >= 2.2.2) - addressable (2.7.0) + addressable (2.8.0) public_suffix (>= 2.0.2, < 5.0) coffee-script (2.4.1) coffee-script-source From 5251581da5dbcf7937f124d81e31e8ea6e589fdd Mon Sep 17 00:00:00 2001 From: James Seward Date: Sat, 17 Jul 2021 14:47:25 +0100 Subject: [PATCH 012/325] Apply pylint fixes --- simplemonitor/Alerters/alerter.py | 18 +++++++------- simplemonitor/Alerters/bulksms.py | 21 +++++++++------- simplemonitor/Alerters/execute.py | 12 ++++++---- simplemonitor/Alerters/fortysixelks.py | 33 ++++++++++---------------- simplemonitor/Alerters/mail.py | 16 ++++++++----- simplemonitor/Alerters/nc.py | 22 ++++++----------- simplemonitor/Alerters/pushbullet.py | 13 ++++++---- simplemonitor/Alerters/pushover.py | 7 +++--- simplemonitor/Alerters/ses.py | 20 ++++++---------- simplemonitor/Alerters/slack.py | 33 ++++++++++---------------- simplemonitor/Alerters/sms77.py | 20 +++++++++------- simplemonitor/Alerters/sns.py | 27 ++++++++------------- simplemonitor/Alerters/syslogger.py | 12 ++++++++-- simplemonitor/Alerters/telegram.py | 11 +++++---- simplemonitor/Alerters/twilio.py | 6 +++-- 15 files changed, 135 insertions(+), 136 deletions(-) diff --git a/simplemonitor/Alerters/alerter.py b/simplemonitor/Alerters/alerter.py index 0c33792a..364cc038 100644 --- a/simplemonitor/Alerters/alerter.py +++ b/simplemonitor/Alerters/alerter.py @@ -1,5 +1,7 @@ # coding=utf-8 -"""Alerting for SimpleMonitor""" +""" +Alerting for SimpleMonitor +""" import datetime import logging @@ -116,17 +118,15 @@ def __init__(self, config_options: dict = None) -> None: self.get_config_option("time_upper", required_type="str", required=True) ) try: + time_lower_split = list(map(int, time_lower.split(":"))) + time_upper_split = list(map(int, time_upper.split(":"))) time_info = [ - datetime.time( - int(time_lower.split(":")[0]), int(time_lower.split(":")[1]) - ), - datetime.time( - int(time_upper.split(":")[0]), int(time_upper.split(":")[1]) - ), + datetime.time(time_lower_split[0], time_lower_split[1]), + datetime.time(time_upper_split[0], time_upper_split[1]), ] self._time_info = (time_info[0], time_info[1]) - except Exception: - raise RuntimeError("error processing time limit definition") + except Exception as error: + raise RuntimeError("error processing time limit definition") from error self._days = cast( List[int], self.get_config_option( diff --git a/simplemonitor/Alerters/bulksms.py b/simplemonitor/Alerters/bulksms.py index 70ac9d72..2bf131a9 100644 --- a/simplemonitor/Alerters/bulksms.py +++ b/simplemonitor/Alerters/bulksms.py @@ -1,4 +1,6 @@ -# coding=utf-8 +""" +SimpleMonitor alerting via BulkSMS +""" from typing import cast @@ -10,7 +12,8 @@ @register class BulkSMSAlerter(Alerter): - """Send SMS alerts using the BulkSMS service. + """ + Send SMS alerts using the BulkSMS service Subscription required, see http://www.bulksms.co.uk""" @@ -61,17 +64,19 @@ def send_alert(self, name: str, monitor: Monitor) -> None: if not self._dry_run: try: - r = requests.get(url, params=params) - s = r.text - if not s.startswith("0"): + response = requests.get(url, params=params) + status = response.text + if not status.startswith("0"): self.alerter_logger.error( - "Unable to send SMS: %s (%s)", s.split("|")[0], s.split("|")[1] + "Unable to send SMS: %s (%s)", + status.split("|")[0], + status.split("|")[1], ) - except Exception: + except requests.exceptions.RequestException: self.alerter_logger.exception("SMS sending failed") else: self.alerter_logger.info( - "dry_run: would send SMS: {} with message {}".format(url, message) + "dry_run: would send SMS: %s with message %s", url, message ) def _describe_action(self) -> str: diff --git a/simplemonitor/Alerters/execute.py b/simplemonitor/Alerters/execute.py index d3bbdec6..ceefb264 100644 --- a/simplemonitor/Alerters/execute.py +++ b/simplemonitor/Alerters/execute.py @@ -1,4 +1,7 @@ -# coding=utf-8 +""" +SimpleMonitor command execution as alerts +""" + import shlex import subprocess # nosec from typing import Optional, cast @@ -10,7 +13,7 @@ @register class ExecuteAlerter(Alerter): - """Execute an external command when a monitor fails or recovers.""" + """Execute an external command when a monitor fails or recovers""" alerter_type = "execute" @@ -34,6 +37,7 @@ def __init__(self, config_options: dict) -> None: raise AlerterConfigurationError("execute alerter has no commands defined") def send_alert(self, name: str, monitor: Monitor) -> None: + """Execute the command""" alert_type = self.should_alert(monitor) command = None # type: Optional[str] downtime = monitor.get_downtime() @@ -44,7 +48,7 @@ def send_alert(self, name: str, monitor: Monitor) -> None: if alert_type == AlertType.NONE: return - elif alert_type == AlertType.FAILURE: + if alert_type == AlertType.FAILURE: command = self.fail_command elif alert_type == AlertType.SUCCESS: command = self.success_command @@ -78,7 +82,7 @@ def send_alert(self, name: str, monitor: Monitor) -> None: try: subprocess.call(shlex.split(command)) # nosec self.alerter_logger.debug("Command has finished.") - except Exception: + except subprocess.SubprocessError: self.alerter_logger.exception( "Exception encountered running command: %s", command ) diff --git a/simplemonitor/Alerters/fortysixelks.py b/simplemonitor/Alerters/fortysixelks.py index 993b3af6..4254f89c 100644 --- a/simplemonitor/Alerters/fortysixelks.py +++ b/simplemonitor/Alerters/fortysixelks.py @@ -1,12 +1,11 @@ -try: - import requests - - requests_available = True -except ImportError: - requests_available = False +""" +SimpleMonitor alerts via 46elks +""" from typing import cast +import requests + from ..Monitors.monitor import Monitor from ..util import AlerterConfigurationError from .alerter import Alerter, AlertLength, AlertType, register @@ -14,21 +13,16 @@ @register class FortySixElksAlerter(Alerter): - """Send SMS alerts using the 46elks SMS service. + """ + Send SMS alerts using the 46elks SMS service - Account required, see https://www.46elks.com/""" + Account required, see https://www.46elks.com/ + """ alerter_type = "46elks" def __init__(self, config_options: dict) -> None: super().__init__(config_options) - if not requests_available: - self.alerter_logger.critical( - "Requests package is not available, cannot use FortySixElksAlerter." - ) - self.alerter_logger.critical("Try: pip install -r requirements.txt") - return - self.username = cast( str, self.get_config_option("username", required=True, allow_empty=False) ) @@ -60,7 +54,6 @@ def send_alert(self, name: str, monitor: Monitor) -> None: if not monitor.urgent: return - alert_type = self.should_alert(monitor) if alert_type not in [AlertType.CATCHUP, AlertType.FAILURE]: @@ -74,10 +67,10 @@ def send_alert(self, name: str, monitor: Monitor) -> None: if not self._dry_run: try: response = requests.post(url, data=params, auth=auth) - s = response.json() - if s["status"] not in ("created", "delivered"): - self.alerter_logger.error("Unable to send SMS: %s", s) - except Exception: + status = response.json() + if status["status"] not in ("created", "delivered"): + self.alerter_logger.error("Unable to send SMS: %s", status) + except requests.exceptions.RequestException: self.alerter_logger.exception("SMS sending failed") else: self.alerter_logger.info("dry_run: would send SMS: %s", url) diff --git a/simplemonitor/Alerters/mail.py b/simplemonitor/Alerters/mail.py index 93fcefa3..17d34168 100644 --- a/simplemonitor/Alerters/mail.py +++ b/simplemonitor/Alerters/mail.py @@ -1,6 +1,9 @@ -# coding=utf-8 -import smtplib +""" +SimpleMonitor alerts via email/SMTP +""" + import email.utils +import smtplib from email.mime.multipart import MIMEMultipart from email.mime.text import MIMEText from typing import Optional, cast @@ -11,7 +14,7 @@ @register class EMailAlerter(Alerter): - """Send email alerts using SMTP to a mail server.""" + """Send email alerts using SMTP to a mail server""" alerter_type = "email" @@ -40,7 +43,7 @@ def __init__(self, config_options: dict) -> None: self.support_catchup = True def send_alert(self, name: str, monitor: Monitor) -> None: - """Send the email.""" + """Send the email""" alert_type = self.should_alert(monitor) @@ -81,12 +84,13 @@ def send_alert(self, name: str, monitor: Monitor) -> None: server.login(self.username, self.password) except smtplib.SMTPNotSupportedError: self.alerter_logger.exception( - "You may need to add ssl=starttls and/or port=587 to your alerter config" + "You may need to add ssl=starttls and/or port=587 to " + "your alerter config" ) return server.sendmail(self.from_addr, envelope_to, message.as_string()) server.quit() - except Exception: + except smtplib.SMTPException: self.alerter_logger.exception("couldn't send mail") else: self.alerter_logger.info( diff --git a/simplemonitor/Alerters/nc.py b/simplemonitor/Alerters/nc.py index 5623a723..1d098032 100644 --- a/simplemonitor/Alerters/nc.py +++ b/simplemonitor/Alerters/nc.py @@ -1,31 +1,23 @@ -try: - import pync - - pync_available = True -except Exception: - pync_available = False +""" +SimpleMonitor alerts via macOS Notification Center +""" import platform +import pync + from ..Monitors.monitor import Monitor from .alerter import Alerter, AlertLength, AlertType, register @register class NotificationCenterAlerter(Alerter): - """Send alerts to the Mac OS X Notification Center.""" + """Send alerts to the macOS Notification Center""" alerter_type = "nc" def __init__(self, config_options: dict) -> None: super().__init__(config_options) - if not pync_available: - self.alerter_logger.critical( - "Pync package is not available, which is necessary to use NotificationCenterAlerter." - ) - self.alerter_logger.critical("Try: pip install -r requirements.txt") - return - if platform.system() != "Darwin": self.alerter_logger.critical( "This alerter (currently) only works on Mac OS X!" @@ -33,7 +25,7 @@ def __init__(self, config_options: dict) -> None: return def send_alert(self, name: str, monitor: Monitor) -> None: - """Send the message.""" + """Send the message""" alert_type = self.should_alert(monitor) message = "" diff --git a/simplemonitor/Alerters/pushbullet.py b/simplemonitor/Alerters/pushbullet.py index 0f859221..f7ae0c26 100644 --- a/simplemonitor/Alerters/pushbullet.py +++ b/simplemonitor/Alerters/pushbullet.py @@ -1,6 +1,11 @@ +""" +SimpleMonitor alerts via pushbullet +""" + from typing import cast import requests +import requests.auth from ..Monitors.monitor import Monitor from .alerter import Alerter, AlertLength, AlertType, register @@ -14,7 +19,6 @@ class PushbulletAlerter(Alerter): def __init__(self, config_options: dict) -> None: super().__init__(config_options) - self.pushbullet_token = cast( str, self.get_config_option("token", required=True, allow_empty=False) ) @@ -23,14 +27,13 @@ def __init__(self, config_options: dict) -> None: def send_pushbullet_notification(self, subject: str, body: str) -> None: """Send a push notification.""" - _payload = {"type": "note", "title": subject, "body": body} _auth = requests.auth.HTTPBasicAuth(self.pushbullet_token, "") - r = requests.post( + response = requests.post( "https://api.pushbullet.com/v2/pushes", data=_payload, auth=_auth ) - if not r.status_code == requests.codes.ok: + if not response.status_code == requests.codes.ok: raise RuntimeError("Unable to send Pushbullet notification") def send_alert(self, name: str, monitor: Monitor) -> None: @@ -49,7 +52,7 @@ def send_alert(self, name: str, monitor: Monitor) -> None: except Exception: self.alerter_logger.exception("Couldn't send push notification") else: - self.alerter_logger.info("dry_run: would send push notification: %s" % body) + self.alerter_logger.info("dry_run: would send push notification: %s", body) def _describe_action(self) -> str: return "posting to pushbullet" diff --git a/simplemonitor/Alerters/pushover.py b/simplemonitor/Alerters/pushover.py index a76294df..7a21202c 100644 --- a/simplemonitor/Alerters/pushover.py +++ b/simplemonitor/Alerters/pushover.py @@ -1,4 +1,7 @@ -# coding=utf-8 +""" +SimpleMonitor alerts via pushover +""" + from typing import cast import requests @@ -15,7 +18,6 @@ class PushoverAlerter(Alerter): def __init__(self, config_options: dict) -> None: super().__init__(config_options) - self.pushover_token = cast( str, self.get_config_option("token", required=True, allow_empty=False) ) @@ -27,7 +29,6 @@ def __init__(self, config_options: dict) -> None: def send_pushover_notification(self, subject: str, body: str) -> None: """Send a push notification.""" - requests.post( "https://api.pushover.net/1/messages.json", data={ diff --git a/simplemonitor/Alerters/ses.py b/simplemonitor/Alerters/ses.py index 87edda17..793f3141 100644 --- a/simplemonitor/Alerters/ses.py +++ b/simplemonitor/Alerters/ses.py @@ -1,14 +1,13 @@ -# coding=utf-8 -try: - import boto3 - - boto3_available = True -except ImportError: - boto3_available = False +""" +SimpleMonitor alerts via Amazon Simple Email Service +""" import os from typing import Any, Dict, cast +import boto3 +from botocore.exceptions import ClientError + from ..Monitors.monitor import Monitor from .alerter import Alerter, AlertLength, AlertType, register @@ -21,11 +20,6 @@ class SESAlerter(Alerter): def __init__(self, config_options: dict) -> None: super().__init__(config_options) - if not boto3_available: - self.alerter_logger.critical( - "boto3 package is not available, cannot use SESAlerter." - ) - return self.from_addr = cast(str, self.get_config_option("from", allow_empty=False)) self.to_addr = cast(str, self.get_config_option("to", allow_empty=False)) @@ -71,7 +65,7 @@ def send_alert(self, name: str, monitor: Monitor) -> None: try: client = boto3.client("ses", **self.ses_client_params) client.send_email(**mail) - except Exception: + except ClientError: self.alerter_logger.exception("couldn't send mail") else: self.alerter_logger.info("dry_run: would send email:") diff --git a/simplemonitor/Alerters/slack.py b/simplemonitor/Alerters/slack.py index 60aee645..f5b80cf0 100644 --- a/simplemonitor/Alerters/slack.py +++ b/simplemonitor/Alerters/slack.py @@ -1,12 +1,11 @@ -try: - import requests - - requests_available = True -except ImportError: - requests_available = False +""" +SimpleMonitor alerts via Slack webhooks +""" from typing import Any, Dict, cast +import requests + from ..Monitors.monitor import Monitor from ..util import format_datetime from .alerter import Alerter, AlertType, register @@ -14,7 +13,7 @@ @register class SlackAlerter(Alerter): - """Send alerts to a Slack webhook.""" + """Send alerts to a Slack webhook""" alerter_type = "slack" @@ -23,13 +22,6 @@ class SlackAlerter(Alerter): def __init__(self, config_options: dict) -> None: super().__init__(config_options) - if not requests_available: - self.alerter_logger.critical( - "Requests package is not available, cannot use SlackAlerter." - ) - self.alerter_logger.critical("Try: pip install -r requirements.txt") - return - self.url = cast( str, self.get_config_option("url", required=True, allow_empty=False) ) @@ -38,8 +30,7 @@ def __init__(self, config_options: dict) -> None: self.username = cast(str, self.get_config_option("username")) def send_alert(self, name: str, monitor: Monitor) -> None: - """Send the message.""" - + """Send the message""" alert_type = self.should_alert(monitor) downtime = monitor.get_downtime() @@ -109,10 +100,12 @@ def send_alert(self, name: str, monitor: Monitor) -> None: if not self._dry_run: try: - r = requests.post(self.url, json=message_json) - if not r.status_code == 200: - self.alerter_logger.error("POST to slack webhook failed: %s", r) - except Exception: + response = requests.post(self.url, json=message_json) + if not response.status_code == 200: + self.alerter_logger.error( + "POST to slack webhook failed: %s", response + ) + except requests.exceptions.RequestException: self.alerter_logger.exception("Failed to post to slack webhook") else: self.alerter_logger.info( diff --git a/simplemonitor/Alerters/sms77.py b/simplemonitor/Alerters/sms77.py index def22fc3..fe63113a 100644 --- a/simplemonitor/Alerters/sms77.py +++ b/simplemonitor/Alerters/sms77.py @@ -1,4 +1,6 @@ -# coding=utf-8 +""" +SimpleMonitor alerts via SMS77 +""" from typing import cast @@ -10,7 +12,7 @@ @register class SMS77Alerter(Alerter): - """Send SMS alerts using the sms77 service.""" + """Send SMS alerts using the sms77 service""" alerter_type = "sms77" @@ -31,7 +33,7 @@ def __init__(self, config_options: dict) -> None: self.support_catchup = True def send_alert(self, name: str, monitor: Monitor) -> None: - """Send an SMS alert.""" + """Send an SMS alert""" if not monitor.urgent: return @@ -52,11 +54,13 @@ def send_alert(self, name: str, monitor: Monitor) -> None: if not self._dry_run: try: - r = requests.get(url, params=params) - s = r.text - if not s.startswith("100"): - self.alerter_logger.error("Unable to send SMS: status code %s", s) - except Exception: + response = requests.get(url, params=params) + status = response.text + if not status.startswith("100"): + self.alerter_logger.error( + "Unable to send SMS: status code %s", status + ) + except requests.RequestException: self.alerter_logger.exception("SMS sending failed") else: self.alerter_logger.info("dry_run: would send SMS: %s", message) diff --git a/simplemonitor/Alerters/sns.py b/simplemonitor/Alerters/sns.py index 18b63848..1d5da16d 100644 --- a/simplemonitor/Alerters/sns.py +++ b/simplemonitor/Alerters/sns.py @@ -1,13 +1,12 @@ -# coding=utf-8 -try: - import boto3 - - boto3_available = True -except ImportError: - boto3_available = False +""" +SimpleMonitor alerts via Amazon SNS +""" from typing import Dict, Optional, cast +import boto3 +from botocore.exceptions import ClientError + from ..Monitors.monitor import Monitor from ..util import AlerterConfigurationError from .alerter import Alerter, AlertLength, AlertType, register @@ -21,12 +20,6 @@ class SNSAlerter(Alerter): def __init__(self, config_options: dict) -> None: super().__init__(config_options) - if not boto3_available: - self.alerter_logger.critical( - "boto3 package is not available, cannot use SNSAlerter." - ) - return - self.topic = cast(str, self.get_config_option("topic", default="")) self.number = cast(str, self.get_config_option("number", default="")) @@ -54,17 +47,17 @@ def __init__(self, config_options: dict) -> None: self.sns_client_params["aws_secret_access_key"] = aws_secret_key def send_alert(self, name: str, monitor: Monitor) -> None: - """Send the email.""" + """Send the alert""" if not monitor.urgent: return - alert_type = self.should_alert(monitor) if alert_type == AlertType.NONE: return subject = None # type: Optional[str] + message = "Misconfiguration: could not build message" if self.topic: subject = self.build_message(AlertLength.NOTIFICATION, alert_type, monitor) message = self.build_message(AlertLength.FULL, alert_type, monitor) @@ -80,7 +73,7 @@ def send_alert(self, name: str, monitor: Monitor) -> None: client.publish( TopicArn=self.topic, Subject=subject, Message=message ) - except Exception: + except ClientError: self.alerter_logger.exception("couldn't send notification") else: if subject is None: @@ -95,6 +88,6 @@ def send_alert(self, name: str, monitor: Monitor) -> None: def _describe_action(self) -> str: if self.topic: return "posting to SNS topic {topic}".format(topic=self.topic) - elif self.number: + if self.number: return "SMSing {target} via SNS".format(target=self.number) return "not sending anything via SNS" diff --git a/simplemonitor/Alerters/syslogger.py b/simplemonitor/Alerters/syslogger.py index ad4e38ef..9e4649eb 100644 --- a/simplemonitor/Alerters/syslogger.py +++ b/simplemonitor/Alerters/syslogger.py @@ -1,8 +1,12 @@ -# coding=utf-8 +""" +SimpleMonitor alerts into syslog +""" + try: import syslog + SYSLOG_AVAILABLE = True except ImportError: - pass + SYSLOG_AVAILABLE = False from ..Monitors.monitor import Monitor from .alerter import Alerter, AlertType, register @@ -10,9 +14,13 @@ @register class SyslogAlerter(Alerter): + """Send alerts to syslog""" alerter_type = "syslog" def send_alert(self, name: str, monitor: Monitor) -> None: + if not SYSLOG_AVAILABLE: + self.alerter_logger.critical("syslog not available") + return alert_type = self.should_alert(monitor) if alert_type == AlertType.FAILURE: syslog.syslog( diff --git a/simplemonitor/Alerters/telegram.py b/simplemonitor/Alerters/telegram.py index 4ae08b18..8b8d9118 100644 --- a/simplemonitor/Alerters/telegram.py +++ b/simplemonitor/Alerters/telegram.py @@ -1,4 +1,7 @@ -# coding=utf-8 +""" +SimpleMonitor alerts via Telegram +""" + from typing import cast import requests @@ -29,11 +32,11 @@ def __init__(self, config_options: dict) -> None: def send_telegram_notification(self, body: str) -> None: """Send a push notification.""" - r = requests.post( + response = requests.post( "https://api.telegram.org/bot{}/sendMessage".format(self.telegram_token), data={"chat_id": self.telegram_chatid, "text": body}, ) - if not r.status_code == requests.codes.ok: + if not response.status_code == requests.codes.ok: raise RuntimeError("Unable to send telegram notification") def send_alert(self, name: str, monitor: Monitor) -> None: @@ -51,7 +54,7 @@ def send_alert(self, name: str, monitor: Monitor) -> None: except Exception: self.alerter_logger.exception("Couldn't send push notification") else: - self.alerter_logger.info("dry_run: would send push notification: %s" % body) + self.alerter_logger.info("dry_run: would send push notification: %s", body) def _describe_action(self) -> str: return "posting messages to {chatid} on Telegram".format( diff --git a/simplemonitor/Alerters/twilio.py b/simplemonitor/Alerters/twilio.py index 241b5bab..dfe0a788 100644 --- a/simplemonitor/Alerters/twilio.py +++ b/simplemonitor/Alerters/twilio.py @@ -1,4 +1,6 @@ -# coding=utf-8 +""" +SimpleMonitor alerts via Twilio +""" from typing import cast @@ -11,7 +13,7 @@ @register class TwilioSMSAlerter(Alerter): - """Send SMS alerts using Twilio.""" + """Send SMS alerts using Twilio""" alerter_type = "twilio_sms" From 99dcd3cbc1f73365eee771b8662898350d5a047c Mon Sep 17 00:00:00 2001 From: James Seward Date: Sat, 17 Jul 2021 14:50:10 +0100 Subject: [PATCH 013/325] Update precommit repos --- .pre-commit-config.yaml | 8 ++++---- setup.cfg | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d649f75f..db1af92a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,18 +8,18 @@ repos: exclude: tests/test_alerter.py - id: flake8 - repo: https://github.com/psf/black - rev: 20.8b1 + rev: 21.7b0 hooks: - id: black - repo: https://github.com/asottile/seed-isort-config - rev: v1.9.3 + rev: v2.2.0 hooks: - id: seed-isort-config - repo: https://github.com/pre-commit/mirrors-isort - rev: v4.3.21 # pick the isort version you'd like to use from https://github.com/pre-commit/mirrors-isort/releases + rev: v5.9.2 # pick the isort version you'd like to use from https://github.com/pre-commit/mirrors-isort/releases hooks: - id: isort - repo: https://github.com/pre-commit/mirrors-mypy - rev: v0.782 + rev: v0.910 hooks: - id: mypy diff --git a/setup.cfg b/setup.cfg index 592495ea..4969dafa 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,7 +11,7 @@ per-file-ignores = simplemonitor/__init__.py:F401 [isort] -known_third_party = OpenSSL,arrow,freezegun,jinja2,requests,setuptools,sphinx,sphinx_rtd_theme,twilio,win32event,win32service,win32serviceutil +known_third_party = OpenSSL,arrow,boto3,botocore,freezegun,jinja2,pync,requests,setuptools,sphinx,sphinx_rtd_theme,twilio,win32event,win32service,win32serviceutil known_first_party = Alerters,Loggers,Monitors,envconfig,util,simplemonitor line_length=88 multi_line_output=3 From 54ea13a9832e672c93cce69165b927cab92105f0 Mon Sep 17 00:00:00 2001 From: James Seward Date: Sat, 17 Jul 2021 15:32:19 +0100 Subject: [PATCH 014/325] Apply pylint fixes --- .pre-commit-config.yaml | 1 + setup.cfg | 2 +- simplemonitor/Loggers/db.py | 56 ++++++++++++++++++-------------- simplemonitor/Loggers/file.py | 21 ++++++++---- simplemonitor/Loggers/logger.py | 5 ++- simplemonitor/Loggers/mqtt.py | 33 +++++++++---------- simplemonitor/Loggers/network.py | 2 -- simplemonitor/Loggers/seq.py | 49 +++++++++++++--------------- 8 files changed, 88 insertions(+), 81 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index db1af92a..0db39431 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,3 +23,4 @@ repos: rev: v0.910 hooks: - id: mypy + args: ["--install-types", "--non-interactive"] diff --git a/setup.cfg b/setup.cfg index 4969dafa..372d20fb 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,7 +11,7 @@ per-file-ignores = simplemonitor/__init__.py:F401 [isort] -known_third_party = OpenSSL,arrow,boto3,botocore,freezegun,jinja2,pync,requests,setuptools,sphinx,sphinx_rtd_theme,twilio,win32event,win32service,win32serviceutil +known_third_party = OpenSSL,arrow,boto3,botocore,freezegun,jinja2,paho,pync,requests,setuptools,sphinx,sphinx_rtd_theme,twilio,win32event,win32service,win32serviceutil known_first_party = Alerters,Loggers,Monitors,envconfig,util,simplemonitor line_length=88 multi_line_output=3 diff --git a/simplemonitor/Loggers/db.py b/simplemonitor/Loggers/db.py index bc1c5c91..953a2cb1 100644 --- a/simplemonitor/Loggers/db.py +++ b/simplemonitor/Loggers/db.py @@ -1,11 +1,8 @@ -# coding=utf-8 -try: - import sqlite3 - - sqlite_available = True -except ImportError: - sqlite_available = False +""" +SimpleMonitor logging with sqlite +""" +import sqlite3 import time from socket import gethostname @@ -51,8 +48,6 @@ class DBLogger(Logger): def __init__(self, config_options: dict) -> None: """Open the database connection.""" super().__init__(config_options) - if not sqlite_available: - raise RuntimeError("SQLite module not loaded.") self.db_path = self.get_config_option( "db_path", required=True, allow_empty=False ) @@ -95,6 +90,7 @@ def check_schema(self) -> None: self.logger_logger.debug("Schema for %s is current", self.db_path) def roll_schema_forward(self, start: int) -> None: + """Update the db schema""" for sql in CREATE_SQL[start:]: self.logger_logger.info("Applying SQL schema update") self.logger_logger.debug(sql) @@ -107,6 +103,9 @@ def roll_schema_forward(self, start: int) -> None: ) self.connected = False + def save_result2(self, name: str, monitor: Monitor) -> None: + raise NotImplementedError + @register class DBFullLogger(DBLogger): @@ -127,9 +126,13 @@ def save_result( if not self.connected: self.logger_logger.warning("cannot send results, a dependency failed") return - sql = "INSERT INTO results (result_id, monitor_host, monitor_name, monitor_type, monitor_params, monitor_result, timestamp, monitor_info) VALUES (null, ?, ?, ?, ?, ?, ?, ?)" + sql = ( + "INSERT INTO results (result_id, monitor_host, monitor_name, monitor_type, " + "monitor_params, monitor_result, timestamp, monitor_info) " + "VALUES (null, ?, ?, ?, ?, ?, ?, ?)" + ) - c = self.db_handle.cursor() + cursor = self.db_handle.cursor() join_string = ":" timestamp = int(time.time()) @@ -146,9 +149,9 @@ def save_result( monitor_info, ) try: - c.execute(sql, params) - except sqlite3.OperationalError as e: - self.logger_logger.critical("sqlite failed to write to database: %s", e) + cursor.execute(sql, params) + except sqlite3.OperationalError: + self.logger_logger.exception("sqlite failed to write to database") def save_result2(self, name: str, monitor: Monitor) -> None: """new interface.""" @@ -174,7 +177,7 @@ class DBStatusLogger(DBLogger): logger_type = "dbstatus" - def save_result( + def _save_result( self, monitor_name: str, monitor_type: str, @@ -183,28 +186,33 @@ def save_result( monitor_info: str, hostname: str = "", ) -> None: + """Original implementation for saving a result""" if hostname == "": hostname = self.hostname - c = self.db_handle.cursor() + cursor = self.db_handle.cursor() try: - c.execute( + cursor.execute( "DELETE FROM status WHERE monitor_host = ? AND monitor_name = ?", (self.hostname, monitor_name), ) - c.execute( - "REPLACE INTO status (monitor_host, monitor_name, monitor_result, monitor_info) VALUES (?, ?, ?, ?)", + cursor.execute( + ( + "REPLACE INTO status (monitor_host, monitor_name, " + "monitor_result, monitor_info) " + "VALUES (?, ?, ?, ?)" + ), (hostname, monitor_name, monitor_result, monitor_info), ) - except sqlite3.OperationalError as e: - self.logger_logger.critical("sqlite failed to write to database: %s", e) + except sqlite3.OperationalError: + self.logger_logger.exception("sqlite failed to write to database") def save_result2(self, name: str, monitor: Monitor) -> None: - """new interface.""" + """Record a result""" if monitor.test_success(): result = 1 else: result = 0 - self.save_result( + self._save_result( name, monitor.monitor_type, str(monitor.get_params()), @@ -213,4 +221,4 @@ def save_result2(self, name: str, monitor: Monitor) -> None: ) def describe(self) -> str: - return "Logging status to {0}".format(self.db_path) + return f"Logging status to {self.db_path}" diff --git a/simplemonitor/Loggers/file.py b/simplemonitor/Loggers/file.py index 9312987c..cf36d449 100644 --- a/simplemonitor/Loggers/file.py +++ b/simplemonitor/Loggers/file.py @@ -1,4 +1,7 @@ -# coding=utf-8 +""" +SimpleMonitor logging to files +""" + import json import logging import logging.handlers @@ -40,7 +43,9 @@ def __init__(self, config_options: Optional[Dict[str, Any]] = None) -> None: self.filename = self.get_config_option( "filename", required=True, allow_empty=False ) - self.file_handle = open(self.filename, "a+") + self.file_handle = open( + self.filename, "a+" + ) # pylint: disable=consider-using-with self.only_failures = self.get_config_option( "only_failures", required_type="bool", default=False @@ -92,7 +97,9 @@ def hup(self) -> None: """Close and reopen log file.""" try: self.file_handle.close() - self.file_handle = open(self.filename, "a+") + self.file_handle = open( + self.filename, "a+" + ) # pylint: disable=consider-using-with except OSError: self.logger_logger.exception( "Couldn't reopen log file %s after HUP", self.filename @@ -315,7 +322,7 @@ def save_result2(self, name: str, monitor: Monitor) -> None: "description": monitor.describe(), "link": monitor.failure_doc, "enabled": monitor.enabled, - "my_host": True if monitor.running_on == self._my_host else False, + "my_host": monitor.running_on == self._my_host, "gps": monitor.gps, } # type: Dict[str, Any] self.batch_data[monitor.name] = data_line @@ -429,7 +436,7 @@ def describe(self) -> str: return "Writing HTML page to {0}".format(self.filename) -class MonitorResult(object): +class MonitorResult: """Represent the current status of a Monitor.""" def __init__(self) -> None: @@ -441,15 +448,17 @@ def __init__(self) -> None: self.dependencies = [] # type: List[str] def json_representation(self) -> dict: + """Get JSON representation""" return self.__dict__ -class MonitorJsonPayload(object): +class MonitorJsonPayload: def __init__(self) -> None: self.generated = None # type: Optional[str] self.monitors = {} # type: dict def json_representation(self) -> dict: + """Get JSON res""presentation""" return self.__dict__ diff --git a/simplemonitor/Loggers/logger.py b/simplemonitor/Loggers/logger.py index 4c03a476..52731415 100644 --- a/simplemonitor/Loggers/logger.py +++ b/simplemonitor/Loggers/logger.py @@ -1,6 +1,5 @@ -# coding=utf-8 - -"""Logging for SimpleMonitor. +""" +Logging for SimpleMonitor. Loggers process every monitor, every iteration, to record their state in some fashion. """ diff --git a/simplemonitor/Loggers/mqtt.py b/simplemonitor/Loggers/mqtt.py index 41d544b7..739077cc 100644 --- a/simplemonitor/Loggers/mqtt.py +++ b/simplemonitor/Loggers/mqtt.py @@ -1,27 +1,25 @@ -# coding=utf-8 +""" +Simplemonitor logger for MQTT -# Simplemonitor logger for MQTT -# It is intended to be used with Home Assistant and its MQTT Discovery feature -# (this the default topic) -# but can be used in any other context -# Python 3 only -# contact: dev@swtk.info +It is intended to be used with Home Assistant and its MQTT Discovery feature +(this the default topic) +but can be used in any other context +contact: dev@swtk.info +""" -try: - import paho.mqtt.publish - - mqtt_available = True -except ImportError: - mqtt_available = False import json from typing import List, cast +import paho.mqtt.publish + from ..Monitors.monitor import Monitor from .logger import Logger, register @register class MQTTLogger(Logger): + """Log to MQTT endpoints""" + logger_type = "mqtt" only_failures = False buffered = False @@ -32,10 +30,6 @@ def __init__(self, config_options: dict = None) -> None: config_options = {} super().__init__(config_options) - if not mqtt_available: - self.logger_logger.error("Missing paho.mqtt module!") - return - self.host = cast( str, self.get_config_option("host", required=True, allow_empty=False) ) @@ -113,7 +107,10 @@ def save_result2(self, name: str, monitor: Monitor) -> None: if self.hass: if " " in safe_name: self.logger_logger.warning( - "replacing spaces with underscores for monitor %s as spaces are not supported for MQTT/HASS names", + ( + "replacing spaces with underscores for monitor %s as spaces are " + "not supported for MQTT/HASS names" + ), monitor.name, ) safe_name = monitor.name.replace(" ", "_") diff --git a/simplemonitor/Loggers/network.py b/simplemonitor/Loggers/network.py index fd155928..10562633 100644 --- a/simplemonitor/Loggers/network.py +++ b/simplemonitor/Loggers/network.py @@ -1,5 +1,3 @@ -# coding=utf-8 - """ Network logging support for SimpleMonitor """ diff --git a/simplemonitor/Loggers/seq.py b/simplemonitor/Loggers/seq.py index 308b6aa8..e3fd11f6 100644 --- a/simplemonitor/Loggers/seq.py +++ b/simplemonitor/Loggers/seq.py @@ -1,27 +1,24 @@ -# coding=utf-8 +""" +Simplemonitor logger for seq -# Simplemonitor logger for seq -# Inspiration from https://raw.githubusercontent.com/eifinger/appdaemon-scripts/master/seqSink/seqSink.py -# Python 3 only +Inspiration from +https://raw.githubusercontent.com/eifinger/appdaemon-scripts/master/seqSink/seqSink.py +""" -try: - import json - import requests - import datetime +import datetime +import json +from typing import cast - from typing import cast +import requests - from ..Monitors.monitor import Monitor - from .logger import Logger, register - - is_available = True - -except ImportError: - is_available = False +from ..Monitors.monitor import Monitor +from .logger import Logger, register @register class SeqLogger(Logger): + """Logging to seq""" + logger_type = "seq" only_failures = False buffered = False @@ -32,10 +29,6 @@ def __init__(self, config_options: dict = None) -> None: config_options = {} super().__init__(config_options) - if not is_available: - self.logger_logger.error("Missing modules!") - return - # i.e. http://192.168.0.5:5341 self.endpoint = cast( str, self.get_config_option("endpoint", required=True, allow_empty=False) @@ -71,11 +64,11 @@ def save_result2(self, name: str, monitor: Monitor) -> None: def describe(self) -> str: return "Sends simple log to seq using raw endpoint" - # From https://raw.githubusercontent.com/eifinger/appdaemon-scripts/master/seqSink/seqSink.py def log_to_seq( self, endpoint, name, app_name, monitor_type, params, description, is_fail ): + """Send an event to seq""" event_data = { "Timestamp": str(datetime.datetime.now()), "Level": "Error" if is_fail is True else "Information", @@ -96,12 +89,14 @@ def log_to_seq( try: _ = json.dumps(request_body) # This just checks it is valid... except TypeError: - self.alerter_logger.error("Could not serialise %s", request_body) + self.logger_logger.error("Could not serialise %s", request_body) return try: - r = requests.post(self.endpoint, json=request_body) - if not r.status_code == 200 and not r.status_code == 201: - self.alerter_logger.error("POST to seq failed with status code: %s", r) - except Exception: - self.alerter_logger.exception("Failed to log to seq") + response = requests.post(self.endpoint, json=request_body) + if not response.status_code == 200 and not response.status_code == 201: + self.logger_logger.error( + "POST to seq failed with status code: %s", response + ) + except requests.RequestException: + self.logger_logger.exception("Failed to log to seq") From 766a1f8c30d84a02b0f2776537f3f5c67e947a89 Mon Sep 17 00:00:00 2001 From: James Seward Date: Sat, 17 Jul 2021 16:00:50 +0100 Subject: [PATCH 015/325] Apply pylint fixes --- poetry.lock | 6 +-- pyproject.toml | 2 + setup.cfg | 2 +- simplemonitor/Monitors/arlo.py | 44 +++++++-------- simplemonitor/Monitors/compound.py | 10 ++-- simplemonitor/Monitors/file.py | 11 +++- simplemonitor/Monitors/hass.py | 25 +++++---- simplemonitor/Monitors/host.py | 87 +++++++++++++++--------------- simplemonitor/Monitors/monitor.py | 42 ++++++++++----- simplemonitor/Monitors/network.py | 11 ++-- simplemonitor/Monitors/ring.py | 17 +++--- simplemonitor/Monitors/service.py | 45 ++++++++-------- simplemonitor/Monitors/unifi.py | 23 ++++---- 13 files changed, 173 insertions(+), 152 deletions(-) diff --git a/poetry.lock b/poetry.lock index 367cab98..98534dd1 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1116,7 +1116,7 @@ python-versions = "*" name = "types-paramiko" version = "0.1.7" description = "Typing stubs for paramiko" -category = "dev" +category = "main" optional = false python-versions = "*" @@ -1146,7 +1146,7 @@ python-versions = "*" name = "types-requests" version = "2.25.0" description = "Typing stubs for requests" -category = "dev" +category = "main" optional = false python-versions = "*" @@ -1214,7 +1214,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pyt [metadata] lock-version = "1.1" python-versions = "^3.6.2" -content-hash = "096337711813817c93231589e8dc79589c75cdfe69e69e0408ed6aa39b109193" +content-hash = "b8da683a5b90580b973e936d04a73765f57e1cc043e4b8880cf830acfe5b966c" [metadata.files] alabaster = [ diff --git a/pyproject.toml b/pyproject.toml index f7838a67..6ee0cdc5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,6 +48,8 @@ ring-doorbell = ">=0.6.0" pyarlo = "^0.2.4" paramiko = "^2.7.2" types-pyOpenSSL = "^20.0.3" +types-paramiko = "^0.1.7" +types-requests = "^2.25.0" [tool.poetry.dev-dependencies] "flake8" = "*" diff --git a/setup.cfg b/setup.cfg index 372d20fb..413814a0 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,7 +11,7 @@ per-file-ignores = simplemonitor/__init__.py:F401 [isort] -known_third_party = OpenSSL,arrow,boto3,botocore,freezegun,jinja2,paho,pync,requests,setuptools,sphinx,sphinx_rtd_theme,twilio,win32event,win32service,win32serviceutil +known_third_party = OpenSSL,arrow,boto3,botocore,freezegun,jinja2,oauthlib,paho,paramiko,psutil,pyarlo,pync,requests,ring_doorbell,setuptools,sphinx,sphinx_rtd_theme,twilio,win32event,win32service,win32serviceutil known_first_party = Alerters,Loggers,Monitors,envconfig,util,simplemonitor line_length=88 multi_line_output=3 diff --git a/simplemonitor/Monitors/arlo.py b/simplemonitor/Monitors/arlo.py index b10c62b7..2a48cc01 100644 --- a/simplemonitor/Monitors/arlo.py +++ b/simplemonitor/Monitors/arlo.py @@ -1,12 +1,11 @@ -try: - import pyarlo - - pyarlo_available = True -except ImportError: - pyarlo_available = False +""" +Arlo monitoring for SimpleMonitor +""" from typing import Optional, cast +import pyarlo + from ..Monitors.monitor import Monitor, register @@ -20,10 +19,6 @@ def __init__(self, name: str, config_options: dict) -> None: if "gap" not in config_options: config_options["gap"] = 21600 # 6 hours super().__init__(name, config_options) - if not pyarlo_available: - self.monitor_logger.critical("pyarlo library is not installed") - self.monitor_logger.critical("Try: pip install pyarlo") - self.monitor_logger.critical(" or pip install simplemonitor[arlo]") self.device_name = cast(str, self.get_config_option("device_name")) self.minimum_battery = cast( int, @@ -44,8 +39,6 @@ def __init__(self, name: str, config_options: dict) -> None: self.camera = None # type: Optional[pyarlo.ArloCamera] def run_test(self) -> bool: - if not pyarlo_available: - return self.record_fail("pyarlo library is not installed") if self.arlo is None: self.monitor_logger.info("logging in to Arlo") try: @@ -59,35 +52,38 @@ def run_test(self) -> bool: return self.record_fail("failed to get Arlo object") if self.arlo_base is None: try: - self.arlo_base = self.arlo.base_stations[self.base_station_id] - except Exception: + base_stations = self.arlo.base_stations + if base_stations: + self.arlo_base = base_stations[self.base_station_id] + except KeyError: self.monitor_logger.exception("arlo base station fetch failed") return self.record_fail("could not fetch base station") if self.arlo_base is None: return self.record_fail("failed to get ArloBaseStation object") if self.camera is None: - for camera in self.arlo.cameras: - if camera.name == self.device_name: - self.camera = camera - if camera is None: + cameras = self.arlo.cameras + if cameras: + for camera in cameras: + if camera.name == self.device_name: + self.camera = camera + if self.camera is None: return self.record_fail( "could not find camera named {}".format(self.device_name) ) else: self.monitor_logger.info("Updating Arlo camera") try: - camera.update() + self.camera.update() except Exception: return self.record_fail("failed to update Arlo camera") - battery = camera.battery_level # type: int + battery = self.camera.battery_level or 0 # type: int if battery < self.minimum_battery: return self.record_fail( "Battery is at {}% (limit: {}%)".format(battery, self.minimum_battery) ) - else: - return self.record_success( - "Battery is at {}% (limit: {}%)".format(battery, self.minimum_battery) - ) + return self.record_success( + "Battery is at {}% (limit: {}%)".format(battery, self.minimum_battery) + ) def describe(self) -> str: return "Checking Arlo camera {} has battery level of at least {}%".format( diff --git a/simplemonitor/Monitors/compound.py b/simplemonitor/Monitors/compound.py index 5daf93b3..980ed8ed 100644 --- a/simplemonitor/Monitors/compound.py +++ b/simplemonitor/Monitors/compound.py @@ -1,5 +1,6 @@ -# coding=utf-8 -"""compound checks (logical and of failure of multiple probes) for SimpleMonitor.""" +""" +Compound checks (logical and of failure of multiple probes) for SimpleMonitor +""" from typing import Dict, List, Optional, Tuple, cast from weakref import WeakValueDictionary @@ -9,7 +10,8 @@ @register class CompoundMonitor(Monitor): - """Combine (logical-and) multiple failures for emergency escalation. + """ + Combine (logical-and) multiple failures for emergency escalation Check most recent proble of provided monitors, if all are fail, then report fail. """ @@ -85,7 +87,7 @@ def virtual_fail_count(self) -> int: return 0 def fail_count(self) -> int: - # increments the fail counter by 1 if a sub-monitor failed. + """increments the fail counter by 1 if a sub-monitor failed""" failcount = 0 if self.m is not None: for i in self.monitors: diff --git a/simplemonitor/Monitors/file.py b/simplemonitor/Monitors/file.py index 804ad46c..c3626dba 100644 --- a/simplemonitor/Monitors/file.py +++ b/simplemonitor/Monitors/file.py @@ -1,5 +1,6 @@ -# coding=utf-8 -""" File-based monitors for SimpleMonitor. """ +""" +File-based monitors for SimpleMonitor +""" import os import os.path @@ -10,6 +11,12 @@ @register class MonitorBackup(Monitor): + """ + Monitor Veritas BackupExec + + May be out of date + """ + monitor_type = "backup" filename = os.path.join( "C:\\", "Program Files", "VERITAS", "Backup Exec", "status.txt" diff --git a/simplemonitor/Monitors/hass.py b/simplemonitor/Monitors/hass.py index 4cbc5219..88e2b68f 100644 --- a/simplemonitor/Monitors/hass.py +++ b/simplemonitor/Monitors/hass.py @@ -1,5 +1,6 @@ -# coding=utf-8 -""" Home Automation monitors for SimpleMonitor. """ +""" +Home Automation monitors for SimpleMonitor +""" from typing import Tuple, cast @@ -10,6 +11,8 @@ @register class MonitorSensor(Monitor): + """Monitor the existence of a HASS sensor""" + monitor_type = "hass_sensor" def __init__(self, name: str, config_options: dict) -> None: @@ -36,23 +39,23 @@ def run_test(self) -> bool: ) if not call.ok: raise ValueError(call.text) - r = call.json() - self.monitor_logger.debug("retrieved JSON: %s", r) - except Exception as e: + response = call.json() + self.monitor_logger.debug("retrieved JSON: %s", response) + except requests.RequestException as error: # a general issue getting to the API - # nothing special to report, this monitor should be configured to be dependent of general hass API availability - return self.record_fail("cannot get info from hass: {}".format(e)) + # nothing special to report, this monitor should be configured to be + # dependent of general hass API availability + return self.record_fail("cannot get info from hass: {}".format(error)) else: # we have a response from the API # now: is the sensor defined at all in hass? If not the answer is basically empty - if r.get("context"): - if r["state"] == "unavailable": + if response.get("context"): + if response["state"] == "unavailable": return self.record_fail( "the sensor exists but state is 'unavailable'" ) return self.record_success() - else: - return self.record_fail("sensor not found in hass") + return self.record_fail("sensor not found in hass") def get_params(self) -> Tuple: return (self.url, self.sensor) diff --git a/simplemonitor/Monitors/host.py b/simplemonitor/Monitors/host.py index afeb5107..d7072682 100644 --- a/simplemonitor/Monitors/host.py +++ b/simplemonitor/Monitors/host.py @@ -1,3 +1,7 @@ +""" +Monitor things on a host for SimpleMonitor +""" + import os import re import shlex @@ -17,9 +21,9 @@ try: import win32api - win32_available = True + WIN32_AVAILABLE = True except ImportError: - win32_available = False + WIN32_AVAILABLE = False @register @@ -32,7 +36,7 @@ def __init__(self, name: str, config_options: dict) -> None: super().__init__(name, config_options) if self.is_windows(allow_cygwin=False): self.use_statvfs = False - if not win32_available: + if not WIN32_AVAILABLE: raise RuntimeError( "win32api is not available, but is needed for DiskSpace monitor." ) @@ -53,8 +57,8 @@ def run_test(self) -> bool: win_result = win32api.GetDiskFreeSpaceEx(self.partition) space = win_result[2] percent = float(win_result[2]) / float(win_result[1]) * 100 - except Exception as e: - return self.record_fail("Couldn't get free disk space: %s" % e) + except Exception as error: + return self.record_fail("Couldn't get free disk space: %s" % error) if self.limit and space <= self.limit: return self.record_fail( @@ -107,8 +111,8 @@ def run_test(self) -> bool: statinfo = os.stat(self.filename) except FileNotFoundError: return self.record_fail("File %s does not exist" % self.filename) - except Exception as e: - return self.record_fail("Unable to check file: %s" % e) + except Exception as error: + return self.record_fail("Unable to check file: %s" % error) if self.minsize: if statinfo.st_size < self.minsize: @@ -177,12 +181,12 @@ def run_test(self) -> bool: try: _output = subprocess.check_output(executable) # nosec output = _output.decode("utf-8") # type: str - except subprocess.CalledProcessError as e: - output = e.output - except OSError as e: - return self.record_fail("Could not run {0}: {1}".format(executable, e)) - except Exception as e: - return self.record_fail("Error while getting UPS info: {0}".format(e)) + except subprocess.CalledProcessError as error: + output = error.output + except OSError as error: + return self.record_fail("Could not run {0}: {1}".format(executable, error)) + except Exception as error: + return self.record_fail("Error while getting UPS info: {0}".format(error)) for line in output.splitlines(): if line.find(":") > -1: @@ -243,12 +247,12 @@ def run_test(self) -> bool: # nosec _output = subprocess.check_output([self.path, "-a", "-X", "1"]) # nosec output = _output.decode("utf-8") - except subprocess.CalledProcessError as e: - output = e.output - except OSError as e: - return self.record_fail("Error running %s: %s" % (self.path, e)) - except Exception as e: - return self.record_fail("Error running portaudit: %s" % e) + except subprocess.CalledProcessError as error: + output = error.output + except OSError as error: + return self.record_fail("Error running %s: %s" % (self.path, error)) + except Exception as error: + return self.record_fail("Error running portaudit: %s" % error) for line in output.splitlines(): matches = self.regexp.match(line) @@ -261,8 +265,8 @@ def run_test(self) -> bool: return self.record_fail("1 problem") return self.record_fail("%d problems" % count) return self.record_success() - except Exception as e: - return self.record_fail("Could not run portaudit: %s" % e) + except Exception as error: + return self.record_fail("Could not run portaudit: %s" % error) @register @@ -290,14 +294,14 @@ def run_test(self) -> bool: try: _output = subprocess.check_output([self.path, "audit"]) # nosec output = _output.decode("utf-8") - except subprocess.CalledProcessError as e: - output = e.output.decode("utf-8") - except OSError as e: + except subprocess.CalledProcessError as error: + output = error.output.decode("utf-8") + except OSError as error: return self.record_fail( - "Failed to run %s audit: {0} {1}".format(self.path, e) + "Failed to run %s audit: {0} {1}".format(self.path, error) ) - except Exception as e: - return self.record_fail("Error running pkg audit: {0}".format(e)) + except Exception as error: + return self.record_fail("Error running pkg audit: {0}".format(error)) for line in output.splitlines(): matches = self.regexp.match(line) @@ -310,8 +314,8 @@ def run_test(self) -> bool: return self.record_fail("1 problem") return self.record_fail("%d problems" % count) return self.record_success() - except Exception as e: - return self.record_fail("Could not run pkg: %s" % e) + except Exception as error: + return self.record_fail("Could not run pkg: %s" % error) @register @@ -335,16 +339,15 @@ def __init__(self, name: str, config_options: dict) -> None: def describe(self) -> str: if self.which == 0: return "Checking 1min loadavg is <= %0.2f" % self.max - elif self.which == 1: + if self.which == 1: return "Checking 5min loadavg is <= %0.2f" % self.max - else: - return "Checking 15min loadavg is <= %0.2f" % self.max + return "Checking 15min loadavg is <= %0.2f" % self.max def run_test(self) -> bool: try: loadavg = os.getloadavg() - except Exception as e: - return self.record_fail("Exception getting loadavg: %s" % e) + except Exception as error: + return self.record_fail("Exception getting loadavg: %s" % error) if loadavg[self.which] > self.max: return self.record_fail("%0.2f" % loadavg[self.which]) @@ -378,8 +381,7 @@ def run_test(self) -> bool: message = "{}% free".format(percent) if percent < self.percent_free: return self.record_fail(message) - else: - return self.record_success(message) + return self.record_success(message) def get_params(self) -> Tuple: return (self.percent_free,) @@ -412,8 +414,7 @@ def run_test(self) -> bool: message = "{}% free".format(percent) if percent < self.percent_free: return self.record_fail(message) - else: - return self.record_success(message) + return self.record_success(message) def get_params(self) -> Tuple: return (self.percent_free,) @@ -447,8 +448,8 @@ def run_test(self) -> bool: return self.record_fail("status is %s" % status) return self.record_success() return self.record_fail("Error getting status") - except Exception as e: - return self.record_fail("Error running ztscan: %s" % e) + except Exception as error: + return self.record_fail("Error running ztscan: %s" % error) def describe(self) -> str: return "Checking status of zap span %d is OK" % self.span @@ -461,7 +462,8 @@ def get_params(self) -> Tuple: class MonitorCommand(Monitor): """Check the output of a command. - We can check for a regexp match in the output or give a max value and check the output is lower that this value. + We can check for a regexp match in the output or give a max value and check the + output is lower than this value. """ result_regexp = None @@ -476,7 +478,8 @@ def __init__(self, name: str, config_options: dict) -> None: self.result_regexp = re.compile(self.result_regexp_text) if self.result_max is not None: self.monitor_logger.error( - "command monitors do not support result_regexp AND result_max settings simultaneously" + "command monitors do not support result_regexp AND" + "result_max settings simultaneously" ) self.result_max = None diff --git a/simplemonitor/Monitors/monitor.py b/simplemonitor/Monitors/monitor.py index f19b1db1..527a1c9e 100644 --- a/simplemonitor/Monitors/monitor.py +++ b/simplemonitor/Monitors/monitor.py @@ -1,4 +1,3 @@ -# coding=utf-8 """A collection of monitors for the SimpleMonitor application. The Monitor class contains the monitor-independent logic for handling results etc. @@ -182,6 +181,7 @@ def first_failure(self) -> bool: return False def state(self) -> MonitorState: + """Get the monitor state""" return self._state def get_result(self) -> str: @@ -204,6 +204,7 @@ def log_result(self, name: str, logger: Any) -> None: TODO: remove when known safe""" self.monitor_logger.critical("Unexpected call to log_result()") + raise NotImplementedError def get_params(self) -> Tuple: """Override this method to return a list of parameters (for logging)""" @@ -295,11 +296,13 @@ def record_skip(self, which_dep: Optional[str]) -> bool: return True def uptime(self) -> Optional[datetime.timedelta]: + """Get the monitor uptime""" if self.uptime_start: return arrow.utcnow() - self.uptime_start return None def skipped(self) -> bool: + """Check if the monitor was skipped""" if self._state == MonitorState.SKIPPED: return True return False @@ -322,6 +325,7 @@ def all_better_now(self) -> bool: @property def availability(self) -> float: + """Calculate the monitor's availablity""" if self.tests_run <= 1: return 0.0 if self._first_load is not None: @@ -337,6 +341,7 @@ def first_failure_time(self) -> Optional[arrow.Arrow]: @property def notify(self) -> bool: + """Should the monitor notify""" return self._notify @notify.setter @@ -348,6 +353,7 @@ def notify(self, value: bool) -> None: @property def urgent(self) -> bool: + """Is the monitor urgent""" return self._urgent @urgent.setter @@ -364,6 +370,7 @@ def urgent(self, value: Union[bool, int]) -> None: @property def was_skipped(self) -> bool: + """Was the monitor skipped""" return self._state == MonitorState.SKIPPED def should_run(self) -> bool: @@ -395,10 +402,12 @@ def should_run(self) -> bool: return False def last_virtual_fail_count(self) -> int: + """The last VFC""" value = self.last_error_count - self._tolerance return max(0, value) def attempt_recover(self) -> None: + """Attempt to recover, if a command is set""" if self._recover_command is None: self.recover_info = "" return @@ -407,24 +416,27 @@ def attempt_recover(self) -> None: try: self.monitor_logger.info("Attempting recovery command") - p = subprocess.Popen(self._recover_command.split(" ")) # nosec - p.wait() - self.recover_info = "Command executed and returned %d" % p.returncode - except Exception as e: - self.recover_info = "Unable to run command: %s" % e + process = subprocess.Popen(self._recover_command.split(" ")) # nosec + process.wait() + self.recover_info = "Command executed and returned %d" % process.returncode + except Exception as error: + self.recover_info = "Unable to run command: %s" % error def run_recovered(self) -> None: + """Run the post-recover command, if set""" if self._recovered_command is None: self.recovered_info = "" return if self.all_better_now(): self.monitor_logger.info("Attempting recovered command") try: - p = subprocess.Popen(self._recovered_command.split(" ")) # nosec - p.wait() - self.recovered_info = "Command executed and returned %d" % p.returncode - except Exception as e: - self.recovered_info = "Unable to run command: %s" % e + process = subprocess.Popen(self._recovered_command.split(" ")) # nosec + process.wait() + self.recovered_info = ( + "Command executed and returned %d" % process.returncode + ) + except Exception as error: + self.recovered_info = "Unable to run command: %s" % error def post_config_setup(self) -> None: """any post config setup needed""" @@ -447,15 +459,17 @@ def _set_monitor_logger(self) -> None: self.monitor_logger = logging.getLogger("simplemonitor.monitor-" + self.name) def to_python_dict(self) -> dict: + """Get a dict of the monitor state""" return self.__getstate__() @classmethod def from_python_dict( - cls: Any, d: dict + cls: Any, load_dict: dict ) -> "Monitor": # can't return Monitor type as flake8 gets cross + """Set up a monitor from a dict""" monitor = Monitor() monitor.__class__ = cls - monitor.__setstate__(d) + monitor.__setstate__(load_dict) return monitor def get_downtime(self) -> UpDownTime: @@ -475,7 +489,7 @@ def get_uptime(self) -> UpDownTime: return UpDownTime.from_timedelta(uptime) def state_dict(self) -> dict: - """Get a dict containing state information about the Monitor to use for logging or alerting""" + """Get state information about the Monitor to use for logging or alerting""" ret = { "failed_at": format_datetime(self.first_failure_time()), "name": self.name, diff --git a/simplemonitor/Monitors/network.py b/simplemonitor/Monitors/network.py index 1b5f377a..1691f3ca 100644 --- a/simplemonitor/Monitors/network.py +++ b/simplemonitor/Monitors/network.py @@ -1,11 +1,12 @@ -# coding=utf-8 -"""Network-related monitors for SimpleMonitor.""" +""" +Network-related monitors for SimpleMonitor +""" import datetime import json import re import socket -import subprocess +import subprocess # nosec import sys from typing import TYPE_CHECKING, List, Optional, Pattern, Tuple, Union, cast @@ -254,7 +255,7 @@ def run_test(self) -> bool: try: cmd = (self.ping_command % self.host).split(" ") - output = subprocess.check_output(cmd) + output = subprocess.check_output(cmd) # nosec for line in str(output).split("\n"): matches = re.search(self.ping_regexp, line) if matches: @@ -310,7 +311,7 @@ def __init__(self, name: str, config_options: dict) -> None: def run_test(self) -> bool: try: - result = subprocess.check_output(self.params).decode("utf-8") + result = subprocess.check_output(self.params).decode("utf-8") # nosec result = result.strip() if result is None or result == "": if self.desired_val != "nxdomain": diff --git a/simplemonitor/Monitors/ring.py b/simplemonitor/Monitors/ring.py index 685abc2d..6a7c6e88 100644 --- a/simplemonitor/Monitors/ring.py +++ b/simplemonitor/Monitors/ring.py @@ -1,13 +1,14 @@ -try: - import ring_doorbell - from oauthlib.oauth2.rfc6749.errors import MissingTokenError -except ImportError: - ring_doorbell = None +""" +Ring doorbell battery monitoring for SimpleMonitor +""" import json from pathlib import Path from typing import Optional, cast +import ring_doorbell +from oauthlib.oauth2.rfc6749.errors import MissingTokenError + from ..Monitors.monitor import Monitor, register from ..version import VERSION @@ -24,10 +25,6 @@ def __init__(self, name: str, config_options: dict) -> None: if "gap" not in config_options: config_options["gap"] = 21600 # 6 hours super().__init__(name, config_options) - if ring_doorbell is None: - self.monitor_logger.critical("ring_doorbell library is not installed") - self.monitor_logger.critical("Try: pip install ring-doorbell") - self.monitor_logger.critical(" or pip install simplemonitor[ring]") self.device_name = cast(str, self.get_config_option("device_name")) self.minimum_battery = cast( int, @@ -65,8 +62,6 @@ def _token_updated(self, token: str) -> None: self.cache_file.write_text(json.dumps(token)) def run_test(self) -> bool: - if ring_doorbell is None: - return self.record_fail("ring_doorbell library is not installed") if self.ring is None: self.ring = ring_doorbell.Ring(self._ring_auth) self.ring.update_data() diff --git a/simplemonitor/Monitors/service.py b/simplemonitor/Monitors/service.py index 9e0d385d..0c172c38 100644 --- a/simplemonitor/Monitors/service.py +++ b/simplemonitor/Monitors/service.py @@ -1,4 +1,7 @@ -# coding=utf-8 +""" +Service monitoring for SimpleMonitor +""" + import fnmatch import os import platform @@ -7,12 +10,9 @@ import time from typing import Any, List, Optional, Tuple, cast -from .monitor import Monitor, register +import psutil -try: - import psutil -except ImportError: - psutil = None +from .monitor import Monitor, register try: import pydbus @@ -42,8 +42,8 @@ def run_test(self) -> bool: if result > 0: return self.record_fail("svok returned %d" % int(result)) return self.record_success() - except Exception as e: - return self.record_fail("Exception while executing svok: %s" % e) + except Exception as error: + return self.record_fail("Exception while executing svok: %s" % error) def describe(self) -> str: return ( @@ -103,7 +103,11 @@ def run_test(self) -> bool: self.monitor_logger.exception("Failed to get service") return self.record_fail("Unable to get service") - state = service.status().upper() + _state = service.status() + if _state: + state = _state.upper() + else: + state = "NONE" if state != self.want_state: return self.record_fail( "Service state is {} (wanted {})".format(state, self.want_state) @@ -159,12 +163,12 @@ def run_test(self) -> bool: returncode = subprocess.check_call([self.script_path, "status"]) if returncode == self.want_return_code: return self.record_success() - except subprocess.CalledProcessError as e: - if e.returncode == self.want_return_code: + except subprocess.CalledProcessError as error: + if error.returncode == self.want_return_code: return self.record_success() returncode = -1 - except Exception as e: - return self.record_fail("Exception while executing script: %s" % e) + except Exception as error: + return self.record_fail("Exception while executing script: %s" % error) return self.record_fail( "Return code: %d (wanted %d)" % (returncode, int(self.want_return_code)) ) @@ -447,13 +451,12 @@ def run_test(self) -> bool: if count == 1: return self.record_fail("%d message queued" % count) return self.record_fail("%d messages queued" % count) - else: - if count == 1: - return self.record_success("%d message queued" % count) - return self.record_success("%d messages queued" % count) + if count == 1: + return self.record_success("%d message queued" % count) + return self.record_success("%d messages queued" % count) return self.record_fail("Error getting queue size") - except Exception as e: - return self.record_fail("Error running exiqgrep: %s" % e) + except Exception as error: + return self.record_fail("Error running exiqgrep: %s" % error) def describe(self) -> str: return "Checking the exim queue length is < %d" % self.max_length @@ -498,8 +501,8 @@ def run_test(self) -> bool: return self.record_fail("%d clients in scope" % clients) return self.record_success("%d clients in scope" % clients) return self.record_fail("Error getting client count: no match") - except Exception as e: - return self.record_fail("Error getting client count: {0}".format(e)) + except Exception as error: + return self.record_fail("Error getting client count: {0}".format(error)) def describe(self) -> str: return "Checking the DHCP scope has fewer than %d leases" % self.max_used diff --git a/simplemonitor/Monitors/unifi.py b/simplemonitor/Monitors/unifi.py index 87362935..18de1595 100644 --- a/simplemonitor/Monitors/unifi.py +++ b/simplemonitor/Monitors/unifi.py @@ -1,19 +1,19 @@ +""" +UniFi monitoring for SimpleMonitor +""" + import re from typing import Dict, NoReturn, Union, cast -from .monitor import Monitor, register - -try: - from paramiko.client import SSHClient, RejectPolicy - from paramiko.ssh_exception import SSHException +from paramiko.client import RejectPolicy, SSHClient +from paramiko.ssh_exception import SSHException - ssh2_available = True -except ImportError: - ssh2_available = False +from .monitor import Monitor, register @register class MonitorUnifiFailover(Monitor): + """Monitor USG WAN Failover""" monitor_type = "unifi_failover" @@ -36,9 +36,6 @@ def __init__(self, name: str, config_options: dict) -> None: ) def run_test(self) -> Union[NoReturn, bool]: - if not ssh2_available: - return self.record_fail("ssh2_python library is not installed") - try: with SSHClient() as client: client.set_missing_host_key_policy(RejectPolicy) @@ -120,6 +117,7 @@ def describe(self) -> str: @register class MonitorUnifiFailoverWatchdog(Monitor): + """Monitor UniFi WAN watchdog""" monitor_type = "unifi_watchdog" @@ -145,9 +143,6 @@ def __init__(self, name: str, config_options: dict) -> None: ) def run_test(self) -> Union[NoReturn, bool]: - if not ssh2_available: - return self.record_fail("ssh2_python library is not installed") - try: with SSHClient() as client: client.set_missing_host_key_policy(RejectPolicy) From 049c40fea7bde1d6f46dc2c66cbb79cd2c12372c Mon Sep 17 00:00:00 2001 From: James Seward Date: Sat, 17 Jul 2021 16:41:12 +0100 Subject: [PATCH 016/325] Fix broken nc alerter --- setup.cfg | 2 +- simplemonitor/Alerters/nc.py | 13 ++++++++++--- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/setup.cfg b/setup.cfg index 413814a0..6e1de522 100644 --- a/setup.cfg +++ b/setup.cfg @@ -11,7 +11,7 @@ per-file-ignores = simplemonitor/__init__.py:F401 [isort] -known_third_party = OpenSSL,arrow,boto3,botocore,freezegun,jinja2,oauthlib,paho,paramiko,psutil,pyarlo,pync,requests,ring_doorbell,setuptools,sphinx,sphinx_rtd_theme,twilio,win32event,win32service,win32serviceutil +known_third_party = OpenSSL,arrow,boto3,botocore,freezegun,jinja2,oauthlib,paho,paramiko,psutil,pyarlo,requests,ring_doorbell,setuptools,sphinx,sphinx_rtd_theme,twilio,win32event,win32service,win32serviceutil known_first_party = Alerters,Loggers,Monitors,envconfig,util,simplemonitor line_length=88 multi_line_output=3 diff --git a/simplemonitor/Alerters/nc.py b/simplemonitor/Alerters/nc.py index 1d098032..a57a9e81 100644 --- a/simplemonitor/Alerters/nc.py +++ b/simplemonitor/Alerters/nc.py @@ -4,7 +4,12 @@ import platform -import pync +try: + import pync + + PYNC_AVAILABLE = True +except ImportError: + PYNC_AVAILABLE = False from ..Monitors.monitor import Monitor from .alerter import Alerter, AlertLength, AlertType, register @@ -18,7 +23,7 @@ class NotificationCenterAlerter(Alerter): def __init__(self, config_options: dict) -> None: super().__init__(config_options) - if platform.system() != "Darwin": + if platform.system() != "Darwin" or not PYNC_AVAILABLE: self.alerter_logger.critical( "This alerter (currently) only works on Mac OS X!" ) @@ -26,7 +31,9 @@ def __init__(self, config_options: dict) -> None: def send_alert(self, name: str, monitor: Monitor) -> None: """Send the message""" - + if not PYNC_AVAILABLE: + self.alerter_logger.critical("Missing pync package") + return alert_type = self.should_alert(monitor) message = "" From 82bbe45055a8aa15f806585d99507ea2494c0eba Mon Sep 17 00:00:00 2001 From: James Seward Date: Sat, 17 Jul 2021 16:44:00 +0100 Subject: [PATCH 017/325] Fix formatting in syslog --- simplemonitor/Alerters/syslogger.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/simplemonitor/Alerters/syslogger.py b/simplemonitor/Alerters/syslogger.py index 9e4649eb..0656c589 100644 --- a/simplemonitor/Alerters/syslogger.py +++ b/simplemonitor/Alerters/syslogger.py @@ -4,6 +4,7 @@ try: import syslog + SYSLOG_AVAILABLE = True except ImportError: SYSLOG_AVAILABLE = False @@ -15,6 +16,7 @@ @register class SyslogAlerter(Alerter): """Send alerts to syslog""" + alerter_type = "syslog" def send_alert(self, name: str, monitor: Monitor) -> None: From cd648c8b950020101c8b490b14f8ed0da61cbaf7 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 19 Jul 2021 12:08:46 +0000 Subject: [PATCH 018/325] Bump black from 21.6b0 to 21.7b0 Bumps [black](https://github.com/psf/black) from 21.6b0 to 21.7b0. - [Release notes](https://github.com/psf/black/releases) - [Changelog](https://github.com/psf/black/blob/main/CHANGES.md) - [Commits](https://github.com/psf/black/commits) --- updated-dependencies: - dependency-name: black dependency-type: direct:development ... Signed-off-by: dependabot[bot] --- poetry.lock | 40 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index 367cab98..e10342ef 100644 --- a/poetry.lock +++ b/poetry.lock @@ -106,7 +106,7 @@ typecheck = ["mypy"] [[package]] name = "black" -version = "21.6b0" +version = "21.7b0" description = "The uncompromising code formatter." category = "dev" optional = false @@ -119,7 +119,7 @@ dataclasses = {version = ">=0.6", markers = "python_version < \"3.7\""} mypy-extensions = ">=0.4.3" pathspec = ">=0.8.1,<1" regex = ">=2020.1.8" -toml = ">=0.10.1" +tomli = ">=0.2.6,<2.0.0" typed-ast = {version = ">=1.4.2", markers = "python_version < \"3.8\""} typing-extensions = {version = ">=3.7.4", markers = "python_version < \"3.8\""} @@ -1023,6 +1023,14 @@ category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +[[package]] +name = "tomli" +version = "1.0.4" +description = "A lil' TOML parser" +category = "dev" +optional = false +python-versions = ">=3.6" + [[package]] name = "tox" version = "3.23.1" @@ -1259,8 +1267,8 @@ bcrypt = [ {file = "bcrypt-3.2.0.tar.gz", hash = "sha256:5b93c1726e50a93a033c36e5ca7fdcd29a5c7395af50a6892f5d9e7c6cfbfb29"}, ] black = [ - {file = "black-21.6b0-py3-none-any.whl", hash = "sha256:dfb8c5a069012b2ab1e972e7b908f5fb42b6bbabcba0a788b86dc05067c7d9c7"}, - {file = "black-21.6b0.tar.gz", hash = "sha256:dc132348a88d103016726fe360cb9ede02cecf99b76e3660ce6c596be132ce04"}, + {file = "black-21.7b0-py3-none-any.whl", hash = "sha256:1c7aa6ada8ee864db745b22790a32f94b2795c253a75d6d9b5e439ff10d23116"}, + {file = "black-21.7b0.tar.gz", hash = "sha256:c8373c6491de9362e39271630b65b964607bc5c79c83783547d76c839b3aa219"}, ] boto3 = [ {file = "boto3-1.17.88-py2.py3-none-any.whl", hash = "sha256:13afcc5e2fcc5e4f9eab1ee46a769cf738a259dcd45f71ee79255f18973e4584"}, @@ -1291,24 +1299,36 @@ cffi = [ {file = "cffi-1.14.5-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:48e1c69bbacfc3d932221851b39d49e81567a4d4aac3b21258d9c24578280058"}, {file = "cffi-1.14.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:69e395c24fc60aad6bb4fa7e583698ea6cc684648e1ffb7fe85e3c1ca131a7d5"}, {file = "cffi-1.14.5-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:9e93e79c2551ff263400e1e4be085a1210e12073a31c2011dbbda14bda0c6132"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:24ec4ff2c5c0c8f9c6b87d5bb53555bf267e1e6f70e52e5a9740d32861d36b6f"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c3f39fa737542161d8b0d680df2ec249334cd70a8f420f71c9304bd83c3cbed"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:681d07b0d1e3c462dd15585ef5e33cb021321588bebd910124ef4f4fb71aef55"}, {file = "cffi-1.14.5-cp36-cp36m-win32.whl", hash = "sha256:58e3f59d583d413809d60779492342801d6e82fefb89c86a38e040c16883be53"}, {file = "cffi-1.14.5-cp36-cp36m-win_amd64.whl", hash = "sha256:005a36f41773e148deac64b08f233873a4d0c18b053d37da83f6af4d9087b813"}, {file = "cffi-1.14.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2894f2df484ff56d717bead0a5c2abb6b9d2bf26d6960c4604d5c48bbc30ee73"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:0857f0ae312d855239a55c81ef453ee8fd24136eaba8e87a2eceba644c0d4c06"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:cd2868886d547469123fadc46eac7ea5253ea7fcb139f12e1dfc2bbd406427d1"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:35f27e6eb43380fa080dccf676dece30bef72e4a67617ffda586641cd4508d49"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:06d7cd1abac2ffd92e65c0609661866709b4b2d82dd15f611e602b9b188b0b69"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0f861a89e0043afec2a51fd177a567005847973be86f709bbb044d7f42fc4e05"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cc5a8e069b9ebfa22e26d0e6b97d6f9781302fe7f4f2b8776c3e1daea35f1adc"}, {file = "cffi-1.14.5-cp37-cp37m-win32.whl", hash = "sha256:9ff227395193126d82e60319a673a037d5de84633f11279e336f9c0f189ecc62"}, {file = "cffi-1.14.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9cf8022fb8d07a97c178b02327b284521c7708d7c71a9c9c355c178ac4bbd3d4"}, {file = "cffi-1.14.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8b198cec6c72df5289c05b05b8b0969819783f9418e0409865dac47288d2a053"}, {file = "cffi-1.14.5-cp38-cp38-manylinux1_i686.whl", hash = "sha256:ad17025d226ee5beec591b52800c11680fca3df50b8b29fe51d882576e039ee0"}, {file = "cffi-1.14.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:6c97d7350133666fbb5cf4abdc1178c812cb205dc6f41d174a7b0f18fb93337e"}, {file = "cffi-1.14.5-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:8ae6299f6c68de06f136f1f9e69458eae58f1dacf10af5c17353eae03aa0d827"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:04c468b622ed31d408fea2346bec5bbffba2cc44226302a0de1ade9f5ea3d373"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:06db6321b7a68b2bd6df96d08a5adadc1fa0e8f419226e25b2a5fbf6ccc7350f"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:293e7ea41280cb28c6fcaaa0b1aa1f533b8ce060b9e701d78511e1e6c4a1de76"}, {file = "cffi-1.14.5-cp38-cp38-win32.whl", hash = "sha256:b85eb46a81787c50650f2392b9b4ef23e1f126313b9e0e9013b35c15e4288e2e"}, {file = "cffi-1.14.5-cp38-cp38-win_amd64.whl", hash = "sha256:1f436816fc868b098b0d63b8920de7d208c90a67212546d02f84fe78a9c26396"}, {file = "cffi-1.14.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1071534bbbf8cbb31b498d5d9db0f274f2f7a865adca4ae429e147ba40f73dea"}, {file = "cffi-1.14.5-cp39-cp39-manylinux1_i686.whl", hash = "sha256:9de2e279153a443c656f2defd67769e6d1e4163952b3c622dcea5b08a6405322"}, {file = "cffi-1.14.5-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:6e4714cc64f474e4d6e37cfff31a814b509a35cb17de4fb1999907575684479c"}, {file = "cffi-1.14.5-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:158d0d15119b4b7ff6b926536763dc0714313aa59e320ddf787502c70c4d4bee"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1bf1ac1984eaa7675ca8d5745a8cb87ef7abecb5592178406e55858d411eadc0"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:df5052c5d867c1ea0b311fb7c3cd28b19df469c056f7fdcfe88c7473aa63e333"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:24a570cd11895b60829e941f2613a4f79df1a27344cbbb82164ef2e0116f09c7"}, {file = "cffi-1.14.5-cp39-cp39-win32.whl", hash = "sha256:afb29c1ba2e5a3736f1c301d9d0abe3ec8b86957d04ddfa9d7a6a42b9367e396"}, {file = "cffi-1.14.5-cp39-cp39-win_amd64.whl", hash = "sha256:f2d45f97ab6bb54753eab54fffe75aaf3de4ff2341c9daee1987ee1837636f1d"}, {file = "cffi-1.14.5.tar.gz", hash = "sha256:fd78e5fee591709f32ef6edb9a015b4aa1a5022598e36227500c8f4e02328d9c"}, @@ -1717,18 +1737,26 @@ pyyaml = [ {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541"}, {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"}, {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc"}, {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6"}, {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, @@ -1848,6 +1876,10 @@ toml = [ {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] +tomli = [ + {file = "tomli-1.0.4-py3-none-any.whl", hash = "sha256:0713b16ff91df8638a6a694e295c8159ab35ba93e3424a626dd5226d386057be"}, + {file = "tomli-1.0.4.tar.gz", hash = "sha256:be670d0d8d7570fd0ea0113bd7bb1ba3ac6706b4de062cc4c952769355c9c268"}, +] tox = [ {file = "tox-3.23.1-py2.py3-none-any.whl", hash = "sha256:b0b5818049a1c1997599d42012a637a33f24c62ab8187223fdd318fa8522637b"}, {file = "tox-3.23.1.tar.gz", hash = "sha256:307a81ddb82bd463971a273f33e9533a24ed22185f27db8ce3386bff27d324e3"}, From 9a2befb4c30134045afd58233e49f5a4724a77b8 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sun, 25 Jul 2021 12:49:54 +0000 Subject: [PATCH 019/325] Bump requests from 2.25.1 to 2.26.0 Bumps [requests](https://github.com/psf/requests) from 2.25.1 to 2.26.0. - [Release notes](https://github.com/psf/requests/releases) - [Changelog](https://github.com/psf/requests/blob/master/HISTORY.md) - [Commits](https://github.com/psf/requests/compare/v2.25.1...v2.26.0) --- updated-dependencies: - dependency-name: requests dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- poetry.lock | 51 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/poetry.lock b/poetry.lock index 98534dd1..2e8d56e4 100644 --- a/poetry.lock +++ b/poetry.lock @@ -178,12 +178,15 @@ python-versions = "*" pycparser = "*" [[package]] -name = "chardet" -version = "4.0.0" -description = "Universal encoding detector for Python 2 and 3" +name = "charset-normalizer" +version = "2.0.3" +description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.5.0" + +[package.extras] +unicode_backport = ["unicodedata2"] [[package]] name = "click" @@ -795,21 +798,21 @@ python-versions = "*" [[package]] name = "requests" -version = "2.25.1" +version = "2.26.0" description = "Python HTTP for Humans." category = "main" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" [package.dependencies] certifi = ">=2017.4.17" -chardet = ">=3.0.2,<5" -idna = ">=2.5,<3" +charset-normalizer = {version = ">=2.0.0,<2.1.0", markers = "python_version >= \"3\""} +idna = {version = ">=2.5,<4", markers = "python_version >= \"3\""} urllib3 = ">=1.21.1,<1.27" [package.extras] -security = ["pyOpenSSL (>=0.14)", "cryptography (>=1.3.4)"] socks = ["PySocks (>=1.5.6,!=1.5.7)", "win-inet-pton"] +use_chardet_on_py3 = ["chardet (>=3.0.2,<5)"] [[package]] name = "requests-oauthlib" @@ -1291,31 +1294,43 @@ cffi = [ {file = "cffi-1.14.5-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:48e1c69bbacfc3d932221851b39d49e81567a4d4aac3b21258d9c24578280058"}, {file = "cffi-1.14.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:69e395c24fc60aad6bb4fa7e583698ea6cc684648e1ffb7fe85e3c1ca131a7d5"}, {file = "cffi-1.14.5-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:9e93e79c2551ff263400e1e4be085a1210e12073a31c2011dbbda14bda0c6132"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:24ec4ff2c5c0c8f9c6b87d5bb53555bf267e1e6f70e52e5a9740d32861d36b6f"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c3f39fa737542161d8b0d680df2ec249334cd70a8f420f71c9304bd83c3cbed"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:681d07b0d1e3c462dd15585ef5e33cb021321588bebd910124ef4f4fb71aef55"}, {file = "cffi-1.14.5-cp36-cp36m-win32.whl", hash = "sha256:58e3f59d583d413809d60779492342801d6e82fefb89c86a38e040c16883be53"}, {file = "cffi-1.14.5-cp36-cp36m-win_amd64.whl", hash = "sha256:005a36f41773e148deac64b08f233873a4d0c18b053d37da83f6af4d9087b813"}, {file = "cffi-1.14.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2894f2df484ff56d717bead0a5c2abb6b9d2bf26d6960c4604d5c48bbc30ee73"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:0857f0ae312d855239a55c81ef453ee8fd24136eaba8e87a2eceba644c0d4c06"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:cd2868886d547469123fadc46eac7ea5253ea7fcb139f12e1dfc2bbd406427d1"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:35f27e6eb43380fa080dccf676dece30bef72e4a67617ffda586641cd4508d49"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:06d7cd1abac2ffd92e65c0609661866709b4b2d82dd15f611e602b9b188b0b69"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0f861a89e0043afec2a51fd177a567005847973be86f709bbb044d7f42fc4e05"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cc5a8e069b9ebfa22e26d0e6b97d6f9781302fe7f4f2b8776c3e1daea35f1adc"}, {file = "cffi-1.14.5-cp37-cp37m-win32.whl", hash = "sha256:9ff227395193126d82e60319a673a037d5de84633f11279e336f9c0f189ecc62"}, {file = "cffi-1.14.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9cf8022fb8d07a97c178b02327b284521c7708d7c71a9c9c355c178ac4bbd3d4"}, {file = "cffi-1.14.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8b198cec6c72df5289c05b05b8b0969819783f9418e0409865dac47288d2a053"}, {file = "cffi-1.14.5-cp38-cp38-manylinux1_i686.whl", hash = "sha256:ad17025d226ee5beec591b52800c11680fca3df50b8b29fe51d882576e039ee0"}, {file = "cffi-1.14.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:6c97d7350133666fbb5cf4abdc1178c812cb205dc6f41d174a7b0f18fb93337e"}, {file = "cffi-1.14.5-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:8ae6299f6c68de06f136f1f9e69458eae58f1dacf10af5c17353eae03aa0d827"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:04c468b622ed31d408fea2346bec5bbffba2cc44226302a0de1ade9f5ea3d373"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:06db6321b7a68b2bd6df96d08a5adadc1fa0e8f419226e25b2a5fbf6ccc7350f"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:293e7ea41280cb28c6fcaaa0b1aa1f533b8ce060b9e701d78511e1e6c4a1de76"}, {file = "cffi-1.14.5-cp38-cp38-win32.whl", hash = "sha256:b85eb46a81787c50650f2392b9b4ef23e1f126313b9e0e9013b35c15e4288e2e"}, {file = "cffi-1.14.5-cp38-cp38-win_amd64.whl", hash = "sha256:1f436816fc868b098b0d63b8920de7d208c90a67212546d02f84fe78a9c26396"}, {file = "cffi-1.14.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1071534bbbf8cbb31b498d5d9db0f274f2f7a865adca4ae429e147ba40f73dea"}, {file = "cffi-1.14.5-cp39-cp39-manylinux1_i686.whl", hash = "sha256:9de2e279153a443c656f2defd67769e6d1e4163952b3c622dcea5b08a6405322"}, {file = "cffi-1.14.5-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:6e4714cc64f474e4d6e37cfff31a814b509a35cb17de4fb1999907575684479c"}, {file = "cffi-1.14.5-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:158d0d15119b4b7ff6b926536763dc0714313aa59e320ddf787502c70c4d4bee"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1bf1ac1984eaa7675ca8d5745a8cb87ef7abecb5592178406e55858d411eadc0"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:df5052c5d867c1ea0b311fb7c3cd28b19df469c056f7fdcfe88c7473aa63e333"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:24a570cd11895b60829e941f2613a4f79df1a27344cbbb82164ef2e0116f09c7"}, {file = "cffi-1.14.5-cp39-cp39-win32.whl", hash = "sha256:afb29c1ba2e5a3736f1c301d9d0abe3ec8b86957d04ddfa9d7a6a42b9367e396"}, {file = "cffi-1.14.5-cp39-cp39-win_amd64.whl", hash = "sha256:f2d45f97ab6bb54753eab54fffe75aaf3de4ff2341c9daee1987ee1837636f1d"}, {file = "cffi-1.14.5.tar.gz", hash = "sha256:fd78e5fee591709f32ef6edb9a015b4aa1a5022598e36227500c8f4e02328d9c"}, ] -chardet = [ - {file = "chardet-4.0.0-py2.py3-none-any.whl", hash = "sha256:f864054d66fd9118f2e67044ac8981a54775ec5b67aed0441892edb553d21da5"}, - {file = "chardet-4.0.0.tar.gz", hash = "sha256:0d6f53a15db4120f2b08c94f11e7d93d2c911ee118b6b30a04ec3ee8310179fa"}, +charset-normalizer = [ + {file = "charset-normalizer-2.0.3.tar.gz", hash = "sha256:c46c3ace2d744cfbdebceaa3c19ae691f53ae621b39fd7570f59d14fb7f2fd12"}, + {file = "charset_normalizer-2.0.3-py3-none-any.whl", hash = "sha256:88fce3fa5b1a84fdcb3f603d889f723d1dd89b26059d0123ca435570e848d5e1"}, ] click = [ {file = "click-8.0.1-py3-none-any.whl", hash = "sha256:fba402a4a47334742d782209a7c79bc448911afe1149d07bdabdf480b3e2f4b6"}, @@ -1717,18 +1732,26 @@ pyyaml = [ {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541"}, {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"}, {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc"}, {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6"}, {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, @@ -1777,8 +1800,8 @@ regex = [ {file = "regex-2021.4.4.tar.gz", hash = "sha256:52ba3d3f9b942c49d7e4bc105bb28551c44065f139a65062ab7912bef10c9afb"}, ] requests = [ - {file = "requests-2.25.1-py2.py3-none-any.whl", hash = "sha256:c210084e36a42ae6b9219e00e48287def368a26d03a048ddad7bfee44f75871e"}, - {file = "requests-2.25.1.tar.gz", hash = "sha256:27973dd4a904a4f13b263a19c866c13b92a39ed1c964655f025f3f8d3d75b804"}, + {file = "requests-2.26.0-py2.py3-none-any.whl", hash = "sha256:6c1246513ecd5ecd4528a0906f910e8f0f9c6b8ec72030dc9fd154dc1a6efd24"}, + {file = "requests-2.26.0.tar.gz", hash = "sha256:b8aa58f8cf793ffd8782d3d8cb19e66ef36f7aba4353eec859e74678b01b07a7"}, ] requests-oauthlib = [ {file = "requests-oauthlib-1.3.0.tar.gz", hash = "sha256:b4261601a71fd721a8bd6d7aa1cc1d6a8a93b4a9f5e96626f8e4d91e8beeaa6a"}, From 48ec8c21eaeb3c93b2cd78205467b8c3cd34e9ee Mon Sep 17 00:00:00 2001 From: James Seward Date: Sun, 25 Jul 2021 14:11:59 +0100 Subject: [PATCH 020/325] Add more debug logging for alert type --- simplemonitor/Alerters/alerter.py | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/simplemonitor/Alerters/alerter.py b/simplemonitor/Alerters/alerter.py index 364cc038..10c89ed0 100644 --- a/simplemonitor/Alerters/alerter.py +++ b/simplemonitor/Alerters/alerter.py @@ -231,10 +231,19 @@ def should_alert(self, monitor: Monitor) -> AlertType: out_of_hours = False if not check_group_match(monitor.group, self.groups): + self.alerter_logger.debug( + "not alerting for %s: group mismatch (monitor: %s; alerter: %s)", + monitor.name, + monitor.group, + self.groups, + ) return AlertType.NONE # Sanity check if not monitor.enabled: + self.alerter_logger.debug( + "not alerting for %s: monitor disabled", monitor.name + ) return AlertType.NONE if not self._allowed_today(): @@ -257,9 +266,15 @@ def should_alert(self, monitor: Monitor) -> AlertType: self._ooh_failures.remove(monitor.name) # if it was in there and we support catchup alerts, do it if self.support_catchup: + self.alerter_logger.debug( + "alert for monitor %s is CATCHUP", monitor.name + ) return AlertType.CATCHUP except ValueError: pass + self.alerter_logger.debug( + "alert for monitor %s is FAILURE", monitor.name + ) return AlertType.FAILURE # Delayed notifications are not enabled if virtual_failure_count == self._limit or ( @@ -272,8 +287,18 @@ def should_alert(self, monitor: Monitor) -> AlertType: and monitor.name not in self._ooh_failures ): self._ooh_failures.append(monitor.name) + self.alerter_logger.debug( + "not alerting for %s: OOH", monitor.name + ) return AlertType.NONE + self.alerter_logger.debug( + "alert for monitor %s is FAILURE", monitor.name + ) return AlertType.FAILURE + self.alerter_logger.debug( + "not alerting for monitor %s: not failed or repeated enough", + monitor.name, + ) return AlertType.NONE # Not failed @@ -282,6 +307,7 @@ def should_alert(self, monitor: Monitor) -> AlertType: and monitor.last_virtual_fail_count() >= self._limit ): # was failed, and enough to have alerted + self.alerter_logger.debug("monitor %s has recovered", monitor.name) try: if self._ooh_failures is not None: self._ooh_failures.remove(monitor.name) @@ -289,9 +315,19 @@ def should_alert(self, monitor: Monitor) -> AlertType: pass if out_of_hours: if self._ooh_recovery and not self._only_failures: + self.alerter_logger.debug( + "alert for monitor %s is SUCCESS (OOH recovery)", monitor.name + ) return AlertType.SUCCESS + self.alerter_logger.debug( + "not alerting for monitor %s: OOH and not recovery/only failures", + monitor.name, + ) return AlertType.NONE if not self._only_failures: + self.alerter_logger.debug( + "alert for monitor %s is SUCCESS", monitor.name + ) return AlertType.SUCCESS return AlertType.NONE From 4056e79ea5e8cc6a313f95d4800b043cfea42548 Mon Sep 17 00:00:00 2001 From: James Seward Date: Sun, 25 Jul 2021 15:45:47 +0100 Subject: [PATCH 021/325] Consolidate Alerter urgent setting and logic --- simplemonitor/Alerters/alerter.py | 12 ++++++++++ simplemonitor/Alerters/bulksms.py | 4 +--- simplemonitor/Alerters/fortysixelks.py | 4 +--- simplemonitor/Alerters/mail.py | 4 ++-- simplemonitor/Alerters/sms77.py | 4 +--- simplemonitor/Alerters/sns.py | 4 +--- simplemonitor/Alerters/twilio.py | 4 +--- simplemonitor/util/__init__.py | 2 +- tests/test_alerter.py | 32 ++++++++++++++++++++++++++ 9 files changed, 52 insertions(+), 18 deletions(-) diff --git a/simplemonitor/Alerters/alerter.py b/simplemonitor/Alerters/alerter.py index 10c89ed0..cad9e98b 100644 --- a/simplemonitor/Alerters/alerter.py +++ b/simplemonitor/Alerters/alerter.py @@ -62,6 +62,7 @@ class Alerter: _ooh_failures = None # type: Optional[List[str]] # subclasses should set this to true if they support catchup notifications for delays support_catchup = False + urgent = False def __init__(self, config_options: dict = None) -> None: if config_options is None: @@ -158,6 +159,10 @@ def __init__(self, config_options: dict = None) -> None: ) self._tz = cast(str, self.get_config_option("tz", default="UTC")) self._times_tz = cast(str, self.get_config_option("times_tz", default="local")) + self.urgent = cast( + bool, + self.get_config_option("urgent", default=self.urgent, required_type="bool"), + ) if self._ooh_failures is None: self._ooh_failures = [] @@ -246,6 +251,13 @@ def should_alert(self, monitor: Monitor) -> AlertType: ) return AlertType.NONE + if self.urgent and not monitor.urgent: + self.alerter_logger.debug( + "not alerting for %s: alerter is urgent and monitor is not", + monitor.name, + ) + return AlertType.NONE + if not self._allowed_today(): out_of_hours = True diff --git a/simplemonitor/Alerters/bulksms.py b/simplemonitor/Alerters/bulksms.py index 2bf131a9..27b0c0b6 100644 --- a/simplemonitor/Alerters/bulksms.py +++ b/simplemonitor/Alerters/bulksms.py @@ -18,6 +18,7 @@ class BulkSMSAlerter(Alerter): Subscription required, see http://www.bulksms.co.uk""" alerter_type = "bulksms" + urgent = True def __init__(self, config_options: dict) -> None: super().__init__(config_options) @@ -43,9 +44,6 @@ def __init__(self, config_options: dict) -> None: def send_alert(self, name: str, monitor: Monitor) -> None: """Send an SMS alert.""" - if not monitor.urgent: - return - alert_type = self.should_alert(monitor) if alert_type not in [AlertType.FAILURE, AlertType.SUCCESS]: return diff --git a/simplemonitor/Alerters/fortysixelks.py b/simplemonitor/Alerters/fortysixelks.py index 4254f89c..ce68eedf 100644 --- a/simplemonitor/Alerters/fortysixelks.py +++ b/simplemonitor/Alerters/fortysixelks.py @@ -20,6 +20,7 @@ class FortySixElksAlerter(Alerter): """ alerter_type = "46elks" + urgent = True def __init__(self, config_options: dict) -> None: super().__init__(config_options) @@ -52,10 +53,7 @@ def __init__(self, config_options: dict) -> None: def send_alert(self, name: str, monitor: Monitor) -> None: """Send an SMS alert.""" - if not monitor.urgent: - return alert_type = self.should_alert(monitor) - if alert_type not in [AlertType.CATCHUP, AlertType.FAILURE]: return diff --git a/simplemonitor/Alerters/mail.py b/simplemonitor/Alerters/mail.py index 17d34168..8c3ec324 100644 --- a/simplemonitor/Alerters/mail.py +++ b/simplemonitor/Alerters/mail.py @@ -46,6 +46,8 @@ def send_alert(self, name: str, monitor: Monitor) -> None: """Send the email""" alert_type = self.should_alert(monitor) + if alert_type == AlertType.NONE: + return message = MIMEMultipart() message["From"] = self.from_addr @@ -56,8 +58,6 @@ def send_alert(self, name: str, monitor: Monitor) -> None: message["CC"] = self.cc_addr.replace(";", ",") envelope_to.extend(self.cc_addr.split(";")) - if alert_type == AlertType.NONE: - return message["Subject"] = self.build_message( AlertLength.NOTIFICATION, alert_type, monitor ) diff --git a/simplemonitor/Alerters/sms77.py b/simplemonitor/Alerters/sms77.py index fe63113a..0676215c 100644 --- a/simplemonitor/Alerters/sms77.py +++ b/simplemonitor/Alerters/sms77.py @@ -15,6 +15,7 @@ class SMS77Alerter(Alerter): """Send SMS alerts using the sms77 service""" alerter_type = "sms77" + urgent = True def __init__(self, config_options: dict) -> None: super().__init__(config_options) @@ -35,9 +36,6 @@ def __init__(self, config_options: dict) -> None: def send_alert(self, name: str, monitor: Monitor) -> None: """Send an SMS alert""" - if not monitor.urgent: - return - alert_type = self.should_alert(monitor) if alert_type not in [AlertType.FAILURE, AlertType.SUCCESS]: return diff --git a/simplemonitor/Alerters/sns.py b/simplemonitor/Alerters/sns.py index 1d5da16d..fe2811a3 100644 --- a/simplemonitor/Alerters/sns.py +++ b/simplemonitor/Alerters/sns.py @@ -17,6 +17,7 @@ class SNSAlerter(Alerter): """Send notifications using Amazon SNS""" alerter_type = "sns" + urgent = True def __init__(self, config_options: dict) -> None: super().__init__(config_options) @@ -49,10 +50,7 @@ def __init__(self, config_options: dict) -> None: def send_alert(self, name: str, monitor: Monitor) -> None: """Send the alert""" - if not monitor.urgent: - return alert_type = self.should_alert(monitor) - if alert_type == AlertType.NONE: return diff --git a/simplemonitor/Alerters/twilio.py b/simplemonitor/Alerters/twilio.py index dfe0a788..76e34f96 100644 --- a/simplemonitor/Alerters/twilio.py +++ b/simplemonitor/Alerters/twilio.py @@ -16,6 +16,7 @@ class TwilioSMSAlerter(Alerter): """Send SMS alerts using Twilio""" alerter_type = "twilio_sms" + urgent = True def __init__(self, config_options: dict) -> None: super().__init__(config_options) @@ -40,9 +41,6 @@ def __init__(self, config_options: dict) -> None: def send_alert(self, name: str, monitor: Monitor) -> None: """Send an SMS alert.""" - if not monitor.urgent: - return - alert_type = self.should_alert(monitor) if alert_type not in [AlertType.FAILURE, AlertType.SUCCESS]: return diff --git a/simplemonitor/util/__init__.py b/simplemonitor/util/__init__.py index cc90c6df..0f319698 100644 --- a/simplemonitor/util/__init__.py +++ b/simplemonitor/util/__init__.py @@ -143,7 +143,7 @@ def get_config_option( "config option {0} needs to be a list of int[int,...]".format(key) ) from error if required_type == "bool": - value = bool(value.lower() in ["1", "true", "yes"]) + value = bool(str(value).lower() in ["1", "true", "yes"]) if required_type == "[str]": value = [x.strip() for x in value.split(",")] if isinstance(value, list) and allowed_values: diff --git a/tests/test_alerter.py b/tests/test_alerter.py index ab76f10a..2cc6ba69 100644 --- a/tests/test_alerter.py +++ b/tests/test_alerter.py @@ -367,6 +367,30 @@ def test_disabled_monitor_no_alert(self): m.run_test() self.assertEqual(a.should_alert(m), alerter.AlertType.NONE) + def test_alert_not_urgent(self): + a = alerter.Alerter() + m = monitor.MonitorFail("fail", {}) + m.run_test() + self.assertEqual(a.should_alert(m), alerter.AlertType.FAILURE) + + def test_no_alert_urgent(self): + a = alerter.Alerter({"urgent": "1"}) + m = monitor.MonitorFail("fail", {"urgent": "0"}) + m.run_test() + self.assertEqual(a.should_alert(m), alerter.AlertType.NONE) + + def test_alert_urgent(self): + a = alerter.Alerter({"urgent": "1"}) + m = monitor.MonitorFail("fail", {"urgent": "1"}) + m.run_test() + self.assertEqual(a.should_alert(m), alerter.AlertType.FAILURE) + + def test_alert_alerter_not_urgent(self): + a = alerter.Alerter({"urgent": "0"}) + m = monitor.MonitorFail("fail", {"urgent": "1"}) + m.run_test() + self.assertEqual(a.should_alert(m), alerter.AlertType.FAILURE) + class TestMessageBuilding(unittest.TestCase): def setUp(self): @@ -543,6 +567,14 @@ def test_config(self): with self.assertRaises(util.AlerterConfigurationError): sns.SNSAlerter({"topic": "a", "number": "b"}) + def test_urgent(self): + a = sns.SNSAlerter({"topic": "a"}) + self.assertEqual(a.urgent, True) + + def test_not_urgent(self): + a = sns.SNSAlerter({"topic": "a", "urgent": 0}) + self.assertEqual(a.urgent, False) + class TestDescription(unittest.TestCase): def test_times_always(self): From 9710e8fde8ce49d311437adde50769c335733016 Mon Sep 17 00:00:00 2001 From: James Seward Date: Sun, 25 Jul 2021 15:58:23 +0100 Subject: [PATCH 022/325] Handle missing sqlite support --- simplemonitor/Loggers/db.py | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/simplemonitor/Loggers/db.py b/simplemonitor/Loggers/db.py index 953a2cb1..5cb806cc 100644 --- a/simplemonitor/Loggers/db.py +++ b/simplemonitor/Loggers/db.py @@ -2,7 +2,13 @@ SimpleMonitor logging with sqlite """ -import sqlite3 +try: + import sqlite3 + + SQLLITE_AVAILABLE = True +except ImportError: + SQLLITE_AVAILABLE = False + import time from socket import gethostname @@ -48,6 +54,13 @@ class DBLogger(Logger): def __init__(self, config_options: dict) -> None: """Open the database connection.""" super().__init__(config_options) + if not SQLLITE_AVAILABLE: + self.logger_logger.critical( + "Python sqlite support not available. Maybe you need to install " + "sqlite-devel or libsqlite3-dev, or similar?" + ) + self.connected = False + return self.db_path = self.get_config_option( "db_path", required=True, allow_empty=False ) From d47cf6ced77ac1f23f864e6ba671f45f7207c216 Mon Sep 17 00:00:00 2001 From: James Seward Date: Sun, 25 Jul 2021 16:36:33 +0100 Subject: [PATCH 023/325] Update docs for alerter.urgent setting --- docs/alerters.rst | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/docs/alerters.rst b/docs/alerters.rst index ea0e573b..690491fc 100644 --- a/docs/alerters.rst +++ b/docs/alerters.rst @@ -96,6 +96,17 @@ These options are common to all alerter types. fire this alerter (for a failed monitor) every iteration +.. confval:: urgent + + :type: boolean + :required: false + + if the alerter should be urgent or not. The default varies from alerter to + alerter. Typically, those which send "page" style alerts such as SMS default + to urgent. You can use this option to override that in e.g. the case of the + SNS alerter, which could be urgent if sending SMSes, but non-urgent if + sending emails. + Time restrictions ----------------- From 127196766f4a64f3b32564ba7ba3dbadc7e2953b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 29 Jul 2021 12:07:28 +0000 Subject: [PATCH 024/325] Bump pylint from 2.9.3 to 2.9.6 Bumps [pylint](https://github.com/PyCQA/pylint) from 2.9.3 to 2.9.6. - [Release notes](https://github.com/PyCQA/pylint/releases) - [Changelog](https://github.com/PyCQA/pylint/blob/main/ChangeLog) - [Commits](https://github.com/PyCQA/pylint/compare/v2.9.3...v2.9.6) --- updated-dependencies: - dependency-name: pylint dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 36 ++++++++++++++++++++++++++++-------- pyproject.toml | 2 +- 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/poetry.lock b/poetry.lock index 98534dd1..b6d43bff 100644 --- a/poetry.lock +++ b/poetry.lock @@ -28,7 +28,7 @@ typing-extensions = {version = "*", markers = "python_version < \"3.8\""} [[package]] name = "astroid" -version = "2.6.2" +version = "2.6.5" description = "An abstract syntax tree for Python with inference support." category = "dev" optional = false @@ -648,14 +648,14 @@ test = ["pytest (>=4.0.1,<5.0.0)", "pytest-cov (>=2.6.0,<3.0.0)", "pytest-runner [[package]] name = "pylint" -version = "2.9.3" +version = "2.9.6" description = "python code static checker" category = "dev" optional = false python-versions = "~=3.6" [package.dependencies] -astroid = ">=2.6.2,<2.7" +astroid = ">=2.6.5,<2.7" colorama = {version = "*", markers = "sys_platform == \"win32\""} isort = ">=4.2.5,<6" mccabe = ">=0.6,<0.7" @@ -1214,7 +1214,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pyt [metadata] lock-version = "1.1" python-versions = "^3.6.2" -content-hash = "b8da683a5b90580b973e936d04a73765f57e1cc043e4b8880cf830acfe5b966c" +content-hash = "2bcbdf92427768166c0554fbb7519dfdaedf56772af5ce803d4fa507ea706a4b" [metadata.files] alabaster = [ @@ -1230,8 +1230,8 @@ arrow = [ {file = "arrow-1.1.1.tar.gz", hash = "sha256:dee7602f6c60e3ec510095b5e301441bc56288cb8f51def14dcb3079f623823a"}, ] astroid = [ - {file = "astroid-2.6.2-py3-none-any.whl", hash = "sha256:606b2911d10c3dcf35e58d2ee5c97360e8477d7b9f3efc3f24811c93e6fc2cd9"}, - {file = "astroid-2.6.2.tar.gz", hash = "sha256:38b95085e9d92e2ca06cf8b35c12a74fa81da395a6f9e65803742e6509c05892"}, + {file = "astroid-2.6.5-py3-none-any.whl", hash = "sha256:7b963d1c590d490f60d2973e57437115978d3a2529843f160b5003b721e1e925"}, + {file = "astroid-2.6.5.tar.gz", hash = "sha256:83e494b02d75d07d4e347b27c066fd791c0c74fc96c613d1ea3de0c82c48168f"}, ] atomicwrites = [ {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, @@ -1291,24 +1291,36 @@ cffi = [ {file = "cffi-1.14.5-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:48e1c69bbacfc3d932221851b39d49e81567a4d4aac3b21258d9c24578280058"}, {file = "cffi-1.14.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:69e395c24fc60aad6bb4fa7e583698ea6cc684648e1ffb7fe85e3c1ca131a7d5"}, {file = "cffi-1.14.5-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:9e93e79c2551ff263400e1e4be085a1210e12073a31c2011dbbda14bda0c6132"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:24ec4ff2c5c0c8f9c6b87d5bb53555bf267e1e6f70e52e5a9740d32861d36b6f"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c3f39fa737542161d8b0d680df2ec249334cd70a8f420f71c9304bd83c3cbed"}, + {file = "cffi-1.14.5-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:681d07b0d1e3c462dd15585ef5e33cb021321588bebd910124ef4f4fb71aef55"}, {file = "cffi-1.14.5-cp36-cp36m-win32.whl", hash = "sha256:58e3f59d583d413809d60779492342801d6e82fefb89c86a38e040c16883be53"}, {file = "cffi-1.14.5-cp36-cp36m-win_amd64.whl", hash = "sha256:005a36f41773e148deac64b08f233873a4d0c18b053d37da83f6af4d9087b813"}, {file = "cffi-1.14.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:2894f2df484ff56d717bead0a5c2abb6b9d2bf26d6960c4604d5c48bbc30ee73"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:0857f0ae312d855239a55c81ef453ee8fd24136eaba8e87a2eceba644c0d4c06"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:cd2868886d547469123fadc46eac7ea5253ea7fcb139f12e1dfc2bbd406427d1"}, {file = "cffi-1.14.5-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:35f27e6eb43380fa080dccf676dece30bef72e4a67617ffda586641cd4508d49"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:06d7cd1abac2ffd92e65c0609661866709b4b2d82dd15f611e602b9b188b0b69"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:0f861a89e0043afec2a51fd177a567005847973be86f709bbb044d7f42fc4e05"}, + {file = "cffi-1.14.5-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cc5a8e069b9ebfa22e26d0e6b97d6f9781302fe7f4f2b8776c3e1daea35f1adc"}, {file = "cffi-1.14.5-cp37-cp37m-win32.whl", hash = "sha256:9ff227395193126d82e60319a673a037d5de84633f11279e336f9c0f189ecc62"}, {file = "cffi-1.14.5-cp37-cp37m-win_amd64.whl", hash = "sha256:9cf8022fb8d07a97c178b02327b284521c7708d7c71a9c9c355c178ac4bbd3d4"}, {file = "cffi-1.14.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8b198cec6c72df5289c05b05b8b0969819783f9418e0409865dac47288d2a053"}, {file = "cffi-1.14.5-cp38-cp38-manylinux1_i686.whl", hash = "sha256:ad17025d226ee5beec591b52800c11680fca3df50b8b29fe51d882576e039ee0"}, {file = "cffi-1.14.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:6c97d7350133666fbb5cf4abdc1178c812cb205dc6f41d174a7b0f18fb93337e"}, {file = "cffi-1.14.5-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:8ae6299f6c68de06f136f1f9e69458eae58f1dacf10af5c17353eae03aa0d827"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:04c468b622ed31d408fea2346bec5bbffba2cc44226302a0de1ade9f5ea3d373"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:06db6321b7a68b2bd6df96d08a5adadc1fa0e8f419226e25b2a5fbf6ccc7350f"}, + {file = "cffi-1.14.5-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:293e7ea41280cb28c6fcaaa0b1aa1f533b8ce060b9e701d78511e1e6c4a1de76"}, {file = "cffi-1.14.5-cp38-cp38-win32.whl", hash = "sha256:b85eb46a81787c50650f2392b9b4ef23e1f126313b9e0e9013b35c15e4288e2e"}, {file = "cffi-1.14.5-cp38-cp38-win_amd64.whl", hash = "sha256:1f436816fc868b098b0d63b8920de7d208c90a67212546d02f84fe78a9c26396"}, {file = "cffi-1.14.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:1071534bbbf8cbb31b498d5d9db0f274f2f7a865adca4ae429e147ba40f73dea"}, {file = "cffi-1.14.5-cp39-cp39-manylinux1_i686.whl", hash = "sha256:9de2e279153a443c656f2defd67769e6d1e4163952b3c622dcea5b08a6405322"}, {file = "cffi-1.14.5-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:6e4714cc64f474e4d6e37cfff31a814b509a35cb17de4fb1999907575684479c"}, {file = "cffi-1.14.5-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:158d0d15119b4b7ff6b926536763dc0714313aa59e320ddf787502c70c4d4bee"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1bf1ac1984eaa7675ca8d5745a8cb87ef7abecb5592178406e55858d411eadc0"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:df5052c5d867c1ea0b311fb7c3cd28b19df469c056f7fdcfe88c7473aa63e333"}, + {file = "cffi-1.14.5-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:24a570cd11895b60829e941f2613a4f79df1a27344cbbb82164ef2e0116f09c7"}, {file = "cffi-1.14.5-cp39-cp39-win32.whl", hash = "sha256:afb29c1ba2e5a3736f1c301d9d0abe3ec8b86957d04ddfa9d7a6a42b9367e396"}, {file = "cffi-1.14.5-cp39-cp39-win_amd64.whl", hash = "sha256:f2d45f97ab6bb54753eab54fffe75aaf3de4ff2341c9daee1987ee1837636f1d"}, {file = "cffi-1.14.5.tar.gz", hash = "sha256:fd78e5fee591709f32ef6edb9a015b4aa1a5022598e36227500c8f4e02328d9c"}, @@ -1648,8 +1660,8 @@ pyjwt = [ {file = "PyJWT-1.7.1.tar.gz", hash = "sha256:8d59a976fb773f3e6a39c85636357c4f0e242707394cadadd9814f5cbaa20e96"}, ] pylint = [ - {file = "pylint-2.9.3-py3-none-any.whl", hash = "sha256:5d46330e6b8886c31b5e3aba5ff48c10f4aa5e76cbf9002c6544306221e63fbc"}, - {file = "pylint-2.9.3.tar.gz", hash = "sha256:23a1dc8b30459d78e9ff25942c61bb936108ccbe29dd9e71c01dc8274961709a"}, + {file = "pylint-2.9.6-py3-none-any.whl", hash = "sha256:2e1a0eb2e8ab41d6b5dbada87f066492bb1557b12b76c47c2ee8aa8a11186594"}, + {file = "pylint-2.9.6.tar.gz", hash = "sha256:8b838c8983ee1904b2de66cce9d0b96649a91901350e956d78f289c3bc87b48e"}, ] pynacl = [ {file = "PyNaCl-1.4.0-cp27-cp27m-macosx_10_10_x86_64.whl", hash = "sha256:ea6841bc3a76fa4942ce00f3bda7d436fda21e2d91602b9e21b7ca9ecab8f3ff"}, @@ -1717,18 +1729,26 @@ pyyaml = [ {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:72a01f726a9c7851ca9bfad6fd09ca4e090a023c00945ea05ba1638c09dc3347"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux2014_s390x.whl", hash = "sha256:895f61ef02e8fed38159bb70f7e100e00f471eae2bc838cd0f4ebb21e28f8541"}, {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:cb333c16912324fd5f769fff6bc5de372e9e7a202247b48870bc251ed40239aa"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux2014_s390x.whl", hash = "sha256:fe69978f3f768926cfa37b867e3843918e012cf83f680806599ddce33c2c68b0"}, {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:fd7f6999a8070df521b6384004ef42833b9bd62cfee11a09bda1079b4b704247"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux2014_s390x.whl", hash = "sha256:bfb51918d4ff3d77c1c856a9699f8492c612cde32fd3bcd344af9be34999bfdc"}, {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:d483ad4e639292c90170eb6f7783ad19490e7a8defb3e46f97dfe4bacae89122"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux2014_s390x.whl", hash = "sha256:fdc842473cd33f45ff6bce46aea678a54e3d21f1b61a7750ce3c498eedfe25d6"}, {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, diff --git a/pyproject.toml b/pyproject.toml index 6ee0cdc5..4f0cc070 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,7 +60,7 @@ mypy = "*" bandit = "*" freezegun = "*" pytest = "*" -pylint = "^2.9.3" +pylint = "^2.9.6" Sphinx = "^4.0.2" sphinx-rtd-theme = "^0.5.1" pytest-cov = "^2.12.1" From 9bbd95dda01cd94c7b62df43cddb114dd162bafd Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 3 Aug 2021 12:07:59 +0000 Subject: [PATCH 025/325] Bump codecov from 2.1.11 to 2.1.12 Bumps [codecov](https://github.com/codecov/codecov-python) from 2.1.11 to 2.1.12. - [Release notes](https://github.com/codecov/codecov-python/releases) - [Changelog](https://github.com/codecov/codecov-python/blob/master/CHANGELOG.md) - [Commits](https://github.com/codecov/codecov-python/compare/v2.1.11...v2.1.12) --- updated-dependencies: - dependency-name: codecov dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/poetry.lock b/poetry.lock index 2c750bfd..dfd555af 100644 --- a/poetry.lock +++ b/poetry.lock @@ -199,7 +199,7 @@ importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} [[package]] name = "codecov" -version = "2.1.11" +version = "2.1.12" description = "Hosted coverage reports for GitHub, Bitbucket and Gitlab" category = "dev" optional = false @@ -1342,9 +1342,9 @@ click = [ {file = "click-8.0.1.tar.gz", hash = "sha256:8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a"}, ] codecov = [ - {file = "codecov-2.1.11-py2.py3-none-any.whl", hash = "sha256:ba8553a82942ce37d4da92b70ffd6d54cf635fc1793ab0a7dc3fecd6ebfb3df8"}, - {file = "codecov-2.1.11-py3.8.egg", hash = "sha256:e95901d4350e99fc39c8353efa450050d2446c55bac91d90fcfd2354e19a6aef"}, - {file = "codecov-2.1.11.tar.gz", hash = "sha256:6cde272454009d27355f9434f4e49f238c0273b216beda8472a65dc4957f473b"}, + {file = "codecov-2.1.12-py2.py3-none-any.whl", hash = "sha256:585dc217dc3d8185198ceb402f85d5cb5dbfa0c5f350a5abcdf9e347776a5b47"}, + {file = "codecov-2.1.12-py3.8.egg", hash = "sha256:782a8e5352f22593cbc5427a35320b99490eb24d9dcfa2155fd99d2b75cfb635"}, + {file = "codecov-2.1.12.tar.gz", hash = "sha256:a0da46bb5025426da895af90938def8ee12d37fcbcbbbc15b6dc64cf7ebc51c1"}, ] colorama = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, From b472e383dc673b6b00badbb715d92b414e1bec1e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Aug 2021 12:08:03 +0000 Subject: [PATCH 026/325] Bump ping3 from 2.8.1 to 3.0.1 Bumps [ping3](https://github.com/kyan001/ping3) from 2.8.1 to 3.0.1. - [Release notes](https://github.com/kyan001/ping3/releases) - [Commits](https://github.com/kyan001/ping3/compare/v2.8.1...v3.0.1) --- updated-dependencies: - dependency-name: ping3 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- poetry.lock | 13 +++++++++---- pyproject.toml | 2 +- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/poetry.lock b/poetry.lock index 2c750bfd..2c5e924a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -550,12 +550,15 @@ python-versions = ">=2.6" [[package]] name = "ping3" -version = "2.8.1" +version = "3.0.1" description = "A pure python3 version of ICMP ping implementation using raw socket." category = "main" optional = false python-versions = ">=3" +[package.extras] +dev = ["build", "twine", "pycodestyle"] + [[package]] name = "pluggy" version = "0.13.1" @@ -1222,7 +1225,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pyt [metadata] lock-version = "1.1" python-versions = "^3.6.2" -content-hash = "2bcbdf92427768166c0554fbb7519dfdaedf56772af5ce803d4fa507ea706a4b" +content-hash = "f2990067b896d3b494a823b4411c5f6726b67edd1448246bcab0d2999550c692" [metadata.files] alabaster = [ @@ -1418,8 +1421,10 @@ cryptography = [ {file = "cryptography-3.4.7-cp36-abi3-win_amd64.whl", hash = "sha256:de4e5f7f68220d92b7637fc99847475b59154b7a1b3868fb7385337af54ac9ca"}, {file = "cryptography-3.4.7-pp36-pypy36_pp73-manylinux2010_x86_64.whl", hash = "sha256:26965837447f9c82f1855e0bc8bc4fb910240b6e0d16a664bb722df3b5b06873"}, {file = "cryptography-3.4.7-pp36-pypy36_pp73-manylinux2014_x86_64.whl", hash = "sha256:eb8cc2afe8b05acbd84a43905832ec78e7b3873fb124ca190f574dca7389a87d"}, + {file = "cryptography-3.4.7-pp37-pypy37_pp73-macosx_10_10_x86_64.whl", hash = "sha256:b01fd6f2737816cb1e08ed4807ae194404790eac7ad030b34f2ce72b332f5586"}, {file = "cryptography-3.4.7-pp37-pypy37_pp73-manylinux2010_x86_64.whl", hash = "sha256:7ec5d3b029f5fa2b179325908b9cd93db28ab7b85bb6c1db56b10e0b54235177"}, {file = "cryptography-3.4.7-pp37-pypy37_pp73-manylinux2014_x86_64.whl", hash = "sha256:ee77aa129f481be46f8d92a1a7db57269a2f23052d5f2433b4621bb457081cc9"}, + {file = "cryptography-3.4.7-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:bf40af59ca2465b24e54f671b2de2c59257ddc4f7e5706dbd6930e26823668d3"}, {file = "cryptography-3.4.7.tar.gz", hash = "sha256:3d10de8116d25649631977cb37da6cbdd2d6fa0e0281d014a5b7d337255ca713"}, ] dataclasses = [ @@ -1603,8 +1608,8 @@ pbr = [ {file = "pbr-5.6.0.tar.gz", hash = "sha256:42df03e7797b796625b1029c0400279c7c34fd7df24a7d7818a1abb5b38710dd"}, ] ping3 = [ - {file = "ping3-2.8.1-py3-none-any.whl", hash = "sha256:c8b1974212151163fef306adfb2c59cb422ab29166562f3b1d6910b12494b720"}, - {file = "ping3-2.8.1.tar.gz", hash = "sha256:9033a398a82efb84614f7c88d8855d5cedc6a6546a9c3bbc00e99cf96f597e5e"}, + {file = "ping3-3.0.1-py3-none-any.whl", hash = "sha256:0497bad6f5c0773f7359c3bf7034fdda495ee0a3f1629e499e7c7872e45215eb"}, + {file = "ping3-3.0.1.tar.gz", hash = "sha256:5111169585edce59ac4d1bc69ec807166b75f0821e12783ba0c0ece8a1717862"}, ] pluggy = [ {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, diff --git a/pyproject.toml b/pyproject.toml index 4f0cc070..5bf33091 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,7 @@ arrow = ">=0.17,<1.2" boto3 = "^1.15.16" colorlog = ">=4.4,<6.0" paho-mqtt = "^1.5.1" -ping3 = "^2.6.6" +ping3 = ">=2.6.6,<4.0.0" psutil = "^5.7.2" pyOpenSSL = ">=19.1,<21.0" requests = "^2.24.0" From 1cda968420634d85039dc9a02a6db6850c179852 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 9 Aug 2021 12:09:31 +0000 Subject: [PATCH 027/325] Bump types-pyopenssl from 20.0.3 to 20.0.5 Bumps [types-pyopenssl](https://github.com/python/typeshed) from 20.0.3 to 20.0.5. - [Release notes](https://github.com/python/typeshed/releases) - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-pyopenssl dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- poetry.lock | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/poetry.lock b/poetry.lock index 2c750bfd..58d5ea72 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1133,7 +1133,7 @@ types-cryptography = "*" [[package]] name = "types-pyopenssl" -version = "20.0.3" +version = "20.0.5" description = "Typing stubs for pyOpenSSL" category = "main" optional = false @@ -1418,8 +1418,10 @@ cryptography = [ {file = "cryptography-3.4.7-cp36-abi3-win_amd64.whl", hash = "sha256:de4e5f7f68220d92b7637fc99847475b59154b7a1b3868fb7385337af54ac9ca"}, {file = "cryptography-3.4.7-pp36-pypy36_pp73-manylinux2010_x86_64.whl", hash = "sha256:26965837447f9c82f1855e0bc8bc4fb910240b6e0d16a664bb722df3b5b06873"}, {file = "cryptography-3.4.7-pp36-pypy36_pp73-manylinux2014_x86_64.whl", hash = "sha256:eb8cc2afe8b05acbd84a43905832ec78e7b3873fb124ca190f574dca7389a87d"}, + {file = "cryptography-3.4.7-pp37-pypy37_pp73-macosx_10_10_x86_64.whl", hash = "sha256:b01fd6f2737816cb1e08ed4807ae194404790eac7ad030b34f2ce72b332f5586"}, {file = "cryptography-3.4.7-pp37-pypy37_pp73-manylinux2010_x86_64.whl", hash = "sha256:7ec5d3b029f5fa2b179325908b9cd93db28ab7b85bb6c1db56b10e0b54235177"}, {file = "cryptography-3.4.7-pp37-pypy37_pp73-manylinux2014_x86_64.whl", hash = "sha256:ee77aa129f481be46f8d92a1a7db57269a2f23052d5f2433b4621bb457081cc9"}, + {file = "cryptography-3.4.7-pp37-pypy37_pp73-win_amd64.whl", hash = "sha256:bf40af59ca2465b24e54f671b2de2c59257ddc4f7e5706dbd6930e26823668d3"}, {file = "cryptography-3.4.7.tar.gz", hash = "sha256:3d10de8116d25649631977cb37da6cbdd2d6fa0e0281d014a5b7d337255ca713"}, ] dataclasses = [ @@ -1940,8 +1942,8 @@ types-paramiko = [ {file = "types_paramiko-0.1.7-py2.py3-none-any.whl", hash = "sha256:9fb9f3a363c99ae735148a7ce3c28adbe8f87797ec3c8cce3103899acbdebfa8"}, ] types-pyopenssl = [ - {file = "types-pyOpenSSL-20.0.3.tar.gz", hash = "sha256:177e102b9e68986ca7b2b6aea11f6ee5b9c5e0f9c89dcaa8d28b31527571f625"}, - {file = "types_pyOpenSSL-20.0.3-py3-none-any.whl", hash = "sha256:c51286c23e26e4c67d1e9d1e1ce2efd2d5386c32c15dc90a977290b79e16532a"}, + {file = "types-pyOpenSSL-20.0.5.tar.gz", hash = "sha256:e9abf9c1ac91e0f3f18122820d7f25b68373620b061aa23be8769fd52c588197"}, + {file = "types_pyOpenSSL-20.0.5-py3-none-any.whl", hash = "sha256:acd4f6c4d58822d79e6c8c84983da43607c5d094e817788acda68c34ac3348d9"}, ] types-python-dateutil = [ {file = "types-python-dateutil-0.1.4.tar.gz", hash = "sha256:e6486ca27b6dde73e0ec079a9e1b03e208766e6bc7f1e08964a7e9104a5c7d7a"}, From 43824a92670d1d7565880d2a98750ca2a5f1e2c1 Mon Sep 17 00:00:00 2001 From: Christian Groschupp Date: Thu, 12 Aug 2021 21:50:26 +0200 Subject: [PATCH 028/325] Fix double-call to record_fail in MonitorUnixService When Exception gets raised self.record_fail() is called two times: inside the exception handler and then at the end of the function, causing the virtual fail count to increment by 2 instead of just 1 --- simplemonitor/Monitors/service.py | 11 +++--- tests/test_service.py | 56 +++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 7 deletions(-) create mode 100644 tests/test_service.py diff --git a/simplemonitor/Monitors/service.py b/simplemonitor/Monitors/service.py index 0c172c38..81803e1d 100644 --- a/simplemonitor/Monitors/service.py +++ b/simplemonitor/Monitors/service.py @@ -209,18 +209,15 @@ def run_test(self) -> bool: try: result = subprocess.run( ["service", self.service_name, "status"], - check=True, + check=False, stderr=subprocess.PIPE, stdout=subprocess.PIPE, ) # nosec returncode = result.returncode - except subprocess.CalledProcessError as exception: - returncode = exception.returncode - if returncode == self._want_return_code: - return self.record_success() - self.record_fail( + except subprocess.SubprocessError as exception: + return self.record_fail( "Failed to run 'service {} status: {}".format( - self.service_name, exception.output + self.service_name, exception ) ) if returncode == self._want_return_code: diff --git a/tests/test_service.py b/tests/test_service.py new file mode 100644 index 00000000..0cd3c77a --- /dev/null +++ b/tests/test_service.py @@ -0,0 +1,56 @@ +# type: ignore +import unittest +import subprocess +from simplemonitor.Monitors import service +from unittest.mock import patch + + +class TestUnixServiceMonitors(unittest.TestCase): + @patch("subprocess.run") + def test_UnixService_ok(self, subprocess_run_fn): + config_options = {"service": "unittest"} + + subprocess_run_fn.return_value = subprocess.CompletedProcess( + ["service", config_options.get("service"), "status"], returncode=1 + ) + m = service.MonitorUnixService("unittest", config_options) + + m.run_test() + self.assertFalse(m.test_success()) + self.assertEqual(m.error_count, 1) + + m.run_test() + self.assertFalse(m.test_success()) + self.assertEqual(m.error_count, 2) + + @patch("subprocess.run") + def test_UnixService_raiseFileNotFoundError(self, subprocess_run_fn): + config_options = {"service": "unittest"} + + subprocess_run_fn.side_effect = FileNotFoundError( + "[Errno 2] No such file or directory: 'service'" + ) + m = service.MonitorUnixService("unittest", config_options) + + self.assertRaises(FileNotFoundError, m.run_test) + + @patch("subprocess.run") + def test_UnixService_raiseSubprocessError(self, subprocess_run_fn): + config_options = {"service": "unittest"} + + subprocess_run_fn.side_effect = subprocess.SubprocessError( + ["service", config_options.get("service"), "status"] + ) + m = service.MonitorUnixService("unittest", config_options) + + m.run_test() + self.assertFalse(m.test_success()) + self.assertEqual(m.error_count, 1) + + m.run_test() + self.assertFalse(m.test_success()) + self.assertEqual(m.error_count, 2) + + +if __name__ == "__main__": + unittest.main() From 66b201023f16dd4750e6533b79bf689cba65ca46 Mon Sep 17 00:00:00 2001 From: James Seward Date: Sun, 15 Aug 2021 16:59:23 +0100 Subject: [PATCH 029/325] Embed JS deps for HTML logger into package This means there's no external dependencies to be loaded by the webpage, so it will work when you're offline. --- .gitignore | 1 + Makefile | 3 + pyproject.toml | 3 +- simplemonitor/Loggers/file.py | 20 +- simplemonitor/html/package-lock.json | 1169 +++++++++++++++++ simplemonitor/html/package.json | 26 + simplemonitor/html/src/index.js | 11 + simplemonitor/html/src/maps.js | 18 + simplemonitor/html/src/marker-shadow.png | Bin 0 -> 797 bytes simplemonitor/html/src/marker-single-down.png | Bin 0 -> 14761 bytes simplemonitor/html/src/marker-single-up.png | Bin 0 -> 2244 bytes simplemonitor/html/src/style.css | 3 + simplemonitor/html/status-template.html | 52 +- simplemonitor/html/webpack.config.js | 30 + 14 files changed, 1294 insertions(+), 42 deletions(-) create mode 100644 simplemonitor/html/package-lock.json create mode 100644 simplemonitor/html/package.json create mode 100644 simplemonitor/html/src/index.js create mode 100644 simplemonitor/html/src/maps.js create mode 100644 simplemonitor/html/src/marker-shadow.png create mode 100644 simplemonitor/html/src/marker-single-down.png create mode 100644 simplemonitor/html/src/marker-single-up.png create mode 100644 simplemonitor/html/src/style.css create mode 100644 simplemonitor/html/webpack.config.js diff --git a/.gitignore b/.gitignore index 35f3a639..20fd570f 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,4 @@ docs/_build *.log .tox pyrightconfig.json +simplemonitor/html/node_modules diff --git a/Makefile b/Makefile index ef49ca11..efdd5df1 100644 --- a/Makefile +++ b/Makefile @@ -61,3 +61,6 @@ docker-build: docker-compose-build: docker-compose build + +html-bundle: + cd simplemonitor/html && npx webpack diff --git a/pyproject.toml b/pyproject.toml index 4f0cc070..a3bbea2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,9 +21,8 @@ classifiers = [ "Typing :: Typed", ] include = [ - "simplemonitor/html/marker-*.png", + "simplemonitor/html/dist/*", "simplemonitor/html/status-template.html", - "simplemonitor/html/style.css" ] [tool.poetry.scripts] diff --git a/simplemonitor/Loggers/file.py b/simplemonitor/Loggers/file.py index cf36d449..8953f9e4 100644 --- a/simplemonitor/Loggers/file.py +++ b/simplemonitor/Loggers/file.py @@ -2,6 +2,7 @@ SimpleMonitor logging to files """ +import glob import json import logging import logging.handlers @@ -241,7 +242,11 @@ def __init__(self, config_options: dict = None) -> None: else: self.map_start = None self.map_token = cast(str, self.get_config_option("map_token")) - self._resource_files = ["style.css"] # type: List[str] + self._resource_files = [ + "dist/main.bundle.js*", + "dist/maps.bundle.js*", + "dist/*.png", + ] self._my_host = short_hostname() self.status = "" self.header_class = "" @@ -418,12 +423,15 @@ def process_batch(self) -> None: return shutil.move(file_name, os.path.join(self.folder, self.filename)) if self.copy_resources: - for filename in self._resource_files: - shutil.copy(os.path.join(self.source_folder, filename), self.folder) + for fileglob in self._resource_files: + for filename in glob.glob( + os.path.join(self.source_folder, fileglob) + ): + shutil.copy( + os.path.join(self.source_folder, filename), self.folder + ) except OSError: - self.logger_logger.exception( - "problem closing/moving temporary file for HTML output" - ) + self.logger_logger.exception("problem closing/moving files for HTML output") if self.upload_command: try: subprocess.run(self.upload_command.split(" "), check=True) # nosec diff --git a/simplemonitor/html/package-lock.json b/simplemonitor/html/package-lock.json new file mode 100644 index 00000000..f912b193 --- /dev/null +++ b/simplemonitor/html/package-lock.json @@ -0,0 +1,1169 @@ +{ + "name": "html", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@discoveryjs/json-ext": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@discoveryjs/json-ext/-/json-ext-0.5.3.tgz", + "integrity": "sha512-Fxt+AfXgjMoin2maPIYzFZnQjAXjAL0PHscM5pRTtatFqB+vZxAM9tLp2Optnuw3QOQC40jTNeGYFOMvyf7v9g==", + "dev": true + }, + "@popperjs/core": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.9.3.tgz", + "integrity": "sha512-xDu17cEfh7Kid/d95kB6tZsLOmSWKCZKtprnhVepjsSaCij+lM3mItSJDuuHDMbCWTh8Ejmebwb+KONcCJ0eXQ==" + }, + "@types/eslint": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-7.28.0.tgz", + "integrity": "sha512-07XlgzX0YJUn4iG1ocY4IX9DzKSmMGUs6ESKlxWhZRaa0fatIWaHWUVapcuGa8r5HFnTqzj+4OCjd5f7EZ/i/A==", + "dev": true, + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "@types/eslint-scope": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.1.tgz", + "integrity": "sha512-SCFeogqiptms4Fg29WpOTk5nHIzfpKCemSN63ksBQYKTcXoJEmJagV+DhVmbapZzY4/5YaOV1nZwrsU79fFm1g==", + "dev": true, + "requires": { + "@types/eslint": "*", + "@types/estree": "*" + } + }, + "@types/estree": { + "version": "0.0.50", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.50.tgz", + "integrity": "sha512-C6N5s2ZFtuZRj54k2/zyRhNDjJwwcViAM3Nbm8zjBpbqAdZ00mr0CFxvSKeO8Y/e03WVFLpQMdHYVfUd6SB+Hw==", + "dev": true + }, + "@types/json-schema": { + "version": "7.0.9", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", + "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", + "dev": true + }, + "@types/node": { + "version": "16.6.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-16.6.1.tgz", + "integrity": "sha512-Sr7BhXEAer9xyGuCN3Ek9eg9xPviCF2gfu9kTfuU2HkTVAMYSDeX40fvpmo72n5nansg3nsBjuQBrsS28r+NUw==", + "dev": true + }, + "@webassemblyjs/ast": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.11.1.tgz", + "integrity": "sha512-ukBh14qFLjxTQNTXocdyksN5QdM28S1CxHt2rdskFyL+xFV7VremuBLVbmCePj+URalXBENx/9Lm7lnhihtCSw==", + "dev": true, + "requires": { + "@webassemblyjs/helper-numbers": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1" + } + }, + "@webassemblyjs/floating-point-hex-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.1.tgz", + "integrity": "sha512-iGRfyc5Bq+NnNuX8b5hwBrRjzf0ocrJPI6GWFodBFzmFnyvrQ83SHKhmilCU/8Jv67i4GJZBMhEzltxzcNagtQ==", + "dev": true + }, + "@webassemblyjs/helper-api-error": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.1.tgz", + "integrity": "sha512-RlhS8CBCXfRUR/cwo2ho9bkheSXG0+NwooXcc3PAILALf2QLdFyj7KGsKRbVc95hZnhnERon4kW/D3SZpp6Tcg==", + "dev": true + }, + "@webassemblyjs/helper-buffer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.11.1.tgz", + "integrity": "sha512-gwikF65aDNeeXa8JxXa2BAk+REjSyhrNC9ZwdT0f8jc4dQQeDQ7G4m0f2QCLPJiMTTO6wfDmRmj/pW0PsUvIcA==", + "dev": true + }, + "@webassemblyjs/helper-numbers": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.1.tgz", + "integrity": "sha512-vDkbxiB8zfnPdNK9Rajcey5C0w+QJugEglN0of+kmO8l7lDb77AnlKYQF7aarZuCrv+l0UvqL+68gSDr3k9LPQ==", + "dev": true, + "requires": { + "@webassemblyjs/floating-point-hex-parser": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/helper-wasm-bytecode": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.1.tgz", + "integrity": "sha512-PvpoOGiJwXeTrSf/qfudJhwlvDQxFgelbMqtq52WWiXC6Xgg1IREdngmPN3bs4RoO83PnL/nFrxucXj1+BX62Q==", + "dev": true + }, + "@webassemblyjs/helper-wasm-section": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.11.1.tgz", + "integrity": "sha512-10P9No29rYX1j7F3EVPX3JvGPQPae+AomuSTPiF9eBQeChHI6iqjMIwR9JmOJXwpnn/oVGDk7I5IlskuMwU/pg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1" + } + }, + "@webassemblyjs/ieee754": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.1.tgz", + "integrity": "sha512-hJ87QIPtAMKbFq6CGTkZYJivEwZDbQUgYd3qKSadTNOhVY7p+gfP6Sr0lLRVTaG1JjFj+r3YchoqRYxNH3M0GQ==", + "dev": true, + "requires": { + "@xtuc/ieee754": "^1.2.0" + } + }, + "@webassemblyjs/leb128": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.1.tgz", + "integrity": "sha512-BJ2P0hNZ0u+Th1YZXJpzW6miwqQUGcIHT1G/sf72gLVD9DZ5AdYTqPNbHZh6K1M5VmKvFXwGSWZADz+qBWxeRw==", + "dev": true, + "requires": { + "@xtuc/long": "4.2.2" + } + }, + "@webassemblyjs/utf8": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.1.tgz", + "integrity": "sha512-9kqcxAEdMhiwQkHpkNiorZzqpGrodQQ2IGrHHxCy+Ozng0ofyMA0lTqiLkVs1uzTRejX+/O0EOT7KxqVPuXosQ==", + "dev": true + }, + "@webassemblyjs/wasm-edit": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.11.1.tgz", + "integrity": "sha512-g+RsupUC1aTHfR8CDgnsVRVZFJqdkFHpsHMfJuWQzWU3tvnLC07UqHICfP+4XyL2tnr1amvl1Sdp06TnYCmVkA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/helper-wasm-section": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-opt": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "@webassemblyjs/wast-printer": "1.11.1" + } + }, + "@webassemblyjs/wasm-gen": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.11.1.tgz", + "integrity": "sha512-F7QqKXwwNlMmsulj6+O7r4mmtAlCWfO/0HdgOxSklZfQcDu0TpLiD1mRt/zF25Bk59FIjEuGAIyn5ei4yMfLhA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "@webassemblyjs/wasm-opt": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.11.1.tgz", + "integrity": "sha512-VqnkNqnZlU5EB64pp1l7hdm3hmQw7Vgqa0KF/KCNO9sIpI6Fk6brDEiX+iCOYrvMuBWDws0NkTOxYEb85XQHHw==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-buffer": "1.11.1", + "@webassemblyjs/wasm-gen": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1" + } + }, + "@webassemblyjs/wasm-parser": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.11.1.tgz", + "integrity": "sha512-rrBujw+dJu32gYB7/Lup6UhdkPx9S9SnobZzRVL7VcBH9Bt9bCBLEuX/YXOOtBsOZ4NQrRykKhffRWHvigQvOA==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/helper-api-error": "1.11.1", + "@webassemblyjs/helper-wasm-bytecode": "1.11.1", + "@webassemblyjs/ieee754": "1.11.1", + "@webassemblyjs/leb128": "1.11.1", + "@webassemblyjs/utf8": "1.11.1" + } + }, + "@webassemblyjs/wast-printer": { + "version": "1.11.1", + "resolved": "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.11.1.tgz", + "integrity": "sha512-IQboUWM4eKzWW+N/jij2sRatKMh99QEelo3Eb2q0qXkvPRISAj8Qxtmw5itwqK+TTkBuUIE45AxYPToqPtL5gg==", + "dev": true, + "requires": { + "@webassemblyjs/ast": "1.11.1", + "@xtuc/long": "4.2.2" + } + }, + "@webpack-cli/configtest": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@webpack-cli/configtest/-/configtest-1.0.4.tgz", + "integrity": "sha512-cs3XLy+UcxiP6bj0A6u7MLLuwdXJ1c3Dtc0RkKg+wiI1g/Ti1om8+/2hc2A2B60NbBNAbMgyBMHvyymWm/j4wQ==", + "dev": true + }, + "@webpack-cli/info": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@webpack-cli/info/-/info-1.3.0.tgz", + "integrity": "sha512-ASiVB3t9LOKHs5DyVUcxpraBXDOKubYu/ihHhU+t1UPpxsivg6Od2E2qU4gJCekfEddzRBzHhzA/Acyw/mlK/w==", + "dev": true, + "requires": { + "envinfo": "^7.7.3" + } + }, + "@webpack-cli/serve": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@webpack-cli/serve/-/serve-1.5.1.tgz", + "integrity": "sha512-4vSVUiOPJLmr45S8rMGy7WDvpWxfFxfP/Qx/cxZFCfvoypTYpPPL1X8VIZMe0WTA+Jr7blUxwUSEZNkjoMTgSw==", + "dev": true + }, + "@xtuc/ieee754": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz", + "integrity": "sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA==", + "dev": true + }, + "@xtuc/long": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz", + "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==", + "dev": true + }, + "acorn": { + "version": "8.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.4.1.tgz", + "integrity": "sha512-asabaBSkEKosYKMITunzX177CXxQ4Q8BSSzMTKD+FefUhipQC70gfW5SiUDhYQ3vk8G+81HqQk7Fv9OXwwn9KA==", + "dev": true + }, + "acorn-import-assertions": { + "version": "1.7.6", + "resolved": "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.7.6.tgz", + "integrity": "sha512-FlVvVFA1TX6l3lp8VjDnYYq7R1nyW6x3svAt4nDgrWQ9SBaSh9CnbwgSUTasgfNfOG5HlM1ehugCvM+hjo56LA==", + "dev": true + }, + "ajv": { + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ajv-keywords": { + "version": "3.5.2", + "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", + "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", + "dev": true + }, + "bootstrap": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.1.0.tgz", + "integrity": "sha512-bs74WNI9BgBo3cEovmdMHikSKoXnDgA6VQjJ7TyTotU6L7d41ZyCEEelPwkYEzsG/Zjv3ie9IE3EMAje0W9Xew==" + }, + "browserslist": { + "version": "4.16.7", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.7.tgz", + "integrity": "sha512-7I4qVwqZltJ7j37wObBe3SoTz+nS8APaNcrBOlgoirb6/HbEU2XxW/LpUDTCngM6iauwFqmRTuOMfyKnFGY5JA==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001248", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.793", + "escalade": "^3.1.1", + "node-releases": "^1.1.73" + } + }, + "buffer-from": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", + "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", + "dev": true + }, + "caniuse-lite": { + "version": "1.0.30001251", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001251.tgz", + "integrity": "sha512-HOe1r+9VkU4TFmnU70z+r7OLmtR+/chB1rdcJUeQlAinjEeb0cKL20tlAtOagNZhbrtLnCvV19B4FmF1rgzl6A==", + "dev": true + }, + "chrome-trace-event": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==", + "dev": true + }, + "clone-deep": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", + "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4", + "kind-of": "^6.0.2", + "shallow-clone": "^3.0.0" + } + }, + "colorette": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.3.0.tgz", + "integrity": "sha512-ecORCqbSFP7Wm8Y6lyqMJjexBQqXSF7SSeaTyGGphogUjBlFP9m9o08wy86HL2uB7fMTxtOUzLMk7ogKcxMg1w==", + "dev": true + }, + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==", + "dev": true + }, + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "css-loader": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/css-loader/-/css-loader-6.2.0.tgz", + "integrity": "sha512-/rvHfYRjIpymZblf49w8jYcRo2y9gj6rV8UroHGmBxKrIyGLokpycyKzp9OkitvqT29ZSpzJ0Ic7SpnJX3sC8g==", + "dev": true, + "requires": { + "icss-utils": "^5.1.0", + "postcss": "^8.2.15", + "postcss-modules-extract-imports": "^3.0.0", + "postcss-modules-local-by-default": "^4.0.0", + "postcss-modules-scope": "^3.0.0", + "postcss-modules-values": "^4.0.0", + "postcss-value-parser": "^4.1.0", + "semver": "^7.3.5" + } + }, + "cssesc": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cssesc/-/cssesc-3.0.0.tgz", + "integrity": "sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg==", + "dev": true + }, + "electron-to-chromium": { + "version": "1.3.806", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.806.tgz", + "integrity": "sha512-AH/otJLAAecgyrYp0XK1DPiGVWcOgwPeJBOLeuFQ5l//vhQhwC9u6d+GijClqJAmsHG4XDue81ndSQPohUu0xA==", + "dev": true + }, + "enhanced-resolve": { + "version": "5.8.2", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.8.2.tgz", + "integrity": "sha512-F27oB3WuHDzvR2DOGNTaYy0D5o0cnrv8TeI482VM4kYgQd/FT9lUQwuNsJ0oOHtBUq7eiW5ytqzp7nBFknL+GA==", + "dev": true, + "requires": { + "graceful-fs": "^4.2.4", + "tapable": "^2.2.0" + } + }, + "envinfo": { + "version": "7.8.1", + "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.8.1.tgz", + "integrity": "sha512-/o+BXHmB7ocbHEAs6F2EnG0ogybVVUdkRunTT2glZU9XAaGmhqskrvKwqXuDfNjEO0LZKWdejEEpnq8aM0tOaw==", + "dev": true + }, + "es-module-lexer": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.7.1.tgz", + "integrity": "sha512-MgtWFl5No+4S3TmhDmCz2ObFGm6lEpTnzbQi+Dd+pw4mlTIZTmM2iAs5gRlmx5zS9luzobCSBSI90JM/1/JgOw==", + "dev": true + }, + "escalade": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "events": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", + "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", + "dev": true + }, + "execa": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/execa/-/execa-5.1.1.tgz", + "integrity": "sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==", + "dev": true, + "requires": { + "cross-spawn": "^7.0.3", + "get-stream": "^6.0.0", + "human-signals": "^2.1.0", + "is-stream": "^2.0.0", + "merge-stream": "^2.0.0", + "npm-run-path": "^4.0.1", + "onetime": "^5.1.2", + "signal-exit": "^3.0.3", + "strip-final-newline": "^2.0.0" + } + }, + "exports-loader": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/exports-loader/-/exports-loader-3.0.0.tgz", + "integrity": "sha512-b23Yg5SKR63ZvikGrQgfGgwd40MDehaYb7vOXgD7C0fMV04wS8U1I4f7n1j1wEhtQNKUqgdFox/ol2rOruOpOA==", + "dev": true, + "requires": { + "source-map": "^0.6.1" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fastest-levenshtein": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/fastest-levenshtein/-/fastest-levenshtein-1.0.12.tgz", + "integrity": "sha512-On2N+BpYJ15xIC974QNVuYGMOlEVt4s0EOI3wwMqOmK1fdDY+FN/zltPV8vosq4ad4c/gJ1KHScUn/6AWIgiow==", + "dev": true + }, + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "get-stream": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-6.0.1.tgz", + "integrity": "sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==", + "dev": true + }, + "glob-to-regexp": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", + "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", + "dev": true + }, + "graceful-fs": { + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.8.tgz", + "integrity": "sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg==", + "dev": true + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "human-signals": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz", + "integrity": "sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==", + "dev": true + }, + "icss-utils": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", + "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", + "dev": true + }, + "import-local": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.0.2.tgz", + "integrity": "sha512-vjL3+w0oulAVZ0hBHnxa/Nm5TAurf9YLQJDhqRZyqb+VKGOB6LU8t9H1Nr5CIo16vh9XfJTOoHwU0B71S557gA==", + "dev": true, + "requires": { + "pkg-dir": "^4.2.0", + "resolve-cwd": "^3.0.0" + } + }, + "interpret": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-2.2.0.tgz", + "integrity": "sha512-Ju0Bz/cEia55xDwUWEa8+olFpCiQoypjnQySseKtmjNrnps3P+xfpUmGr90T7yjlVJmOtybRvPXhKMbHr+fWnw==", + "dev": true + }, + "is-core-module": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.5.0.tgz", + "integrity": "sha512-TXCMSDsEHMEEZ6eCA8rwRDbLu55MRGmrctljsBX/2v1d9/GzqHOxW5c5oPSgrUt2vBFXebu9rGqckXGPWOlYpg==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "is-stream": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", + "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "jest-worker": { + "version": "27.0.6", + "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.0.6.tgz", + "integrity": "sha512-qupxcj/dRuA3xHPMUd40gr2EaAurFbkwzOh7wfPaeE9id7hyjURRQoqNfHifHK3XjJU6YJJUQKILGUnwGPEOCA==", + "dev": true, + "requires": { + "@types/node": "*", + "merge-stream": "^2.0.0", + "supports-color": "^8.0.0" + } + }, + "jquery": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.6.0.tgz", + "integrity": "sha512-JVzAR/AjBvVt2BmYhxRCSYysDsPcssdmTFnzyLEts9qNwmjmu4JTAMYubEfwVOSwpQ1I1sKKFcxhZCI2buerfw==" + }, + "json-parse-better-errors": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz", + "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "leaflet": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/leaflet/-/leaflet-1.7.1.tgz", + "integrity": "sha512-/xwPEBidtg69Q3HlqPdU3DnrXQOvQU/CCHA1tcDQVzOwm91YMYaILjNp7L4Eaw5Z4sOYdbBz6koWyibppd8Zqw==" + }, + "loader-runner": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/loader-runner/-/loader-runner-4.2.0.tgz", + "integrity": "sha512-92+huvxMvYlMzMt0iIOukcwYBFpkYJdpl2xsZ7LrlayO7E8SOv+JJUEK17B/dJIHAOLMfh2dZZ/Y18WgmGtYNw==", + "dev": true + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "merge-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", + "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", + "dev": true + }, + "mime-db": { + "version": "1.49.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.49.0.tgz", + "integrity": "sha512-CIc8j9URtOVApSFCQIF+VBkX1RwXp/oMMOrqdyXSBXq5RWNEsRfyj1kiRnQgmNXmHxPoFIxOroKA3zcU9P+nAA==", + "dev": true + }, + "mime-types": { + "version": "2.1.32", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.32.tgz", + "integrity": "sha512-hJGaVS4G4c9TSMYh2n6SQAGrC4RnfU+daP8G7cSCmaqNjiOoUY0VHCMS42pxnQmVF1GWwFhbHWn3RIxCqTmZ9A==", + "dev": true, + "requires": { + "mime-db": "1.49.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "nanoid": { + "version": "3.1.25", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.25.tgz", + "integrity": "sha512-rdwtIXaXCLFAQbnfqDRnI6jaRHp9fTcYBjtFKE8eezcZ7LuLjhUaQGNeMXf1HmRoCH32CLz6XwX0TtxEOS/A3Q==", + "dev": true + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "node-releases": { + "version": "1.1.74", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.74.tgz", + "integrity": "sha512-caJBVempXZPepZoZAPCWRTNxYQ+xtG/KAi4ozTA5A+nJ7IU+kLQCbqaUjb5Rwy14M9upBWiQ4NutcmW04LJSRw==", + "dev": true + }, + "npm-run-path": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", + "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", + "dev": true, + "requires": { + "path-key": "^3.0.0" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "p-limit": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", + "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", + "dev": true, + "requires": { + "yocto-queue": "^0.1.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + }, + "dependencies": { + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + } + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", + "dev": true + }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, + "pkg-dir": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", + "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", + "dev": true, + "requires": { + "find-up": "^4.0.0" + } + }, + "postcss": { + "version": "8.3.6", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.3.6.tgz", + "integrity": "sha512-wG1cc/JhRgdqB6WHEuyLTedf3KIRuD0hG6ldkFEZNCjRxiC+3i6kkWUUbiJQayP28iwG35cEmAbe98585BYV0A==", + "dev": true, + "requires": { + "colorette": "^1.2.2", + "nanoid": "^3.1.23", + "source-map-js": "^0.6.2" + } + }, + "postcss-modules-extract-imports": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", + "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", + "dev": true + }, + "postcss-modules-local-by-default": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-local-by-default/-/postcss-modules-local-by-default-4.0.0.tgz", + "integrity": "sha512-sT7ihtmGSF9yhm6ggikHdV0hlziDTX7oFoXtuVWeDd3hHObNkcHRo9V3yg7vCAY7cONyxJC/XXCmmiHHcvX7bQ==", + "dev": true, + "requires": { + "icss-utils": "^5.0.0", + "postcss-selector-parser": "^6.0.2", + "postcss-value-parser": "^4.1.0" + } + }, + "postcss-modules-scope": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-scope/-/postcss-modules-scope-3.0.0.tgz", + "integrity": "sha512-hncihwFA2yPath8oZ15PZqvWGkWf+XUfQgUGamS4LqoP1anQLOsOJw0vr7J7IwLpoY9fatA2qiGUGmuZL0Iqlg==", + "dev": true, + "requires": { + "postcss-selector-parser": "^6.0.4" + } + }, + "postcss-modules-values": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/postcss-modules-values/-/postcss-modules-values-4.0.0.tgz", + "integrity": "sha512-RDxHkAiEGI78gS2ofyvCsu7iycRv7oqw5xMWn9iMoR0N/7mf9D50ecQqUo5BZ9Zh2vH4bCUR/ktCqbB9m8vJjQ==", + "dev": true, + "requires": { + "icss-utils": "^5.0.0" + } + }, + "postcss-selector-parser": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.6.tgz", + "integrity": "sha512-9LXrvaaX3+mcv5xkg5kFwqSzSH1JIObIx51PrndZwlmznwXRfxMddDvo9gve3gVR8ZTKgoFDdWkbRFmEhT4PMg==", + "dev": true, + "requires": { + "cssesc": "^3.0.0", + "util-deprecate": "^1.0.2" + } + }, + "postcss-value-parser": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz", + "integrity": "sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ==", + "dev": true + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "rechoir": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", + "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", + "dev": true, + "requires": { + "resolve": "^1.9.0" + } + }, + "resolve": { + "version": "1.20.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", + "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", + "dev": true, + "requires": { + "is-core-module": "^2.2.0", + "path-parse": "^1.0.6" + } + }, + "resolve-cwd": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/resolve-cwd/-/resolve-cwd-3.0.0.tgz", + "integrity": "sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==", + "dev": true, + "requires": { + "resolve-from": "^5.0.0" + } + }, + "resolve-from": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-5.0.0.tgz", + "integrity": "sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==", + "dev": true + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + }, + "schema-utils": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-3.1.1.tgz", + "integrity": "sha512-Y5PQxS4ITlC+EahLuXaY86TXfR7Dc5lw294alXOq86JAHCihAIZfqv8nNCWvaEJvaC51uN9hbLGeV0cFBdH+Fw==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.8", + "ajv": "^6.12.5", + "ajv-keywords": "^3.5.2" + } + }, + "semver": { + "version": "7.3.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", + "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "serialize-javascript": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", + "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "shallow-clone": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", + "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", + "dev": true + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "source-map-js": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-0.6.2.tgz", + "integrity": "sha512-/3GptzWzu0+0MBQFrDKzw/DvvMTUORvgY6k6jd/VS6iCR4RDTKWH6v6WPwQoUO8667uQEf9Oe38DxAYWY5F/Ug==", + "dev": true + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + } + }, + "strip-final-newline": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", + "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", + "dev": true + }, + "style-loader": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/style-loader/-/style-loader-3.2.1.tgz", + "integrity": "sha512-1k9ZosJCRFaRbY6hH49JFlRB0fVSbmnyq1iTPjNxUmGVjBNEmwrrHPenhlp+Lgo51BojHSf6pl2FcqYaN3PfVg==", + "dev": true + }, + "supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "tapable": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.2.0.tgz", + "integrity": "sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw==", + "dev": true + }, + "terser": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.7.1.tgz", + "integrity": "sha512-b3e+d5JbHAe/JSjwsC3Zn55wsBIM7AsHLjKxT31kGCldgbpFePaFo+PiddtO6uwRZWRw7sPXmAN8dTW61xmnSg==", + "dev": true, + "requires": { + "commander": "^2.20.0", + "source-map": "~0.7.2", + "source-map-support": "~0.5.19" + }, + "dependencies": { + "source-map": { + "version": "0.7.3", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", + "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", + "dev": true + } + } + }, + "terser-webpack-plugin": { + "version": "5.1.4", + "resolved": "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.1.4.tgz", + "integrity": "sha512-C2WkFwstHDhVEmsmlCxrXUtVklS+Ir1A7twrYzrDrQQOIMOaVAYykaoo/Aq1K0QRkMoY2hhvDQY1cm4jnIMFwA==", + "dev": true, + "requires": { + "jest-worker": "^27.0.2", + "p-limit": "^3.1.0", + "schema-utils": "^3.0.0", + "serialize-javascript": "^6.0.0", + "source-map": "^0.6.1", + "terser": "^5.7.0" + } + }, + "uri-js": { + "version": "4.4.1", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", + "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "v8-compile-cache": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.3.0.tgz", + "integrity": "sha512-l8lCEmLcLYZh4nbunNZvQCJc5pv7+RCwa8q/LdUx8u7lsWvPDKmpodJAJNwkAhJC//dFY48KuIEmjtd4RViDrA==", + "dev": true + }, + "watchpack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.2.0.tgz", + "integrity": "sha512-up4YAn/XHgZHIxFBVCdlMiWDj6WaLKpwVeGQk2I5thdYxF/KmF0aaz6TfJZ/hfl1h/XlcDr7k1KH7ThDagpFaA==", + "dev": true, + "requires": { + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.1.2" + } + }, + "webpack": { + "version": "5.50.0", + "resolved": "https://registry.npmjs.org/webpack/-/webpack-5.50.0.tgz", + "integrity": "sha512-hqxI7t/KVygs0WRv/kTgUW8Kl3YC81uyWQSo/7WUs5LsuRw0htH/fCwbVBGCuiX/t4s7qzjXFcf41O8Reiypag==", + "dev": true, + "requires": { + "@types/eslint-scope": "^3.7.0", + "@types/estree": "^0.0.50", + "@webassemblyjs/ast": "1.11.1", + "@webassemblyjs/wasm-edit": "1.11.1", + "@webassemblyjs/wasm-parser": "1.11.1", + "acorn": "^8.4.1", + "acorn-import-assertions": "^1.7.6", + "browserslist": "^4.14.5", + "chrome-trace-event": "^1.0.2", + "enhanced-resolve": "^5.8.0", + "es-module-lexer": "^0.7.1", + "eslint-scope": "5.1.1", + "events": "^3.2.0", + "glob-to-regexp": "^0.4.1", + "graceful-fs": "^4.2.4", + "json-parse-better-errors": "^1.0.2", + "loader-runner": "^4.2.0", + "mime-types": "^2.1.27", + "neo-async": "^2.6.2", + "schema-utils": "^3.1.0", + "tapable": "^2.1.1", + "terser-webpack-plugin": "^5.1.3", + "watchpack": "^2.2.0", + "webpack-sources": "^3.2.0" + } + }, + "webpack-cli": { + "version": "4.7.2", + "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-4.7.2.tgz", + "integrity": "sha512-mEoLmnmOIZQNiRl0ebnjzQ74Hk0iKS5SiEEnpq3dRezoyR3yPaeQZCMCe+db4524pj1Pd5ghZXjT41KLzIhSLw==", + "dev": true, + "requires": { + "@discoveryjs/json-ext": "^0.5.0", + "@webpack-cli/configtest": "^1.0.4", + "@webpack-cli/info": "^1.3.0", + "@webpack-cli/serve": "^1.5.1", + "colorette": "^1.2.1", + "commander": "^7.0.0", + "execa": "^5.0.0", + "fastest-levenshtein": "^1.0.12", + "import-local": "^3.0.2", + "interpret": "^2.2.0", + "rechoir": "^0.7.0", + "v8-compile-cache": "^2.2.0", + "webpack-merge": "^5.7.3" + }, + "dependencies": { + "commander": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-7.2.0.tgz", + "integrity": "sha512-QrWXB+ZQSVPmIWIhtEO9H+gwHaMGYiF5ChvoJ+K9ZGHG/sVsa6yiesAD1GC/x46sET00Xlwo1u49RVVVzvcSkw==", + "dev": true + } + } + }, + "webpack-merge": { + "version": "5.8.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", + "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", + "dev": true, + "requires": { + "clone-deep": "^4.0.1", + "wildcard": "^2.0.0" + } + }, + "webpack-sources": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.0.tgz", + "integrity": "sha512-fahN08Et7P9trej8xz/Z7eRu8ltyiygEo/hnRi9KqBUs80KeDcnf96ZJo++ewWd84fEf3xSX9bp4ZS9hbw0OBw==", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "wildcard": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", + "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "yocto-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", + "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", + "dev": true + } + } +} diff --git a/simplemonitor/html/package.json b/simplemonitor/html/package.json new file mode 100644 index 00000000..9985eec8 --- /dev/null +++ b/simplemonitor/html/package.json @@ -0,0 +1,26 @@ +{ + "name": "html", + "version": "1.0.0", + "description": "", + "private": true, + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "devDependencies": { + "css-loader": "^6.2.0", + "style-loader": "^3.2.1", + "webpack": "^5.50.0", + "webpack-cli": "^4.7.2", + "exports-loader": "^3.0.0" + }, + "dependencies": { + "@popperjs/core": "^2.9.3", + "bootstrap": "^5.1.0", + "jquery": "^3.6.0", + "leaflet": "^1.7.1" + }, + "sideEffects": true +} diff --git a/simplemonitor/html/src/index.js b/simplemonitor/html/src/index.js new file mode 100644 index 00000000..741471b3 --- /dev/null +++ b/simplemonitor/html/src/index.js @@ -0,0 +1,11 @@ +window.$ = require("jquery"); +import "bootstrap"; +import 'bootstrap/dist/css/bootstrap.min.css'; +import './style.css' + +window.too_old = function() { + $("#refresh_badge").removeClass("d-none"); + $("#refresh_status").addClass("d-inline"); + $("#summary").removeClass("border-success border-danger"); + $("#summary").addClass("border-warning"); +} diff --git a/simplemonitor/html/src/maps.js b/simplemonitor/html/src/maps.js new file mode 100644 index 00000000..c2b3181e --- /dev/null +++ b/simplemonitor/html/src/maps.js @@ -0,0 +1,18 @@ +window.L = require("leaflet"); +import "leaflet/dist/leaflet.css"; + +import IconUp from "./marker-single-up.png"; +import IconDown from "./marker-single-down.png"; +import IconShadow from "./marker-shadow.png"; + +window.markerIconUp = L.icon({ + iconUrl: IconUp, + shadowUrl: IconShadow, + popupAnchor: [11, 2], +}); + +window.markerIconDown = L.icon({ + iconUrl: IconDown, + shadowUrl: IconShadow, + popupAnchor: [11, 2], +}); diff --git a/simplemonitor/html/src/marker-shadow.png b/simplemonitor/html/src/marker-shadow.png new file mode 100644 index 0000000000000000000000000000000000000000..d1e773c715a9b508ebea055c4bb4b0a2ad7f6e52 GIT binary patch literal 797 zcmV+&1LFLNP)oNwbRQ6Eq$4M3RDU@$ z<4cV9zWLV=bA&uX9wCpA{{f^4$D#k>GcX53-UQqf>_LzMU@frMz|MwbfQGbY0?ccG zBj_wh0?6Tv;HWR0`x;m^Bm<;sCm_85SGspFBn6|A!tDh$nR`wGorGkyL7j?F3#OJq zIswLIz;iF7f|LMnF(pXPAY*GYpsw%&e_WjlnV`C$6@#Q7GZu1$Q8>&p8=(iJj8o|T~0u%hM*Yg_d(Av{WS$h&pM%nlEAonVL0;DkN|xc zn)9F+aMDk#VtAMb0c=kIb1pU-$e4$3pwo&qVh(Umlw3_IU_dFcFe(In6*x}D4LHLhFZ4N=V2ZR+>XHU5D&uY$npJ7Eu?{iAK>UxC?4uyg4+iD z!nst**H%2zhOBxc7C7Tv{f^`%hqT1KpU@Vf6+C2|bGaR(1~TU5D-1;&HXT~PMc2Lu z{Q%^i6vvox&EMFT7I_)R$xq1779I8kE@?|D*cLWnP0a@a)xJA`o*^$^V(yN)b`kV7 z=o@jbFF4j{KeuQh7NlmdH|(ts+Vb zk;+=OvS$}XEAgFCJo2>uKA-RJ_5I_yU(9u1=Q`*8KIdHLT=%#|n;PpfG4L_~001U^ zJ#BN+$V2*-q@y8y)+QZ&0swGU9JaJ3nj`&yK6q~o))NgR2Kbye(z$=f>ns)^Ui_(QLQ1yI-1K}eVrEww`s@Y zf$!gT_cV`(Xe_cVfz=-j$6KcqZ%e)%a%W8N!SH+Z-C3@<3|E%pEB->c#i~othOy~G zaWyx06tK3wDahY3T}(F-n`BY9SaR3oWyokijmEi*(MUUc_nR-pG@ASb8y*G(z3F8M zsebX`CD&fVJMfos;fQSFztH{QIf zhWZh_%p2qH{pRB4CcWt1k&z&PKb4 zz>Xy!PrWNjr9O7m2BnvX3vhRXb&kqE?SCK1XV8MY8m&EI?YvWQfuqqt(n13Yb$1&{ zwRloFlGd9PD6lid5-*v{8TLHCpH(8b(oru@o{Si2 z^xsD#F`k)TIcmZ1FdaX7I8zeulxR~KaBY9R9ugw>=5>GNVshn*gtrN9#jNk{?WX4! zIzES>UJ3bzJnrpBd7T);2_C63mGez}HSFs#Oz#!dVQrOG@z_^v>Rn)Sm6dNl0cm&X>|#T%+8^lwefBA$J`RB^D%s-kJzd_xB&yRRwjnf&bdrRGNU zQ50i+Q_4_aRb6YM^83m6l-E3Hl5CX}yevac2ztzzHD?+4#d|!l{Unrai=UN_4C5V$ zzxS?vAg1!h<2?nk;SK&`Hl=)NiJy#muAA(laNs?B%2d<0GH_Rpy|E>v(vt;SlDhj; z9o4xrW0zD$-Ofs#EK7H~$vrW%{7)2j3#d%W5gcH9`h75`@GMI-~A@?HTBOwp5KBMepLzTWs@ zD=(tsfh^|CSm>SPd7G&1BeZj!ez<#w8lo5KpIAi|ct@B|o^~c2?1`f{>}}P#aM&Fp z!WI!%+{~P?HP6KIazw>}O#B$Kl`}A!a5^RQ^YeTe#c}t-^KKlb1PM<@Ai8X#8&oh) z>sChVRyD@kxc|X&bi^5@?uw81#I8?`&a@mhvTob0M+gO5=VgqYKA3sNt>Tb6%w+$C z=81CD{X?&%y^FRA((OA5PX%2qxEwbr4r5PbzS|Kx7TjWLAKIRzI8Bexz0REg*7Y42 zW1bXBOR3kV$&rH-&>ai;0Yv04LCl%Pkty4FRRH26m{<0}q3?ULG#H`k*OG(r6?iBY-Ne zLl*I5U*a*z4;-PqyzZ37pH0sRB+MxEq`kfqlAtdu1eG%@Yh%wjW}fL|CZc&n^D<~s zV(XFS>HJ<53OV^V+NCi{%uEwD8VmyrwE65#KzmKz*&>jp;fr=8=1h_**KtD-CBT%? zSI3BQbpB(lO1fweO|ctn-vDRdRyv(M;t^&0z!k3WIBNO}rVxd?qr9cwwG9-xnK`f_ zE?`v909#x%@cgCda+VYUijbhYLOXXz-wI5nRif=N{X9m~Yj$aGMbz`)m#{nsle2EZ zSNUpv_27f7)HOLQd%TzqcqQno(lMf}R)9wfL>amxhn)*r_J}eR0j`6Xt=h*SwkZap z3rEvK@9t7EcBKt&fFe)Z(IH~y-S(VSr2)-uT)A-n1jnh z_rzTCeRqBMp15*eZwaMMW!R33@RK9d%F~Gv!i>CIcyO1dsXL_fw2-`~x0z~o-YL%y zjT-R06tg_R21e(PL#i#Df<(-nu9qg8g%3oI4Cpv=h~gclc_}r#6H-&9?wbkUbX&mpG0riNprrTrG&vHA z;YFrsmV`YZhS20_rMW2#EK@2AosGf*0OE+-Fj2Y^h_xF4!^U@2uOj2P1PkLhFuX*0 zPW>3qhslGAL`D7Jk7-KaCWPNox!Sf2I*LalIE`?snzEw|C%x`UHg*VqI@@;tT`WT| z2C!SgVu;sSmGZ#*O!(`oNmm4PS#ZLPJKAyrN9{NR8?R{YUmjSFH;Wx&*IS|Czn69E zF$-qvnftt;4@R%y4wv&7-2@1K_{U=4pzkSW9>MWjmgw7VdxtqniFMS=HH zP6BJujZCiw*`!IkJVs{;^94yh-Moh=GskqLa*?fI$5Ab(t0mjFF{IzCU#O<4*&5(f zT!M9j&Be+`*6jwaaB3ZFZ-Q}tl5@3wH7K&vIS){ib?{8!4w|rP>)!Ywp0>1YjdbM= z#aT?iYf)Ui4ZKDki;?pxG%>O4!qe$opAe!zQ^Q)M9NR5k&SZnVEk)4i$*gC`Q2tLU zjG|S6y#-WhTVixtKqnf84UmaVYAvjE=AMk)XK+TydkoBOPFAMr@mxInsYTf38!lq7 z4Ut`Tor8u^)`MP@>^Z!j_=3$2fG3L112TsuI%)G2Vi-9i@*4qo)7)1gnr2to_*u?^ zCAFz6n0Kpe`3rNvI<{w!sT}Of0H<-*NQP#T+cdiu;V8DNtZ97%T*p~)o^+tPT~zu zireiADBAj%=O15EO}b1b<#T5S`=XK&<_y-K=C1OeRR6S7mjelLyY=#=(M{1U`EFGy zL0k7#53qie488xzc~MF)kg^Xyh-GVNaX*xJ!qq&^c2wkYS~;bww!N{o4EItfYPXTW z`6pFOW!t!su7g-3npEzvYlZwh2`i&ga1jd6n&StqD%(qB-il@(p{6#--+EHkoi0#C za9dtK8^w{{PyAf9Z7p=CYXwp|Yp>Vcj{xsMNM+mR?~H7I;KP&~F(!}cV#@+fJlx`- z%fd1pOTF}YE|9gGCX$nZt5&-`hKeX$D_EOXWV~MzmYN_ge1d7P8Jn)0>2#7kK#aQe z%8--Gh}6VIk(VJmj(}>#Zk#t`#ev1RJi{2<7OKNrR-jh3oR_;}?3ehZExTX%UG~{- zcO~1o5(h6=5k4IF^g-=)krNPOY6!K%C5)8sE{Jlq63he>*t--Nw#p2JG8V6_hgN7M6ZDW)9E4Fhhz8QiQD2 z`=CA}DO7`@{M@JYc3!c!o)-Q5me-D4a+we40$-jI&AELcYh+xK< zw$LiWJi#i7?szv{5&Cp`Ks(4iq?XS#WC(9U$PPF4_}Bw_rWO>NxcpRv{WV1a*DV3$ zp&5=N$I62W{5uR!jmZzuY&}Y!|5VhB1w#9nQ^5wu@mHX!ff47^9i{R)S&7W*_P)Up zN_k!q^d1&lXhmwgI_xKu7(=O#t*C2Io(SW!kU{V zBUEV7`dE>Pq7=vhjpRH$5~IXcbz*M|Y=`&_HU73xSy5<1OxMk-`T!JDin0wNytbM9 z$Rxvo_{E@vpt4;(dbi5(6$3SZ>kp~mEJV>Epyh|(k}v9y)N z5O@){@L&(S=INa4=h7CZhUec>gBHz^!B2&WbfqH0JABUBwxx!27(;S(*c)q^J<~aI zc9|@j9^>V0k3&b&*l&q7>O%~ioj8Bc!ACv%sf*9;Gih zY4hfjpW5f6@@IVb>bHYl7K(wA-Kie29=B7-#sswRoA0d>JkdVD#40PU&TVjf*}#7| z1;xwoDSKfW>r{l0zbiUUZ;z1idxGEyc+v`uxn z**yFXl$K8Dp4ud6xeD_FR9Jn)zV@%G0~95$@Yx`W{>Fa!HyQE%qK1$0z1YyBJH&2} z9%^h$-0s6fRS7U07zXU-V|1Ra{RrCYBi`&l>WYTS8Rpm?j^g_);%yB5+ugI_rI8fji+cN5<@S>|FwJs_( zTVq_Ur7Hex!c336;&>XXH$M5en85ys^~Q#*boUSc+7j?;|R-O8Mu=QSpu&?-y^K z0kVbDf#H#K3*qSI1?bCAadGLmZWy(tLz$QcN2149+5JY>54mjH=GEzi1bB2 zo(kTo-!n3x*qV@PlBzt?*IOgUcPGqFx(WxM(o!=}Zo>k=<**KZ)OSkt?RX7-*e`c{N#4339Tw)vb7#1L3Nv)j!9wa3WU|Y@} zrr=Gx;WEKEBm(L%KXqT5sG7?CJZ?0a&Zy(etLdTP`%`pP&q|4W+vi6!2K*Ke-kyHC zyLo>=5ckJ7C88OfS1eu}61G0&Ia|(OW0l8{0L@^BQUkdJFCuU!Vl7Xp?DI*hbGL{R z_Rzm>Vj4EU3!fXI-|6nT8x!W?rt`v!29V(a-P#!t!C}y-Fx&~)D_%eDf)+c%%N6#j z>s{&VC|+s+a-z`5sJy7}24sMtP6+zsu*kwl4Tx{+Db*Jk829H>j=blCn~Htkl;yUc z(W!1y(25POj);5Ra;^|tob24H{8>~;d#qTiIiq-nnT_)5RdFQ+-+Mfz_Ow~D%^hZj z+FUo9x={*dE~zGrfE`C$8 z4VBLZ%xUC+y2qHcE9H`Uj^CHlWu^8C9gPsYV(VNSou*X&*1c+FZ|vD!6G^$Vue@-@ zffpy|ugD6vps+)ZjT|jkc4VEnn@Eh={sPwKtXh~9Aq2e3t1U#;WuJ6DLV31_A+FVg zM;X)>o%|{meA%xHoD{<{E9Mxhn3_QE%u!sTfXv#NZ=0D2zqltJXZ$d6_T~`$8gxi! z>J%dQ00ncZ6*x-u+%YG?T3*A&7B)HQnX_*Fx+{C$F9+p3*g?4r!}oT{*dLDm#IDt; z#+3k&vt{S%xbo;^_dUCbBaD{X{7UYb7p`?z`}kldb;X6T3GQNym-jI6W{cpD+U&v>AQfR)sHvw6-bVVGZ^ujP0anPuE$A8wT&GeLUlIU8=LA0C zxfUAPTMx2IIcK3#cWX;K#6=-Kiai{-KrC0H@h7Ofpt$8!T3cHpnm^%~FG&nyyzbHvzdq4jDSL^g9ZlSn)fj?Us8CtQ(?b60Y>CMhC zH*qxK=n1!UQ-j;7YIPAi>h>~Ged4|tGWz(VL`Lv3%b9{J(;9Zq-jLp7qrdwC8|y=K zA-}*@GlVgRg6VF~Gh|$C#o(H4Qfa*fmO?yRx@Z_qcRZP5?q&CkG#(p};t09XDG_&I zIQ&9>q3lGjU6s)Lmfc|37X3N35&9Pb?{;x{(-$rC0RR+{SS>A6eJ!oEH|8Xo^x#A_ zy?dq{5hm^K2r1!1tOpxR`R^aikGf!4LdR)fm$i>J>C7^n5$`DuF5Np70|U*@Pw&*( z?5EuiV_l*+NFbOK6WM3?GJu?`=lli7UJ(3e)iv|a{N+wlPqDA;q@}7Dh9K=cw_Tl> z&2oWG?@`CLiHNPLQ&Z=w3SMQaHr?J%iWlrT074R$4M0Ge1tzkN6d4&R@kE- z2fpEoeA9zZn<|fFeIU%P2M<3fwc9i@LSlwjQp}tvFh9qlvMgGO!h3}#x(IB~PvFz| zAh>k?icM;|PZC@%bGYuBMr7E4OiOhrDPTGy#C=Uxrn&XKCgkH zs@%rF+Lz4WxtzU`BYH<{;aPy{j8?^$q04refltrb&GY54Xhvcxh*W%hlp=_S4)gwg z`xl=t&tRX-((Wn1C!+bey8r-I0W9f%7}iFHDlXn$GDwuSGg`*q%ZF4O0D!87zYo&I z15E@vqg}B$HR0Ktw}pXNl$!8&jmNy;^RFF}S0fP|!*h3Iubq1g+ z9)(dc*Vg$8L7J%vyAg>#DzdVEett53@-p6dS6Mk_Wo20~L>2-8ku*Sr02~qN55f^d z$PiyJw9y0?JgK0u-Z&r`6Y1>jOH>mUCanX%f|JV~;ZG8NB_PjN;R!^PtUhU?K#GT? zAPWJ5l|Wz!2%;>z(VnzwWVCLLBYe#wDW9_bNFP}_8L+IE*EbdfBI3~BeBZSoSd#vg zBx{Z)c>CgA(1=5598qK=DS>E?{yQhX0YOs#2EfPDm$1=kUjmveS`FM2g^?viwd(pt zQeAx`({&s2KDc7Nd{!;U+8Z@dF6(+ezIe}79h8eK+7sR3Mfhg&~lojRWG9u66b#ob6b5LihO4N_2chJr|TyFv08C9!u&6 zr04fMfy*J}bhPE5Fa$yY0g;n~At2gHa!@601qFFH6oFWUAtzD=W~#3y43PoJMNpgcRKFCW9?8}lAFzSn0)6ny?91WfiCs+<5V+d#Do7V{7S)6a z$U|t<>K2gl_+`n(4T*C_lTOyJU9l#|ey3QK&@PHfyX7z-s1nizq(CYMkTS{{34&t4 zN+_s{qOuE8{#$f{H-_kk#G_%Zq_!dLGpTD=_ZcYhwaz5J)%SBllZyxpAvFZ)XSXF- zSw%rfMP6R`%WeZzWyxphTC}RVBzcIfiFO zz4I&cjcQ-4wY+@-NGFIJ(Zmn;Q~K{HenBwAx}b3c@1ME8QRT~aZFm%teEuRMJz_~u zY}xfk_SfnqH~9bJ^|dSh7a2&<|C0Pse*aC^zv=p;4E&Muzt#0`y8b8wf290xb^X`U z#qjqZ{b(HN`=}r3PkK|kPzdRD0JSU32nGO@#4|1-w~*#E&Uya0072q(rwTs<-%R>5vhR}o3Ha}j{e$Ft1oqU_o3YmCIZI3H_iHzsqxyzq zGr`Zm*8tbX&14&i)=B;of?pA>lKeLaen#|kkAU{+JroQ&$G=ym=`@8P5$9Ed2xH)x4rw1bZtb~NIey6)yE$P26B z(OT{6hfU?3#dU-K*3EhZ{|&&6QEbFpC-E2VD(ncb#Oj(Vyil8w=91p3|k%~6o;{z0-C>{niHT>l=y4@v&h zXf`{#UbdST$n!sW4E!hxGR`m4MOOMxub)Oj2LDkszq1!>&i&trSy_Kdd=Y-<^Z!dEzfH2aK{wC86TrIYw@KD5{vU4sh-B@%0BNN96E54x VTZv)2T+7Hd`Uqp~BDmAh{{alvRU7~S literal 0 HcmV?d00001 diff --git a/simplemonitor/html/src/marker-single-up.png b/simplemonitor/html/src/marker-single-up.png new file mode 100644 index 0000000000000000000000000000000000000000..df69a9ee3af558f2fb10e15fbd7f9ed28354be98 GIT binary patch literal 2244 zcmbVOX;c&E8ct+UqV(26@e;2vMnu+x2_zwr0D%Mv5Y|Wnf*6v4L`)_o0Roj(C@?#74QAw>5n^SmhXGN_j%s^oY@i_xXKuV z#h_3qW413d6#1GXkL^4|S5YO< zaUY!GbAkbHSOEbfytAXw2?PN$84tRU$Yjs~AUc6Wf)jF+9YGfwiA*C>fR7grv8E8k z(L$L%A8jE!I!>%o$!P>aa&j_0*%=Qj;t3#?O4V@?iH?YdqcTON5~v+z%4M?*Oh_qI zNaQLBECY0mf>=0FMaLnYeh5J-=Wsp|%ak7zg`|w27RU)8-iaWU>f(B@tyG0V|8?WD z+DdMU93q55N;pv=MCuW@Y!-~LW<)_w1HlKzEk|7hLKt`ju>iks{N`H#YWN_8L*YMVeqgI>V8Uu^1 zuKgBAGq++$OE2eP{Dh`cL5$OS{Dla(=F z`;G_47uN1xWqfN>uY1hdkjyDX4==zMFD{}-wU{q`z4G?c3$ze3{nHtJJzbU@lRY6} zZv5?yiLREtGhx{Wdl|f;7Hbb=yj4=#vX&I92Ul);e~kb)Ss`d znrxzqpBv?zm|G{(#+jAA!0vb3%UOJP{5JMxm4dU`HD}|zZ=Rg9N2P~hYpYZ}J*2Oq zAD%R+TWW(A-r+A6PiKBxAIUc7yffVR?<3QVw^rcLqTU4;)Rfa|qn`RLsQ)Ylx}VNqNmkA@01}h-yw6=P=HUnEzP zw;24^;^X6c$6rz%CT}Pc!>ud)19F$#t9aI`=i71pTkB)u^<{_66(#6f(xE#qkIV&v z7wKQm!8Q+-XJw4F3nr7IddmjHi%j(Pu}9R`TAhZ(eT`Q{UlpJ)&oBP*5mwaDb>TYR zAlJBYf8~+30!4$XrA?>R2#!)edNMI-VRi&{s7qT?X6HmK&o|XWq=(mBYPbZNXMUBB7Hn@qY!6T8WUDX3lPXpb#pxZ!}K4g zq0fOclufTXmj03O*S&(%r#o-iTO+A9!+-UTfG9SWq-Vne zceRIRG@<%teuGSQjG59;5TiF+jXBy6Y?;HroL|QGSPrK~5ZKv%HNmy9+uLt;7kCm^`Y>j=X^#7mh~*CoD>MVK3w_sWR^)!?v%1|U1vtARYcRd1Bxt(q?oV1)Kuy*@ z(%|D*LB!ICna&ehE_?f?Yp?UCw}(H%*m53hzL(GIh@w?k+BPwGLHkmr4!IAiZr4Vq z_(;qu-7DHF9DENf&tu#76=6mqOCxRg80?7!-gZmPfu7(K%g%fEpRqp8ue*0Y zku=;~lsJ5F?bhF|?DA!@L+|JUXPO^N}FMv(E1E{+umO6)9$0t z;n6*yndS4s#GOOk_UMIkG>v|F_b*Jeyz`rG^t){{status}}@{{host}} monitor - - + {%- if map -%} - - + {%- endif %} - - +
+
SimpleMonitor {{version}} » Documentation | » Code
+
+ {%- if map -%} - + {%- endif %} - - + - - - - - + + {%- if map -%} -
- + {%- else %} - - - - - - - - - - - - - +
MonitorStatusHostFailed atVFCUp/downtimeDetailFailuresLast FailureAge
+ + + + + + + + + + + + {% macro table_row(entry) -%} - {{entry.status_text}}{% if entry.failures == 0 %}{% else %}{% endif %} + + + {{entry.status_text}} + + + + + + {% if entry.failures == 0 %} + + {% else %} + + + {% endif %} + + {%- endmacro -%} {% for entry in fail_entries -%} {{table_row(entry)}} @@ -91,19 +131,34 @@ {% endfor -%}
MonitorStatusHostFailed atVFCUp/downtimeDetailFailuresLast FailureAge
{{entry.monitor_name}}{{entry.host}}{{entry.fail_time}}{% if entry.fail_count %}{{entry.fail_count}}{% endif %}{{entry.downtime}} ({{"%.2f" | format(entry.availability * 100)}}%){{entry.fail_data}}{{entry.failures}}{{entry.last_failure}}{% if not entry.my_host %}{{entry.age}}{% endif %}
+ {{entry.monitor_name}} + {{entry.host}}{{entry.fail_time}}{% if entry.fail_count %}{{entry.fail_count}}{% endif %}{{entry.downtime}} ({{"%.2f" | format(entry.availability * 100)}}%) + {{entry.fail_data}}{{entry.failures}}{{entry.last_failure}}{% if not entry.my_host %}{{entry.age}}{% endif %}
{%- endif %} - -
-
SimpleMonitor {{version}} » Documentation | » Code
-
- - + +
+
+ SimpleMonitor {{version}} + » Documentation + | + » Code +
+
+ + diff --git a/tests/html/map1.html b/tests/html/map1.html index 7134cedf..ef2f2ae4 100644 --- a/tests/html/map1.html +++ b/tests/html/map1.html @@ -1,92 +1,103 @@ - - - + + + - FAIL@fake_hostname.local monitor + FAIL@fake_hostname.local monitor - - - - - + + + - function check_age() { - var generated = 1587211200; - var now = Date.parse(new Date()) / 1000; - var diff = now - generated; - if (diff > (30 * 2)) { - too_old(); - } - } + +
+ - - - -
- - - -
SimpleMonitor __VERSION__ » Documentation | » Code
- - - - - - + +
+
+ SimpleMonitor 1.11.0 + » Documentation + | + » Code +
+
+ + diff --git a/tests/html/test1.html b/tests/html/test1.html index c262ddde..9bc99d09 100644 --- a/tests/html/test1.html +++ b/tests/html/test1.html @@ -1,71 +1,167 @@ - - - + + + - FAIL@fake_hostname.local monitor + FAIL@fake_hostname.local monitor - - - - + + + - function check_age() { - var generated = 1587211200; - var now = Date.parse(new Date()) / 1000; - var diff = now - generated; - if (diff > (30 * 2)) { - too_old(); - } - } - - - - - - - - - - - - - - - - - - - - - - + + +
MonitorStatusHostFailed atVFCUp/downtimeDetailFailuresLast FailureAge
failFAILfake_hostname2020-04-18 12:00:00+00:0010+00:00:00 (0.00%)This monitor always fails.12020-04-18 12:00:00+00:00
disabledDISABLEDfake_hostname0+00:00:00 (0.00%)
unnamedOKfake_hostname0+00:00:00 (0.00%)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MonitorStatusHostFailed atVFCUp/downtimeDetailFailuresLast FailureAge
+ fail + FAILfake_hostname2020-04-18 12:00:00+00:0010+00:00:00 (0.00%) + This monitor always fails.12020-04-18 12:00:00+00:00
+ disabled + DISABLEDfake_hostname0+00:00:00 (0.00%) +
+ unnamed + OKfake_hostname0+00:00:00 (0.00%) +
- - -
SimpleMonitor __VERSION__ » Documentation | » Code
- - - - - - + +
+
+ SimpleMonitor 1.11.0 + » Documentation + | + » Code +
+
+ + diff --git a/tests/html/test2.html b/tests/html/test2.html index 340645ec..70687692 100644 --- a/tests/html/test2.html +++ b/tests/html/test2.html @@ -1,71 +1,167 @@ - - - + + + - FAIL@fake_hostname.local monitor + FAIL@fake_hostname.local monitor - - - - + + + - function check_age() { - var generated = 1587211200; - var now = Date.parse(new Date()) / 1000; - var diff = now - generated; - if (diff > (30 * 2)) { - too_old(); - } - } - - - - - - - - - - - - - - - - - - - - - - + + +
MonitorStatusHostFailed atVFCUp/downtimeDetailFailuresLast FailureAge
failFAILfake_hostname2020-04-18 14:00:00+02:0010+00:00:00 (0.00%)This monitor always fails.12020-04-18 14:00:00+02:00
disabledDISABLEDfake_hostname0+00:00:00 (0.00%)
unnamedOKfake_hostname0+00:00:00 (0.00%)
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
MonitorStatusHostFailed atVFCUp/downtimeDetailFailuresLast FailureAge
+ fail + FAILfake_hostname2020-04-18 14:00:00+02:0010+00:00:00 (0.00%) + This monitor always fails.12020-04-18 14:00:00+02:00
+ disabled + DISABLEDfake_hostname0+00:00:00 (0.00%) +
+ unnamed + OKfake_hostname0+00:00:00 (0.00%) +
- - -
SimpleMonitor __VERSION__ » Documentation | » Code
- - - - - - + +
+
+ SimpleMonitor 1.11.0 + » Documentation + | + » Code +
+
+ + diff --git a/tests/test_htmllogger.py b/tests/test_htmllogger.py index aa196a77..8426c588 100644 --- a/tests/test_htmllogger.py +++ b/tests/test_htmllogger.py @@ -33,8 +33,8 @@ def test_html_logger(self): "status.html was not created", ) self.assertTrue( - os.path.exists(os.path.join("test_html", "style.css")), - "style.css was not copied", + os.path.exists(os.path.join("test_html", "main.bundle.js")), + "main.bundle.js was not copied", ) def tearDown(self): From 5b776b3bb3415774ff10a10708092aa44cd92d57 Mon Sep 17 00:00:00 2001 From: James Seward Date: Mon, 16 Aug 2021 20:41:09 +0100 Subject: [PATCH 031/325] Fix tooltips --- simplemonitor/html/src/index.js | 2 +- simplemonitor/html/status-template.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/simplemonitor/html/src/index.js b/simplemonitor/html/src/index.js index 741471b3..18885676 100644 --- a/simplemonitor/html/src/index.js +++ b/simplemonitor/html/src/index.js @@ -1,5 +1,5 @@ window.$ = require("jquery"); -import "bootstrap"; +window.bootstrap = require("bootstrap"); import 'bootstrap/dist/css/bootstrap.min.css'; import './style.css' diff --git a/simplemonitor/html/status-template.html b/simplemonitor/html/status-template.html index 18b61c57..a2b44bf7 100644 --- a/simplemonitor/html/status-template.html +++ b/simplemonitor/html/status-template.html @@ -151,7 +151,7 @@
- SimpleMonitor 1.11.0 + SimpleMonitor __VERSION__ $(function () { var tooltipTriggerList = [].slice.call( - document.querySelectorAll('[data-bs-toggle="tooltip"]') + document.querySelectorAll('[data-toggle="tooltip"]') ); var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) { return new bootstrap.Tooltip(tooltipTriggerEl); diff --git a/tests/html/test1.html b/tests/html/test1.html index 9bc99d09..963b723a 100644 --- a/tests/html/test1.html +++ b/tests/html/test1.html @@ -31,7 +31,7 @@