Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -498,6 +498,42 @@ const ProviderDashboard = () => {
</div>

<div className="chart-widget all-metrics-widget">
<h3>All Metrics</h3>
{allMetrics && Object.keys(allMetrics).length > 0 ? (
<div className="scrollable-table">
<table>
<thead>
<tr>
<th>ID</th>
<th>Voltage</th>
<th>Current</th>
<th>Power</th>
<th>Energy</th>
<th>Timestamp</th>
</tr>
</thead>
<tbody>
{allMetrics.map((metric) => (
<tr key={metric.id}>
<td>{metric.id}</td>
<td>{metric.voltage}</td>
<td>{metric.current}</td>
<td>{metric.power}</td>
<td>{metric.energy}</td>
<td>
{new Date(metric.created_at).toLocaleString()}
</td>
</tr>
))}
</tbody>
</table>
</div>
) : (
<p>No detailed metrics data available.</p>
)}
</div>

{/* <div className="chart-widget all-metrics-widget">
<h3>All Metrics</h3>
{allMetrics && Object.keys(allMetrics).length > 0 ? (
<table>
Expand Down Expand Up @@ -527,7 +563,7 @@ const ProviderDashboard = () => {
) : (
<p>No detailed metrics data available.</p>
)}
</div>
</div> */}
</div>
)}
</div>
Expand Down
23 changes: 23 additions & 0 deletions amp-client/src/Pages/ProviderPages/ProviderDashboard/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,29 @@
max-height: 450px;
}

.chart-widget.all-metrics-widget {
max-height: 450px;
overflow: hidden;
}

.scrollable-table {
max-height: 450px;
overflow-y: auto;
border: 1px solid #ccc;
}

.scrollable-table table {
width: 100%;
border-collapse: collapse;
}

.scrollable-table th,
.scrollable-table td {
padding: 8px;
text-align: left;
border-bottom: 1px solid #eee;
}

.metric-card {
flex: 1;
min-width: 150px;
Expand Down
Loading