1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-01-06 03:54:12 +02:00

Adding persons statistic to ui

This commit is contained in:
Patrik J. Braun 2020-12-30 22:12:36 +01:00
parent 7184f94c88
commit 411023021d
10 changed files with 98 additions and 50 deletions

View File

@ -5,6 +5,7 @@ import {Config} from '../../../common/config/private/Config';
import {ISQLGalleryManager} from '../../model/database/sql/IGalleryManager';
import {ServerConfig} from '../../../common/config/private/PrivateConfig';
import {ISQLPersonManager} from '../../model/database/sql/IPersonManager';
import {StatisticDTO} from '../../../common/entities/settings/StatisticDTO';
export class AdminMWs {
@ -18,12 +19,12 @@ export class AdminMWs {
const galleryManager = <ISQLGalleryManager>ObjectManagers.getInstance().GalleryManager;
const personManager = <ISQLPersonManager>ObjectManagers.getInstance().PersonManager;
try {
req.resultPipe = {
req.resultPipe = <StatisticDTO>{
directories: await galleryManager.countDirectories(),
photos: await galleryManager.countPhotos(),
videos: await galleryManager.countVideos(),
diskUsage: await galleryManager.countMediaSize(),
faces: await personManager.countFaces(),
persons: await personManager.countFaces(),
};
return next();
} catch (err) {

View File

@ -1,7 +1,7 @@
import {DirectoryDTO} from '../../../../common/entities/DirectoryDTO';
export interface IIndexingManager {
SavingReady: Promise<void>
SavingReady: Promise<void>;
IsSavingInProgress: boolean;
indexDirectory(relativeDirectoryName: string): Promise<DirectoryDTO>;

View File

@ -2,6 +2,8 @@ import {IIndexingManager} from '../interfaces/IIndexingManager';
import {DirectoryDTO} from '../../../../common/entities/DirectoryDTO';
export class IndexingManager implements IIndexingManager {
IsSavingInProgress: boolean;
SavingReady: Promise<void>;
indexDirectory(relativeDirectoryName: string): Promise<DirectoryDTO> {
throw new Error('not supported by memory DB');

View File

@ -3,4 +3,5 @@ export interface StatisticDTO {
photos: number;
videos: number;
diskUsage: number;
persons: number;
}

View File

@ -109,7 +109,7 @@
<hr/>
<div class="row statics">
<div class="col-md-4 col-12" i18n>
<div class="col-md-2 col-12" i18n>
Statistic:
</div>
<div class="col-md-2 col-6">
@ -125,6 +125,10 @@
{{_settingsService.statistic.value ? _settingsService.statistic.value.videos : '...'}}
</div>
<div class="col-md-2 col-6">
<span class="oi oi-people" title="Persons" i18n-title aria-hidden="true"> </span>
{{_settingsService.statistic.value ? _settingsService.statistic.value.persons : '...'}}
</div>
<div class="col-md-2 col-6">
<span class="oi oi-pie-chart" title="Size" i18n-title aria-hidden="true"> </span>
{{_settingsService.statistic.value ? (_settingsService.statistic.value.diskUsage | fileSize) : '...'}}

View File

@ -68,7 +68,7 @@
<source>Remember me</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/login/login.component.html</context>
<context context-type="linenumber">56</context>
<context context-type="linenumber">58</context>
</context-group>
<target>Remember me</target>
</trans-unit>
@ -77,7 +77,7 @@
</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/login/login.component.html</context>
<context context-type="linenumber">66</context>
<context context-type="linenumber">68</context>
</context-group>
<target>Login</target>
</trans-unit>
@ -419,7 +419,7 @@
</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">30</context>
<context context-type="linenumber">34</context>
</context-group>
<target>To dismiss these notifications, restart the server.</target>
</trans-unit>
@ -427,7 +427,7 @@
<source>App version:</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">43</context>
<context context-type="linenumber">47</context>
</context-group>
<target>App version:</target>
</trans-unit>
@ -435,7 +435,7 @@
<source>Mode</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">47</context>
<context context-type="linenumber">51</context>
</context-group>
<target>Mode</target>
</trans-unit>
@ -443,7 +443,7 @@
<source>Advanced</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">55</context>
<context context-type="linenumber">59</context>
</context-group>
<target>Advanced</target>
</trans-unit>
@ -451,7 +451,7 @@
<source>Simplified</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">56</context>
<context context-type="linenumber">60</context>
</context-group>
<target>Simplified</target>
</trans-unit>
@ -459,7 +459,7 @@
<source>Up time</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">135</context>
<context context-type="linenumber">139</context>
</context-group>
<target>Up time</target>
</trans-unit>
@ -1926,11 +1926,19 @@
</context-group>
<target>Videos</target>
</trans-unit>
<trans-unit id="09c3d8dca68f757aec322440b75f686a1e2c2322" datatype="html">
<source>Persons</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/settings/indexing/indexing.settings.component.html</context>
<context context-type="linenumber">129</context>
</context-group>
<target>Persons</target>
</trans-unit>
<trans-unit id="7faaaa08f56427999f3be41df1093ce4089bbd75" datatype="html">
<source>Size</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/settings/indexing/indexing.settings.component.html</context>
<context context-type="linenumber">129</context>
<context context-type="linenumber">133</context>
</context-group>
<target>Size</target>
</trans-unit>

View File

@ -68,7 +68,7 @@
<source>Remember me</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/login/login.component.html</context>
<context context-type="linenumber">56</context>
<context context-type="linenumber">58</context>
</context-group>
<target>Se souvenir de moi</target>
</trans-unit>
@ -77,7 +77,7 @@
</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/login/login.component.html</context>
<context context-type="linenumber">66</context>
<context context-type="linenumber">68</context>
</context-group>
<target>Connexion</target>
</trans-unit>
@ -419,7 +419,7 @@
</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">30</context>
<context context-type="linenumber">34</context>
</context-group>
<target>Pour supprimer ces notifications, redémarrez le serveur.</target>
</trans-unit>
@ -427,7 +427,7 @@
<source>App version:</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">43</context>
<context context-type="linenumber">47</context>
</context-group>
<target>App version:</target>
</trans-unit>
@ -435,7 +435,7 @@
<source>Mode</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">47</context>
<context context-type="linenumber">51</context>
</context-group>
<target>Mode</target>
</trans-unit>
@ -443,7 +443,7 @@
<source>Advanced</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">55</context>
<context context-type="linenumber">59</context>
</context-group>
<target>Avancé</target>
</trans-unit>
@ -451,7 +451,7 @@
<source>Simplified</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">56</context>
<context context-type="linenumber">60</context>
</context-group>
<target>Simplifié</target>
</trans-unit>
@ -459,7 +459,7 @@
<source>Up time</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">135</context>
<context context-type="linenumber">139</context>
</context-group>
<target>Up time</target>
</trans-unit>
@ -1926,11 +1926,19 @@
</context-group>
<target>Vidéos</target>
</trans-unit>
<trans-unit id="09c3d8dca68f757aec322440b75f686a1e2c2322" datatype="html">
<source>Persons</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/settings/indexing/indexing.settings.component.html</context>
<context context-type="linenumber">129</context>
</context-group>
<target>Persons</target>
</trans-unit>
<trans-unit id="7faaaa08f56427999f3be41df1093ce4089bbd75" datatype="html">
<source>Size</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/settings/indexing/indexing.settings.component.html</context>
<context context-type="linenumber">129</context>
<context context-type="linenumber">133</context>
</context-group>
<target>Taille</target>
</trans-unit>

View File

@ -68,7 +68,7 @@
<source>Remember me</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/login/login.component.html</context>
<context context-type="linenumber">56</context>
<context context-type="linenumber">58</context>
</context-group>
<target>Emlékezz rám</target>
</trans-unit>
@ -77,7 +77,7 @@
</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/login/login.component.html</context>
<context context-type="linenumber">66</context>
<context context-type="linenumber">68</context>
</context-group>
<target>Belépés</target>
</trans-unit>
@ -419,7 +419,7 @@
</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">30</context>
<context context-type="linenumber">34</context>
</context-group>
<target>Az ilyen értesítések elutasításához indítsa újra a kiszolgálót.</target>
</trans-unit>
@ -427,7 +427,7 @@
<source>App version:</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">43</context>
<context context-type="linenumber">47</context>
</context-group>
<target>Verzió:</target>
</trans-unit>
@ -435,7 +435,7 @@
<source>Mode</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">47</context>
<context context-type="linenumber">51</context>
</context-group>
<target>Mód</target>
</trans-unit>
@ -443,7 +443,7 @@
<source>Advanced</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">55</context>
<context context-type="linenumber">59</context>
</context-group>
<target>Részletes</target>
</trans-unit>
@ -451,7 +451,7 @@
<source>Simplified</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">56</context>
<context context-type="linenumber">60</context>
</context-group>
<target>Egyszerűsített</target>
</trans-unit>
@ -459,7 +459,7 @@
<source>Up time</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">135</context>
<context context-type="linenumber">139</context>
</context-group>
<target>Szerver futás kezdete</target>
</trans-unit>
@ -1926,11 +1926,19 @@
</context-group>
<target>Videók</target>
</trans-unit>
<trans-unit id="09c3d8dca68f757aec322440b75f686a1e2c2322" datatype="html">
<source>Persons</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/settings/indexing/indexing.settings.component.html</context>
<context context-type="linenumber">129</context>
</context-group>
<target>Emberek</target>
</trans-unit>
<trans-unit id="7faaaa08f56427999f3be41df1093ce4089bbd75" datatype="html">
<source>Size</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/settings/indexing/indexing.settings.component.html</context>
<context context-type="linenumber">129</context>
<context context-type="linenumber">133</context>
</context-group>
<target>Méret</target>
</trans-unit>
@ -2822,4 +2830,4 @@
</trans-unit>
</body>
</file>
</xliff>
</xliff>

View File

@ -68,7 +68,7 @@
<source>Remember me</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/login/login.component.html</context>
<context context-type="linenumber">56</context>
<context context-type="linenumber">58</context>
</context-group>
<target>Reține-mă</target>
</trans-unit>
@ -77,7 +77,7 @@
</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/login/login.component.html</context>
<context context-type="linenumber">66</context>
<context context-type="linenumber">68</context>
</context-group>
<target>Autentificare</target>
</trans-unit>
@ -419,7 +419,7 @@
</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">30</context>
<context context-type="linenumber">34</context>
</context-group>
<target>Pentru a respinge aceste notificări, reporniți serverul.</target>
</trans-unit>
@ -427,7 +427,7 @@
<source>App version:</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">43</context>
<context context-type="linenumber">47</context>
</context-group>
<target>Versiunea aplicației:</target>
</trans-unit>
@ -435,7 +435,7 @@
<source>Mode</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">47</context>
<context context-type="linenumber">51</context>
</context-group>
<target>Mod</target>
</trans-unit>
@ -443,7 +443,7 @@
<source>Advanced</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">55</context>
<context context-type="linenumber">59</context>
</context-group>
<target>Avansat</target>
</trans-unit>
@ -451,7 +451,7 @@
<source>Simplified</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">56</context>
<context context-type="linenumber">60</context>
</context-group>
<target>Simplificat</target>
</trans-unit>
@ -459,7 +459,7 @@
<source>Up time</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">135</context>
<context context-type="linenumber">139</context>
</context-group>
<target>Up time</target>
</trans-unit>
@ -1926,11 +1926,19 @@
</context-group>
<target>Videoclipuri</target>
</trans-unit>
<trans-unit id="09c3d8dca68f757aec322440b75f686a1e2c2322" datatype="html">
<source>Persons</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/settings/indexing/indexing.settings.component.html</context>
<context context-type="linenumber">129</context>
</context-group>
<target>Persons</target>
</trans-unit>
<trans-unit id="7faaaa08f56427999f3be41df1093ce4089bbd75" datatype="html">
<source>Size</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/settings/indexing/indexing.settings.component.html</context>
<context context-type="linenumber">129</context>
<context context-type="linenumber">133</context>
</context-group>
<target>Dimensiuni</target>
</trans-unit>

View File

@ -68,7 +68,7 @@
<source>Remember me</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/login/login.component.html</context>
<context context-type="linenumber">56</context>
<context context-type="linenumber">58</context>
</context-group>
<target>Запомнить меня</target>
</trans-unit>
@ -77,7 +77,7 @@
</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/login/login.component.html</context>
<context context-type="linenumber">66</context>
<context context-type="linenumber">68</context>
</context-group>
<target>Войти</target>
</trans-unit>
@ -419,7 +419,7 @@
</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">30</context>
<context context-type="linenumber">34</context>
</context-group>
<target>Чтобы отключить эти уведомления, перезапустите сервер.</target>
</trans-unit>
@ -427,7 +427,7 @@
<source>App version:</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">43</context>
<context context-type="linenumber">47</context>
</context-group>
<target>App version:</target>
</trans-unit>
@ -435,7 +435,7 @@
<source>Mode</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">47</context>
<context context-type="linenumber">51</context>
</context-group>
<target>Режим</target>
</trans-unit>
@ -443,7 +443,7 @@
<source>Advanced</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">55</context>
<context context-type="linenumber">59</context>
</context-group>
<target>Advanced</target>
</trans-unit>
@ -451,7 +451,7 @@
<source>Simplified</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">56</context>
<context context-type="linenumber">60</context>
</context-group>
<target>Simplified</target>
</trans-unit>
@ -459,7 +459,7 @@
<source>Up time</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/admin/admin.component.html</context>
<context context-type="linenumber">135</context>
<context context-type="linenumber">139</context>
</context-group>
<target>Up time</target>
</trans-unit>
@ -1926,11 +1926,19 @@
</context-group>
<target>Видео</target>
</trans-unit>
<trans-unit id="09c3d8dca68f757aec322440b75f686a1e2c2322" datatype="html">
<source>Persons</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/settings/indexing/indexing.settings.component.html</context>
<context context-type="linenumber">129</context>
</context-group>
<target>Persons</target>
</trans-unit>
<trans-unit id="7faaaa08f56427999f3be41df1093ce4089bbd75" datatype="html">
<source>Size</source>
<context-group purpose="location">
<context context-type="sourcefile">app/ui/settings/indexing/indexing.settings.component.html</context>
<context context-type="linenumber">129</context>
<context context-type="linenumber">133</context>
</context-group>
<target>Размер</target>
</trans-unit>