Added last scrape date to stats page.

This commit is contained in:
DebaucheryLibrarian
2021-02-10 04:20:58 +01:00
parent b6022a3e90
commit 23335f8bd9
2 changed files with 28 additions and 2 deletions

View File

@@ -167,7 +167,17 @@ function initUiActions(_store, _router) {
channels,
} = await graphql(`
query Stats {
scenes: releasesConnection { totalCount }
scenes: releasesConnection(
last: 1,
orderBy: BATCH_BY_CREATED_BATCH_ID__CREATED_AT_ASC
) {
totalCount
scenes: nodes {
batch: createdBatch {
createdAt
}
}
}
movies: moviesConnection { totalCount }
actors: actorsConnection { totalCount }
networks: entitiesConnection(filter: { type: { equalTo: "network" } }) { totalCount }
@@ -181,6 +191,7 @@ function initUiActions(_store, _router) {
totalActors: actors.totalCount,
totalNetworks: networks.totalCount,
totalChannels: channels.totalCount,
lastScrape: new Date(scenes.scenes[0]?.batch.createdAt),
};
}