Skip to content

Commit

Permalink
update to the page and tables and filters
Browse files Browse the repository at this point in the history
  • Loading branch information
mildrette committed Jul 18, 2024
1 parent 1e9a33e commit 6db427a
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions src/Pages/OpenTelemetry.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,35 +307,37 @@ const OpenTelemetry = () => {
</Grid>

{/* Data Table */}

<Grid item xs={6}>
<TableContainer sx={{ minWidth: 650 }} aria-label="country table">
<TableHead>
<TableRow>
<TableCell>COUNTRY</TableCell>
<TableCell>USERS</TableCell>
<TableCell>PERCENTAGE</TableCell>
</TableRow>
</TableHead>
<TableBody>
{data && data.countries && data.countries.length > 0 ? (
data.countries.map((country, index) => (
<TableRow key={index}>
<TableCell>{country[0]}</TableCell>
<TableCell>{country[2]}</TableCell>
<TableCell>{((country[2] / totalUsers) * 100).toFixed(2)}%</TableCell>
</TableRow>
))
) : (
<TableContainer component={Paper} sx={{ maxHeight: 400, marginTop: 3 }}>
<Table>
<TableHead>
<TableRow>
<TableCell colSpan={3} align="center">
No data available
</TableCell>
<TableCell>COUNTRY</TableCell>
<TableCell>USERS</TableCell>
<TableCell>PERCENTAGE</TableCell>
</TableRow>
)}
</TableBody>
</TableHead>
<TableBody>
{data && data.countries && data.countries.length > 0 ? (
data.countries.map((country, index) => (
<TableRow key={index}>
<TableCell>{country[0]}</TableCell>
<TableCell>{country[2]}</TableCell>
<TableCell>{((country[2] / totalUsers) * 100).toFixed(2)}%</TableCell>
</TableRow>
))
) : (
<TableRow>
<TableCell colSpan={3} align="center">
No data available
</TableCell>
</TableRow>
)}
</TableBody>
</Table>
</TableContainer>
</Grid>
<Grid item xs={6}></Grid>
</Box>
</Grid>
</Grid>
Expand Down

0 comments on commit 6db427a

Please sign in to comment.