Fix Protocol Mappings tab layout overflow and remove (Simplified) text
This commit is contained in:
parent
f935ad065c
commit
22a1059e7b
|
|
@ -310,6 +310,80 @@ DASHBOARD_HTML = """
|
||||||
color: #856404;
|
color: #856404;
|
||||||
border: 1px solid #ffeaa7;
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
@ -638,18 +712,18 @@ DASHBOARD_HTML = """
|
||||||
<button onclick="exportProtocolMappings()">Export to CSV</button>
|
<button onclick="exportProtocolMappings()">Export to CSV</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="margin-top: 20px;">
|
<div class="protocol-mappings-table-container">
|
||||||
<table style="width: 100%; border-collapse: collapse;" id="protocol-mappings-table">
|
<table id="protocol-mappings-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr style="background: #f8f9fa;">
|
<tr style="background: #f8f9fa;">
|
||||||
<th style="padding: 10px; border: 1px solid #ddd; text-align: left;">ID</th>
|
<th>ID</th>
|
||||||
<th style="padding: 10px; border: 1px solid #ddd; text-align: left;">Protocol</th>
|
<th>Protocol</th>
|
||||||
<th style="padding: 10px; border: 1px solid #ddd; text-align: left;">Station (Name & ID)</th>
|
<th>Station (Name & ID)</th>
|
||||||
<th style="padding: 10px; border: 1px solid #ddd; text-align: left;">Equipment (Name & ID)</th>
|
<th>Equipment (Name & ID)</th>
|
||||||
<th style="padding: 10px; border: 1px solid #ddd; text-align: left;">Data Type (Name & ID)</th>
|
<th>Data Type (Name & ID)</th>
|
||||||
<th style="padding: 10px; border: 1px solid #ddd; text-align: left;">Protocol Address</th>
|
<th>Protocol Address</th>
|
||||||
<th style="padding: 10px; border: 1px solid #ddd; text-align: left;">Database Source</th>
|
<th>Database Source</th>
|
||||||
<th style="padding: 10px; border: 1px solid #ddd; text-align: left;">Actions</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="protocol-mappings-body">
|
<tbody id="protocol-mappings-body">
|
||||||
|
|
@ -659,22 +733,22 @@ DASHBOARD_HTML = """
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Simplified Protocol Signals Table (for discovery integration) -->
|
<!-- Protocol Signals Table (for discovery integration) -->
|
||||||
<div class="config-section">
|
<div class="config-section">
|
||||||
<h3>Protocol Signals (Simplified)</h3>
|
<h3>Protocol Signals</h3>
|
||||||
<p>Signals discovered through protocol discovery will appear here</p>
|
<p>Signals discovered through protocol discovery will appear here</p>
|
||||||
|
|
||||||
<div style="margin-top: 20px;">
|
<div class="protocol-signals-table-container">
|
||||||
<table style="width: 100%; border-collapse: collapse;" id="protocol-signals-table">
|
<table id="protocol-signals-table">
|
||||||
<thead>
|
<thead>
|
||||||
<tr style="background: #f8f9fa;">
|
<tr style="background: #f8f9fa;">
|
||||||
<th style="padding: 10px; border: 1px solid #ddd; text-align: left;">Signal Name</th>
|
<th>Signal Name</th>
|
||||||
<th style="padding: 10px; border: 1px solid #ddd; text-align: left;">Protocol Type</th>
|
<th>Protocol Type</th>
|
||||||
<th style="padding: 10px; border: 1px solid #ddd; text-align: left;">Tags</th>
|
<th>Tags</th>
|
||||||
<th style="padding: 10px; border: 1px solid #ddd; text-align: left;">Protocol Address</th>
|
<th>Protocol Address</th>
|
||||||
<th style="padding: 10px; border: 1px solid #ddd; text-align: left;">Database Source</th>
|
<th>Database Source</th>
|
||||||
<th style="padding: 10px; border: 1px solid #ddd; text-align: left;">Status</th>
|
<th>Status</th>
|
||||||
<th style="padding: 10px; border: 1px solid #ddd; text-align: left;">Actions</th>
|
<th>Actions</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody id="protocol-signals-body">
|
<tbody id="protocol-signals-body">
|
||||||
|
|
@ -827,6 +901,7 @@ DASHBOARD_HTML = """
|
||||||
<script src="/static/protocol_mapping.js"></script>
|
<script src="/static/protocol_mapping.js"></script>
|
||||||
<script src="/static/simplified_protocol_mapping.js"></script>
|
<script src="/static/simplified_protocol_mapping.js"></script>
|
||||||
<script src="/static/discovery.js"></script>
|
<script src="/static/discovery.js"></script>
|
||||||
|
<script src="/static/simplified_discovery.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
"""
|
"""
|
||||||
Loading…
Reference in New Issue