1
0
mirror of https://github.com/bpatrik/pigallery2.git synced 2025-03-31 22:05:20 +02:00
pigallery2/src/frontend/app/ui/settings/indexing/indexing.settings.component.html

141 lines
5.5 KiB
HTML
Raw Normal View History

2017-07-25 21:09:37 +02:00
<form #settingsForm="ngForm" class="form-horizontal">
2018-05-13 16:59:57 -04:00
<div class="card mb-4">
2019-12-07 20:40:29 +01:00
<h5 class="card-header">
{{Name}}
2018-05-13 16:59:57 -04:00
</h5>
<div class="card-body">
2017-07-25 21:09:37 +02:00
<div [hidden]="!error" class="alert alert-danger" role="alert"><strong>Error: </strong>{{error}}</div>
2017-07-27 23:10:16 +02:00
<ng-container *ngIf="!simplifiedMode">
2020-02-04 19:37:47 +01:00
<app-settings-entry
name="Index cache timeout [ms]"
description="If there was no indexing in this time, it reindexes. (skipped if indexes are in DB and sensitivity is low)"
i18n-description i18n-name
[ngModel]="states.cachedFolderTimeout"
required="true">
</app-settings-entry>
<app-settings-entry
name="Sub folder preview size"
description="Reads this many photos from sub folders."
i18n-description i18n-name
[ngModel]="states.folderPreviewSize"
required="true">
</app-settings-entry>
<app-settings-entry
name="Folder reindexing sensitivity"
[ngModel]="states.reIndexingSensitivity"
description="Set the reindexing sensitivity. High value check the folders for change more often."
i18n-description i18n-name
required="true">
</app-settings-entry>
<app-settings-entry
name="Exclude Folder List"
i18n-name
placeholder="/media/images/family/private;private;family/private"
2020-02-06 22:46:45 +01:00
[ngModel]="states.excludeFolderList">
2020-02-04 19:37:47 +01:00
<small class="form-text text-muted">
<ng-container i18n>Folders to exclude from indexing</ng-container>
<br/>
<ng-container
i18n>';' separated strings. If an entry starts with '/' it is treated as an absolute path. If it doesn't
start with '/' but contains a '/', the path is relative to the image directory. If it doesn't contain a
'/', any folder with this name will be excluded.
</ng-container>
</small>
</app-settings-entry>
<app-settings-entry
name="Exclude File List"
i18n-name
placeholder=".ignore;.pg2ignore"
2020-02-06 22:46:45 +01:00
[ngModel]="states.excludeFileList">
2020-02-04 19:37:47 +01:00
<small class="form-text text-muted">
<ng-container i18n>Files that mark a folder to be excluded from indexing</ng-container>
<br/>
<ng-container
i18n>';' separated strings. Any folder that contains a file with this name will be excluded from
indexing.
</ng-container>
</small>
</app-settings-entry>
2017-07-27 23:10:16 +02:00
2017-07-27 23:10:16 +02:00
2018-05-13 16:59:57 -04:00
<button class="btn btn-success float-right"
2017-07-27 23:10:16 +02:00
[disabled]="!settingsForm.form.valid || !changed || inProgress"
(click)="save()" i18n>Save
2017-07-27 23:10:16 +02:00
</button>
2019-02-23 00:29:35 +01:00
<button class="btn btn-secondary float-right"
[disabled]=" !changed || inProgress"
(click)="reset()" i18n>Reset
2017-07-27 23:10:16 +02:00
</button>
<br/>
<hr/>
</ng-container>
2019-12-15 14:40:31 +01:00
<div class="alert alert-secondary" role="alert">
<ng-container i18n>If you add a new folder to your gallery, the site indexes it automatically.</ng-container>&nbsp;
<ng-container i18n>If you would like to trigger indexing manually, click index button.</ng-container>
<br/>
2019-12-30 15:49:56 +01:00
(
<ng-container i18n>Note: search only works among the indexed directories</ng-container>
)
2019-12-15 14:40:31 +01:00
</div>
2017-07-25 21:09:37 +02:00
2019-12-30 15:49:56 +01:00
<app-settings-job-progress [progress]="Progress"></app-settings-job-progress>
<app-settings-job-button #indexingButton
[soloRun]="true"
(error)="error=$event"
2019-12-31 13:38:23 +01:00
[allowParallelRun]="false"
2019-12-30 15:49:56 +01:00
[jobName]="indexingJobName"></app-settings-job-button>
2017-07-25 21:09:37 +02:00
2019-12-15 14:40:31 +01:00
<app-settings-job-button class="ml-md-2 mt-2 mt-md-0"
2019-12-30 15:49:56 +01:00
danger="true"
[soloRun]="true"
(error)="error=$event"
2019-12-31 13:38:23 +01:00
[allowParallelRun]="false"
2019-12-30 15:49:56 +01:00
[disabled]="indexingButton.Running"
[jobName]="resetJobName"></app-settings-job-button>
2019-12-15 14:40:31 +01:00
2018-12-09 23:25:39 +01:00
<hr/>
<div class="row statics">
2020-12-30 22:12:36 +01:00
<div class="col-md-2 col-12" i18n>
2018-12-09 23:25:39 +01:00
Statistic:
</div>
<div class="col-md-2 col-6">
<span class="oi oi-folder" title="Folders" i18n-title aria-hidden="true"> </span>
{{_settingsService.statistic.value ? _settingsService.statistic.value.directories : '...'}}
2018-12-09 23:25:39 +01:00
</div>
<div class="col-md-2 col-6">
<span class="oi oi-camera-slr" title="Photos" i18n-title aria-hidden="true"> </span>
{{_settingsService.statistic.value ? _settingsService.statistic.value.photos : '...'}}
2018-12-09 23:25:39 +01:00
</div>
<div class="col-md-2 col-6">
<span class="oi oi-video" title="Videos" i18n-title aria-hidden="true"> </span>
{{_settingsService.statistic.value ? _settingsService.statistic.value.videos : '...'}}
2018-12-09 23:25:39 +01:00
</div>
2020-12-30 22:12:36 +01:00
<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>
2018-12-09 23:25:39 +01:00
<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) : '...'}}
2018-12-09 23:25:39 +01:00
</div>
2017-07-25 21:09:37 +02:00
</div>
</div>
</div>
</form>