diff --git a/Tekst-API/openapi.json b/Tekst-API/openapi.json index 9d8c02fb2..4a11c0d8f 100644 --- a/Tekst-API/openapi.json +++ b/Tekst-API/openapi.json @@ -2947,55 +2947,6 @@ ] } }, - "/platform/stats": { - "get": { - "tags": [ - "platform" - ], - "summary": "Get statistics", - "operationId": "getStatistics", - "responses": { - "200": { - "description": "Successful Response", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/PlatformStats" - } - } - } - }, - "401": { - "description": "Unauthorized", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TekstErrorModel" - } - } - } - }, - "403": { - "description": "Forbidden", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/TekstErrorModel" - } - } - } - } - }, - "security": [ - { - "APIKeyCookie": [] - }, - { - "OAuth2PasswordBearer": [] - } - ] - } - }, "/platform/tasks": { "get": { "tags": [ @@ -3278,8 +3229,8 @@ "tags": [ "resources" ], - "summary": "Trigger resources maintenance", - "operationId": "triggerResourcesMaintenance", + "summary": "Trigger precomputation", + "operationId": "triggerPrecomputation", "responses": { "202": { "description": "Successful Response", @@ -14166,28 +14117,6 @@ "type": "object", "title": "PlatformStateUpdate" }, - "PlatformStats": { - "properties": { - "usersCount": { - "type": "integer", - "title": "Userscount" - }, - "texts": { - "items": { - "$ref": "#/components/schemas/TextStats" - }, - "type": "array", - "title": "Texts" - } - }, - "type": "object", - "required": [ - "usersCount", - "texts" - ], - "title": "PlatformStats", - "description": "Platform statistics data" - }, "PrivateUserProp": { "type": "string", "enum": [ @@ -16884,42 +16813,6 @@ ], "title": "TextRead" }, - "TextStats": { - "properties": { - "id": { - "type": "string", - "maxLength": 24, - "minLength": 24, - "pattern": "^[0-9a-f]{24}$", - "title": "Id", - "example": "5eb7cf5a86d9755df3a6c593" - }, - "locationsCount": { - "type": "integer", - "title": "Locationscount" - }, - "resourcesCount": { - "type": "integer", - "title": "Resourcescount" - }, - "resourceTypes": { - "additionalProperties": { - "type": "integer" - }, - "type": "object", - "title": "Resourcetypes" - } - }, - "type": "object", - "required": [ - "id", - "locationsCount", - "resourcesCount", - "resourceTypes" - ], - "title": "TextStats", - "description": "Text statistics data" - }, "TextSubtitleTranslation": { "properties": { "locale": { diff --git a/Tekst-API/tekst/models/platform.py b/Tekst-API/tekst/models/platform.py index 9eaa259e4..be69b2406 100644 --- a/Tekst-API/tekst/models/platform.py +++ b/Tekst-API/tekst/models/platform.py @@ -263,19 +263,3 @@ class PlatformData(ModelBase): info_segments: list[ClientSegmentHead] tekst: dict[str, str] max_field_mappings: int - - -class TextStats(ModelBase): - """Text statistics data""" - - id: PydanticObjectId - locations_count: int - resources_count: int - resource_types: dict[str, int] - - -class PlatformStats(ModelBase): - """Platform statistics data""" - - users_count: int - texts: list[TextStats] diff --git a/Tekst-API/tekst/routers/platform.py b/Tekst-API/tekst/routers/platform.py index e82ea93cc..fd7866335 100644 --- a/Tekst-API/tekst/routers/platform.py +++ b/Tekst-API/tekst/routers/platform.py @@ -11,17 +11,13 @@ from tekst import errors, tasks from tekst.auth import OptionalUserDep, SuperuserDep from tekst.config import ConfigDep -from tekst.models.location import LocationDocument from tekst.models.platform import ( PlatformData, PlatformSecurityInfo, PlatformStateDocument, PlatformStateRead, PlatformStateUpdate, - PlatformStats, - TextStats, ) -from tekst.models.resource import ResourceBaseDocument from tekst.models.segment import ( ClientSegmentCreate, ClientSegmentDocument, @@ -29,9 +25,7 @@ ClientSegmentRead, ClientSegmentUpdate, ) -from tekst.models.text import TextDocument from tekst.models.user import UserDocument -from tekst.resources import resource_types_mgr from tekst.routers.texts import get_all_texts from tekst.state import get_state, update_state @@ -200,52 +194,6 @@ async def delete_segment( raise errors.E_500_INTERNAL_SERVER_ERROR -@router.get( - "/stats", - response_model=PlatformStats, - status_code=status.HTTP_200_OK, - responses=errors.responses( - [ - errors.E_401_UNAUTHORIZED, - errors.E_403_FORBIDDEN, - ] - ), -) -async def get_statistics(su: SuperuserDep) -> PlatformStats: - resource_type_names = resource_types_mgr.list_names() - texts = await TextDocument.find_all().to_list() - text_stats = [] - - for text in texts: - locations_count = await LocationDocument.find( - LocationDocument.text_id == text.id - ).count() - resource_types = { - rt_name: ( - await ResourceBaseDocument.find( - ResourceBaseDocument.text_id == text.id, - ResourceBaseDocument.resource_type == rt_name, - with_children=True, - ).count() - ) - for rt_name in resource_type_names - } - resources_count = sum(resource_types.values()) - text_stats.append( - TextStats( - id=text.id, - locations_count=locations_count, - resources_count=resources_count, - resource_types=resource_types, - ) - ) - - return PlatformStats( - users_count=await UserDocument.find_all().count(), - texts=text_stats, - ) - - @router.get( "/tasks", status_code=status.HTTP_200_OK, diff --git a/Tekst-API/tekst/routers/resources.py b/Tekst-API/tekst/routers/resources.py index f20f010e6..56338345c 100644 --- a/Tekst-API/tekst/routers/resources.py +++ b/Tekst-API/tekst/routers/resources.py @@ -128,7 +128,7 @@ async def preprocess_resource_read( ] ), ) -async def trigger_resources_maintenance( +async def trigger_precomputation( su: SuperuserDep, ) -> tasks.TaskDocument: return await tasks.create_task( diff --git a/Tekst-API/tests/test_api_platform.py b/Tekst-API/tests/test_api_platform.py index a4efc6fef..1dec68324 100644 --- a/Tekst-API/tests/test_api_platform.py +++ b/Tekst-API/tests/test_api_platform.py @@ -14,21 +14,6 @@ async def test_platform_data( assert resp.json()["tekst"]["version"] == package_metadata["version"] -@pytest.mark.anyio -async def test_get_stats( - test_client: AsyncClient, - assert_status, - login, - insert_sample_data, -): - await insert_sample_data("texts", "locations", "resources", "contents") - await login(is_superuser=True) - resp = await test_client.get("/platform/stats") - assert_status(200, resp) - assert "usersCount" in resp.json() - assert resp.json()["usersCount"] == 1 - - @pytest.mark.anyio async def test_update_platform_settings( test_client: AsyncClient, diff --git a/Tekst-Web/i18n/help/deDE/adminStatisticsView.md b/Tekst-Web/i18n/help/deDE/adminInfoPagesView.md similarity index 100% rename from Tekst-Web/i18n/help/deDE/adminStatisticsView.md rename to Tekst-Web/i18n/help/deDE/adminInfoPagesView.md diff --git a/Tekst-Web/i18n/help/deDE/adminSystemMaintenanceView.md b/Tekst-Web/i18n/help/deDE/adminMaintenanceView.md similarity index 100% rename from Tekst-Web/i18n/help/deDE/adminSystemMaintenanceView.md rename to Tekst-Web/i18n/help/deDE/adminMaintenanceView.md diff --git a/Tekst-Web/i18n/help/deDE/adminSystemPagesView.md b/Tekst-Web/i18n/help/deDE/adminSegmentsView.md similarity index 100% rename from Tekst-Web/i18n/help/deDE/adminSystemPagesView.md rename to Tekst-Web/i18n/help/deDE/adminSegmentsView.md diff --git a/Tekst-Web/i18n/help/deDE/adminSystemSettingsOskModes.md b/Tekst-Web/i18n/help/deDE/adminSettingsOskModes.md similarity index 100% rename from Tekst-Web/i18n/help/deDE/adminSystemSettingsOskModes.md rename to Tekst-Web/i18n/help/deDE/adminSettingsOskModes.md diff --git a/Tekst-Web/i18n/help/deDE/adminSystemSettingsResourceFonts.md b/Tekst-Web/i18n/help/deDE/adminSettingsResourceFonts.md similarity index 100% rename from Tekst-Web/i18n/help/deDE/adminSystemSettingsResourceFonts.md rename to Tekst-Web/i18n/help/deDE/adminSettingsResourceFonts.md diff --git a/Tekst-Web/i18n/help/deDE/adminSystemSegmentsView.md b/Tekst-Web/i18n/help/deDE/adminSettingsView.md similarity index 100% rename from Tekst-Web/i18n/help/deDE/adminSystemSegmentsView.md rename to Tekst-Web/i18n/help/deDE/adminSettingsView.md diff --git a/Tekst-Web/i18n/help/deDE/adminTextsLocationsView.md b/Tekst-Web/i18n/help/deDE/adminTextsLocationsView.md deleted file mode 100644 index d85b27d32..000000000 --- a/Tekst-Web/i18n/help/deDE/adminTextsLocationsView.md +++ /dev/null @@ -1,3 +0,0 @@ -## Schade! - -Dieser Hilfe-Text existiert **leider** noch nicht. diff --git a/Tekst-Web/i18n/help/deDE/adminSystemSettingsView.md b/Tekst-Web/i18n/help/deDE/adminUsersView.md similarity index 100% rename from Tekst-Web/i18n/help/deDE/adminSystemSettingsView.md rename to Tekst-Web/i18n/help/deDE/adminUsersView.md diff --git a/Tekst-Web/i18n/help/deDE/adminSystemUsersView.md b/Tekst-Web/i18n/help/deDE/textLevels.md similarity index 100% rename from Tekst-Web/i18n/help/deDE/adminSystemUsersView.md rename to Tekst-Web/i18n/help/deDE/textLevels.md diff --git a/Tekst-Web/i18n/help/deDE/adminTextsLevelsView.md b/Tekst-Web/i18n/help/deDE/textLocations.md similarity index 100% rename from Tekst-Web/i18n/help/deDE/adminTextsLevelsView.md rename to Tekst-Web/i18n/help/deDE/textLocations.md diff --git a/Tekst-Web/i18n/help/enUS/adminStatisticsView.md b/Tekst-Web/i18n/help/enUS/adminInfoPagesView.md similarity index 100% rename from Tekst-Web/i18n/help/enUS/adminStatisticsView.md rename to Tekst-Web/i18n/help/enUS/adminInfoPagesView.md diff --git a/Tekst-Web/i18n/help/enUS/adminSystemMaintenanceView.md b/Tekst-Web/i18n/help/enUS/adminMaintenanceView.md similarity index 100% rename from Tekst-Web/i18n/help/enUS/adminSystemMaintenanceView.md rename to Tekst-Web/i18n/help/enUS/adminMaintenanceView.md diff --git a/Tekst-Web/i18n/help/enUS/adminSystemPagesView.md b/Tekst-Web/i18n/help/enUS/adminSegmentsView.md similarity index 100% rename from Tekst-Web/i18n/help/enUS/adminSystemPagesView.md rename to Tekst-Web/i18n/help/enUS/adminSegmentsView.md diff --git a/Tekst-Web/i18n/help/enUS/adminSystemSettingsOskModes.md b/Tekst-Web/i18n/help/enUS/adminSettingsOskModes.md similarity index 100% rename from Tekst-Web/i18n/help/enUS/adminSystemSettingsOskModes.md rename to Tekst-Web/i18n/help/enUS/adminSettingsOskModes.md diff --git a/Tekst-Web/i18n/help/enUS/adminSystemSettingsResourceFonts.md b/Tekst-Web/i18n/help/enUS/adminSettingsResourceFonts.md similarity index 100% rename from Tekst-Web/i18n/help/enUS/adminSystemSettingsResourceFonts.md rename to Tekst-Web/i18n/help/enUS/adminSettingsResourceFonts.md diff --git a/Tekst-Web/i18n/help/enUS/adminSystemSegmentsView.md b/Tekst-Web/i18n/help/enUS/adminSettingsView.md similarity index 100% rename from Tekst-Web/i18n/help/enUS/adminSystemSegmentsView.md rename to Tekst-Web/i18n/help/enUS/adminSettingsView.md diff --git a/Tekst-Web/i18n/help/enUS/adminTextsLocationsView.md b/Tekst-Web/i18n/help/enUS/adminTextsLocationsView.md deleted file mode 100644 index 50ff9a008..000000000 --- a/Tekst-Web/i18n/help/enUS/adminTextsLocationsView.md +++ /dev/null @@ -1,3 +0,0 @@ -## Too bad! - -This help text **unfortunately** doesn't exist, yet. diff --git a/Tekst-Web/i18n/help/enUS/adminSystemSettingsView.md b/Tekst-Web/i18n/help/enUS/adminUsersView.md similarity index 100% rename from Tekst-Web/i18n/help/enUS/adminSystemSettingsView.md rename to Tekst-Web/i18n/help/enUS/adminUsersView.md diff --git a/Tekst-Web/i18n/help/enUS/adminSystemUsersView.md b/Tekst-Web/i18n/help/enUS/textLevels.md similarity index 100% rename from Tekst-Web/i18n/help/enUS/adminSystemUsersView.md rename to Tekst-Web/i18n/help/enUS/textLevels.md diff --git a/Tekst-Web/i18n/help/enUS/adminTextsLevelsView.md b/Tekst-Web/i18n/help/enUS/textLocations.md similarity index 100% rename from Tekst-Web/i18n/help/enUS/adminTextsLevelsView.md rename to Tekst-Web/i18n/help/enUS/textLocations.md diff --git a/Tekst-Web/i18n/ui/deDE.yml b/Tekst-Web/i18n/ui/deDE.yml index 2f7f572ee..ec95ccc6c 100644 --- a/Tekst-Web/i18n/ui/deDE.yml +++ b/Tekst-Web/i18n/ui/deDE.yml @@ -27,7 +27,7 @@ general: moveDownAction: Nach unten bewegen refreshAction: Aktualisieren exportAction: Export - precomputeAction: Vorberechnen + precomputeAction: Ausführen expandAction: Ausklappen collapseAction: Einklappen showAttachmentsAction: Angehängte Inhalte anzeigen @@ -116,10 +116,8 @@ errors: exportNotFound: Der angefragte Export konnte nicht gefunden werden. nav: - about: Über browse: Lesen search: Suche - help: Hilfe info: Info osk: @@ -166,16 +164,13 @@ routes: community: Gemeinschaft accountProfile: '@:account.profileHeading' accountSettings: '@:account.settings.heading' - adminStatistics: Statistiken - adminTextsSettings: '@:general.settings – {text}' - adminTextsLevels: Ebenen – {text} - adminTextsLocations: Belegstellen – {text} - adminNewText: Neuer Text - adminSystemSettings: '@:general.settings' - adminSystemUsers: Benutzer - adminSystemSegments: Segmente - adminSystemInfoPages: Info-Seiten - adminSystemMaintenance: '@:admin.system.maintenance.heading' + textSettings: Einstellungen – {text} + newText: Neuer Text + adminSettings: '@:general.settings' + adminUsers: Benutzer + adminSegments: Segmente + adminInfoPages: Info-Seiten + adminMaintenance: '@:admin.maintenance.heading' verify: Verifizierung reset: Passwort zurücksetzen siteNotice: '@:admin.system.segments.systemKeys.systemSiteNotice' @@ -356,15 +351,15 @@ models: navSearchEntry: Beschriftung für "Suche" in Hauptnavigation navInfoEntry: Beschriftung für "Info" in Hauptnavigation registerIntroText: Einführungstext für Registrierungsseite - directJumpOnUniqueAliasSearch: Springe direkt zur Belegstelle bei Suche nach eindeutigem Alias + directJumpOnUniqueAliasSearch: Bei eindeutigem Treffer direkt zur Belegstelle springen showLogoOnLoadingScreen: Zeige Logo in Ladebildschirm showLogoInHeader: Zeige Logo in Kopfzeile showTekstFooterHint: Zeige kleinen Hinweis auf Tekst-Software in Fußzeile (Danke ♥) showResourceCategoryHeadings: Zeige Überschriften für Kategorien prioritizeBrowseLevelResources: Platziere Ressourcen der aktuellen Ebene vor anderen (innerhalb ihrer Kategorien) showLocationAliases: Zeige Belegstellen-Aliase - denyResourceTypes: Erstellung dieser Ressourcentypen auf Administratoren beschränken - fonts: Zusätzliche Schriftarten + denyResourceTypes: Erstellung dieser Ressourcentypen nur Administratoren erlauben + fonts: Benutzerdefinierte Schritarten für Inhalte fontName: Name oskModes: Bildschirmtastaturen oskModeName: Name @@ -692,6 +687,90 @@ account: community: heading: Gemeinschaft +texts: + heading: Texts + settings: + msgSaved: Text-Einstellungen gespeichert. + warnDeleteText: | + Wenn Sie diesen Text ("{title}") löschen, werden alle Daten, die sich auf ihn + beziehen, ebenfalls gelöscht. Dies schließt die Textstruktur sowie alle + Ressourcen mit ein – unabhängig von welchem User sie erstellt wurden. + Dies kann nicht rückgängig gemacht werden. + Sind Sie sich sicher? + msgDeleted: Text "{title}" gelöscht + levels: + heading: Ebenen + tipInsertLevel: Neue Ebene an Position {n} einfügen + tipEditLevel: Bezeichnung für Ebene "{levelLabel}" bearbeiten + tipDeleteLevel: Ebene "{levelLabel}" löschen + msgInsertSuccess: Ebene an Position {position} eingefügt + msgEditSuccess: Änerungen an Ebene auf Position {position} gespeichert + msgDeleteSuccess: Ebene "{levelLabel}" gelöscht + warnInsertLevel: | + Das nachträgliche Einfügen einer Textebene ist eine Operation mit + gravierenden Auswirkungen auf das Datenmodell des Textes. + Die Anwendung wird ihr Bestes tun, um die neue Ebene in die + bestehende Datenstruktur einzubetten, aber Sie werden das Ergebnis + anschließend mit Hilfe der Einstellungen für die Belegstellen des Textes + anpassen müssen. + Es ist außerdem angeraten, ein Backup des aktuellen Zustands Ihrer + Datenbank zu erstellen, bevor Sie diesen Schritt durchführen. + warnDeleteLevel: | + Das Löschen einer Textebene hat weitreichende Folgen: + Alle Daten, die mit dieser Textebene verbunden sind, + werden mit ihr gelöscht. Dies betrifft alle (!) Ressourcen auf dieser + Ebene - egal, welcher Benutzer diese erstellt hat! + Die Anwendung wird ihr Bestes tun, um angrenzende Ebenen sinnvoll miteinander + zu verbinden, aber Sie werden das Ergebnis + anschließend mit Hilfe der Einstellungen für die Belegstellen des Textes + anpassen müssen. + Bitte machen Sie ein Backup Ihrer Datenbank, bevor Sie eine Ebene löschen! + Dies kann nicht rückgängig gemacht werden. + Sind Sie sich sicher, dass Sie die + Textebene "{levelLabel}" löschen möchten? + locations: + heading: Belegstellen + add: + heading: Belegstelle zu "{parentLabel}" auf Ebene "{level}" hinzufügen + tooltip: Belegstelle hinzufügen + msgSuccess: Belegstelle "{label}" zu "{parentLabel}" hinzugefügt + lblBtnAddLocationFirstLevel: Hinzufügen + tipBtnAddLocationFirstLevel: Belegstelle auf oberster Ebene hinzufügen + lblBtnDownloadTemplate: Vorlage für Textstruktur + tipBtnDownloadTemplate: '@:admin.text.locations.lblBtnDownloadTemplate herunterladen' + lblBtnUploadStructure: Textstruktur importieren + tipBtnUploadStructure: Vorbereitete Daten für neue Textstruktur importieren + lblBtnUploadUpdates: Änderungen importieren + tipBtnUploadUpdates: Geänderte Beschriftungen und Aliase für Belegstellen importieren + infoNoLocations: | + Dieser Text hat noch keine Belegstellen. + Fügen Sie den Strukturebenen des Textes Belegstellen hinzu, + indem Sie die untenstehenden Werkzeuge verwenden, + oder laden Sie eine Strukturvorlage herunter, + die Sie programmatisch mit Ihren Daten füllen können, + und importieren Sie diese dann hier. + warnGeneral: | + Das Neuordnen oder Löschen von Belegstellen hat gravierende Auswirkungen auf das + Datenmodell des Textes. Es ist dringend empfohlen, ein Backup des aktuellen + Zustands der Datenbank zu erstellen, bevor Änderungen vorgenommen werden. + warnDeleteLocation: | + Wenn Sie diese Belegstelle löschen, werden alle Daten, die mit ihr und allen + untergeordneten Belegstelle verbunden sind, ebenfalls gelöscht. + Dies kann Inhalte mehrerer Ressourcen betreffen – auch jener, + die von anderen Benutzern angelegt wurden. Die Belegstelle wird danach nicht mehr + über ihre ursprüngliche ID adressierbar sein. + Dies kann nicht rückgängig gemacht werden. Sind Sie sich sicher, dass Sie fortfahren wollen? + tipDeleteLocation: Belegstelle "{location}" löschen + infoDeletedLocation: Belegstelle "{location}" gelöscht (insgesamt {locations} Belegstellen und {contents} Inhalte) + infoMovedLocation: Belegstelle "{location}" auf position {position} von Ebene "{level}" verschoben + errorLocationLeftLevel: Belegstellen können nur innerhalb der gleichen Ebene verschoben werden! + checkShowWarnings: Zeige Warnungen, bevor destruktive Operationen durchgeführt werden + edit: + heading: Belegstelle bearbeiten + msgSuccess: Belegstelle "{label}" gespeichert + importSuccess: Neue Textstruktur erfolgreich hochgeladen und verarbeitet + updateInfo: Geänderte Beschriftungen und Aliase für Belegstellen werden im Hintergrund verarbeitet. Die Suchindizes werden im Hintergrund aktualisiert. @:general.takeAWhile + admin: heading: Administration optionGroupLabel: Administration @@ -726,92 +805,7 @@ admin: setActive: '@:admin.users.confirmMsg.areYouSure das Konto von {username} aktivieren möchten?' setUnverified: '@:admin.users.confirmMsg.areYouSure die E-Mail-Verifizierung von {username} zurücksetzen möchten?' setVerified: '@:admin.users.confirmMsg.areYouSure die E-Mail-Adresse von {username} als verifiziert markieren möchten?' - deleteUser: | - '@:admin.users.confirmMsg.areYouSure den Benutzeraccount {username} - und alle damit verknüpften Daten löschen möchten?' - text: - heading: Text - settings: - msgSaved: Text-Einstellungen gespeichert. - warnDeleteText: | - Wenn Sie diesen Text ("{title}") löschen, werden alle Daten, die sich auf ihn - beziehen, ebenfalls gelöscht. Dies schließt die Textstruktur sowie alle - Ressourcen mit ein – unabhängig von welchem User sie erstellt wurden. - Dies kann nicht rückgängig gemacht werden. - Sind Sie sich sicher? - msgDeleted: Text "{title}" gelöscht - levels: - heading: Ebenen - tipInsertLevel: Neue Ebene an Position {n} einfügen - tipEditLevel: Bezeichnung für Ebene "{levelLabel}" bearbeiten - tipDeleteLevel: Ebene "{levelLabel}" löschen - msgInsertSuccess: Ebene an Position {position} eingefügt - msgEditSuccess: Änerungen an Ebene auf Position {position} gespeichert - msgDeleteSuccess: Ebene "{levelLabel}" gelöscht - warnInsertLevel: | - Das nachträgliche Einfügen einer Textebene ist eine Operation mit - gravierenden Auswirkungen auf das Datenmodell des Textes. - Die Anwendung wird ihr Bestes tun, um die neue Ebene in die - bestehende Datenstruktur einzubetten, aber Sie werden das Ergebnis - anschließend mit Hilfe der Einstellungen für die Belegstellen des Textes - anpassen müssen. - Es ist außerdem angeraten, ein Backup des aktuellen Zustands Ihrer - Datenbank zu erstellen, bevor Sie diesen Schritt durchführen. - warnDeleteLevel: | - Das Löschen einer Textebene hat weitreichende Folgen: - Alle Daten, die mit dieser Textebene verbunden sind, - werden mit ihr gelöscht. Dies betrifft alle (!) Ressourcen auf dieser - Ebene - egal, welcher Benutzer diese erstellt hat! - Die Anwendung wird ihr Bestes tun, um angrenzende Ebenen sinnvoll miteinander - zu verbinden, aber Sie werden das Ergebnis - anschließend mit Hilfe der Einstellungen für die Belegstellen des Textes - anpassen müssen. - Bitte machen Sie ein Backup Ihrer Datenbank, bevor Sie eine Ebene löschen! - Dies kann nicht rückgängig gemacht werden. - Sind Sie sich sicher, dass Sie die - Textebene "{levelLabel}" löschen möchten? - locations: - heading: Belegstellen - add: - heading: Belegstelle zu "{parentLabel}" auf Ebene "{level}" hinzufügen - tooltip: Belegstelle hinzufügen - msgSuccess: Belegstelle "{label}" zu "{parentLabel}" hinzugefügt - lblBtnAddLocationFirstLevel: Hinzufügen - tipBtnAddLocationFirstLevel: Belegstelle auf oberster Ebene hinzufügen - lblBtnDownloadTemplate: Vorlage für Import-Daten - tipBtnDownloadTemplate: '@:admin.texts.locations.lblBtnDownloadTemplate herunterladen' - lblBtnUploadStructure: Neue Textstruktur importieren - tipBtnUploadStructure: Vorbereitete Daten für neue Textstruktur importieren - lblBtnUploadUpdates: Änderungen importieren - tipBtnUploadUpdates: Geänderte Beschriftungen und Aliase für Belegstellen importieren - infoNoLocations: | - Dieser Text hat noch keine Belegstellen. - Fügen Sie den Strukturebenen des Textes Belegstellen hinzu, - indem Sie die untenstehenden Werkzeuge verwenden, - oder laden Sie eine Strukturvorlage herunter, - die Sie programmatisch mit Ihren Daten füllen können, - und importieren Sie diese dann hier. - warnGeneral: | - Das Neuordnen oder Löschen von Belegstellen hat gravierende Auswirkungen auf das - Datenmodell des Textes. Es ist dringend empfohlen, ein Backup des aktuellen - Zustands der Datenbank zu erstellen, bevor Änderungen vorgenommen werden. - warnDeleteLocation: | - Wenn Sie diese Belegstelle löschen, werden alle Daten, die mit ihr und allen - untergeordneten Belegstelle verbunden sind, ebenfalls gelöscht. - Dies kann Inhalte mehrerer Ressourcen betreffen – auch jener, - die von anderen Benutzern angelegt wurden. Die Belegstelle wird danach nicht mehr - über ihre ursprüngliche ID adressierbar sein. - Dies kann nicht rückgängig gemacht werden. Sind Sie sich sicher, dass Sie fortfahren wollen? - tipDeleteLocation: Belegstelle "{location}" löschen - infoDeletedLocation: Belegstelle "{location}" gelöscht (insgesamt {locations} Belegstellen und {contents} Inhalte) - infoMovedLocation: Belegstelle "{location}" auf position {position} von Ebene "{level}" verschoben - errorLocationLeftLevel: Belegstellen können nur innerhalb der gleichen Ebene verschoben werden! - checkShowWarnings: Zeige Warnungen, bevor destruktive Operationen durchgeführt werden - edit: - heading: Belegstelle bearbeiten - msgSuccess: Belegstelle "{label}" gespeichert - importSuccess: Neue Textstruktur erfolgreich hochgeladen und verarbeitet - updateInfo: Geänderte Beschriftungen und Aliase für Belegstellen werden im Hintergrund verarbeitet. Die Suchindizes werden im Hintergrund aktualisiert. @:general.takeAWhile + deleteUser: '@:admin.users.confirmMsg.areYouSure den Benutzeraccount {username} und alle damit verknüpften Daten löschen möchten?' newText: heading: Neuer Text headerInfoAlert: | @@ -822,66 +816,69 @@ admin: btnProceed: Fortfahren btnFinish: Abschließen msgSaveSuccess: Der neue Text "{title}" wurde erfolgreich erstellt. Sie können jetzt Einstellungen dafür vornehmen. - system: - heading: System - platformSettings: - nav: - heading: Navigation - aliasSearch: Suche nach Belegstellen-Aliasen - customNavLabels: Benutzerdefinierte Navigations-Beschriftungen - headingBrowseView: Lese-Ansicht - headingBranding: Branding - msgSaved: Plattform-Einstellungen gespeichert. - defaultTextPlaceholder: Automatisch - maintenance: - heading: Wartung - indices: - heading: Suchindizes - documents: Dokumente - size: Größe - searches: Suchen - fields: Felder - utd: Aktuell - ood: Veraltet - actionCreate: Neuindexierung - actionCreateStarted: Die Suchindizes werden im Hintergrund aktualisiert. @:general.takeAWhile - actionCreateSuccess: Suchindizes wurden aktualisiert - resourceMaintenance: - heading: Vorberechnete Ressourcen-Daten - actionStarted: Die Aktualisierung von vorberechneten Ressourcen-Daten wird im Hintergrund durchgeführt. @:general.takeAWhile - tasks: - noTasks: Keine aktiven @:tasks.title - started: Gestartet - ended: Beendet - duration: Dauer - seconds: '{seconds} Sek.' - startedBy: Gestartet durch - actionDeleteSystem: Systemprozesse löschen - actionDeleteAll: Alle Prozesse löschen - actionDeleteAllSuccess: Alle @:tasks.title wurden gelöscht - segments: - heading: Seitensegmente - systemKeys: - systemHome: Startseite - systemHeadEnd: Ende von HTML head - systemBodyEnd: Ende von HTML body - systemFooter: Fußzeile - systemSiteNotice: Impressum - systemPrivacyPolicy: Datenschutzerklärung - systemRegisterIntro: Einführungstext auf "Registrieren"-Seite - noSegment: Bitte wählen Sie ein Segment aus oder erstellen Sie ein neues! - newSegment: Neues Segment - phSelectSegment: Segment auswählen - msgUpdated: '"{title}" wurde aktualisiert.' - msgCreated: '"{title}" wurde erstellt.' - msgDeleted: '"{title}" wurde gelöscht.' - warnCancel: Alle ungespeicherten Änderungen gehen verloren. Sind sie sicher? - warnDelete: Sind Sie sicher, dass Sie "{title}" löschen möchten? - infoPages: - heading: Info-Seiten - newPage: Neue Seite - phSelectPage: Seite auswählen - noPage: Bitte wählen Sie eine Info-Seite aus oder erstellen Sie eine neue! + platformSettings: + nav: + heading: Navigation + aliasSearch: Suche nach Belegstellen-Aliasen + customNavLabels: Benutzerdefinierte Navigations-Beschriftungen + headingBrowseView: Lese-Ansicht + headingBranding: Branding + headingI18n: Internationalisierung + headingRestrictedResTypes: Eingeschränkte Ressourcen-Typen + msgSaved: Plattform-Einstellungen gespeichert. + defaultTextPlaceholder: Automatisch + maintenance: + heading: Wartung + indices: + heading: Suchindizes + documents: Dokumente + size: Größe + searches: Suchen + fields: Felder + utd: Aktuell + ood: Veraltet + actionCreate: Neuindexierung + actionCreateStarted: Die Suchindizes werden im Hintergrund aktualisiert. @:general.takeAWhile + actionCreateSuccess: Suchindizes wurden aktualisiert + precomputed: + heading: Vorberechnete Ressourcen-Daten + description: | + Diese Routine ist Teil des Wartungsprozesses, kann hier aber manuell ausgeführt werden. + Es werden die Belegstellen-Abdeckung aller Ressourcen sowie weitere Ressourcentyp-spezifische Daten (falls zutreffend) vorberechnet. + actionStarted: Die Generierung von vorberechneten Ressourcen-Daten wird im Hintergrund durchgeführt. @:general.takeAWhile + tasks: + noTasks: Keine aktiven @:tasks.title + started: Gestartet + ended: Beendet + duration: Dauer + seconds: '{seconds} Sek.' + startedBy: Gestartet durch + actionDeleteSystem: Systemprozesse löschen + actionDeleteAll: Alle Prozesse löschen + actionDeleteAllSuccess: Alle @:tasks.title wurden gelöscht + segments: + heading: Seitensegmente + systemKeys: + systemHome: Startseite + systemHeadEnd: Ende von HTML head + systemBodyEnd: Ende von HTML body + systemFooter: Fußzeile + systemSiteNotice: Impressum + systemPrivacyPolicy: Datenschutzerklärung + systemRegisterIntro: Einführungstext auf "Registrieren"-Seite + noSegment: Bitte wählen Sie ein Segment aus oder erstellen Sie ein neues! + newSegment: Neues Segment + phSelectSegment: Segment auswählen + msgUpdated: '"{title}" wurde aktualisiert.' + msgCreated: '"{title}" wurde erstellt.' + msgDeleted: '"{title}" wurde gelöscht.' + warnCancel: Alle ungespeicherten Änderungen gehen verloren. Sind sie sicher? + warnDelete: Sind Sie sicher, dass Sie "{title}" löschen möchten? + infoPages: + heading: Info-Seiten + newPage: Neue Seite + phSelectPage: Seite auswählen + noPage: Bitte wählen Sie eine Info-Seite aus oder erstellen Sie eine neue! search: searchAction: Suchen diff --git a/Tekst-Web/i18n/ui/enUS.yml b/Tekst-Web/i18n/ui/enUS.yml index f06ae4414..828ad30b4 100644 --- a/Tekst-Web/i18n/ui/enUS.yml +++ b/Tekst-Web/i18n/ui/enUS.yml @@ -27,7 +27,7 @@ general: moveDownAction: Move down refreshAction: Refresh exportAction: Export - precomputeAction: Precompute + precomputeAction: Run expandAction: Expand collapseAction: Collapse showAttachmentsAction: Show attached contents @@ -114,10 +114,8 @@ errors: exportNotFound: The requested export could not be found. nav: - about: About browse: Browse search: Search - help: Help info: Info osk: @@ -163,16 +161,13 @@ routes: community: Community accountProfile: '@:account.profileHeading' accountSettings: '@:account.settings.heading' - adminStatistics: Statistics - adminTextsSettings: '@:general.settings – {text}' - adminTextsLevels: Levels – {text} - adminTextsLocations: Locations – {text} - adminNewText: New Text - adminSystemSettings: '@:general.settings' - adminSystemUsers: Users - adminSystemSegments: Site Segments - adminSystemInfoPages: Info Pages - adminSystemMaintenance: '@:admin.system.maintenance.heading' + textSettings: Settings – {text} + newText: New Text + adminSettings: '@:general.settings' + adminUsers: Users + adminSegments: Site Segments + adminInfoPages: Info Pages + adminMaintenance: '@:admin.maintenance.heading' verify: Verification reset: Reset password siteNotice: '@:admin.system.segments.systemKeys.systemSiteNotice' @@ -355,15 +350,15 @@ models: navSearchEntry: Label for "Search" in main navigation navInfoEntry: Label for "Info" in main navigation registerIntroText: Introduction text for register page - directJumpOnUniqueAliasSearch: Directly jump to location when searching for unambiguous alias + directJumpOnUniqueAliasSearch: Directly jump to location when an unambiguous alias is found showLogoOnLoadingScreen: Show logo on loading screen showLogoInHeader: Show logo in page header showTekstFooterHint: Show small hint to Tekst software in footer (Thank you ♥) showResourceCategoryHeadings: Show category headings prioritizeBrowseLevelResources: Place resources of current browse level before others (inside their category) showLocationAliases: Show location aliases - denyResourceTypes: Restrict creation of these resource types to administrators - fonts: Additional fonts + denyResourceTypes: Allow creation of these resource types for administrators only + fonts: Custom Content Fonts fontName: Name oskModes: On-screen Keyboards oskModeName: Name @@ -682,6 +677,78 @@ account: community: heading: Community +texts: + heading: Texts + settings: + msgSaved: Text settings saved. + warnDeleteText: | + Deleting this text ("{title}") will delete all data associated with it, + including its configured structure and all resources, regardless of the + user who created it. This cannot be undone. Are you sure? + msgDeleted: Text "{title}" deleted + levels: + heading: Levels + tipInsertLevel: Insert new level at position {n} + tipEditLevel: 'Edit label for level "{levelLabel}"' + tipDeleteLevel: Delete level "{levelLabel}" + msgInsertSuccess: Level inserted at position {position} + msgEditSuccess: Changes to level at position {position} saved + msgDeleteSuccess: Level "{levelLabel}" deleted + warnInsertLevel: | + Retroactively inserting a text level is an operation with serious + impact on the text's data model. The application will try its best to embed the + new level into the existing data structure, but you will have to adjust the + result to your needs using the text's locations settings afterwards. + Also, it is recommended to make a backup of the current state of your database + before performing this operation. + warnDeleteLevel: | + Deleting a text level has far-reaching consequences: All data associated + with this text level will be deleted with it. This includes all (!) resources + on this level, regardless of the user who created it! + The application will try its best to re-connect adjacent levels, + but you will have to adjust the result to your needs using the text's + locations settings afterwards. This cannot be undone. + Please make sure you know what you are doing and make a backup + of your database before doing this! Are you sure you want to delete the text + level "{levelLabel}"? + locations: + heading: Locations + add: + heading: Add Location to "{parentLabel}" on Level "{level}" + tooltip: Add location + msgSuccess: Added location "{label}" to "{parentLabel}" + lblBtnAddLocationFirstLevel: Add + tipBtnAddLocationFirstLevel: Add top-level location + lblBtnDownloadTemplate: Template for text structure + tipBtnDownloadTemplate: Download a template for text structure import data + lblBtnUploadStructure: Import text structure + tipBtnUploadStructure: Import prepared data for new text structure + lblBtnUploadUpdates: Import modifications + tipBtnUploadUpdates: Import modifications to location labels and aliases + infoNoLocations: | + This text does not have any locations, yet. Add locations to the text's + structure levels using the interface below or download a structure template + you can programmatically populate with your data and upload it here. + warnGeneral: | + Rearranging or deleting text locations has serious impact on the text's data model. + It is recommended to make a backup of the current state of your + database before making any changes, here. + warnDeleteLocation: | + If you delete this location, all data associated with it or its child locations will + be deleted with it. This may affect contents of multiple resources, + even ones created by other users. The location will not be available under its original ID anymore. + This cannot be undone. Are you sure you want to proceed? + tipDeleteLocation: Delete location "{location}" + infoDeletedLocation: Deleted location "{location}" (total of {locations} locations and {contents} contents) + infoMovedLocation: Moved location "{location}" to position {position} on level "{level}" + errorLocationLeftLevel: Text locations can only be moved on their original structure level! + checkShowWarnings: Show warnings before performing destructive operations + edit: + heading: Edit Location + msgSuccess: Location "{label}" saved + importSuccess: New text structure uploaded and processed successfully + updateInfo: Modified labels and aliases for locations are processed in the background. @:general.takeAWhile + admin: heading: Administration optionGroupLabel: Administration @@ -716,80 +783,7 @@ admin: setActive: '@:admin.users.confirmMsg.areYouSure activate the account of {username}?' setUnverified: '@:admin.users.confirmMsg.areYouSure reset the email verification status of {username}?' setVerified: '@:admin.users.confirmMsg.areYouSure set the email address of {username} to verified?' - deleteUser: | - '@:admin.users.confirmMsg.areYouSure delete the user account - {username} and all the data associated with it?' - text: - heading: Text - settings: - msgSaved: Text settings saved. - warnDeleteText: | - Deleting this text ("{title}") will delete all data associated with it, - including its configured structure and all resources, regardless of the - user who created it. This cannot be undone. Are you sure? - msgDeleted: Text "{title}" deleted - levels: - heading: Levels - tipInsertLevel: Insert new level at position {n} - tipEditLevel: 'Edit label for level "{levelLabel}"' - tipDeleteLevel: Delete level "{levelLabel}" - msgInsertSuccess: Level inserted at position {position} - msgEditSuccess: Changes to level at position {position} saved - msgDeleteSuccess: Level "{levelLabel}" deleted - warnInsertLevel: | - Retroactively inserting a text level is an operation with serious - impact on the text's data model. The application will try its best to embed the - new level into the existing data structure, but you will have to adjust the - result to your needs using the text's locations settings afterwards. - Also, it is recommended to make a backup of the current state of your database - before performing this operation. - warnDeleteLevel: | - Deleting a text level has far-reaching consequences: All data associated - with this text level will be deleted with it. This includes all (!) resources - on this level, regardless of the user who created it! - The application will try its best to re-connect adjacent levels, - but you will have to adjust the result to your needs using the text's - locations settings afterwards. This cannot be undone. - Please make sure you know what you are doing and make a backup - of your database before doing this! Are you sure you want to delete the text - level "{levelLabel}"? - locations: - heading: Locations - add: - heading: Add Location to "{parentLabel}" on Level "{level}" - tooltip: Add location - msgSuccess: Added location "{label}" to "{parentLabel}" - lblBtnAddLocationFirstLevel: Add - tipBtnAddLocationFirstLevel: Add top-level location - lblBtnDownloadTemplate: Template for import data - tipBtnDownloadTemplate: Download a template for import data - lblBtnUploadStructure: Import new text structure - tipBtnUploadStructure: Import prepared data for new text structure - lblBtnUploadUpdates: Import modifications - tipBtnUploadUpdates: Import modifications to location labels and aliases - infoNoLocations: | - This text does not have any locations, yet. Add locations to the text's - structure levels using the interface below or download a structure template - you can programmatically populate with your data and upload it here. - warnGeneral: | - Rearranging or deleting text locations has serious impact on the text's data model. - It is recommended to make a backup of the current state of your - database before making any changes, here. - warnDeleteLocation: | - If you delete this location, all data associated with it or its child locations will - be deleted with it. This may affect contents of multiple resources, - even ones created by other users. The location will not be available under its original ID anymore. - This cannot be undone. Are you sure you want to proceed? - tipDeleteLocation: Delete location "{location}" - infoDeletedLocation: Deleted location "{location}" (total of {locations} locations and {contents} contents) - infoMovedLocation: Moved location "{location}" to position {position} on level "{level}" - errorLocationLeftLevel: Text locations can only be moved on their original structure level! - checkShowWarnings: Show warnings before performing destructive operations - edit: - heading: Edit Location - msgSuccess: Location "{label}" saved - importSuccess: New text structure uploaded and processed successfully - updateInfo: Modified labels and aliases for locations are processed in the background. @:general.takeAWhile + deleteUser: '@:admin.users.confirmMsg.areYouSure delete the user account {username} and all the data associated with it?' newText: heading: New Text headerInfoAlert: | @@ -800,66 +794,69 @@ admin: btnProceed: Proceed btnFinish: Finish msgSaveSuccess: The new text "{title}" was successfully created. You may now configure its details. - system: - heading: System - platformSettings: - nav: - heading: Navigation - aliasSearch: Location Alias Search - customNavLabels: Custom Navigation Labels - headingBrowseView: Browse View - headingBranding: Branding - msgSaved: Platform settings saved. - defaultTextPlaceholder: Automatic - maintenance: - heading: Maintenance - indices: - heading: Search Indices - documents: Documents - size: Size - searches: Searches - fields: Fields - utd: Up to date - ood: Out of date - actionCreate: Reindex - actionCreateStarted: The search indices will be updated in the background. @:general.takeAWhile - actionCreateSuccess: Search indices have been updated - resourceMaintenance: - heading: Precomputed Resource Data - actionStarted: The update of precomputed resource data is performed in the background. @:general.takeAWhile - tasks: - noTasks: No active background tasks - started: Started - ended: Ended - duration: Duration - seconds: '{seconds} sec' - startedBy: Started by - actionDeleteSystem: Delete system tasks - actionDeleteAll: Delete all tasks - actionDeleteAllSuccess: All background tasks have been deleted - segments: - heading: Site Segments - systemKeys: - systemHome: Home page - systemHeadEnd: End of HTML head - systemBodyEnd: End of HTML body - systemFooter: Page footer - systemSiteNotice: Site notice - systemPrivacyPolicy: Privacy policy - systemRegisterIntro: Intro text on "Register" page - noSegment: Please select a segment or create a new one! - newSegment: New Segment - phSelectSegment: Select segment - msgUpdated: Updated "{title}". - msgCreated: Created "{title}". - msgDeleted: Deleted "{title}". - warnCancel: Any unsaved changes will be lost. Are you sure? - warnDelete: Are you sure you want to delete "{title}"? - infoPages: - heading: Info Pages - newPage: New Page - phSelectPage: Select page - noPage: Please select an info page or create a new one! + platformSettings: + nav: + heading: Navigation + aliasSearch: Location Alias Search + customNavLabels: Custom Navigation Labels + headingBrowseView: Browse View + headingBranding: Branding + headingI18n: Internationalization + headingRestrictedResTypes: Restricted Resource Types + msgSaved: Platform settings saved. + defaultTextPlaceholder: Automatic + maintenance: + heading: Maintenance + indices: + heading: Search Indices + documents: Documents + size: Size + searches: Searches + fields: Fields + utd: Up to date + ood: Out of date + actionCreate: Reindex + actionCreateStarted: The search indices will be updated in the background. @:general.takeAWhile + actionCreateSuccess: Search indices have been updated + precomputed: + heading: Precomputed Data + description: | + This routine is part of the maintenance process, but can be run manually here. + The location coverage of all resources and resource type-specific data (if applicable) will be precomputed. + actionStarted: The generation of precomputed resource data is performed in the background. @:general.takeAWhile + tasks: + noTasks: No active background tasks + started: Started + ended: Ended + duration: Duration + seconds: '{seconds} sec' + startedBy: Started by + actionDeleteSystem: Delete system tasks + actionDeleteAll: Delete all tasks + actionDeleteAllSuccess: All background tasks have been deleted + segments: + heading: Site Segments + systemKeys: + systemHome: Home page + systemHeadEnd: End of HTML head + systemBodyEnd: End of HTML body + systemFooter: Page footer + systemSiteNotice: Site notice + systemPrivacyPolicy: Privacy policy + systemRegisterIntro: Intro text on "Register" page + noSegment: Please select a segment or create a new one! + newSegment: New Segment + phSelectSegment: Select segment + msgUpdated: Updated "{title}". + msgCreated: Created "{title}". + msgDeleted: Deleted "{title}". + warnCancel: Any unsaved changes will be lost. Are you sure? + warnDelete: Are you sure you want to delete "{title}"? + infoPages: + heading: Info Pages + newPage: New Page + phSelectPage: Select page + noPage: Please select an info page or create a new one! search: searchAction: Search diff --git a/Tekst-Web/public/base.css b/Tekst-Web/public/base.css index cc80ed292..b81047120 100644 --- a/Tekst-Web/public/base.css +++ b/Tekst-Web/public/base.css @@ -36,8 +36,8 @@ :root { --font-size: 20px; --font-size-mini: 14px; - --font-size-tiny: 16px; - --font-size-small: 18px; + --font-size-tiny: 15px; + --font-size-small: 16px; --font-size-medium: 18px; --font-size-large: 22px; --font-size-huge: 24px; diff --git a/Tekst-Web/src/api/index.ts b/Tekst-Web/src/api/index.ts index 5a6f1c163..d2394d0d5 100644 --- a/Tekst-Web/src/api/index.ts +++ b/Tekst-Web/src/api/index.ts @@ -299,7 +299,6 @@ export type LocationData = components['schemas']['LocationData']; // platform -export type PlatformStats = components['schemas']['PlatformStats']; export type PlatformData = components['schemas']['PlatformData']; export type PlatformSettingsRead = components['schemas']['PlatformStateRead']; export type PlatformSettingsUpdate = components['schemas']['PlatformStateUpdate']; diff --git a/Tekst-Web/src/api/schema.d.ts b/Tekst-Web/src/api/schema.d.ts index 02e3d4399..59d38bdf7 100644 --- a/Tekst-Web/src/api/schema.d.ts +++ b/Tekst-Web/src/api/schema.d.ts @@ -478,23 +478,6 @@ export interface paths { patch?: never; trace?: never; }; - '/platform/stats': { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - /** Get statistics */ - get: operations['getStatistics']; - put?: never; - post?: never; - delete?: never; - options?: never; - head?: never; - patch?: never; - trace?: never; - }; '/platform/tasks': { parameters: { query?: never; @@ -571,8 +554,8 @@ export interface paths { path?: never; cookie?: never; }; - /** Trigger resources maintenance */ - get: operations['triggerResourcesMaintenance']; + /** Trigger precomputation */ + get: operations['triggerPrecomputation']; put?: never; post?: never; delete?: never; @@ -4501,16 +4484,6 @@ export interface components { */ oskModes?: components['schemas']['OskMode'][]; }; - /** - * PlatformStats - * @description Platform statistics data - */ - PlatformStats: { - /** Userscount */ - usersCount: number; - /** Texts */ - texts: components['schemas']['TextStats'][]; - }; /** @enum {string} */ PrivateUserProp: 'name' | 'affiliation' | 'bio'; PrivateUserProps: components['schemas']['PrivateUserProp'][]; @@ -5837,25 +5810,6 @@ export interface components { } & { [key: string]: unknown; }; - /** - * TextStats - * @description Text statistics data - */ - TextStats: { - /** - * Id - * @example 5eb7cf5a86d9755df3a6c593 - */ - id: string; - /** Locationscount */ - locationsCount: number; - /** Resourcescount */ - resourcesCount: number; - /** Resourcetypes */ - resourceTypes: { - [key: string]: number; - }; - }; /** TextSubtitleTranslation */ TextSubtitleTranslation: { locale: components['schemas']['TranslationLocaleKey']; @@ -7892,44 +7846,6 @@ export interface operations { }; }; }; - getStatistics: { - parameters: { - query?: never; - header?: never; - path?: never; - cookie?: never; - }; - requestBody?: never; - responses: { - /** @description Successful Response */ - 200: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['PlatformStats']; - }; - }; - /** @description Unauthorized */ - 401: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['TekstErrorModel']; - }; - }; - /** @description Forbidden */ - 403: { - headers: { - [name: string]: unknown; - }; - content: { - 'application/json': components['schemas']['TekstErrorModel']; - }; - }; - }; - }; getAllTasksStatus: { parameters: { query?: never; @@ -8124,7 +8040,7 @@ export interface operations { }; }; }; - triggerResourcesMaintenance: { + triggerPrecomputation: { parameters: { query?: never; header?: never; diff --git a/Tekst-Web/src/components/FormSectionHeading.vue b/Tekst-Web/src/components/FormSectionHeading.vue index b51daff25..faa956a04 100644 --- a/Tekst-Web/src/components/FormSectionHeading.vue +++ b/Tekst-Web/src/components/FormSectionHeading.vue @@ -1,6 +1,6 @@ diff --git a/Tekst-Web/src/components/InsertItemSeparator.vue b/Tekst-Web/src/components/InsertItemSeparator.vue index 561e418d2..3d7c4f4f8 100644 --- a/Tekst-Web/src/components/InsertItemSeparator.vue +++ b/Tekst-Web/src/components/InsertItemSeparator.vue @@ -16,6 +16,7 @@ defineEmits(['click']); -
+
{{ $t(`tasks.types.${task.type}`) }} ({{ $t(`tasks.statuses.${task.status}`) }})
diff --git a/Tekst-Web/src/components/editors/HtmlEditor.vue b/Tekst-Web/src/components/editors/HtmlEditor.vue index 740845c76..f035502de 100644 --- a/Tekst-Web/src/components/editors/HtmlEditor.vue +++ b/Tekst-Web/src/components/editors/HtmlEditor.vue @@ -78,7 +78,6 @@ watch( -
+
diff --git a/Tekst-Web/src/components/modals/EditLocationModal.vue b/Tekst-Web/src/components/modals/EditLocationModal.vue index 6b1f6966d..0701ffc66 100644 --- a/Tekst-Web/src/components/modals/EditLocationModal.vue +++ b/Tekst-Web/src/components/modals/EditLocationModal.vue @@ -67,7 +67,7 @@ defineExpose({ open }); diff --git a/Tekst-Web/src/components/navigation/UserActionsButton.vue b/Tekst-Web/src/components/navigation/UserActionsButton.vue index d93da6e9e..7989477ce 100644 --- a/Tekst-Web/src/components/navigation/UserActionsButton.vue +++ b/Tekst-Web/src/components/navigation/UserActionsButton.vue @@ -8,6 +8,7 @@ import { LogoutIcon, MessageIcon, ResourceIcon, + TextsIcon, UserIcon, } from '@/icons'; import { @@ -72,6 +73,20 @@ const userOptions = computed(() => [ key: 'resources', icon: renderIcon(ResourceIcon), }, + ...(!!auth.user?.isSuperuser + ? [ + { + label: renderLink(() => $t('texts.heading'), { + name: 'textSettings', + params: { + textSlug: state.text?.slug || '', + }, + }), + key: 'adminText', + icon: renderIcon(TextsIcon), + }, + ] + : []), ...(auth.user?.isSuperuser ? [ { diff --git a/Tekst-Web/src/components/navigation/navMenuOptions.ts b/Tekst-Web/src/components/navigation/navMenuOptions.ts index 0680c8444..8b2f551cc 100644 --- a/Tekst-Web/src/components/navigation/navMenuOptions.ts +++ b/Tekst-Web/src/components/navigation/navMenuOptions.ts @@ -13,13 +13,10 @@ import { computed, h } from 'vue'; import { RouterLink, type RouteLocationRaw } from 'vue-router'; import { - AddCircleIcon, - BarChartIcon, BookIcon, CommunityIcon, EyeIcon, InfoIcon, - LevelsIcon, LogoutIcon, MaintenanceIcon, ManageAccountIcon, @@ -28,9 +25,7 @@ import { SearchIcon, SegmentsIcon, SettingsIcon, - SystemIcon, TextsIcon, - TreeIcon, UsersIcon, } from '@/icons'; @@ -41,9 +36,6 @@ function renderLink(label: unknown, to: RouteLocationRaw, props?: Record $t('texts.heading'), { + name: 'textSettings', + params: { + textSlug: state.text?.slug || '', + }, + }), + key: 'textSettings', + icon: (showIcons && renderIcon(TextsIcon)) || undefined, + }, + ] + : []), ...(infoPagesOptions.value.length ? [ { @@ -204,103 +210,39 @@ export function useAccountMenuOptions(showIcons: boolean = true) { } export function useAdminMenuOptions(showIcons: boolean = true) { - const state = useStateStore(); - const menuOptions = computed(() => [ { - label: renderLink(() => $t('admin.statistics.heading'), { name: 'adminStatistics' }), - key: 'adminStatistics', - icon: (showIcons && renderIcon(BarChartIcon)) || undefined, + label: renderLink(() => $t('general.settings'), { + name: 'adminSettings', + }), + key: 'adminSettings', + icon: (showIcons && renderIcon(SettingsIcon)) || undefined, }, { - label: $t('admin.text.heading'), - key: 'adminText', - icon: (showIcons && renderIcon(TextsIcon)) || undefined, - children: [ - { - key: 'currentTextGroup', - type: 'group', - label: state.text?.title || '', - children: [ - { - label: renderLink(() => $t('general.settings'), { - name: 'adminTextsSettings', - params: { textSlug: state.text?.slug }, - }), - key: 'adminTextsSettings', - icon: (showIcons && renderIcon(SettingsIcon)) || undefined, - }, - { - label: renderLink(() => $t('admin.text.levels.heading'), { - name: 'adminTextsLevels', - params: { textSlug: state.text?.slug }, - }), - key: 'adminTextsLevels', - icon: (showIcons && renderIcon(LevelsIcon)) || undefined, - }, - { - label: renderLink(() => $t('admin.text.locations.heading'), { - name: 'adminTextsLocations', - params: { textSlug: state.text?.slug }, - }), - key: 'adminTextsLocations', - icon: (showIcons && renderIcon(TreeIcon)) || undefined, - }, - ], - }, - { - key: 'textGeneralGroup', - type: 'group', - label: $t('general.general'), - children: [ - { - label: renderLink(() => $t('admin.newText.heading'), { name: 'adminNewText' }), - key: 'adminNewText', - icon: (showIcons && renderIcon(AddCircleIcon)) || undefined, - }, - ], - }, - ], + label: renderLink(() => $t('admin.infoPages.heading'), { + name: 'adminInfoPages', + }), + key: 'adminInfoPages', + icon: (showIcons && renderIcon(InfoIcon)) || undefined, }, { - label: $t('admin.system.heading'), - key: 'adminSystem', - icon: (showIcons && renderIcon(SystemIcon)) || undefined, - children: [ - { - label: renderLink(() => $t('general.settings'), { - name: 'adminSystemSettings', - }), - key: 'adminSystemSettings', - icon: (showIcons && renderIcon(SettingsIcon)) || undefined, - }, - { - label: renderLink(() => $t('admin.system.infoPages.heading'), { - name: 'adminSystemInfoPages', - }), - key: 'adminSystemInfoPages', - icon: (showIcons && renderIcon(InfoIcon)) || undefined, - }, - { - label: renderLink(() => $t('admin.system.segments.heading'), { - name: 'adminSystemSegments', - }), - key: 'adminSystemSegments', - icon: (showIcons && renderIcon(SegmentsIcon)) || undefined, - }, - { - label: renderLink(() => $t('admin.users.heading'), { name: 'adminSystemUsers' }), - key: 'adminSystemUsers', - icon: (showIcons && renderIcon(UsersIcon)) || undefined, - }, - { - label: renderLink(() => $t('admin.system.maintenance.heading'), { - name: 'adminSystemMaintenance', - }), - key: 'adminSystemMaintenance', - icon: (showIcons && renderIcon(MaintenanceIcon)) || undefined, - }, - ], + label: renderLink(() => $t('admin.segments.heading'), { + name: 'adminSegments', + }), + key: 'adminSegments', + icon: (showIcons && renderIcon(SegmentsIcon)) || undefined, + }, + { + label: renderLink(() => $t('admin.users.heading'), { name: 'adminUsers' }), + key: 'adminUsers', + icon: (showIcons && renderIcon(UsersIcon)) || undefined, + }, + { + label: renderLink(() => $t('admin.maintenance.heading'), { + name: 'adminMaintenance', + }), + key: 'adminMaintenance', + icon: (showIcons && renderIcon(MaintenanceIcon)) || undefined, }, ]); diff --git a/Tekst-Web/src/composables/fetchers.ts b/Tekst-Web/src/composables/fetchers.ts index 27d2bbb95..1af13a1a3 100644 --- a/Tekst-Web/src/composables/fetchers.ts +++ b/Tekst-Web/src/composables/fetchers.ts @@ -1,10 +1,4 @@ -import type { - PlatformStats, - PublicUserSearchFilters, - UserRead, - UserReadPublic, - UserSearchFilters, -} from '@/api'; +import type { PublicUserSearchFilters, UserRead, UserReadPublic, UserSearchFilters } from '@/api'; import { GET } from '@/api'; import { STATIC_PATH } from '@/common'; import { $t } from '@/i18n'; @@ -46,28 +40,6 @@ export function useProfile( return { user, error }; } -export function useStats() { - const stats = ref(null); - const error = ref(false); - - async function load() { - stats.value = null; - error.value = false; - - const { data, error: err } = await GET('/platform/stats', {}); - - if (!err) { - stats.value = data; - } else { - error.value = true; - } - } - - load(); - - return { stats, error, load }; -} - export function useUsersAdmin(filtersRef: Ref) { const users = ref>([]); const total = ref(0); diff --git a/Tekst-Web/src/forms/resources/config/ResourceSettingsFormItems.vue b/Tekst-Web/src/forms/resources/config/ResourceSettingsFormItems.vue index b03e75444..632f0263b 100644 --- a/Tekst-Web/src/forms/resources/config/ResourceSettingsFormItems.vue +++ b/Tekst-Web/src/forms/resources/config/ResourceSettingsFormItems.vue @@ -29,9 +29,9 @@ watch( diff --git a/Tekst-Web/src/views/admin/AdminSystemMaintenanceView.vue b/Tekst-Web/src/views/admin/AdminSystemMaintenanceView.vue index ced4174b2..c59cf38ba 100644 --- a/Tekst-Web/src/views/admin/AdminSystemMaintenanceView.vue +++ b/Tekst-Web/src/views/admin/AdminSystemMaintenanceView.vue @@ -3,6 +3,7 @@ import HelpButtonWidget from '@/components/HelpButtonWidget.vue'; import { $t } from '@/i18n'; import { DELETE, GET, type IndexInfoResponse, type TaskRead } from '@/api'; +import FormSectionHeading from '@/components/FormSectionHeading.vue'; import ButtonShelf from '@/components/generic/ButtonShelf.vue'; import IconHeading from '@/components/generic/IconHeading.vue'; import { useMessages } from '@/composables/messages'; @@ -11,6 +12,7 @@ import { DeleteIcon, MaintenanceIcon, RefreshIcon, UpdateIcon } from '@/icons'; import { useStateStore, useThemeStore } from '@/stores'; import { utcToLocalTime } from '@/utils'; import { + NAlert, NButton, NIcon, NTable, @@ -33,7 +35,7 @@ const tabsRef = ref(); const allTasks = ref([]); const indicesInfo = ref(); const indicesInfoLoading = ref(false); -const resourceMaintenanceLoading = ref(false); +const precomputedLoading = ref(false); const tasksLoading = ref(false); const statusColors: Record = { @@ -48,21 +50,21 @@ async function createIndex() { const { data, error } = await GET('/search/index/create'); if (!error) { addTask(data); - message.info($t('admin.system.maintenance.indices.actionCreateStarted')); + message.info($t('admin.maintenance.indices.actionCreateStarted')); startTasksPolling(); } indicesInfoLoading.value = false; } -async function triggerResourceMaintenance() { - resourceMaintenanceLoading.value = true; +async function triggerPrecomputation() { + precomputedLoading.value = true; const { data, error } = await GET('/resources/maintenance'); if (!error) { addTask(data); - message.info($t('admin.system.maintenance.resourceMaintenance.actionStarted')); + message.info($t('admin.maintenance.precomputed.actionStarted')); startTasksPolling(); } - resourceMaintenanceLoading.value = false; + precomputedLoading.value = false; } async function deleteTask(id: string) { @@ -78,7 +80,7 @@ async function deleteAllTasks() { tasksLoading.value = true; const { error } = await DELETE('/platform/tasks'); if (!error) { - message.success($t('admin.system.maintenance.tasks.actionDeleteAllSuccess')); + message.success($t('admin.maintenance.tasks.actionDeleteAllSuccess')); allTasks.value = []; } tasksLoading.value = false; @@ -132,70 +134,75 @@ onBeforeMount(() => {