Skip to content

Commit

Permalink
Merge pull request #248 from chxash/master
Browse files Browse the repository at this point in the history
Add total number of token holders
  • Loading branch information
sparrowDom authored Nov 21, 2022
2 parents 2b16b3a + 72b892e commit 1626e92
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
21 changes: 21 additions & 0 deletions eagleproject/core/templates/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,10 @@
font-size: 1.8rem;
}

.floating-stat.larger {
width: 200px;
}

.floating-stat .label {
color: var(--dark-blue-grey);
font-size: 0.875rem;
Expand Down Expand Up @@ -300,6 +304,14 @@
.logs .filters a {
margin-left: 20px;
}
.hide-dune-title {
position: absolute;
top: 8px;
left: 286px;
min-width: 120px;
min-height: 30px;
background-color: #FAFBFC;
}
}
</style>

Expand Down Expand Up @@ -414,6 +426,15 @@
<div class="iframe-holder">
<iframe src="https://dune.xyz/embeds/412267/786810/c0746688-f5a3-450e-b7ae-f6d7f86dec58" width="100%" height="300" style="border:1px solid #999999; border-radius: 10px; margin-bottom: 20px;">
</iframe>
<div class="floating-stat d-flex flex-column align-items-center">
<div class="label">
Total amount of current token holders
</div>
<div class="no-wrap">
{{token_holder_amount|floatformat:0}}
</div>
</div>
<div class="hide-dune-title"></div>
</div>
<div class="iframe-holder">
<iframe src="https://dune.xyz/embeds/415779/792793/c522b4f5-65e4-467b-ae8c-2aec9cc5e5af" width="100%" height="300" style="border:1px solid #999999; border-radius: 10px; margin-bottom: 20px;">
Expand Down
5 changes: 5 additions & 0 deletions eagleproject/core/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ def dashboard(request):
if topic:
logs_q = logs_q.filter(topic_0=topic)
latest_logs = logs_q[:100]
weekly_reports = AnalyticsReport.objects.filter(
week__isnull=False
).order_by("-year", "-week")
if (len(weekly_reports) > 0):
token_holder_amount = weekly_reports[0].accounts_holding_ousd

filters = [
{
Expand Down

0 comments on commit 1626e92

Please sign in to comment.