From 16f101d0fc0f46aa944f6278f5554312ae8b6f54 Mon Sep 17 00:00:00 2001 From: wcollins Date: Fri, 5 Sep 2025 10:19:54 -0400 Subject: [PATCH 1/6] Add logo headers --- .../torero_ui/static/css/dashboard.css | 27 ++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/opt/torero-ui/torero_ui/static/css/dashboard.css b/opt/torero-ui/torero_ui/static/css/dashboard.css index 7b1ba2d..61b7267 100644 --- a/opt/torero-ui/torero_ui/static/css/dashboard.css +++ b/opt/torero-ui/torero_ui/static/css/dashboard.css @@ -145,11 +145,24 @@ body { transform: translateY(-2px); } +.service-header { + display: flex; + align-items: center; + margin-bottom: 10px; +} + +.service-logo { + width: 24px; + height: 24px; + margin-right: 10px; + flex-shrink: 0; +} + .service-name { color: #ccff00; font-size: 18px; - margin-bottom: 10px; font-weight: bold; + flex-grow: 1; } .status-info { @@ -251,6 +264,18 @@ body { margin-bottom: 8px; } +.execution-service-with-logo { + display: flex; + align-items: center; +} + +.execution-logo { + width: 20px; + height: 20px; + margin-right: 8px; + flex-shrink: 0; +} + .execution-service { color: #ccff00; font-weight: bold; From a440d33c93b6610bf874ec388c9a0ca56497dc09 Mon Sep 17 00:00:00 2001 From: wcollins Date: Fri, 5 Sep 2025 10:20:06 -0400 Subject: [PATCH 2/6] Add ansible.svg --- opt/torero-ui/torero_ui/static/img/ansible.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 opt/torero-ui/torero_ui/static/img/ansible.svg diff --git a/opt/torero-ui/torero_ui/static/img/ansible.svg b/opt/torero-ui/torero_ui/static/img/ansible.svg new file mode 100644 index 0000000..0b0b51e --- /dev/null +++ b/opt/torero-ui/torero_ui/static/img/ansible.svg @@ -0,0 +1 @@ + \ No newline at end of file From 208a585746a1b8e8188a0dbaef84ec439794fde7 Mon Sep 17 00:00:00 2001 From: wcollins Date: Fri, 5 Sep 2025 10:20:13 -0400 Subject: [PATCH 3/6] Add opentofu.svg --- opt/torero-ui/torero_ui/static/img/opentofu.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 opt/torero-ui/torero_ui/static/img/opentofu.svg diff --git a/opt/torero-ui/torero_ui/static/img/opentofu.svg b/opt/torero-ui/torero_ui/static/img/opentofu.svg new file mode 100644 index 0000000..ca71ade --- /dev/null +++ b/opt/torero-ui/torero_ui/static/img/opentofu.svg @@ -0,0 +1 @@ + \ No newline at end of file From 6d239d03ac231ac57ef30827f81796b53cff5d8f Mon Sep 17 00:00:00 2001 From: wcollins Date: Fri, 5 Sep 2025 10:20:20 -0400 Subject: [PATCH 4/6] Add python.svg --- opt/torero-ui/torero_ui/static/img/python.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 opt/torero-ui/torero_ui/static/img/python.svg diff --git a/opt/torero-ui/torero_ui/static/img/python.svg b/opt/torero-ui/torero_ui/static/img/python.svg new file mode 100644 index 0000000..1c2739b --- /dev/null +++ b/opt/torero-ui/torero_ui/static/img/python.svg @@ -0,0 +1 @@ + \ No newline at end of file From ec87e9f5262c20f6790568bd0fd8f4d02f32749f Mon Sep 17 00:00:00 2001 From: wcollins Date: Fri, 5 Sep 2025 10:20:41 -0400 Subject: [PATCH 5/6] Infer logo based on service type --- .../torero_ui/static/js/dashboard.js | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/opt/torero-ui/torero_ui/static/js/dashboard.js b/opt/torero-ui/torero_ui/static/js/dashboard.js index be3c5db..5e99a65 100644 --- a/opt/torero-ui/torero_ui/static/js/dashboard.js +++ b/opt/torero-ui/torero_ui/static/js/dashboard.js @@ -144,12 +144,25 @@ function updateServiceStatus(services) { const statusClass = service.latest_status ? `status-${service.latest_status}` : 'status-value'; const statusText = service.latest_status ? service.latest_status.toUpperCase() : 'NEVER RUN'; + // Determine logo based on service type + let logoHtml = ''; + if (service.service_type === 'ansible-playbook') { + logoHtml = ''; + } else if (service.service_type === 'opentofu-plan') { + logoHtml = ''; + } else if (service.service_type === 'python-script') { + logoHtml = ''; + } + const card = document.createElement('div'); card.className = 'status-card'; card.dataset.service = service.name; card.innerHTML = ` -
${service.name}
+
+ ${logoHtml} +
${service.name}
+
Type: ${service.service_type} @@ -210,9 +223,22 @@ function updateExecutionList(listId, executions) { minute: '2-digit' }); + // Determine logo based on service type + let logoHtml = ''; + if (execution.service_type === 'ansible-playbook') { + logoHtml = ''; + } else if (execution.service_type === 'opentofu-plan') { + logoHtml = ''; + } else if (execution.service_type === 'python-script') { + logoHtml = ''; + } + item.innerHTML = `
- ${execution.service_name} + ${execution.status.toUpperCase()}
From e9c5592c8e1de27f829dce2dbf6f904df1fb86d4 Mon Sep 17 00:00:00 2001 From: wcollins Date: Fri, 5 Sep 2025 10:20:58 -0400 Subject: [PATCH 6/6] Update index.html --- .../torero_ui/templates/dashboard/index.html | 45 +++++++++++++++++-- 1 file changed, 41 insertions(+), 4 deletions(-) diff --git a/opt/torero-ui/torero_ui/templates/dashboard/index.html b/opt/torero-ui/torero_ui/templates/dashboard/index.html index fe0ced0..ffa62bf 100644 --- a/opt/torero-ui/torero_ui/templates/dashboard/index.html +++ b/opt/torero-ui/torero_ui/templates/dashboard/index.html @@ -1,4 +1,5 @@ {% extends "dashboard/base.html" %} +{% load static %} {% block content %} @@ -36,7 +37,16 @@
{% for service in services %}
-
{{ service.name }}
+
+ {% if service.service_type == "ansible-playbook" %} + + {% elif service.service_type == "opentofu-plan" %} + + {% elif service.service_type == "python-script" %} + + {% endif %} +
{{ service.name }}
+
Type: {{ service.service_type }} @@ -76,7 +86,16 @@ {% for execution in recent_executions %}
  • - {{ execution.service_name }} + {{ execution.status|upper }}
    @@ -101,7 +120,16 @@ {% if execution.status == 'success' %}
  • - {{ execution.service_name }} + SUCCESS
    @@ -127,7 +155,16 @@ {% if execution.status == 'failed' %}
  • - {{ execution.service_name }} + FAILED