Added ban stats on frontpage
This commit is contained in:
parent
889d2c40e4
commit
814aef4bbe
@ -35,7 +35,8 @@ data class Statistics(
|
|||||||
val total_users: Int,
|
val total_users: Int,
|
||||||
val total_scores: Int,
|
val total_scores: Int,
|
||||||
val total_replay_scores: Int,
|
val total_replay_scores: Int,
|
||||||
val total_replay_similarity: Int
|
val total_replay_similarity: Int,
|
||||||
|
val total_bans: Int,
|
||||||
)
|
)
|
||||||
|
|
||||||
data class SuspiciousScoreEntry(
|
data class SuspiciousScoreEntry(
|
||||||
|
|||||||
@ -17,7 +17,8 @@ class StatisticsService(private val dslContext: DSLContext) {
|
|||||||
dslContext.fetchCount(USERS),
|
dslContext.fetchCount(USERS),
|
||||||
dslContext.fetchCount(SCORES),
|
dslContext.fetchCount(SCORES),
|
||||||
dslContext.fetchCount(SCORES, SCORES.REPLAY.isNotNull),
|
dslContext.fetchCount(SCORES, SCORES.REPLAY.isNotNull),
|
||||||
dslContext.fetchCount(SCORES_SIMILARITY)
|
dslContext.fetchCount(SCORES_SIMILARITY),
|
||||||
|
dslContext.fetchCount(USERS, USERS.IS_BANNED.eq(true))
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,8 @@
|
|||||||
<div class="main term text-center statistics">
|
<div class="main term text-center statistics">
|
||||||
Players: {{ this.statistics?.total_users | number }} | Beatmaps: {{ this.statistics?.total_beatmaps | number }} | Scores: {{ this.statistics?.total_scores | number }}
|
Players: {{ this.statistics?.total_users | number }} | Beatmaps: {{ this.statistics?.total_beatmaps | number }} | Scores: {{ this.statistics?.total_scores | number }}
|
||||||
|
<ng-container *ngIf="this.statistics?.total_bans">
|
||||||
|
| <a [routerLink]="['/banlist']">Bans: {{ this.statistics?.total_bans | number }}</a>
|
||||||
|
</ng-container>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="main container">
|
<div class="main container">
|
||||||
|
|||||||
@ -16,6 +16,7 @@ interface Statistics {
|
|||||||
total_scores: number;
|
total_scores: number;
|
||||||
total_replay_scores: number;
|
total_replay_scores: number;
|
||||||
total_replay_similarity: number;
|
total_replay_similarity: number;
|
||||||
|
total_bans: number;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface AnalyzeReplayResponse {
|
interface AnalyzeReplayResponse {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user