mirror of
https://github.com/Prowlarr/Prowlarr.git
synced 2025-09-17 17:14:18 +02:00
Grab Stats
This commit is contained in:
@@ -30,6 +30,21 @@ function getTotalRequestsData(indexerStats) {
|
||||
return data;
|
||||
}
|
||||
|
||||
function getNumberGrabsData(indexerStats) {
|
||||
const data = indexerStats.map((indexer) => {
|
||||
return {
|
||||
label: indexer.indexerName,
|
||||
value: indexer.numberOfGrabs
|
||||
};
|
||||
});
|
||||
|
||||
data.sort((a, b) => {
|
||||
return b.value - a.value;
|
||||
});
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
function Stats(props) {
|
||||
const {
|
||||
items,
|
||||
@@ -70,6 +85,12 @@ function Stats(props) {
|
||||
title='Total Indexer Queries'
|
||||
/>
|
||||
</div>
|
||||
<div className={styles.halfWidthChart}>
|
||||
<BarChart
|
||||
data={getNumberGrabsData(items)}
|
||||
title='Total Indexer Grabs'
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</PageContent>
|
||||
|
Reference in New Issue
Block a user