From 4fa90a439f2b19b9492f74ef565fb032945e1d0e Mon Sep 17 00:00:00 2001 From: silversword411 Date: Thu, 26 Mar 2026 17:31:43 -0400 Subject: [PATCH 1/6] TRMM base template v3.1 work --- dev_base_template/TRMM_Base v3.0.html | 1389 +++++++++++++++ dev_base_template/TRMM_Base v3.1.html | 1521 +++++++++++++++++ dev_base_template/TRMM_Base_CHANGELOG.md | 599 +++++++ dev_template/README - Using v3.0 Templates.md | 93 + dev_template/create_production_template.py | 162 ++ 5 files changed, 3764 insertions(+) create mode 100644 dev_base_template/TRMM_Base v3.0.html create mode 100644 dev_base_template/TRMM_Base v3.1.html create mode 100644 dev_base_template/TRMM_Base_CHANGELOG.md create mode 100644 dev_template/README - Using v3.0 Templates.md create mode 100644 dev_template/create_production_template.py diff --git a/dev_base_template/TRMM_Base v3.0.html b/dev_base_template/TRMM_Base v3.0.html new file mode 100644 index 0000000..1e0ab89 --- /dev/null +++ b/dev_base_template/TRMM_Base v3.0.html @@ -0,0 +1,1389 @@ + + + + + + + + + + +
+ +
+ {% block header_title %}{% endblock %} +
+
+

Report Date:
{{ report_run_timestamp.strftime('%B %d, %Y') }}

+
+ +
+ {% block content %}{% endblock %} + + + + diff --git a/dev_base_template/TRMM_Base v3.1.html b/dev_base_template/TRMM_Base v3.1.html new file mode 100644 index 0000000..1958e9b --- /dev/null +++ b/dev_base_template/TRMM_Base v3.1.html @@ -0,0 +1,1521 @@ + + + + + + + + + + +
+ + +
+ {% block header_title %}{% endblock %} +
+
+ +
+ +

Report Date: {{ report_run_timestamp.strftime('%B %d, %Y') }}

+
+ +
+ {% block content %}{% endblock %} + + + + diff --git a/dev_base_template/TRMM_Base_CHANGELOG.md b/dev_base_template/TRMM_Base_CHANGELOG.md new file mode 100644 index 0000000..1d69f6a --- /dev/null +++ b/dev_base_template/TRMM_Base_CHANGELOG.md @@ -0,0 +1,599 @@ +# TRMM_Base Version Changelog + +## v3.1 (2026-02-25) + +### Centralized Company Customization + +All brandable values are now consolidated into a single, well-documented "COMPANY CUSTOMIZATION" section at the top of the `\n \n \n {% block content %}{% endblock %}\n \n" + }, + "template": { + "name": "NOC Dashboard v1.32", + "template_css": "", + "template_md": "{% block content %}\r\n\r\n\r\n\r\n
\r\n \r\n

NOC PCR Dashboard v1.32

\r\n\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Also show online IdleAlert TODO\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n ×\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n\r\n \r\n \r\n\r\n \r\n
\r\n Current Time:
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n {% for client, clientAgents in data_sources.allAgent\r\n | sort(attribute='site__client__name')\r\n | groupby(\"site__client__name\") %}\r\n
\r\n \r\n
\r\n {{ client }}\r\n
\r\n \r\n
\r\n {% for site, siteAgents in clientAgents\r\n | sort(attribute='site__name')\r\n | groupby(\"site__name\") %}\r\n
\r\n \r\n
\r\n {{ site }}\r\n
\r\n \r\n
\r\n {% for agent in siteAgents %}\r\n {% set idle_alert = '' %}\r\n {% if 'custom_fields' in agent and agent['custom_fields'] and 'IdleAlert' in agent['custom_fields'] %}\r\n {% set idle_alert = agent['custom_fields']['IdleAlert']|string|lower %}\r\n {% endif %}\r\n
\r\n
\r\n {% endfor %}\r\n
\r\n
\r\n {% endfor %}\r\n
\r\n
\r\n {% endfor %}\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n No \"IdleAlert\" custom field was found on any agents.\r\n To use this view, create a boolean custom field named IdleAlert\r\n on your agents in TRMM custom_fields.\r\n
\r\n

TODO Online Idle Agents

\r\n
\r\n {% for client, clientAgents in data_sources.allAgent\r\n | sort(attribute='site__client__name')\r\n | groupby(\"site__client__name\") %}\r\n
\r\n
\r\n {{ client }}\r\n
\r\n
\r\n {% for site, siteAgents in clientAgents\r\n | sort(attribute='site__name')\r\n | groupby(\"site__name\") %}\r\n
\r\n
\r\n {{ site }}\r\n
\r\n
\r\n {% for agent in siteAgents %}\r\n {% set idle_alert = '' %}\r\n {% if 'custom_fields' in agent and agent['custom_fields'] and 'IdleAlert' in agent['custom_fields'] %}\r\n {% set idle_alert = agent['custom_fields']['IdleAlert']|string|lower %}\r\n {% endif %}\r\n
\r\n
\r\n {% endfor %}\r\n
\r\n
\r\n {% endfor %}\r\n
\r\n
\r\n {% endfor %}\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {% for agent in data_sources.allAgent\r\n | sort(attribute='hostname')\r\n | sort(attribute='site__name')\r\n | sort(attribute='site__client__name') %}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {% endfor %}\r\n \r\n
Status\r\n smartphone\r\n \r\n email\r\n \r\n notifications\r\n Client NameSite NameHostOperating SystemDisksAlert TemplatePolicy
Checking...\r\n \r\n \r\n \r\n \r\n \r\n \r\n {% set plat = agent.plat|string|lower %}\r\n {% if plat == \"windows\" %}\r\n \r\n {% elif plat == \"darwin\" %}\r\n \r\n {% elif plat == \"linux\" %}\r\n \r\n {% else %}\r\n {{ agent.plat }}\r\n {% endif %}\r\n \r\n {% set mtype = agent.monitoring_type|string|lower %}\r\n {% if mtype == \"workstation\" %}\r\n laptop\r\n {% elif mtype == \"server\" %}\r\n dns\r\n {% else %}\r\n {{ agent.monitoring_type }}\r\n {% endif %}\r\n \r\n {% if agent.maintenance_mode|string|lower == \"true\" %}\r\n handyman\r\n {% endif %}\r\n {{ agent.site__client__name }}{{ agent.site__name }}\r\n {% if agent.needs_reboot|string|lower == \"true\" %}\r\n power_settings_new\r\n {% endif %}\r\n {{ agent.hostname }}
\r\n Desc: {{ agent.description }}
\r\n RAM: {{ agent.total_ram }}GB
\r\n User:\r\n {% if agent.logged_in_username == \"None\" %}\r\n {{ agent.last_logged_in_user }}\r\n {% else %}\r\n {{ agent.logged_in_username }}\r\n {% endif %}\r\n
\r\n Pub IP: {{ agent.public_ip }}
\r\n Boot Time: {{ agent.boot_time }}
\r\n Last Seen:\r\n {% if agent.last_seen %}\r\n \r\n {% else %}\r\n N/A\r\n {% endif %}\r\n
\r\n Last Patched:\r\n {% if agent.patches_last_installed %}\r\n \r\n {% else %}\r\n N/A\r\n {% endif %}\r\n
\r\n Offline: {{ agent.offline_time }} | Overdue: {{ agent.overdue_time }} | Check Int: {{ agent.check_interval }}\r\n {% if agent.block_policy_inheritance|string|lower == \"true\" %}\r\n Policy Inheritance Blocked\r\n {% endif %}\r\n
\r\n TRMM Ver: {{ agent.version }}\r\n
{{ agent.operating_system }}\r\n {% if agent.disks %}\r\n {% for disk in agent.disks %}\r\n
\r\n \r\n
\r\n Device: {{ disk.device }} - Total: {{ disk.total }}\r\n
\r\n \r\n \r\n
= 80 %}\r\n #ff4d4d\r\n {% elif disk.percent|float >= 60 %}\r\n #ffa500\r\n {% else %}\r\n #4CAF50\r\n {% endif %}\r\n ;\">
\r\n
\r\n \r\n
\r\n Used: {{ disk.used }} ({{ disk.percent }}%) - Free: {{ disk.free }}\r\n
\r\n \r\n {% endfor %}\r\n {% else %}\r\n N/A\r\n {% endif %}\r\n
{{ agent.alert_template }}{{ agent.policy }}
\r\n
\r\n\r\n
\r\n\r\n\r\n\r\n{% endblock %}", + "type": "html", + "depends_on": [], + "template_variables": "data_sources:\n allAgent:\n limit: 10000\n model: agent \n defer:\n - services\n - wmi_detail\n only:\n - id\n - created_by\n - created_time\n - modified_by\n - modified_time\n - version\n - operating_system\n - plat\n - goarch\n - hostname\n - agent_id\n - last_seen\n - public_ip\n - total_ram\n - disks\n - boot_time\n - logged_in_username\n - last_logged_in_user\n - monitoring_type\n - description\n - mesh_node_id\n - overdue_email_alert\n - overdue_text_alert\n - overdue_dashboard_alert\n - offline_time\n - overdue_time\n - check_interval\n - needs_reboot\n - choco_installed\n - patches_last_installed\n - time_zone\n - maintenance_mode\n - block_policy_inheritance\n - alert_template\n - site\n - policy\n - site__name\n - site__client__name\n custom_fields:\n - IdleAlert" + }, + "assets": [] +} \ No newline at end of file From 3bbbaed21b90ca5e56f006d6ca05ca526faaef19 Mon Sep 17 00:00:00 2001 From: silversword411 Date: Thu, 26 Mar 2026 17:37:07 -0400 Subject: [PATCH 3/6] Refactor to v3.1 base template Agent Specs Agent Uptime (html) Agent Uptime_By Client (html) Agents_Filtered by RAM (md) Windows Updates Not Installed_By Client v3.1 --- templates/Agent Specs v3.2.json | 17 +++++++++++++++++ templates/Agent Uptime (html) v1.6.json | 15 +++++++++++++++ templates/Agent Uptime (html) v3.1.json | 15 +++++++++++++++ templates/Agent Uptime (html) v3.2.json | 15 +++++++++++++++ .../Agent Uptime_By Client (html) v1.5.json | 17 ----------------- .../Agent Uptime_By Client (html) v3.2.json | 17 +++++++++++++++++ templates/Agents_Filtered by RAM (md) v3.0.json | 15 +++++++++++++++ templates/Agents_Filtered by RAM (md) v3.1.json | 15 +++++++++++++++ ...ws Updates Not Installed_By Client v3.1.json | 17 +++++++++++++++++ 9 files changed, 126 insertions(+), 17 deletions(-) create mode 100644 templates/Agent Specs v3.2.json create mode 100644 templates/Agent Uptime (html) v1.6.json create mode 100644 templates/Agent Uptime (html) v3.1.json create mode 100644 templates/Agent Uptime (html) v3.2.json delete mode 100644 templates/Agent Uptime_By Client (html) v1.5.json create mode 100644 templates/Agent Uptime_By Client (html) v3.2.json create mode 100644 templates/Agents_Filtered by RAM (md) v3.0.json create mode 100644 templates/Agents_Filtered by RAM (md) v3.1.json create mode 100644 templates/Windows Updates Not Installed_By Client v3.1.json diff --git a/templates/Agent Specs v3.2.json b/templates/Agent Specs v3.2.json new file mode 100644 index 0000000..379af16 --- /dev/null +++ b/templates/Agent Specs v3.2.json @@ -0,0 +1,17 @@ +{ + "base_template": { + "name": "TRMM_Base v3.2", + "html": "\n\n\n\n \n\n \n\n\n\n
\n \n
\n \"Company\n
\n
\n {% block header_title %}{% endblock %}\n
\n
\n \n
\n \n

Report Date: {{ report_run_timestamp.strftime('%B %d, %Y') }}

\n
\n
\n \n
\n
\n {% block content %}{% endblock %}\n
\n {% block footer %}\n \n
\n {% endblock %}\n
\n\n\n\n" + }, + "template": { + "name": "Agent Specs v3.2", + "template_css": "@page { size: letter landscape; }", + "template_md": "{% block header_title %}

Agent Specs

\n

{{ client.name }}

\n
\n Filtered: 0\n of 0 agents\n
{% endblock %}\n\n{% block content %}\n\n\n
Loading...
\n\n
\n \n \n \n
\n
\n\n\n\n\n{% endblock %}", + "type": "html", + "depends_on": [ + "client" + ], + "template_variables": "data_sources:\n agentsList:\n filter:\n site__client_id: '{{client.id}}'\n model: agent\n only:\n - hostname\n - last_logged_in_user\n - operating_system\n - wmi_detail\n - total_ram\n - disks\nreport_run_timestamp: !now" + }, + "assets": [] +} \ No newline at end of file diff --git a/templates/Agent Uptime (html) v1.6.json b/templates/Agent Uptime (html) v1.6.json new file mode 100644 index 0000000..fe7115c --- /dev/null +++ b/templates/Agent Uptime (html) v1.6.json @@ -0,0 +1,15 @@ +{ + "base_template": { + "name": "TRMM_Base v1.1", + "html": "\n\n\n \n\n\n\n {% block content %}{% endblock %}\n\n\n" + }, + "template": { + "name": "Agent Uptime (html) v1.6", + "template_css": "", + "template_md": "{% block content %}\r\n\r\n\r\n
\r\n \r\n
\r\n

Agent Uptime Report

\r\n

Report Date: {{ report_run_timestamp.strftime('%Y-%m-%d') }}

\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n Filtered Downtime Records: 0\r\n of 0\r\n
\r\n
\r\n\r\n{% set cutoff = timedelta_30_days %}\r\n{% set alert_events_full = [] %}\r\n{% for item in data_sources.allFieldsAlerts %}\r\n {% if item.alert_type == \"availability\"\r\n and item.resolved\r\n and item.alert_time is defined\r\n and item.resolved_on is defined\r\n and item.agent__hostname is defined\r\n and item.alert_time >= cutoff %}\r\n {% set downtime = (item.resolved_on - item.alert_time).total_seconds() / 60 %}\r\n {% set _ = alert_events_full.append({\r\n \"agent\": item.agent__hostname,\r\n \"start\": item.alert_time.isoformat(),\r\n \"end\": item.resolved_on.isoformat(),\r\n \"message\": item.message,\r\n \"downtime_minutes\": downtime,\r\n \"alert_time_fmt\": item.alert_time.strftime('%Y-%m-%d %H:%M'),\r\n \"resolved_on_fmt\": item.resolved_on.strftime('%Y-%m-%d %H:%M'),\r\n \"clientRaw\": (item.agent__site__client__name or (client.name if client and client.name else 'N/A')),\r\n \"site\": (item.agent__site__name or 'N/A')\r\n }) %}\r\n {% endif %}\r\n{% endfor %}\r\n\r\n
\r\n

Agent Timeline (Green = Online, Red = Offline)

\r\n
Loading timeline...
\r\n
\r\n\r\n

Downtime List

\r\n
Loading downtime data...
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Agent IDClientSiteMessageTime OffTime OnDowntime
\r\n\r\n\r\n\r\n\r\n{% endblock %}", + "type": "html", + "depends_on": [], + "template_variables": "report_run_timestamp: !now\ntimedelta_30_days: !now days=-30\ndata_sources:\n allFieldsAlerts:\n model: alert\n only:\n - agent__hostname\n - message\n - alert_time\n - resolved_on\n - alert_type\n - agent_id\n - resolved\n - agent__site__name\n - agent__site__client__name" + }, + "assets": [] +} \ No newline at end of file diff --git a/templates/Agent Uptime (html) v3.1.json b/templates/Agent Uptime (html) v3.1.json new file mode 100644 index 0000000..09e6d14 --- /dev/null +++ b/templates/Agent Uptime (html) v3.1.json @@ -0,0 +1,15 @@ +{ + "base_template": { + "name": "TRMM_Base v3.1", + "html": "\n\n\n\n \n\n \n\n\n\n
\n \n
\n \"Company\n
\n
\n {% block header_title %}{% endblock %}\n
\n
\n \n
\n \n

Report Date: {{ report_run_timestamp.strftime('%B %d, %Y') }}

\n
\n
\n \n
\n
\n {% block content %}{% endblock %}\n
\n {% block footer %}\n \n
\n {% endblock %}\n
\n\n\n\n" + }, + "template": { + "name": "Agent Uptime (html) v3.1", + "template_css": "", + "template_md": "{% block header_title %}

Agent Uptime Report

\n
\n Filtered: 0\n of 0\n
{% endblock %}\n\n{% block content %}\n\n\n{% set cutoff = timedelta_30_days %}\n{% set alert_events_full = [] %}\n{% for item in data_sources.allFieldsAlerts %}\n {% if item.alert_type == \"availability\"\n and item.resolved\n and item.alert_time is defined\n and item.resolved_on is defined\n and item.agent__hostname is defined\n and item.alert_time >= cutoff %}\n {% set downtime = (item.resolved_on - item.alert_time).total_seconds() / 60 %}\n {% set dt_mins = downtime | round(0, 'floor') %}\n {% set dt_days = dt_mins // 1440 %}\n {% set dt_hrs = (dt_mins % 1440) // 60 %}\n {% set dt_min = dt_mins % 60 %}\n {% set dt_str = '' %}\n {% if dt_days > 0 %}{% set dt_str = dt_str ~ dt_days ~ 'd ' %}{% endif %}\n {% if dt_hrs > 0 %}{% set dt_str = dt_str ~ dt_hrs ~ 'h ' %}{% endif %}\n {% if dt_min > 0 or (dt_days == 0 and dt_hrs == 0) %}{% set dt_str = dt_str ~ dt_min ~ 'm' %}{% endif %}\n {% set _ = alert_events_full.append({\n \"agent\": item.agent__hostname,\n \"start\": item.alert_time.isoformat(),\n \"end\": item.resolved_on.isoformat(),\n \"message\": item.message,\n \"downtime\": dt_str,\n \"downtimeNum\": dt_mins,\n \"timeOff\": item.alert_time.strftime('%Y-%m-%d %H:%M'),\n \"timeOn\": item.resolved_on.strftime('%Y-%m-%d %H:%M'),\n \"clientRaw\": (item.agent__site__client__name or 'N/A'),\n \"site\": (item.agent__site__name or 'N/A'),\n \"clientSiteHTML\": ((item.agent__site__client__name or 'N/A') ~ '
' ~ (item.agent__site__name or 'N/A') ~ '')\n }) %}\n {% endif %}\n{% endfor %}\n\n
\n

Agent Timeline (Green = Online, Red = Offline)

\n
\n\n

Downtime List

\n\n\n\n
Loading...
\n\n
\n \n \n \n
\n
\n\n\n\n\n{% endblock %}", + "type": "html", + "depends_on": [], + "template_variables": "report_run_timestamp: !now\ntimedelta_30_days: !now days=-30\ndata_sources:\n allFieldsAlerts:\n model: alert\n only:\n - agent__hostname\n - message\n - alert_time\n - resolved_on\n - alert_type\n - agent_id\n - resolved\n - agent__site__name\n - agent__site__client__name" + }, + "assets": [] +} \ No newline at end of file diff --git a/templates/Agent Uptime (html) v3.2.json b/templates/Agent Uptime (html) v3.2.json new file mode 100644 index 0000000..c3e2cb5 --- /dev/null +++ b/templates/Agent Uptime (html) v3.2.json @@ -0,0 +1,15 @@ +{ + "base_template": { + "name": "TRMM_Base v3.1", + "html": "\n\n\n\n \n\n \n\n\n\n
\n \n
\n \"Company\n
\n
\n {% block header_title %}{% endblock %}\n
\n
\n \n
\n \n

Report Date: {{ report_run_timestamp.strftime('%B %d, %Y') }}

\n
\n
\n \n
\n
\n {% block content %}{% endblock %}\n
\n {% block footer %}\n \n
\n {% endblock %}\n
\n\n\n\n" + }, + "template": { + "name": "Agent Uptime (html) v3.2", + "template_css": "", + "template_md": "{% block header_title %}

Agent Uptime Report

\n
\n Filtered: 0\n of 0\n
{% endblock %}\n\n{% block content %}\n\n\n{% set cutoff = timedelta_30_days %}\n{% set alert_events_full = [] %}\n{% for item in data_sources.allFieldsAlerts %}\n {% if item.alert_type == \"availability\"\n and item.resolved\n and item.alert_time is defined\n and item.resolved_on is defined\n and item.agent__hostname is defined\n and item.alert_time >= cutoff %}\n {% set downtime = (item.resolved_on - item.alert_time).total_seconds() / 60 %}\n {% set dt_mins = downtime | round(0, 'floor') %}\n {% set dt_days = dt_mins // 1440 %}\n {% set dt_hrs = (dt_mins % 1440) // 60 %}\n {% set dt_min = dt_mins % 60 %}\n {% set dt_str = '' %}\n {% if dt_days > 0 %}{% set dt_str = dt_str ~ dt_days ~ 'd ' %}{% endif %}\n {% if dt_hrs > 0 %}{% set dt_str = dt_str ~ dt_hrs ~ 'h ' %}{% endif %}\n {% if dt_min > 0 or (dt_days == 0 and dt_hrs == 0) %}{% set dt_str = dt_str ~ dt_min ~ 'm' %}{% endif %}\n {% set _ = alert_events_full.append({\n \"agent\": item.agent__hostname,\n \"start\": item.alert_time.isoformat(),\n \"end\": item.resolved_on.isoformat(),\n \"message\": item.message,\n \"downtime\": dt_str,\n \"downtimeNum\": dt_mins,\n \"timeOff\": item.alert_time.strftime('%Y-%m-%d %H:%M'),\n \"timeOn\": item.resolved_on.strftime('%Y-%m-%d %H:%M'),\n \"clientRaw\": (item.agent__site__client__name or 'N/A'),\n \"site\": (item.agent__site__name or 'N/A'),\n \"clientSiteHTML\": ((item.agent__site__client__name or 'N/A') ~ '
' ~ (item.agent__site__name or 'N/A') ~ '')\n }) %}\n {% endif %}\n{% endfor %}\n\n
\n

Agent Timeline (Green = Online, Red = Offline)

\n
\n\n

Downtime List

\n\n\n\n
Loading...
\n\n
\n \n \n \n
\n
\n\n\n{% endblock %}", + "type": "html", + "depends_on": [], + "template_variables": "report_run_timestamp: !now\ntimedelta_30_days: !now days=-30\ndata_sources:\n allFieldsAlerts:\n model: alert\n only:\n - agent__hostname\n - message\n - alert_time\n - resolved_on\n - alert_type\n - agent_id\n - resolved\n - agent__site__name\n - agent__site__client__name" + }, + "assets": [] +} \ No newline at end of file diff --git a/templates/Agent Uptime_By Client (html) v1.5.json b/templates/Agent Uptime_By Client (html) v1.5.json deleted file mode 100644 index d54bdd7..0000000 --- a/templates/Agent Uptime_By Client (html) v1.5.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "base_template": { - "name": "TRMM_Base v1", - "html": "\n\n\n \n\n\n\n {% block content %}{% endblock %}\n\n\n" - }, - "template": { - "name": "Agent Uptime_By Client (html) v1.5", - "template_css": "", - "template_md": "{% block content %}\r\n\r\n\r\n
\r\n \r\n
\r\n

{{ client.name }} - Agent Uptime Report

\r\n

Report Date: {{ report_run_timestamp.strftime('%Y-%m-%d') }}

\r\n
\r\n
\r\n\r\n{% set cutoff = timedelta_30_days %}\r\n{% set alert_events = [] %}\r\n\r\n
\r\n

Agent Timeline (Green = Online, Red = Offline)

\r\n
\r\n\r\n

Downtime List

\r\n\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {% for item in data_sources.allFieldsAlerts %}\r\n {% if item.alert_type == \"availability\"\r\n and item.resolved\r\n and item.alert_time is defined\r\n and item.resolved_on is defined\r\n and item.agent__hostname is defined\r\n and item.alert_time >= cutoff %}\r\n {% set downtime = (item.resolved_on - item.alert_time).total_seconds() / 60 %}\r\n \r\n \r\n \r\n \r\n \r\n {% set dt_mins = downtime | round(0, 'floor') %}\r\n {% set dt_days = dt_mins // 1440 %}\r\n {% set dt_hrs = (dt_mins % 1440) // 60 %}\r\n {% set dt_min = dt_mins % 60 %}\r\n \r\n \r\n {% set _ = alert_events.append({\r\n \"agent\": item.agent__hostname,\r\n \"start\": item.alert_time.isoformat(),\r\n \"end\": item.resolved_on.isoformat()\r\n }) %}\r\n {% endif %}\r\n {% endfor %}\r\n \r\n
Agent IDMessageTime OffTime OnDowntime
{{ item.agent__hostname }}{{ item.message }}{{ item.alert_time.strftime('%Y-%m-%d %H:%M') }}{{ item.resolved_on.strftime('%Y-%m-%d %H:%M') }}\r\n {% if dt_days > 0 %}{{ dt_days }}d {% endif %}\r\n {% if dt_hrs > 0 %}{{ dt_hrs }}h {% endif %}\r\n {% if dt_min > 0 or (dt_days == 0 and dt_hrs == 0) %}{{ dt_min }}m{% endif %}\r\n
\r\n\r\n\r\n{% endblock %}", - "type": "html", - "depends_on": [ - "client" - ], - "template_variables": "report_run_timestamp: !now\ntimedelta_30_days: !now days=-30\ndata_sources:\n allFieldsAlerts:\n model: alert\n only:\n - agent__hostname\n - message\n - alert_time\n - resolved_on\n - alert_type\n - agent_id\n - resolved\n filter:\n agent__site__client_id: '{{client.id}}'" - }, - "assets": [] -} \ No newline at end of file diff --git a/templates/Agent Uptime_By Client (html) v3.2.json b/templates/Agent Uptime_By Client (html) v3.2.json new file mode 100644 index 0000000..31d8284 --- /dev/null +++ b/templates/Agent Uptime_By Client (html) v3.2.json @@ -0,0 +1,17 @@ +{ + "base_template": { + "name": "TRMM_Base v3.1", + "html": "\n\n\n\n \n\n \n\n\n\n
\n \n
\n \"Company\n
\n
\n {% block header_title %}{% endblock %}\n
\n
\n \n
\n \n

Report Date: {{ report_run_timestamp.strftime('%B %d, %Y') }}

\n
\n
\n \n
\n
\n {% block content %}{% endblock %}\n
\n {% block footer %}\n \n
\n {% endblock %}\n
\n\n\n\n" + }, + "template": { + "name": "Agent Uptime_By Client (html) v3.2", + "template_css": "", + "template_md": "{% block header_title %}

Agent Uptime Report

\n

{{ client.name }}

\n
\n Filtered: 0\n of 0\n
{% endblock %}\n\n{% block content %}\n\n\n{% set cutoff = timedelta_30_days %}\n{% set alert_events = [] %}\n\n
\n

Agent Timeline (Green = Online, Red = Offline)

\n
\n\n

Downtime List

\n\n\n\n
Loading...
\n\n
\n \n \n \n
\n
\n\n\n\n\n{% endblock %}", + "type": "html", + "depends_on": [ + "client" + ], + "template_variables": "report_run_timestamp: !now\ntimedelta_30_days: !now days=-30\ndata_sources:\n allFieldsAlerts:\n model: alert\n only:\n - agent__hostname\n - message\n - alert_time\n - resolved_on\n - alert_type\n - agent_id\n - resolved\n filter:\n agent__site__client_id: \"{{client.id}}\"" + }, + "assets": [] +} \ No newline at end of file diff --git a/templates/Agents_Filtered by RAM (md) v3.0.json b/templates/Agents_Filtered by RAM (md) v3.0.json new file mode 100644 index 0000000..ece7ddd --- /dev/null +++ b/templates/Agents_Filtered by RAM (md) v3.0.json @@ -0,0 +1,15 @@ +{ + "base_template": { + "name": "TRMM_Base v3.0", + "html": "\n\n\n\n \n\n \n\n\n\n
\n
\n \"Logo\"\n
\n
\n {% block header_title %}{% endblock %}\n
\n
\n

Report Date:
{{ report_run_timestamp.strftime('%B %d, %Y') }}

\n
\n
\n \n
\n
\n {% block content %}{% endblock %}\n
\n {% block footer %}{% endblock %}\n
\n\n\n\n" + }, + "template": { + "name": "Agents_Filtered by RAM (md) v3.0", + "template_css": "@page { size: letter landscape; }\n\n/* Column widths */\ntable.vt th:nth-child(1), table.vt td:nth-child(1) { width: 160px; }\ntable.vt th:nth-child(2), table.vt td:nth-child(2) { width: 160px; }\ntable.vt th:nth-child(3), table.vt td:nth-child(3) { min-width: 180px; }\ntable.vt th:nth-child(4), table.vt td:nth-child(4) { width: 140px; }\ntable.vt th:nth-child(5), table.vt td:nth-child(5) { min-width: 200px; }\ntable.vt th:nth-child(6), table.vt td:nth-child(6) { width: 100px; text-align: center; }\ntable.vt th:nth-child(7), table.vt td:nth-child(7) { min-width: 150px; }", + "template_md": "{% block header_title %}

Low RAM Agents Report

\n
\n Filtered: 0\n of 0 agents\n
{% endblock %}\n\n{% block content %}\n
Loading...
\n\n
\n \n \n \n
\n
\n\n\n\n\n{% endblock %}", + "type": "html", + "depends_on": [], + "template_variables": "data_sources:\n agents:\n model: agent\n only:\n - hostname\n - site__name\n - site__client__name\n - last_logged_in_user\n - operating_system\n - wmi_detail\n - total_ram\n - disks\nreport_run_timestamp: !now" + }, + "assets": [] +} \ No newline at end of file diff --git a/templates/Agents_Filtered by RAM (md) v3.1.json b/templates/Agents_Filtered by RAM (md) v3.1.json new file mode 100644 index 0000000..b3c8426 --- /dev/null +++ b/templates/Agents_Filtered by RAM (md) v3.1.json @@ -0,0 +1,15 @@ +{ + "base_template": { + "name": "TRMM_Base v3.1", + "html": "\n\n\n\n \n\n \n\n\n\n
\n \n
\n \"Company\n
\n
\n {% block header_title %}{% endblock %}\n
\n
\n \n
\n \n

Report Date: {{ report_run_timestamp.strftime('%B %d, %Y') }}

\n
\n
\n \n
\n
\n {% block content %}{% endblock %}\n
\n {% block footer %}\n \n
\n {% endblock %}\n
\n\n\n\n" + }, + "template": { + "name": "Agents_Filtered by RAM (md) v3.1", + "template_css": "@page { size: letter landscape; }\n\n/* Column widths */\ntable.vt th:nth-child(1), table.vt td:nth-child(1) { width: 160px; }\ntable.vt th:nth-child(2), table.vt td:nth-child(2) { width: 160px; }\ntable.vt th:nth-child(3), table.vt td:nth-child(3) { min-width: 180px; }\ntable.vt th:nth-child(4), table.vt td:nth-child(4) { width: 140px; }\ntable.vt th:nth-child(5), table.vt td:nth-child(5) { min-width: 200px; }\ntable.vt th:nth-child(6), table.vt td:nth-child(6) { width: 100px; text-align: center; }\ntable.vt th:nth-child(7), table.vt td:nth-child(7) { min-width: 150px; }", + "template_md": "{% block header_title %}

Low RAM Agents Report

\n
\n Filtered: 0\n of 0 agents\n
{% endblock %}\n\n{% block content %}\n
Loading...
\n\n
\n \n \n \n
\n
\n\n\n\n\n{% endblock %}", + "type": "html", + "depends_on": [], + "template_variables": "data_sources:\n agents:\n model: agent\n only:\n - hostname\n - site__name\n - site__client__name\n - last_logged_in_user\n - operating_system\n - wmi_detail\n - total_ram\n - disks\nreport_run_timestamp: !now" + }, + "assets": [] +} \ No newline at end of file diff --git a/templates/Windows Updates Not Installed_By Client v3.1.json b/templates/Windows Updates Not Installed_By Client v3.1.json new file mode 100644 index 0000000..d80b703 --- /dev/null +++ b/templates/Windows Updates Not Installed_By Client v3.1.json @@ -0,0 +1,17 @@ +{ + "base_template": { + "name": "TRMM_Base v3.1", + "html": "\n\n\n\n \n\n \n\n\n\n
\n \n
\n \"Company\n
\n
\n {% block header_title %}{% endblock %}\n
\n
\n \n
\n \n

Report Date: {{ report_run_timestamp.strftime('%B %d, %Y') }}

\n
\n
\n \n
\n
\n {% block content %}{% endblock %}\n
\n {% block footer %}\n \n
\n {% endblock %}\n
\n\n\n\n" + }, + "template": { + "name": "Windows Updates Not Installed_By Client v3.1", + "template_css": "@page { size: letter portrait; }\n\n.sev-badge {\n display: inline-block;\n padding: var(--badge-padding);\n border-radius: var(--badge-radius);\n font-size: var(--badge-font-size);\n font-weight: 600;\n text-align: center;\n white-space: nowrap;\n}\n.sev-critical { background-color: #dc3545; color: #fff; }\n.sev-important { background-color: #fd7e14; color: #fff; }\n.sev-moderate { background-color: #ffc107; color: #333; }\n.sev-low { background-color: #28a745; color: #fff; }\n.sev-unspecified { background-color: #6c757d; color: #fff; }\n.sev-n-a,\n.sev-unknown { background-color: #adb5bd; color: #333; }\n\ntable.vt th:nth-child(1), table.vt td:nth-child(1) { width: 180px; min-width: 140px; }\ntable.vt th:nth-child(2), table.vt td:nth-child(2) { min-width: 280px; }\ntable.vt th:nth-child(3), table.vt td:nth-child(3) { width: 100px; text-align: center; }\ntable.vt th:nth-child(4), table.vt td:nth-child(4) { width: 120px; text-align: center; }", + "template_md": "{% block header_title %}

Windows Updates Not Installed

\n
\n Filtered: 0\n of 0\n
{% endblock %}\n\n{% block content %}\n\n\n
Loading...
\n\n
\n \n \n \n
\n
\n\n\n{% endblock %}", + "type": "html", + "depends_on": [ + "client" + ], + "template_variables": "data_sources:\n allFieldsWindowsUpdates:\n filter:\n agent__site__client__id: '{{client.id}}'\n model: winupdate\n only:\n - id\n - agent__hostname\n - title\n - installed\n - description\n - severity\n - categories\n - category_ids\n - kb_article_ids\nreport_run_timestamp: !now" + }, + "assets": [] +} \ No newline at end of file From 065ffac08947420be93c60bd529266a936a827e9 Mon Sep 17 00:00:00 2001 From: silversword411 Date: Thu, 26 Mar 2026 17:41:07 -0400 Subject: [PATCH 4/6] Remove old NOC Dashboard --- templates/NOC Dashboard v1.31.json | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 templates/NOC Dashboard v1.31.json diff --git a/templates/NOC Dashboard v1.31.json b/templates/NOC Dashboard v1.31.json deleted file mode 100644 index 5d8afe8..0000000 --- a/templates/NOC Dashboard v1.31.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "base_template": { - "name": "Jinja Base Template", - "html": "\n \n \n \n \n \n \n {% block content %}{% endblock %}\n \n" - }, - "template": { - "name": "NOC Dashboard v1.31", - "template_css": "", - "template_md": "{% block content %}\r\n\r\n\r\n\r\n
\r\n \r\n

NOC PCR Dashboard v1.30

\r\n\r\n \r\n
\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n Also show online IdleAlert TODO\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n ×\r\n
\r\n\r\n \r\n
\r\n \r\n
\r\n\r\n \r\n \r\n\r\n \r\n
\r\n Current Time:
\r\n \r\n \r\n \r\n
\r\n
\r\n\r\n\r\n\r\n
\r\n \r\n
\r\n
\r\n {% for client, clientAgents in data_sources.allAgent\r\n | sort(attribute='site__client__name')\r\n | groupby(\"site__client__name\") %}\r\n
\r\n \r\n
\r\n {{ client }}\r\n
\r\n \r\n
\r\n {% for site, siteAgents in clientAgents\r\n | sort(attribute='site__name')\r\n | groupby(\"site__name\") %}\r\n
\r\n \r\n
\r\n {{ site }}\r\n
\r\n \r\n
\r\n {% for agent in siteAgents %}\r\n {% set idle_alert = '' %}\r\n {% if 'custom_fields' in agent and agent['custom_fields'] and 'IdleAlert' in agent['custom_fields'] %}\r\n {% set idle_alert = agent['custom_fields']['IdleAlert']|string|lower %}\r\n {% endif %}\r\n
\r\n
\r\n {% endfor %}\r\n
\r\n
\r\n {% endfor %}\r\n
\r\n
\r\n {% endfor %}\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n No \"IdleAlert\" custom field was found on any agents.\r\n To use this view, create a boolean custom field named IdleAlert\r\n on your agents in TRMM custom_fields.\r\n
\r\n

TODO Online Idle Agents

\r\n
\r\n {% for client, clientAgents in data_sources.allAgent\r\n | sort(attribute='site__client__name')\r\n | groupby(\"site__client__name\") %}\r\n
\r\n
\r\n {{ client }}\r\n
\r\n
\r\n {% for site, siteAgents in clientAgents\r\n | sort(attribute='site__name')\r\n | groupby(\"site__name\") %}\r\n
\r\n
\r\n {{ site }}\r\n
\r\n
\r\n {% for agent in siteAgents %}\r\n {% set idle_alert = '' %}\r\n {% if 'custom_fields' in agent and agent['custom_fields'] and 'IdleAlert' in agent['custom_fields'] %}\r\n {% set idle_alert = agent['custom_fields']['IdleAlert']|string|lower %}\r\n {% endif %}\r\n
\r\n
\r\n {% endfor %}\r\n
\r\n
\r\n {% endfor %}\r\n
\r\n
\r\n {% endfor %}\r\n
\r\n
\r\n\r\n \r\n
\r\n
\r\n\r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n {% for agent in data_sources.allAgent\r\n | sort(attribute='hostname')\r\n | sort(attribute='site__name')\r\n | sort(attribute='site__client__name') %}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {% endfor %}\r\n \r\n
Status\r\n smartphone\r\n \r\n email\r\n \r\n notifications\r\n Client NameSite NameHostOperating SystemDisksAlert TemplatePolicy
Checking...\r\n \r\n \r\n \r\n \r\n \r\n \r\n {% set plat = agent.plat|string|lower %}\r\n {% if plat == \"windows\" %}\r\n \r\n {% elif plat == \"darwin\" %}\r\n \r\n {% elif plat == \"linux\" %}\r\n \r\n {% else %}\r\n {{ agent.plat }}\r\n {% endif %}\r\n \r\n {% set mtype = agent.monitoring_type|string|lower %}\r\n {% if mtype == \"workstation\" %}\r\n laptop\r\n {% elif mtype == \"server\" %}\r\n dns\r\n {% else %}\r\n {{ agent.monitoring_type }}\r\n {% endif %}\r\n \r\n {% if agent.maintenance_mode|string|lower == \"true\" %}\r\n handyman\r\n {% endif %}\r\n {{ agent.site__client__name }}{{ agent.site__name }}\r\n {% if agent.needs_reboot|string|lower == \"true\" %}\r\n power_settings_new\r\n {% endif %}\r\n {{ agent.hostname }}
\r\n Desc: {{ agent.description }}
\r\n RAM: {{ agent.total_ram }}GB
\r\n User:\r\n {% if agent.logged_in_username == \"None\" %}\r\n {{ agent.last_logged_in_user }}\r\n {% else %}\r\n {{ agent.logged_in_username }}\r\n {% endif %}\r\n
\r\n Pub IP: {{ agent.public_ip }}
\r\n Boot Time: {{ agent.boot_time }}
\r\n Last Seen:\r\n {% if agent.last_seen %}\r\n \r\n {% else %}\r\n N/A\r\n {% endif %}\r\n
\r\n Last Patched:\r\n {% if agent.patches_last_installed %}\r\n \r\n {% else %}\r\n N/A\r\n {% endif %}\r\n
\r\n Offline: {{ agent.offline_time }} | Overdue: {{ agent.overdue_time }} | Check Int: {{ agent.check_interval }}\r\n {% if agent.block_policy_inheritance|string|lower == \"true\" %}\r\n Policy Inheritance Blocked\r\n {% endif %}\r\n
\r\n TRMM Ver: {{ agent.version }}\r\n
{{ agent.operating_system }}\r\n {% if agent.disks %}\r\n {% for disk in agent.disks %}\r\n
\r\n \r\n
\r\n Device: {{ disk.device }} - Total: {{ disk.total }}\r\n
\r\n \r\n \r\n
= 80 %}\r\n #ff4d4d\r\n {% elif disk.percent|float >= 60 %}\r\n #ffa500\r\n {% else %}\r\n #4CAF50\r\n {% endif %}\r\n ;\">
\r\n
\r\n \r\n
\r\n Used: {{ disk.used }} ({{ disk.percent }}%) - Free: {{ disk.free }}\r\n
\r\n \r\n {% endfor %}\r\n {% else %}\r\n N/A\r\n {% endif %}\r\n
{{ agent.alert_template }}{{ agent.policy }}
\r\n
\r\n\r\n
\r\n\r\n\r\n\r\n{% endblock %}", - "type": "html", - "depends_on": [], - "template_variables": "data_sources:\n allAgent:\n limit: 10000\n model: agent \n defer:\n - services\n - wmi_detail\n only:\n - id\n - created_by\n - created_time\n - modified_by\n - modified_time\n - version\n - operating_system\n - plat\n - goarch\n - hostname\n - agent_id\n - last_seen\n - public_ip\n - total_ram\n - disks\n - boot_time\n - logged_in_username\n - last_logged_in_user\n - monitoring_type\n - description\n - mesh_node_id\n - overdue_email_alert\n - overdue_text_alert\n - overdue_dashboard_alert\n - offline_time\n - overdue_time\n - check_interval\n - needs_reboot\n - choco_installed\n - patches_last_installed\n - time_zone\n - maintenance_mode\n - block_policy_inheritance\n - alert_template\n - site\n - policy\n - site__name\n - site__client__name\n custom_fields:\n - IdleAlert" - }, - "assets": [] -} \ No newline at end of file From 18c111d8f3dd5d9e8159079bddbbae2390384428 Mon Sep 17 00:00:00 2001 From: silversword411 Date: Thu, 26 Mar 2026 17:43:19 -0400 Subject: [PATCH 5/6] Cleanup old reports migrated to v3.1 --- templates/Agent Specs (md).json | 17 ----------------- templates/Agent Uptime (html) v1.6.json | 15 --------------- templates/Agent Uptime (html) v3.1.json | 15 --------------- templates/Agents_Filtered by RAM (md) v3.0.json | 15 --------------- templates/Agents_Filtered by RAM (md).json | 17 ----------------- 5 files changed, 79 deletions(-) delete mode 100644 templates/Agent Specs (md).json delete mode 100644 templates/Agent Uptime (html) v1.6.json delete mode 100644 templates/Agent Uptime (html) v3.1.json delete mode 100644 templates/Agents_Filtered by RAM (md) v3.0.json delete mode 100644 templates/Agents_Filtered by RAM (md).json diff --git a/templates/Agent Specs (md).json b/templates/Agent Specs (md).json deleted file mode 100644 index 4fe708c..0000000 --- a/templates/Agent Specs (md).json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "base_template": { - "name": "Basic Tailwind CSS Template", - "html": "\n\n\n \n\n\n\n\n {% block content %} \n {% endblock %}\n\n\n\n\n" - }, - "template": { - "name": "Agent Specs (md)", - "template_css": "", - "template_md": "{% block content %}\r\n
\r\n# ![Company Logo](https://github.com/amidaware/reporting-templates/blob/master/assets/gbtnavy%20(256).png?raw=true)\r\n\r\n
\r\n--- \r\n

{{ client.name }}

\r\n\r\n
\r\n---\r\n

Agent List

\r\n\r\n\r\n
\r\n\r\n \r\n \r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n \r\n \r\n \r\n \r\n {% for item in data_sources.agentsList %}\r\n \r\n\t\r\n \r\n \r\n\t\r\n \r\n \r\n\r\n \r\n {% endfor %}\r\n \r\n
Device NameUserDevice OSDevice PlatformDevice RamDrive Info
{{ item.hostname }}{{ item.last_logged_in_user }}{{ item.operating_system }}{{item.wmi_detail.cpu[0][0].Name if item.wmi_detail and item.wmi_detail.cpu and item.wmi_detail.cpu[0][0].Name else 'N/A'}} {{ item.total_ram }}GB{{item.disks[0].device if item.disks and item.disks[0].device else 'N/A'}} {{item.disks[0].total if item.disks and item.disks[0].total else 'N/A'}}
\r\n
\r\n{% endblock %}", - "type": "markdown", - "depends_on": [ - "client" - ], - "template_variables": "data_sources:\n agentsList:\n filter:\n site__client_id: '{{client.id}}'\n model: agent\n only:\n - hostname\n - last_logged_in_user\n - operating_system\n - wmi_detail\n - total_ram\n - disks\n" - }, - "assets": [] -} diff --git a/templates/Agent Uptime (html) v1.6.json b/templates/Agent Uptime (html) v1.6.json deleted file mode 100644 index fe7115c..0000000 --- a/templates/Agent Uptime (html) v1.6.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "base_template": { - "name": "TRMM_Base v1.1", - "html": "\n\n\n \n\n\n\n {% block content %}{% endblock %}\n\n\n" - }, - "template": { - "name": "Agent Uptime (html) v1.6", - "template_css": "", - "template_md": "{% block content %}\r\n\r\n\r\n
\r\n \r\n
\r\n

Agent Uptime Report

\r\n

Report Date: {{ report_run_timestamp.strftime('%Y-%m-%d') }}

\r\n
\r\n
\r\n\r\n
\r\n \r\n
\r\n
\r\n
\r\n Filtered Downtime Records: 0\r\n of 0\r\n
\r\n
\r\n\r\n{% set cutoff = timedelta_30_days %}\r\n{% set alert_events_full = [] %}\r\n{% for item in data_sources.allFieldsAlerts %}\r\n {% if item.alert_type == \"availability\"\r\n and item.resolved\r\n and item.alert_time is defined\r\n and item.resolved_on is defined\r\n and item.agent__hostname is defined\r\n and item.alert_time >= cutoff %}\r\n {% set downtime = (item.resolved_on - item.alert_time).total_seconds() / 60 %}\r\n {% set _ = alert_events_full.append({\r\n \"agent\": item.agent__hostname,\r\n \"start\": item.alert_time.isoformat(),\r\n \"end\": item.resolved_on.isoformat(),\r\n \"message\": item.message,\r\n \"downtime_minutes\": downtime,\r\n \"alert_time_fmt\": item.alert_time.strftime('%Y-%m-%d %H:%M'),\r\n \"resolved_on_fmt\": item.resolved_on.strftime('%Y-%m-%d %H:%M'),\r\n \"clientRaw\": (item.agent__site__client__name or (client.name if client and client.name else 'N/A')),\r\n \"site\": (item.agent__site__name or 'N/A')\r\n }) %}\r\n {% endif %}\r\n{% endfor %}\r\n\r\n
\r\n

Agent Timeline (Green = Online, Red = Offline)

\r\n
Loading timeline...
\r\n
\r\n\r\n

Downtime List

\r\n
Loading downtime data...
\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Agent IDClientSiteMessageTime OffTime OnDowntime
\r\n\r\n\r\n\r\n\r\n{% endblock %}", - "type": "html", - "depends_on": [], - "template_variables": "report_run_timestamp: !now\ntimedelta_30_days: !now days=-30\ndata_sources:\n allFieldsAlerts:\n model: alert\n only:\n - agent__hostname\n - message\n - alert_time\n - resolved_on\n - alert_type\n - agent_id\n - resolved\n - agent__site__name\n - agent__site__client__name" - }, - "assets": [] -} \ No newline at end of file diff --git a/templates/Agent Uptime (html) v3.1.json b/templates/Agent Uptime (html) v3.1.json deleted file mode 100644 index 09e6d14..0000000 --- a/templates/Agent Uptime (html) v3.1.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "base_template": { - "name": "TRMM_Base v3.1", - "html": "\n\n\n\n \n\n \n\n\n\n
\n \n
\n \"Company\n
\n
\n {% block header_title %}{% endblock %}\n
\n
\n \n
\n \n

Report Date: {{ report_run_timestamp.strftime('%B %d, %Y') }}

\n
\n
\n \n
\n
\n {% block content %}{% endblock %}\n
\n {% block footer %}\n \n
\n {% endblock %}\n
\n\n\n\n" - }, - "template": { - "name": "Agent Uptime (html) v3.1", - "template_css": "", - "template_md": "{% block header_title %}

Agent Uptime Report

\n
\n Filtered: 0\n of 0\n
{% endblock %}\n\n{% block content %}\n\n\n{% set cutoff = timedelta_30_days %}\n{% set alert_events_full = [] %}\n{% for item in data_sources.allFieldsAlerts %}\n {% if item.alert_type == \"availability\"\n and item.resolved\n and item.alert_time is defined\n and item.resolved_on is defined\n and item.agent__hostname is defined\n and item.alert_time >= cutoff %}\n {% set downtime = (item.resolved_on - item.alert_time).total_seconds() / 60 %}\n {% set dt_mins = downtime | round(0, 'floor') %}\n {% set dt_days = dt_mins // 1440 %}\n {% set dt_hrs = (dt_mins % 1440) // 60 %}\n {% set dt_min = dt_mins % 60 %}\n {% set dt_str = '' %}\n {% if dt_days > 0 %}{% set dt_str = dt_str ~ dt_days ~ 'd ' %}{% endif %}\n {% if dt_hrs > 0 %}{% set dt_str = dt_str ~ dt_hrs ~ 'h ' %}{% endif %}\n {% if dt_min > 0 or (dt_days == 0 and dt_hrs == 0) %}{% set dt_str = dt_str ~ dt_min ~ 'm' %}{% endif %}\n {% set _ = alert_events_full.append({\n \"agent\": item.agent__hostname,\n \"start\": item.alert_time.isoformat(),\n \"end\": item.resolved_on.isoformat(),\n \"message\": item.message,\n \"downtime\": dt_str,\n \"downtimeNum\": dt_mins,\n \"timeOff\": item.alert_time.strftime('%Y-%m-%d %H:%M'),\n \"timeOn\": item.resolved_on.strftime('%Y-%m-%d %H:%M'),\n \"clientRaw\": (item.agent__site__client__name or 'N/A'),\n \"site\": (item.agent__site__name or 'N/A'),\n \"clientSiteHTML\": ((item.agent__site__client__name or 'N/A') ~ '
' ~ (item.agent__site__name or 'N/A') ~ '')\n }) %}\n {% endif %}\n{% endfor %}\n\n
\n

Agent Timeline (Green = Online, Red = Offline)

\n
\n\n

Downtime List

\n\n\n\n
Loading...
\n\n
\n \n \n \n
\n
\n\n\n\n\n{% endblock %}", - "type": "html", - "depends_on": [], - "template_variables": "report_run_timestamp: !now\ntimedelta_30_days: !now days=-30\ndata_sources:\n allFieldsAlerts:\n model: alert\n only:\n - agent__hostname\n - message\n - alert_time\n - resolved_on\n - alert_type\n - agent_id\n - resolved\n - agent__site__name\n - agent__site__client__name" - }, - "assets": [] -} \ No newline at end of file diff --git a/templates/Agents_Filtered by RAM (md) v3.0.json b/templates/Agents_Filtered by RAM (md) v3.0.json deleted file mode 100644 index ece7ddd..0000000 --- a/templates/Agents_Filtered by RAM (md) v3.0.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "base_template": { - "name": "TRMM_Base v3.0", - "html": "\n\n\n\n \n\n \n\n\n\n
\n
\n \"Logo\"\n
\n
\n {% block header_title %}{% endblock %}\n
\n
\n

Report Date:
{{ report_run_timestamp.strftime('%B %d, %Y') }}

\n
\n
\n \n
\n
\n {% block content %}{% endblock %}\n
\n {% block footer %}{% endblock %}\n
\n\n\n\n" - }, - "template": { - "name": "Agents_Filtered by RAM (md) v3.0", - "template_css": "@page { size: letter landscape; }\n\n/* Column widths */\ntable.vt th:nth-child(1), table.vt td:nth-child(1) { width: 160px; }\ntable.vt th:nth-child(2), table.vt td:nth-child(2) { width: 160px; }\ntable.vt th:nth-child(3), table.vt td:nth-child(3) { min-width: 180px; }\ntable.vt th:nth-child(4), table.vt td:nth-child(4) { width: 140px; }\ntable.vt th:nth-child(5), table.vt td:nth-child(5) { min-width: 200px; }\ntable.vt th:nth-child(6), table.vt td:nth-child(6) { width: 100px; text-align: center; }\ntable.vt th:nth-child(7), table.vt td:nth-child(7) { min-width: 150px; }", - "template_md": "{% block header_title %}

Low RAM Agents Report

\n
\n Filtered: 0\n of 0 agents\n
{% endblock %}\n\n{% block content %}\n
Loading...
\n\n
\n \n \n \n
\n
\n\n\n\n\n{% endblock %}", - "type": "html", - "depends_on": [], - "template_variables": "data_sources:\n agents:\n model: agent\n only:\n - hostname\n - site__name\n - site__client__name\n - last_logged_in_user\n - operating_system\n - wmi_detail\n - total_ram\n - disks\nreport_run_timestamp: !now" - }, - "assets": [] -} \ No newline at end of file diff --git a/templates/Agents_Filtered by RAM (md).json b/templates/Agents_Filtered by RAM (md).json deleted file mode 100644 index 7b5c6c0..0000000 --- a/templates/Agents_Filtered by RAM (md).json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "base_template": { - "name": "Bootstrap Base", - "html": "\n\n \n \n \n \n \n {% block content %}{% endblock %}\n {% block header %}{% endblock %}\n \n" - }, - "template": { - "name": "Agents_Filtered by RAM (md)", - "template_css": "", - "template_md": "{% block content %}\r\n

Agents Filtered by less than {{low_ram}} GB RAM

\r\n\r\n\r\n \r\n \r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n \r\n \r\n \r\n {% set filtered_agents = data_sources.agents|selectattr('total_ram', 'defined')|selectattr('total_ram', 'lt', low_ram|int)|list %}{% for item in filtered_agents %} \r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n\t\r\n \r\n \r\n {% endfor %}\r\n \r\n
Device NameUserDevice OSCPURAMHDD
{{item.hostname if item.hostname else 'N/A'}}{{item.last_logged_in_user if item.last_logged_in_user else 'N/A'}}{{item.operating_system|replace(\",\", \"\") if item.operating_system else 'N/A'}}{{item.wmi_detail.cpu[0][0].Name if item.wmi_detail and item.wmi_detail.cpu and item.wmi_detail.cpu[0][0].Name else 'N/A'}}{{item.total_ram if item.total_ram else 'N/A'}}GB{% for disk in item.disks %}{% if not loop.previtem or loop.previtem.device != disk.device %}{{disk.device}} {{disk.total}},{% endif %}{% else %}N/A,{% endfor %}
\r\n\r\n\r\n{% endblock %}", - "type": "markdown", - "depends_on": [ - "low_ram" - ], - "template_variables": "data_sources:\r\n agents:\r\n model: agent\r\n only:\r\n - hostname\r\n - last_logged_in_user\r\n - operating_system\r\n - wmi_detail\r\n - total_ram\r\n - disks" - }, - "assets": [] -} \ No newline at end of file From 021a8f896d2f9482a3b0a7910d98747248f0c89e Mon Sep 17 00:00:00 2001 From: silversword411 Date: Thu, 26 Mar 2026 18:17:03 -0400 Subject: [PATCH 6/6] Migrating to Base Template 3.1 - Agents_Pending Reboot (and fix csv naming order) - Antivirus Report - Windows 11 Compatible List_By Client --- index.json | 48 ++++++++++++------- ....json => Agents_Pending Reboot (csv).json} | 2 +- templates/Agents_Pending Reboot v3.1.json | 15 ++++++ templates/Antivirus Report v1.6.json | 15 ------ templates/Antivirus Report v3.1.json | 15 ++++++ ...Compatible List_By Client (html) v1.9.json | 17 ------- ...Compatible List_By Client (html) v3.1.json | 17 +++++++ 7 files changed, 80 insertions(+), 49 deletions(-) rename templates/{Pending Reboot_By Agent (csv).json => Agents_Pending Reboot (csv).json} (93%) create mode 100644 templates/Agents_Pending Reboot v3.1.json delete mode 100644 templates/Antivirus Report v1.6.json create mode 100644 templates/Antivirus Report v3.1.json delete mode 100644 templates/Windows 11 Compatible List_By Client (html) v1.9.json create mode 100644 templates/Windows 11 Compatible List_By Client (html) v3.1.json diff --git a/index.json b/index.json index 32d9b70..693458d 100644 --- a/index.json +++ b/index.json @@ -16,16 +16,24 @@ "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Agent%20List_By%20Client%20with%20Specs%20%28pdf%29%20v1.6.json" }, { - "name": "Agent Specs (md)", - "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Agent%20Specs%20%28md%29.json" + "name": "Agent Specs v3.2", + "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Agent%20Specs%20v3.2.json" + }, + { + "name": "Agent Status Task and Check Dashboard v1.19", + "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Agent%20Status%20Task%20and%20Check%20Dashboard%20v1.19.json" }, { "name": "Agent TRMM Install date_descending v1.6", "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Agent%20TRMM%20Install%20date_descending%20v1.6.json" }, { - "name": "Agent Uptime_By Client (html) v1.5", - "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Agent%20Uptime_By%20Client%20%28html%29%20v1.5.json" + "name": "Agent Uptime (html) v3.2", + "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Agent%20Uptime%20%28html%29%20v3.2.json" + }, + { + "name": "Agent Uptime_By Client (html) v3.2", + "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Agent%20Uptime_By%20Client%20%28html%29%20v3.2.json" }, { "name": "Agent_ListClientThenSite (csv) v1.1", @@ -40,13 +48,21 @@ "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Agents_Filtered%20by%20RAM%20%28csv%29.json" }, { - "name": "Agents_Filtered by RAM (md)", - "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Agents_Filtered%20by%20RAM%20%28md%29.json" + "name": "Agents_Filtered by RAM (md) v3.1", + "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Agents_Filtered%20by%20RAM%20%28md%29%20v3.1.json" + }, + { + "name": "Agents_Pending Reboot (csv)", + "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Agents_Pending%20Reboot%20%28csv%29.json" }, { "name": "Agents_Pending Reboot (md) v1.2", "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Agents_Pending%20Reboot%20%28md%29%20v1.2.json" }, + { + "name": "Agents_Pending Reboot v3.1", + "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Agents_Pending%20Reboot%20v3.1.json" + }, { "name": "Alerts - Interactive Dashboard (html) v1.6", "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Alerts%20-%20Interactive%20Dashboard%20%28html%29%20v1.6.json" @@ -128,8 +144,8 @@ "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/All%20Fields%20-%20Windows%20Updates.json" }, { - "name": "Antivirus Report v1.6", - "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Antivirus%20Report%20v1.6.json" + "name": "Antivirus Report v3.1", + "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Antivirus%20Report%20v3.1.json" }, { "name": "Antivirus Report_by Client (csv)", @@ -172,17 +188,13 @@ "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Machine%20Specs%20%28csv%29%20v1.1.json" }, { - "name": "NOC Dashboard v1.31", - "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/NOC%20Dashboard%20v1.31.json" + "name": "NOC Dashboard v1.32", + "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/NOC%20Dashboard%20v1.32.json" }, { "name": "OS Operating Systems Report v1.8", "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/OS%20Operating%20Systems%20Report%20v1.8.json" }, - { - "name": "Pending Reboot_By Agent (csv)", - "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Pending%20Reboot_By%20Agent%20%28csv%29.json" - }, { "name": "Software Inventory_By Software Name", "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Software%20Inventory_By%20Software%20Name.json" @@ -228,8 +240,8 @@ "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Windows%2011%20Compatible%20List_By%20Client%20%28csv%29.json" }, { - "name": "Windows 11 Compatible List_By Client (html) v1.9", - "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Windows%2011%20Compatible%20List_By%20Client%20%28html%29%20v1.9.json" + "name": "Windows 11 Compatible List_By Client (html) v3.1", + "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Windows%2011%20Compatible%20List_By%20Client%20%28html%29%20v3.1.json" }, { "name": "Windows Updates Not Installed_By Client (csv)", @@ -239,6 +251,10 @@ "name": "Windows Updates Not Installed_By Client (md)", "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Windows%20Updates%20Not%20Installed_By%20Client%20%28md%29.json" }, + { + "name": "Windows Updates Not Installed_By Client v3.1", + "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Windows%20Updates%20Not%20Installed_By%20Client%20v3.1.json" + }, { "name": "Windows Updates_By Device (csv)", "download_url": "https://raw.githubusercontent.com/amidaware/reporting-templates/master/templates/Windows%20Updates_By%20Device%20%28csv%29.json" diff --git a/templates/Pending Reboot_By Agent (csv).json b/templates/Agents_Pending Reboot (csv).json similarity index 93% rename from templates/Pending Reboot_By Agent (csv).json rename to templates/Agents_Pending Reboot (csv).json index ac084fc..80d1ae8 100644 --- a/templates/Pending Reboot_By Agent (csv).json +++ b/templates/Agents_Pending Reboot (csv).json @@ -1,7 +1,7 @@ { "base_template": null, "template": { - "name": "Pending Reboot_By Agent (csv)", + "name": "Agents_Pending Reboot (csv)", "template_css": "", "template_md": "Device Name, Needs Rebooted, Last Seen\r\n{% for item in data_sources.agentsPendingReboot %}{{item.hostname if item.hostname else 'N/A'}},{{item.needs_reboot if item.needs_reboot else 'N/A'}},{{ (item.last_seen|string)|truncate(19, False, '') if item.last_seen else 'N/A' }}\r\n{% endfor %}", "type": "plaintext", diff --git a/templates/Agents_Pending Reboot v3.1.json b/templates/Agents_Pending Reboot v3.1.json new file mode 100644 index 0000000..17f67af --- /dev/null +++ b/templates/Agents_Pending Reboot v3.1.json @@ -0,0 +1,15 @@ +{ + "base_template": { + "name": "TRMM_Base v3.1", + "html": "\n\n\n\n \n\n \n\n\n\n
\n \n
\n \"Company\n
\n
\n {% block header_title %}{% endblock %}\n
\n
\n \n
\n \n

Report Date: {{ report_run_timestamp.strftime('%B %d, %Y') }}

\n
\n
\n \n
\n
\n {% block content %}{% endblock %}\n
\n {% block footer %}\n \n
\n {% endblock %}\n
\n\n\n\n" + }, + "template": { + "name": "Agents_Pending Reboot v3.1", + "template_css": "@page { size: letter landscape; }", + "template_md": "{% block header_title %}

Agents Pending Reboot

\n

Client: All | Site: All

\n
\n Filtered: 0\n of 0 agents\n
{% endblock %}\n\n{% block content %}\n\n\n
Loading...
\n\n
\n \n \n \n
\n
\n\n\n{% endblock %}", + "type": "html", + "depends_on": [], + "template_variables": "data_sources:\n agentsPendingReboot:\n filter:\n needs_reboot: true\n limit: 1000\n model: agent\n only:\n - hostname\n - site__client__name\n - site__name\n - needs_reboot\n - last_seen\nreport_run_timestamp: !now" + }, + "assets": [] +} \ No newline at end of file diff --git a/templates/Antivirus Report v1.6.json b/templates/Antivirus Report v1.6.json deleted file mode 100644 index 4961805..0000000 --- a/templates/Antivirus Report v1.6.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "base_template": { - "name": "TRMM_Base v1.1", - "html": "\n\n\n \n\n\n\n {% block content %}{% endblock %}\n\n\n" - }, - "template": { - "name": "Antivirus Report v1.6", - "template_css": "", - "template_md": "{% block content %}\r\n\r\n\r\n
\r\n
\r\n \"Amidaware\r\n
\r\n
\r\n

Antivirus Report

\r\n

Client: All | Site: All

\r\n
\r\n Filtered Row Count: 0 of {{ data_sources.agentsList | length }}\r\n
\r\n
\r\n
\r\n

Report Date:
{{ report_run_timestamp.strftime('%B %d, %Y') }}

\r\n
\r\n
\r\n\r\n{% set clients = data_sources.agentsList | map(attribute='site__client__name') | unique | sort %}\r\n{% set sites = data_sources.agentsList | map(attribute='site__name') | unique | sort %}\r\n\r\n\r\n \r\n \r\n \r\n \r\n\r\n \r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n\r\n \r\n \r\n \r\n\r\n \r\n {% for item in data_sources.agentsList %}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {% endfor %}\r\n \r\n
\r\n
\r\n Client\r\n \r\n
\r\n \r\n
\r\n
\r\n Site\r\n \r\n
\r\n \r\n
\r\n
\r\n Device Name\r\n \r\n
\r\n
\r\n
\r\n User\r\n \r\n
\r\n \r\n
\r\n
\r\n Device OS\r\n \r\n
\r\n \r\n
\r\n
\r\n Antivirus\r\n \r\n
\r\n \r\n
{{ item.site__client__name }}{{ item.site__name }}\r\n {{ item.hostname }}
\r\n {% if item.last_seen %}\r\n 30 %}text-danger{% endif %}\" data-sort-value=\"{{ item.last_seen.isoformat() }}\">\r\n Last Seen: {{ item.last_seen.astimezone(ZoneInfo('America/New_York')).strftime('%Y-%m-%d %H:%M:%S') }}\r\n \r\n {% else %}\r\n  \r\n {% endif %}\r\n
{{ item.last_logged_in_user }}{{ item.operating_system }}\r\n {% if item.custom_fields and 'Antivirus' in item.custom_fields %}\r\n {{ item.custom_fields.Antivirus }}\r\n {% endif %}\r\n
\r\n\r\n\r\n{% endblock %}", - "type": "html", - "depends_on": [], - "template_variables": "data_sources:\n agentsList:\n custom_fields:\n - Antivirus\n model: agent\n only:\n - hostname\n - site__client__name\n - site__name\n - operating_system\n - last_seen\n - last_logged_in_user\nreport_run_timestamp: !now" - }, - "assets": [] -} \ No newline at end of file diff --git a/templates/Antivirus Report v3.1.json b/templates/Antivirus Report v3.1.json new file mode 100644 index 0000000..c6760e3 --- /dev/null +++ b/templates/Antivirus Report v3.1.json @@ -0,0 +1,15 @@ +{ + "base_template": { + "name": "TRMM_Base v3.1", + "html": "\n\n\n\n \n\n \n\n\n\n
\n \n
\n \"Company\n
\n
\n {% block header_title %}{% endblock %}\n
\n
\n \n
\n \n

Report Date: {{ report_run_timestamp.strftime('%B %d, %Y') }}

\n
\n
\n \n
\n
\n {% block content %}{% endblock %}\n
\n {% block footer %}\n \n
\n {% endblock %}\n
\n\n\n\n" + }, + "template": { + "name": "Antivirus Report v3.1", + "template_css": "@page { size: letter landscape; }", + "template_md": "{% block header_title %}

Antivirus Report

\n

Client: All | Site: All

\n
\n Filtered: 0\n of 0 agents\n
{% endblock %}\n\n{% block content %}\n\n\n
Loading...
\n\n
\n \n \n \n
\n
\n\n\n{% endblock %}", + "type": "html", + "depends_on": [], + "template_variables": "data_sources:\n agentsList:\n custom_fields:\n - Antivirus\n model: agent\n only:\n - hostname\n - site__client__name\n - site__name\n - operating_system\n - last_seen\n - last_logged_in_user\nreport_run_timestamp: !now" + }, + "assets": [] +} \ No newline at end of file diff --git a/templates/Windows 11 Compatible List_By Client (html) v1.9.json b/templates/Windows 11 Compatible List_By Client (html) v1.9.json deleted file mode 100644 index 0c03923..0000000 --- a/templates/Windows 11 Compatible List_By Client (html) v1.9.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "base_template": { - "name": "TRMM_Base v1", - "html": "\n\n\n \n\n\n\n {% block content %}{% endblock %}\n\n\n" - }, - "template": { - "name": "Windows 11 Compatible List_By Client (html) v1.9", - "template_css": "", - "template_md": "{% block content %}\r\n\r\n
\r\n
\r\n \"Amidaware\r\n
\r\n
\r\n

Windows 11 Compatibility Report

\r\n

Client: {{ client.name }}

\r\n
\r\n
\r\n

Report Date:
{{ report_run_timestamp.strftime('%B %d, %Y') }}

\r\n
\r\n
\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {% set not_ready_devices, ready_devices, already_devices, na_devices = [], [], [], [] %}\r\n {% for device in data_sources.agentsList %}\r\n {% if device.plat and device.plat|lower == \"windows\" %}\r\n {% if 'server' in device.operating_system|lower %}\r\n {% set _ = na_devices.append(device) %}\r\n {% elif device.custom_fields.Windows11Comp %}\r\n {% if device.custom_fields.Windows11Comp == \"Windows 11 Ready\" %}\r\n {% set _ = ready_devices.append(device) %}\r\n {% elif device.custom_fields.Windows11Comp == \"Already Windows 11\" %}\r\n {% set _ = already_devices.append(device) %}\r\n {% else %}\r\n {% set _ = not_ready_devices.append(device) %}\r\n {% endif %}\r\n {% else %}\r\n {% set _ = not_ready_devices.append(device) %}\r\n {% endif %}\r\n {% endif %}\r\n {% endfor %}\r\n {% set sorted_devices = (na_devices | sort(attribute='hostname') | sort(attribute='site__name')) +\r\n (not_ready_devices | sort(attribute='hostname') | sort(attribute='site__name')) +\r\n (ready_devices | sort(attribute='hostname') | sort(attribute='site__name')) +\r\n (already_devices | sort(attribute='hostname') | sort(attribute='site__name')) %}\r\n\r\n {% for device in sorted_devices %}\r\n {% set row_class = 'status-unknown' %}\r\n {% set badge_class = 'badge-unknown' %}\r\n {% set status_text = 'Update custom_field' %}\r\n\r\n {% if 'server' in device.operating_system|lower %}\r\n {% set status_text = 'N/A' %}\r\n {% elif device.custom_fields.Windows11Comp %}\r\n {% if device.custom_fields.Windows11Comp == \"Windows 11 Ready\" %}\r\n {% set row_class = 'status-ready' %}\r\n {% set badge_class = 'badge-ready' %}\r\n {% set status_text = 'Ready' %}\r\n {% elif device.custom_fields.Windows11Comp == \"Already Windows 11\" %}\r\n {% set row_class = 'status-ready' %}\r\n {% set badge_class = 'badge-already' %}\r\n {% set status_text = 'Already Windows 11' %}\r\n {% else %}\r\n {% set row_class = 'status-not-ready' %}\r\n {% set badge_class = 'badge-not-ready' %}\r\n {% set status_text = 'Not Ready - ' ~ device.custom_fields.Windows11Comp %}\r\n {% endif %}\r\n {% endif %}\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {% endfor %}\r\n \r\n
ClientSiteDevice NameUserOperating SystemWindows 11 Compatibility
{{ device.site__client__name or 'N/A' }}{{ device.site__name or 'N/A' }}\r\n {{ device.hostname or 'N/A' }}
\r\n {% if device.last_seen %}\r\n 30 %} class=\"text-danger\" {% endif %}>\r\n Last Seen: {{ device.last_seen.astimezone(ZoneInfo('America/New_York')).strftime('%Y-%m-%d %H:%M:%S') }}\r\n \r\n {% else %}\r\n N/A\r\n {% endif %}\r\n
{{ device.last_logged_in_user or 'N/A' }}{{ device.operating_system or 'N/A' }}\r\n {{ status_text }}\r\n
\r\n
\r\n{% endblock %}", - "type": "html", - "depends_on": [ - "client" - ], - "template_variables": "data_sources:\r\n agentsList:\r\n custom_fields:\r\n - Windows11Comp\r\n filter:\r\n site__client_id: '{{client.id}}'\r\n model: agent\r\n only:\r\n - hostname\r\n - last_logged_in_user\r\n - site__client__name\r\n - site__name\r\n - operating_system\r\n - last_seen\r\n - plat\r\nreport_run_timestamp: !now" - }, - "assets": [] -} \ No newline at end of file diff --git a/templates/Windows 11 Compatible List_By Client (html) v3.1.json b/templates/Windows 11 Compatible List_By Client (html) v3.1.json new file mode 100644 index 0000000..11e26b1 --- /dev/null +++ b/templates/Windows 11 Compatible List_By Client (html) v3.1.json @@ -0,0 +1,17 @@ +{ + "base_template": { + "name": "TRMM_Base v3.1", + "html": "\n\n\n\n \n\n \n\n\n\n
\n \n
\n \"Company\n
\n
\n {% block header_title %}{% endblock %}\n
\n
\n \n
\n \n

Report Date: {{ report_run_timestamp.strftime('%B %d, %Y') }}

\n
\n
\n \n
\n
\n {% block content %}{% endblock %}\n
\n {% block footer %}\n \n
\n {% endblock %}\n
\n\n\n\n" + }, + "template": { + "name": "Windows 11 Compatible List_By Client (html) v3.1", + "template_css": "@page { size: letter landscape; }", + "template_md": "{% block header_title %}

Windows 11 Compatibility Report

\n

{{ client.name }}

\n
\n Filtered: 0\n of 0 devices\n
{% endblock %}\n\n{% block content %}\n\n\n\n\n
Loading...
\n\n
\n \n \n \n
\n
\n\n\n{% endblock %}", + "type": "html", + "depends_on": [ + "client" + ], + "template_variables": "data_sources:\n agentsList:\n custom_fields:\n - Windows11Comp\n filter:\n site__client_id: '{{client.id}}'\n model: agent\n only:\n - hostname\n - last_logged_in_user\n - site__client__name\n - site__name\n - operating_system\n - last_seen\n - plat\nreport_run_timestamp: !now" + }, + "assets": [] +} \ No newline at end of file