-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add sample/user/cell counters to deployment about page (#383)
* Add `info/stats` endpoint for counters * Add basic entry counts table on About page * Iterate on statistics table in about page
- Loading branch information
Showing
5 changed files
with
114 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<template> | ||
<div v-if="counts" class="mx-auto"> | ||
<table> | ||
<tr> | ||
<td :style="{ color: itemTypes['users'].navbarColor }">{{ counts["users"] }}</td> | ||
<td :style="{ color: itemTypes['samples'].navbarColor }">{{ counts["samples"] }}</td> | ||
<td :style="{ color: itemTypes['cells'].navbarColor }">{{ counts["cells"] }}</td> | ||
</tr> | ||
<tr> | ||
<th>Active Users</th> | ||
<th>Samples</th> | ||
<th>Cells</th> | ||
</tr> | ||
</table> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { getStats } from "@/server_fetch_utils.js"; | ||
import { itemTypes } from "@/resources.js"; | ||
export default { | ||
data() { | ||
return { | ||
counts: null, | ||
itemTypes: itemTypes, | ||
}; | ||
}, | ||
async mounted() { | ||
console.log(this.counts); | ||
this.counts = await getStats(); | ||
console.log(this.counts); | ||
}, | ||
}; | ||
</script> | ||
|
||
<style scoped> | ||
table { | ||
margin-left: auto; | ||
margin-right: auto; | ||
margin-top: 20px; | ||
margin-bottom: 20px; | ||
} | ||
td, | ||
th { | ||
width: 150px; | ||
text-align: center; | ||
margin-left: auto; | ||
margin-right: auto; | ||
font-weight: bold; | ||
} | ||
th { | ||
font-weight: normal; | ||
border-right: 1px solid #ddd; | ||
border-left: 1px solid #ddd; | ||
border-bottom: 1px solid #ddd; | ||
} | ||
td { | ||
border-top: 1px solid #ddd; | ||
font-size: 2em; | ||
border-right: 1px solid #ddd; | ||
border-left: 1px solid #ddd; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters