Skip to content

Commit

Permalink
#21 Styleing the table
Browse files Browse the repository at this point in the history
  • Loading branch information
baardl committed Nov 12, 2023
1 parent 25d3160 commit 2749602
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 14 deletions.
17 changes: 17 additions & 0 deletions src/main/resources/static/styles/cssandjs/systemStatus.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,23 @@
.error {
background-color: #f99;
}
/* Table styles */
table {
border-collapse: collapse;
width: 100%;
}

th, td {
text-align: left;
padding: 8px;
}

tr:nth-child(even){background-color: #f2f2f2}

th {
background-color: #04AA6D;
color: white;
}

/* Additional styles for positioning and visual separation */
.component-group {
Expand Down
38 changes: 24 additions & 14 deletions src/main/resources/templates/RepositoryStatus.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8">
<title>Application Status</title>
<!-- Include any CSS or JS here -->
<style th:insert="~{../static/styles/cssandjs/main.css}"></style>
<style th:insert="~{../static/styles/cssandjs/systemStatus.css}"></style>
</head>
<body>

Expand All @@ -13,22 +13,32 @@ <h1>Repository Status</h1>
<div>
<h2 th:text="${count} + ' Sensors'"/>
<table style="border: solid 1px black;">
<thead>
<tr>
<th>SensorId</th><th>TrendId</th><th>Type</th>
</tr>
</thead>
<th:block th:each="sensorDetail : ${sensorList}">
<!-- <tr th:each="e : ${map}">-->
<!-- <thead>-->
<!-- <tr>-->
<!-- <th>Key</th>-->
<!-- <th>Value</th>-->
<!-- </tr>-->
<!-- </thead>-->
<!-- <tbody>-->

<tr th:each="property: ${sensorDetail}">
<td th:text="${property.key}"/>
<td th:text="${property.value}"/>
<tr>
<td th:text="${sensorDetail.sensorId}"/>
<td th:text="${sensorDetail.trendId}"/>
<td th:text="${sensorDetail.type}"/>
</tr>
</th:block>
</table>
<h3>Details</h3>
<table>
<thead>
<tr>
<th>Key</th><th>Value</th>
</tr>
</thead>
<th:block th:each="sensorDetail : ${sensorList}">
<tr th:each="property: ${sensorDetail}">
<td th:text="${property.key}"/>
<td th:text="${property.value}"/>
</tr>
</th:block>
<!-- </tbody>-->
</table>
</div>

Expand Down

0 comments on commit 2749602

Please sign in to comment.