From 1a67d5ec175f82f47d8d401447c4279b9369adcb Mon Sep 17 00:00:00 2001 From: Matthew Holloway Date: Tue, 21 May 2024 18:13:16 +1200 Subject: [PATCH 01/25] feat: Total ids on IESG dashboard --- ietf/doc/views_search.py | 7 ++++++ ietf/templates/doc/ad_list.html | 43 +++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/ietf/doc/views_search.py b/ietf/doc/views_search.py index 422e38f7dd..7abc8a7848 100644 --- a/ietf/doc/views_search.py +++ b/ietf/doc/views_search.py @@ -484,6 +484,13 @@ def _state_to_doc_type(state): ) ad.buckets = copy.deepcopy(bucket_template) + # https://github.com/ietf-tools/datatracker/issues/4577 + # "a count of adopted I-Ds in the WGs overseen by the AD+ + # any independent documents the AD is assigned to (in cases of + # AD sponsored documents)" + # "WG state = * AND IESG state = I-D Exists" + ad.total_ids = len(Document.objects.filter(ad=ad)) + for doc in Document.objects.exclude(type_id="rfc").filter(ad=ad): dt = doc_type(doc) state = doc_state(doc) diff --git a/ietf/templates/doc/ad_list.html b/ietf/templates/doc/ad_list.html index cfc8830e50..406d1395e9 100644 --- a/ietf/templates/doc/ad_list.html +++ b/ietf/templates/doc/ad_list.html @@ -35,6 +35,8 @@

{{ dt.type.1 }} State Counts

Area Director + Total I-Ds + {% for state, state_name in dt.states %} @@ -51,6 +53,12 @@

{{ dt.type.1 }} State Counts

{{ ad.name }} + + {{ ad.total_ids }} + {% for state, state_name in dt.states %} @@ -63,6 +71,9 @@

{{ dt.type.1 }} State Counts

Sum + +
+ {% for state, state_name in dt.states %}
@@ -87,6 +98,38 @@

{{ dt.type.1 }} State Counts

{{ data|json_script:"data" }} + + + + @@ -190,10 +190,10 @@

{{ dt.type.1 }} State Counts

const key = cell.dataset.sum const value = safeParseFloat(cell.textContent) if(key && !isNaN(value)) { - sumsAccumulator[key] = (sumsAccumulator[key] || 0) + (value || 0); + sumsAccumulator[key] = (sumsAccumulator[key] || 0) + (value || 0) } - return sumsAccumulator; - }, {}); + return sumsAccumulator + }, {}) Array.from(table.querySelectorAll('[data-sum-result]')).forEach(result => { const key = result.dataset.sumResult @@ -208,49 +208,47 @@

{{ dt.type.1 }} State Counts

const endValue = safeParseFloat(element.innerText) if(isNaN(endValue)) throw Error("Can't render Highcharts chart with non-numerical " + element.innerText) - const ymax = Math.max(1, endValue + GRAPH_BUFFER); + const ymax = Math.max(1, endValue + GRAPH_BUFFER) Highcharts.chart( highchartsConfigFactory({ element, ymax, - series: [endValue], + series: [endValue] }) ) }) }) {% endblock %} \ No newline at end of file From 28179810b4034377c0a50823714631c3919ffc28 Mon Sep 17 00:00:00 2001 From: Matthew Holloway Date: Thu, 15 Aug 2024 09:15:59 +1200 Subject: [PATCH 25/25] fix: only show graph for ADs/Secretariat --- ietf/templates/doc/ad_list.html | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ietf/templates/doc/ad_list.html b/ietf/templates/doc/ad_list.html index b0c9e9e8fb..a73264c0f3 100644 --- a/ietf/templates/doc/ad_list.html +++ b/ietf/templates/doc/ad_list.html @@ -58,7 +58,9 @@

{{ dt.type.1 }} State Counts

{{ ad.pre_pubreq }} @@ -77,7 +79,12 @@

{{ dt.type.1 }} State Counts

Sum {% if dt.type.1 == "Internet-Draft" %} -
+
{% endif %} {% for state, state_name in dt.states %}