From 66cf1b3c259286e5814d016c9e69cb296222e600 Mon Sep 17 00:00:00 2001 From: li0ard Date: Sat, 4 May 2024 13:02:41 +0600 Subject: [PATCH] upd --- fedsfm/index.html | 144 ++++++++++++++++++++++++++++++++++++++++ fedsfm/stats.html | 164 ++++++++++++++++++++++++++++++++++++++++++++++ index.html | 2 +- orgs/index.html | 7 +- orgs/stats.html | 80 +++++++--------------- stats.html | 72 ++++++-------------- 6 files changed, 354 insertions(+), 115 deletions(-) create mode 100644 fedsfm/index.html create mode 100644 fedsfm/stats.html diff --git a/fedsfm/index.html b/fedsfm/index.html new file mode 100644 index 0000000..3e61cb7 --- /dev/null +++ b/fedsfm/index.html @@ -0,0 +1,144 @@ + + + + + + + + + + + + + + + + + + Реестр нежелательных организаций + + + + + + + + + + +
+
+
+
+
+
+
+
+ + + + \ No newline at end of file diff --git a/fedsfm/stats.html b/fedsfm/stats.html new file mode 100644 index 0000000..d8ab99b --- /dev/null +++ b/fedsfm/stats.html @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + Реестр нежелательных организаций + + + + + + + +
+
+
+
+

Статистика

+
+
+
+
+
+
+ +
+
+
+
+ +
+
+
+
+
+ +
+ + +
+
+
+
+
+ + + + \ No newline at end of file diff --git a/index.html b/index.html index 312606e..8ceb360 100644 --- a/index.html +++ b/index.html @@ -90,7 +90,7 @@

Запись №

-

© 2023, li0ard. Made with 🕊️

+

© 2024, li0ard. Made with 🕊️


diff --git a/orgs/index.html b/orgs/index.html index 94ef5bc..dd790e8 100644 --- a/orgs/index.html +++ b/orgs/index.html @@ -1,11 +1,10 @@ - - - + + @@ -81,7 +80,7 @@

Запись №

-

© 2023, li0ard. Made with 🕊️

+

© 2024, li0ard. Made with 🕊️


diff --git a/orgs/stats.html b/orgs/stats.html index d7ff4b2..b9df751 100644 --- a/orgs/stats.html +++ b/orgs/stats.html @@ -1,11 +1,10 @@ - - - + + @@ -46,12 +45,11 @@

Статистика


- -
-
-
-
- + +
+ + +

@@ -59,7 +57,7 @@

Статистика


-

© 2023, li0ard. Made with 🕊️

+

© 2024, li0ard. Made with 🕊️


@@ -70,58 +68,21 @@

Статистика

fetch(`https://raw.githubusercontent.com/fz255/undesirable-organizations/main/registry.json`) .then(res => res.json()) .then(body => { - let years_labes = ["2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024 *"] - let years_dt_in = [body.filter(i => i.dateIn.includes("2015")).length, body.filter(i => i.dateIn.includes("2016")).length, body.filter(i => i.dateIn.includes("2017")).length, body.filter(i => i.dateIn.includes("2018")).length, body.filter(i => i.dateIn.includes("2019")).length, body.filter(i => i.dateIn.includes("2020")).length, body.filter(i => i.dateIn.includes("2021")).length, body.filter(i => i.dateIn.includes("2022")).length, body.filter(i => i.dateIn.includes("2023")).length, body.filter(i => i.dateIn.includes("2024")).length] + let years_lables = ["2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024 *"] + let years_in = [body.filter(i => i.dateIn.includes("2015")).length, body.filter(i => i.dateIn.includes("2016")).length, body.filter(i => i.dateIn.includes("2017")).length, body.filter(i => i.dateIn.includes("2018")).length, body.filter(i => i.dateIn.includes("2019")).length, body.filter(i => i.dateIn.includes("2020")).length, body.filter(i => i.dateIn.includes("2021")).length, body.filter(i => i.dateIn.includes("2022")).length, body.filter(i => i.dateIn.includes("2023")).length, body.filter(i => i.dateIn.includes("2024")).length] + + let years_out = [body.filter(i => i.dateOut.includes("2015")).length, body.filter(i => i.dateOut.includes("2016")).length, body.filter(i => i.dateOut.includes("2017")).length, body.filter(i => i.dateOut.includes("2018")).length, body.filter(i => i.dateOut.includes("2019")).length, body.filter(i => i.dateOut.includes("2020")).length, body.filter(i => i.dateOut.includes("2021")).length, body.filter(i => i.dateOut.includes("2022")).length, body.filter(i => i.dateOut.includes("2023")).length, body.filter(i => i.dateOut.includes("2024")).length] - let years_dt_out = [body.filter(i => i.dateOut.includes("2015")).length, body.filter(i => i.dateOut.includes("2016")).length, body.filter(i => i.dateOut.includes("2017")).length, body.filter(i => i.dateOut.includes("2018")).length, body.filter(i => i.dateOut.includes("2019")).length, body.filter(i => i.dateOut.includes("2020")).length, body.filter(i => i.dateOut.includes("2021")).length, body.filter(i => i.dateOut.includes("2022")).length, body.filter(i => i.dateOut.includes("2023")).length, body.filter(i => i.dateOut.includes("2024")).length] - let years = new Chart(document.getElementById('years'), { + let years_cfg = { type: "bar", data: { - labels: years_labes, + labels: years_lables, datasets: [ { label: 'Внесено', backgroundColor: ["#1e88e5"], - data: years_dt_in - }, - { - label: 'Исключено', - backgroundColor: "#ff5722", - data: years_dt_out - } - ] - }, - options: { - plugins: { - title: { - display: true, - text: 'По кол-ву внесений/исключений (Диаграмма)' - }, - subtitle: { - display: true, - text: '* - на момент последнего обновления' - } - }, - watermark: { - image: "https://habrastorage.org/webt/a_/xt/c_/a_xtc_o6zp8oqpzkamwvuzlayfq.jpeg", - x: 0, - y: 0, - width: 48, - height: 48, - opacity: 0.3 - } - } - }) - let years_line = new Chart(document.getElementById('years_line'), { - type: "line", - data: { - labels: years_labes, - datasets: [ - { - label: 'Внесено', - backgroundColor: "#1e88e5", borderColor: "#1e88e5", - data: years_dt_in, + data: years_in, pointStyle: 'circle', pointRadius: 5, pointHoverRadius: 10 @@ -130,7 +91,7 @@

Статистика

label: 'Исключено', backgroundColor: "#ff5722", borderColor: "#ff5722", - data: years_dt_out, + data: years_out, pointStyle: 'circle', pointRadius: 5, pointHoverRadius: 10 @@ -141,7 +102,7 @@

Статистика

plugins: { title: { display: true, - text: 'По кол-ву внесений/исключений (График)' + text: 'По кол-ву внесений/исключений' }, subtitle: { display: true, @@ -157,7 +118,12 @@

Статистика

opacity: 0.3 } } - }) + } + let years = new Chart(document.getElementById('years'), years_cfg) + window.years_cfg = years_cfg + window.years = years + document.querySelectorAll("button.btn-primary")[0].removeAttribute("disabled") + document.querySelectorAll("button.btn-primary")[1].removeAttribute("disabled") }) diff --git a/stats.html b/stats.html index 04f1fb8..47bd1fb 100644 --- a/stats.html +++ b/stats.html @@ -61,11 +61,10 @@

Статистика

-
-
-
-
- +
+ + +

@@ -73,7 +72,7 @@

Статистика


-

© 2023, li0ard. Made with 🕊️

+

© 2024, li0ard. Made with 🕊️


@@ -159,58 +158,20 @@

Статистика

} } }) - let years_labes = ["2013","2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024 *"] - let years_dt_in = [body.filter(i => i.dateIn.includes("2013")).length, body.filter(i => i.dateIn.includes("2014")).length, body.filter(i => i.dateIn.includes("2015")).length, body.filter(i => i.dateIn.includes("2016")).length, body.filter(i => i.dateIn.includes("2017")).length, body.filter(i => i.dateIn.includes("2018")).length, body.filter(i => i.dateIn.includes("2019")).length, body.filter(i => i.dateIn.includes("2020")).length, body.filter(i => i.dateIn.includes("2021")).length, body.filter(i => i.dateIn.includes("2022")).length, body.filter(i => i.dateIn.includes("2023")).length, body.filter(i => i.dateIn.includes("2024")).length] + let years_lables = ["2013","2014", "2015", "2016", "2017", "2018", "2019", "2020", "2021", "2022", "2023", "2024 *"] + let years_in = [body.filter(i => i.dateIn.includes("2013")).length, body.filter(i => i.dateIn.includes("2014")).length, body.filter(i => i.dateIn.includes("2015")).length, body.filter(i => i.dateIn.includes("2016")).length, body.filter(i => i.dateIn.includes("2017")).length, body.filter(i => i.dateIn.includes("2018")).length, body.filter(i => i.dateIn.includes("2019")).length, body.filter(i => i.dateIn.includes("2020")).length, body.filter(i => i.dateIn.includes("2021")).length, body.filter(i => i.dateIn.includes("2022")).length, body.filter(i => i.dateIn.includes("2023")).length, body.filter(i => i.dateIn.includes("2024")).length] - let years_dt_out = [body.filter(i => i.dateOut.includes("2013")).length, body.filter(i => i.dateOut.includes("2014")).length, body.filter(i => i.dateOut.includes("2015")).length, body.filter(i => i.dateOut.includes("2016")).length, body.filter(i => i.dateOut.includes("2017")).length, body.filter(i => i.dateOut.includes("2018")).length, body.filter(i => i.dateOut.includes("2019")).length, body.filter(i => i.dateOut.includes("2020")).length, body.filter(i => i.dateOut.includes("2021")).length, body.filter(i => i.dateOut.includes("2022")).length, body.filter(i => i.dateOut.includes("2023")).length, body.filter(i => i.dateOut.includes("2024")).length] - let years = new Chart(document.getElementById('years'), { + let years_out = [body.filter(i => i.dateOut.includes("2013")).length, body.filter(i => i.dateOut.includes("2014")).length, body.filter(i => i.dateOut.includes("2015")).length, body.filter(i => i.dateOut.includes("2016")).length, body.filter(i => i.dateOut.includes("2017")).length, body.filter(i => i.dateOut.includes("2018")).length, body.filter(i => i.dateOut.includes("2019")).length, body.filter(i => i.dateOut.includes("2020")).length, body.filter(i => i.dateOut.includes("2021")).length, body.filter(i => i.dateOut.includes("2022")).length, body.filter(i => i.dateOut.includes("2023")).length, body.filter(i => i.dateOut.includes("2024")).length] + let years_cfg = { type: "bar", data: { - labels: years_labes, - datasets: [ - { - label: 'Внесено', - backgroundColor: ["#1e88e5"], - data: years_dt_in - }, - { - label: 'Исключено', - backgroundColor: "#ff5722", - data: years_dt_out - } - ] - }, - options: { - plugins: { - title: { - display: true, - text: 'По кол-ву внесений/исключений (Диаграмма)' - }, - subtitle: { - display: true, - text: '* - на момент последнего обновления' - } - }, - watermark: { - image: "https://habrastorage.org/webt/a_/xt/c_/a_xtc_o6zp8oqpzkamwvuzlayfq.jpeg", - x: 0, - y: 0, - width: 48, - height: 48, - opacity: 0.3 - } - } - }) - let years_line = new Chart(document.getElementById('years_line'), { - type: "line", - data: { - labels: years_labes, + labels: years_lables, datasets: [ { label: 'Внесено', backgroundColor: "#1e88e5", borderColor: "#1e88e5", - data: years_dt_in, + data: years_in, pointStyle: 'circle', pointRadius: 5, pointHoverRadius: 10 @@ -219,7 +180,7 @@

Статистика

label: 'Исключено', backgroundColor: "#ff5722", borderColor: "#ff5722", - data: years_dt_out, + data: years_out, pointStyle: 'circle', pointRadius: 5, pointHoverRadius: 10 @@ -230,7 +191,7 @@

Статистика

plugins: { title: { display: true, - text: 'По кол-ву внесений/исключений (График)' + text: 'По кол-ву внесений/исключений (Диаграмма)' }, subtitle: { display: true, @@ -246,7 +207,12 @@

Статистика

opacity: 0.3 } } - }) + } + let years = new Chart(document.getElementById('years'), years_cfg) + window.years_cfg = years_cfg + window.years = years + document.querySelectorAll("button.btn-primary")[0].removeAttribute("disabled") + document.querySelectorAll("button.btn-primary")[1].removeAttribute("disabled") })