From 22a1059e7b0dfe1eea8532ddf31146947188b7c1 Mon Sep 17 00:00:00 2001 From: openhands Date: Fri, 14 Nov 2025 12:56:00 +0000 Subject: [PATCH] Fix Protocol Mappings tab layout overflow and remove (Simplified) text --- src/dashboard/templates.py | 117 ++++++++++++++++++++++++++++++------- 1 file changed, 96 insertions(+), 21 deletions(-) diff --git a/src/dashboard/templates.py b/src/dashboard/templates.py index 5da2c16..3925be0 100644 --- a/src/dashboard/templates.py +++ b/src/dashboard/templates.py @@ -310,6 +310,80 @@ DASHBOARD_HTML = """ color: #856404; border: 1px solid #ffeaa7; } + + /* Table Layout Fixes for Protocol Mappings */ + .protocol-mappings-table-container { + overflow-x: auto; + margin-top: 20px; + } + + #protocol-mappings-table { + table-layout: fixed; + width: 100%; + min-width: 800px; + } + + #protocol-mappings-table th, + #protocol-mappings-table td { + padding: 8px 10px; + border: 1px solid #ddd; + text-align: left; + word-wrap: break-word; + overflow-wrap: break-word; + } + + #protocol-mappings-table th:nth-child(1) { width: 10%; min-width: 80px; } /* ID */ + #protocol-mappings-table th:nth-child(2) { width: 8%; min-width: 80px; } /* Protocol */ + #protocol-mappings-table th:nth-child(3) { width: 15%; min-width: 120px; } /* Station */ + #protocol-mappings-table th:nth-child(4) { width: 15%; min-width: 120px; } /* Equipment */ + #protocol-mappings-table th:nth-child(5) { width: 15%; min-width: 120px; } /* Data Type */ + #protocol-mappings-table th:nth-child(6) { width: 12%; min-width: 100px; } /* Protocol Address */ + #protocol-mappings-table th:nth-child(7) { width: 15%; min-width: 120px; } /* Database Source */ + #protocol-mappings-table th:nth-child(8) { width: 10%; min-width: 100px; } /* Actions */ + + /* Protocol Signals Table */ + .protocol-signals-table-container { + overflow-x: auto; + margin-top: 20px; + } + + #protocol-signals-table { + table-layout: fixed; + width: 100%; + min-width: 700px; + } + + #protocol-signals-table th, + #protocol-signals-table td { + padding: 8px 10px; + border: 1px solid #ddd; + text-align: left; + word-wrap: break-word; + overflow-wrap: break-word; + } + + #protocol-signals-table th:nth-child(1) { width: 20%; min-width: 120px; } /* Signal Name */ + #protocol-signals-table th:nth-child(2) { width: 12%; min-width: 100px; } /* Protocol Type */ + #protocol-signals-table th:nth-child(3) { width: 20%; min-width: 150px; } /* Tags */ + #protocol-signals-table th:nth-child(4) { width: 15%; min-width: 100px; } /* Protocol Address */ + #protocol-signals-table th:nth-child(5) { width: 18%; min-width: 120px; } /* Database Source */ + #protocol-signals-table th:nth-child(6) { width: 8%; min-width: 80px; } /* Status */ + #protocol-signals-table th:nth-child(7) { width: 7%; min-width: 100px; } /* Actions */ + + /* Mobile responsiveness */ + @media (max-width: 768px) { + .protocol-mappings-table-container, + .protocol-signals-table-container { + font-size: 14px; + } + + #protocol-mappings-table th, + #protocol-mappings-table td, + #protocol-signals-table th, + #protocol-signals-table td { + padding: 6px 8px; + } + } @@ -638,18 +712,18 @@ DASHBOARD_HTML = """ -
- +
+
- - - - - - - - + + + + + + + + @@ -659,22 +733,22 @@ DASHBOARD_HTML = """ - +
-

Protocol Signals (Simplified)

+

Protocol Signals

Signals discovered through protocol discovery will appear here

-
-
IDProtocolStation (Name & ID)Equipment (Name & ID)Data Type (Name & ID)Protocol AddressDatabase SourceActionsIDProtocolStation (Name & ID)Equipment (Name & ID)Data Type (Name & ID)Protocol AddressDatabase SourceActions
+
+
- - - - - - - + + + + + + + @@ -827,6 +901,7 @@ DASHBOARD_HTML = """ + """ \ No newline at end of file
Signal NameProtocol TypeTagsProtocol AddressDatabase SourceStatusActionsSignal NameProtocol TypeTagsProtocol AddressDatabase SourceStatusActions