This is an automated email from the ASF dual-hosted git repository. riemer pushed a commit to branch minor-improvements-entry-page in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit 3169170fadeb51417170adfbd289ed442968c51d Author: Dominik Riemer <[email protected]> AuthorDate: Wed Dec 17 14:34:31 2025 +0100 style: Minor UX improvements, add translations --- ui/deployment/i18n/de.json | 44 ++++++---- ui/deployment/i18n/en.json | 44 ++++++---- .../asset-map/home-asset-map.component.ts | 21 +++-- ui/src/app/home/home.component.html | 98 ++++++++++++---------- ui/src/app/home/home.component.scss | 1 + 5 files changed, 124 insertions(+), 84 deletions(-) diff --git a/ui/deployment/i18n/de.json b/ui/deployment/i18n/de.json index 801d314eb2..29f4b8c50a 100644 --- a/ui/deployment/i18n/de.json +++ b/ui/deployment/i18n/de.json @@ -62,6 +62,7 @@ "Edit": "Bearbeiten", "Manage permissions": "Berechtigungen verwalten", "Delete": "Löschen", + "Monitoring": "Monitoring", "The desired pipeline was not found!": "Die gewünschte Pipeline wurde nicht gefunden", "no log messages available": "keine Logs verfügbar", "Data Preview": "Datenvorschau", @@ -111,7 +112,20 @@ "Login with": "Anmelden mit", "Documentation": "Dokumentation", "API Documentation": "API-Dokumentation", - "Welcome": "Willkommen", + "Assets": "Assets", + "Map": "Karte", + "Table": "Tabelle", + "Map configuration required": "Karteneinstellungen benötigt", + "To enable the map view, a map provider needs to be configured. Admins can configure map providers under Settings -> Sites.": "Um die Kartenansicht zu aktivieren, ist ein konfigurierter Kartenanbieter erforderlich. Administratoren können Kartenanbieter unter Einstellungen → Standorte verwalten.", + "No assets found.": "Keine Assets gefunden", + "Start by creating an asset in Assets → New Asset. Once created, you can add asset links to better organize and track your resources.": "Starten Sie, indem Sie ein Asset unter Assets → Neues Asset erstellen. Sobald es erstellt wurde, können Sie Asset-Links hinzufügen, um Ihre Ressourcen besser zu organisieren und zu verwalten.", + "New": "Neu", + "Type": "Typ", + "Location": "Lage", + "Area": "Bereich", + "Links": "Links", + "No linked resources": "Keine verknüpften Ressourcen", + "Show asset": "Asset anzeigen", "Preparing pipeline editor...": "Pipeline-Editor vorbereiten...", "Pipeline Name": "Name der Rohrleitung", "Pipeline name can only contain letters, numbers, dashes (-), and underscores (_).": "Pipeline-Namen dürfen nur Buchstaben, Zahlen, Bindestriche (-) und Unterstriche (_) enthalten.", @@ -209,7 +223,6 @@ "Remove index from database": "Index aus der Datenbank löschen", "Export Providers": "Exportanbieter", "Add, Edit, and Delete export providers used for backing up data lakes.": "Hinzufügen, Bearbeiten und Löschen von Exportanbietern, die für die Sicherung von Data Lakes verwendet werden.", - "New": "Neu", "Edit Export Provider": "Exportanbieter bearbeiten", "Remove": "Löschen", "Remove export provider configuration": "Konfiguration des Exportanbieters entfernen", @@ -370,6 +383,8 @@ "Manage your organization's sites and production areas": "Verwaltung der Standorte und Produktionsbereiche", "Site": "Standort", "Areas": "Bereiche", + "To delete a site, please remove the site from all assets": "Um einen Standort zu entfernen, muss der Standort aus allen Assets entfernt werden.", + "Delete site": "Standort löschen", "Geo features": "Geo-Features", "Geo features are used to better organize assets.": "Geo-Features dienen der besseren Organisation von Assets.", "Enable geo features": "Geo-Features aktivieren", @@ -396,7 +411,6 @@ "Group ID": "Gruppen-ID", "Edit user": "Benutzer bearbeiten", "Delete service": "Service löschen", - "Type": "Typ", "Full Name": "Vor- und Nachname", "Last Login": "Letzte Anmeldung", "Delete user": "Benutzer löschen", @@ -444,6 +458,7 @@ "Edit label": "Label bearbeiten", "To delete a label, please remove the label from all assets": "Um ein Label zu löschen, entfernen Sie bitte das Label aus allen Assets", "Delete label": "Label löschen", + "Color": "Farbe", "Basic": "Allgemein", "Basic settings": "Grundeinstellungen", "Default values": "Standardwerte", @@ -464,7 +479,6 @@ "Terms acknowledgment after login": "Bestätigung von Nutzungsbedingungen nach dem Login", "Require users to accept terms after login": "Benutzer müssen Nutzungsbedingungen nach Anmeldung akzeptieren", "Dialog Title": "Dialogfeld", - "Links": "Links", "Configure application links": "Anwendungslinks konfigurieren", "Documentation Link": "Dokumentations-Link", "Define individual link targets to the documentation": "Definieren Sie individuelle Linkziele zur Dokumentation", @@ -528,7 +542,6 @@ "Check that the uploaded zip file is a valid export": "Prüfen Sie, ob die hochgeladene Zip-Datei ein gültiger Export ist", "Select resources to import": "Zu importierende Ressourcen auswählen", "Deselect all": "Alle abwählen", - "Assets": "Assets", "Data Lake Storage": "Speicherung im Data Lake", "Pipelines": "Pipelines", "Import options": "Import Optionen", @@ -542,7 +555,6 @@ "Download export": "Export herunterladen", "Additional documents from generic storage": "Zusätzliche Dokumente aus dem Generic Storage", "Document ID": "Dokument-ID", - "No linked resources": "Keine verknüpften Ressourcen", "Only linked resources are part of the application package.": "Nur verknüpfte Ressourcen sind Teil des Anwendungspakets.", "Mail Settings": "E-Mail-Einstellungen", "Settings to connect to a mail server": "Einstellungen zur Verbindung mit einem Mailserver", @@ -578,7 +590,6 @@ "New site": "Neuer Standort", "Site name is required": "Standortname erforderlich", "Available areas within the site (e.g. plants or facilities)": "Verfügbare Flächen innerhalb des Standorts (z.B. Werke oder Anlagen)", - "Location": "Lage", "Exact location of the site": "Genaue Lage des Standorts", "No areas defined yet.": "Noch keine Bereiche definiert.", "This site already exists": "Standort existiert bereits", @@ -671,7 +682,6 @@ "Delete Chart": "Diagramm löschen", "The current data selection can't be displayed by this chart.": "Die aktuelle Auswahl kann in diesem Diagramm nicht angezeigt werden.", "Field settings": "Feldeinstellungen", - "Color": "Farbe", "Bar": "Balken", "Line": "Linien", "Scatter": "Streudiagramm", @@ -701,7 +711,8 @@ "Clone Data Source": "Datenquelle klonen", "Delete Data Source": "Datenquelle löschen", "Dataset": "Datensatz", - "No data available! Please connect an adapter or verify your pipeline is running": "Keine Daten verfügbar! Bitte schließen Sie einen Adapter an oder überprüfen Sie, ob Ihre Pipeline läuft", + "No datasets available": "Keine Datensätze verfügbar", + "Please connect an adapter or verify your pipeline is running": "Erstellen Sie einen neuen Adapter oder stellen Sie sicher, dass die zugehörige Pipeline gestartet wurde.", "Connect Adapter": "Adapter anschließen", "Query": "Abfrage", "Expand Less": "Ausklappen", @@ -740,6 +751,7 @@ "Edit chart": "Diagramm bearbeiten", "Clone chart": "Diagramm kopieren", "Delete chart": "Diagramm löschen", + "Info": "Info", "Select All": "Alle auswählen", "Deselect All": "Alle abwählen", "Update links": "Links aktualisieren", @@ -773,7 +785,6 @@ "Sites": "Standorte", "Assign a location (site and area) to this asset": "Weisen Sie diesem Asset einen Standort (Standort und Gebiet) zu", "Manage Sites": "Standorte verwalten", - "Area": "Bereich", "Add exact location": "Genauen Standort hinzufügen", "Assign additional labels to better discover your assets": "Weisen Sie zusätzliche Labels zu, um Ihre Assets besser zu finden", "Manage Labels": "Labels verwalten", @@ -787,6 +798,10 @@ "Network Error": "Netzwerkfehler", "Deleting pipeline...": "Löschen der Pipeline...", "Stopping pipeline...": "Pipeline stoppen...", + "Running": "Gestartet", + "Good morning": "Guten Morgen", + "Good afternoon": "Guten Tag", + "Good evening": "Guten Abend", "Testing the connection.": "Testen der Verbindung.", "Connection was established and test file was successfully saved:": "Die Verbindung wurde hergestellt und die Testdatei wurde erfolgreich gespeichert:", "Connection could not be established.": "Die Verbindung konnte nicht hergestellt werden.", @@ -880,12 +895,10 @@ "Email custom inner content (mandatory)": "Benutzerdefinierter E-Mail-Inhalt (erforderlich)", "Gauge": "Gauge", "The current value displayed in a gauge": "Der aktuelle Wert, der im Gauge-Chart angezeigt wird", - "Table": "Tabelle", "A table displaying the data in rows and columns": "Eine Tabelle, die Daten in Zeilen und Spalten anzeigt", "Traffic Light": "Ampel", "A traffic light that shows if a value is above/below a threshold": "Eine Ampel, die anzeigt, ob ein Wert über/unter einem Schwellenwert liegt", "A simple red/green status light": "Eine einfache rot/grüne Statuslampe", - "Map": "Karte", "A map visualization for spatial coordinates": "Eine Kartenvisualisierung für räumliche Koordinaten", "Time-Series Heatmap": "Zeitreihen-Heatmap", "A heatmap that shows values mapped to a color range": "Eine Heatmap, die einem Farbbereich zugeordnete Werte anzeigt", @@ -962,6 +975,7 @@ "Download successful": "Download erfolgreich", "Apply": "Anwenden", "Refresh interval": "Aktualisierungsintervall", + "Preview": "Vorschau", "No entries available.": "Keine Einträge vorhanden.", "Probable cause": "Wahrscheinliche Ursache", "No more information": "Keine weiteren Informationen", @@ -975,9 +989,7 @@ "Preview is currently unavailable.": "Die Vorschau ist derzeit nicht verfügbar.", "(no documentation available)": "(keine Dokumentation verfügbar)", "Show input fields": "Eingabefelder anzeigen", - "No assets found - use assets to better organize resources!": "Keine Assets gefunden - verwenden Sie Assets, um Ressourcen besser zu organisieren!", - "Manage assets": "Assets verwalten", - "Asset Browser": "Asset-Browser", + "Lifecycle": "Lebenszyklus", "Filter assets": "Assets filtern", "All assets": "Alle Assets", "Reset filters": "Filter zurücksetzen", @@ -1010,13 +1022,11 @@ "Boolean": "Boolean", "List": "Liste", "Nested": "Verschachtelt", - "Preview": "Vorschau", "Items per page": "Einträge pro Seite", "Next page": "Nächste Seite", "Previous page": "Vorherige Seite", " of ": " von ", " items ": " Einträge", "Error Details": "Fehler-Details", - "All {{allResourcesAlias}}": "Alle {{allResourcesAlias}}", "{{ widgetTitle }} Clone": "{{ widgetTitle }} Kopie" } diff --git a/ui/deployment/i18n/en.json b/ui/deployment/i18n/en.json index 369b497ee3..da4d67205d 100644 --- a/ui/deployment/i18n/en.json +++ b/ui/deployment/i18n/en.json @@ -62,6 +62,7 @@ "Edit": null, "Manage permissions": null, "Delete": null, + "Monitoring": null, "The desired pipeline was not found!": null, "no log messages available": null, "Data Preview": null, @@ -111,7 +112,20 @@ "Login with": null, "Documentation": null, "API Documentation": null, - "Welcome": null, + "Assets": null, + "Map": null, + "Table": null, + "Map configuration required": null, + "To enable the map view, a map provider needs to be configured. Admins can configure map providers under Settings -> Sites.": null, + "No assets found.": null, + "Start by creating an asset in Assets → New Asset. Once created, you can add asset links to better organize and track your resources.": null, + "New": null, + "Type": null, + "Location": null, + "Area": null, + "Links": null, + "No linked resources": null, + "Show asset": null, "Preparing pipeline editor...": null, "Pipeline Name": null, "Pipeline name can only contain letters, numbers, dashes (-), and underscores (_).": null, @@ -209,7 +223,6 @@ "Remove index from database": null, "Export Providers": null, "Add, Edit, and Delete export providers used for backing up data lakes.": null, - "New": null, "Edit Export Provider": null, "Remove": null, "Remove export provider configuration": null, @@ -370,6 +383,8 @@ "Manage your organization's sites and production areas": null, "Site": null, "Areas": null, + "To delete a site, please remove the site from all assets": null, + "Delete site": null, "Geo features": null, "Geo features are used to better organize assets.": null, "Enable geo features": null, @@ -396,7 +411,6 @@ "Group ID": null, "Edit user": null, "Delete service": null, - "Type": null, "Full Name": null, "Last Login": null, "Delete user": null, @@ -444,6 +458,7 @@ "Edit label": null, "To delete a label, please remove the label from all assets": null, "Delete label": null, + "Color": null, "Basic": null, "Basic settings": null, "Default values": null, @@ -464,7 +479,6 @@ "Terms acknowledgment after login": null, "Require users to accept terms after login": null, "Dialog Title": null, - "Links": null, "Configure application links": null, "Documentation Link": null, "Define individual link targets to the documentation": null, @@ -528,7 +542,6 @@ "Check that the uploaded zip file is a valid export": null, "Select resources to import": null, "Deselect all": null, - "Assets": null, "Data Lake Storage": null, "Pipelines": null, "Import options": null, @@ -542,7 +555,6 @@ "Download export": null, "Additional documents from generic storage": null, "Document ID": null, - "No linked resources": null, "Only linked resources are part of the application package.": null, "Mail Settings": null, "Settings to connect to a mail server": null, @@ -578,7 +590,6 @@ "New site": null, "Site name is required": null, "Available areas within the site (e.g. plants or facilities)": null, - "Location": null, "Exact location of the site": null, "No areas defined yet.": null, "This site already exists": null, @@ -671,7 +682,6 @@ "Delete Chart": null, "The current data selection can't be displayed by this chart.": null, "Field settings": null, - "Color": null, "Bar": null, "Line": null, "Scatter": null, @@ -701,7 +711,8 @@ "Clone Data Source": null, "Delete Data Source": null, "Dataset": null, - "No data available! Please connect an adapter or verify your pipeline is running": null, + "No datasets available": null, + "Please connect an adapter or verify your pipeline is running": null, "Connect Adapter": null, "Query": null, "Expand Less": null, @@ -740,6 +751,7 @@ "Edit chart": null, "Clone chart": null, "Delete chart": null, + "Info": null, "Select All": null, "Deselect All": null, "Update links": null, @@ -773,7 +785,6 @@ "Sites": null, "Assign a location (site and area) to this asset": null, "Manage Sites": null, - "Area": null, "Add exact location": null, "Assign additional labels to better discover your assets": null, "Manage Labels": null, @@ -787,6 +798,10 @@ "Network Error": null, "Deleting pipeline...": null, "Stopping pipeline...": null, + "Running": null, + "Good morning": null, + "Good afternoon": null, + "Good evening": null, "Testing the connection.": null, "Connection was established and test file was successfully saved:": null, "Connection could not be established.": null, @@ -880,12 +895,10 @@ "Email custom inner content (mandatory)": null, "Gauge": null, "The current value displayed in a gauge": null, - "Table": null, "A table displaying the data in rows and columns": null, "Traffic Light": null, "A traffic light that shows if a value is above/below a threshold": null, "A simple red/green status light": null, - "Map": null, "A map visualization for spatial coordinates": null, "Time-Series Heatmap": null, "A heatmap that shows values mapped to a color range": null, @@ -962,6 +975,7 @@ "Download successful": null, "Apply": null, "Refresh interval": null, + "Preview": null, "No entries available.": null, "Probable cause": null, "No more information": null, @@ -975,9 +989,7 @@ "Preview is currently unavailable.": null, "(no documentation available)": null, "Show input fields": null, - "No assets found - use assets to better organize resources!": null, - "Manage assets": null, - "Asset Browser": null, + "Lifecycle": null, "Filter assets": null, "All assets": null, "Reset filters": null, @@ -1010,13 +1022,11 @@ "Boolean": null, "List": null, "Nested": null, - "Preview": null, "Items per page": null, "Next page": null, "Previous page": null, " of ": null, " items ": null, "Error Details": null, - "All {{allResourcesAlias}}": "All {{allResourcesAlias}}", "{{ widgetTitle }} Clone": "{{ widgetTitle }} Clone" } diff --git a/ui/src/app/home/components/asset-map/home-asset-map.component.ts b/ui/src/app/home/components/asset-map/home-asset-map.component.ts index d06b40c59d..eaaf33b427 100644 --- a/ui/src/app/home/components/asset-map/home-asset-map.component.ts +++ b/ui/src/app/home/components/asset-map/home-asset-map.component.ts @@ -126,15 +126,20 @@ export class HomeAssetMapComponent implements OnInit, OnChanges { this.markersGroup.addLayer(marker); }); const bounds = (this.markersGroup as any).getBounds?.(); - if (!bounds || !bounds.isValid()) return; - - const sw = bounds.getSouthWest(); - const ne = bounds.getNorthEast(); - - if (sw.equals(ne)) { - this.map.setView(sw, Math.min(this.map.getMaxZoom() ?? 18, 18)); + if (!bounds || !bounds.isValid()) { + this.map.setView( + { lat: 0, lng: 0 }, + Math.min(this.map.getMaxZoom() ?? 3, 3), + ); } else { - this.map.fitBounds(bounds, { padding: [24, 24] }); + const sw = bounds.getSouthWest(); + const ne = bounds.getNorthEast(); + + if (sw.equals(ne)) { + this.map.setView(sw, Math.min(this.map.getMaxZoom() ?? 18, 18)); + } else { + this.map.fitBounds(bounds, { padding: [24, 24] }); + } } } diff --git a/ui/src/app/home/home.component.html b/ui/src/app/home/home.component.html index 07360dbf72..e8534adb39 100644 --- a/ui/src/app/home/home.component.html +++ b/ui/src/app/home/home.component.html @@ -40,54 +40,68 @@ [title]="'Assets' | translate" class="asset-section" > - <div section-actions> - <mat-button-toggle-group - name="Asset view" - aria-label="Asset view mode" - [value]="selectedView()" - (change)="updateView($event.value)" - > - <mat-button-toggle value="map" - >{{ 'Map' | translate }} - </mat-button-toggle> - <mat-button-toggle value="table">{{ - 'Table' | translate - }}</mat-button-toggle> - </mat-button-toggle-group> - </div> - <div fxFlexFill fxLayout="column" class="assets-content"> - @if (selectedView() === 'map') { - @if (locationConfig && locationConfig.locationEnabled) { - <sp-home-asset-map - class="h-100 map" + @if (assets.length > 0) { + <div section-actions> + <mat-button-toggle-group + name="Asset view" + aria-label="Asset view mode" + [value]="selectedView()" + (change)="updateView($event.value)" + > + <mat-button-toggle value="map" + >{{ 'Map' | translate }} + </mat-button-toggle> + <mat-button-toggle value="table">{{ + 'Table' | translate + }}</mat-button-toggle> + </mat-button-toggle-group> + </div> + <div fxFlexFill fxLayout="column" class="assets-content"> + @if (selectedView() === 'map') { + @if ( + locationConfig && locationConfig.locationEnabled + ) { + <sp-home-asset-map + class="h-100 map" + [assetLinkTypes]="assetLinkTypes" + [sites]="sites" + [locationConfig]="locationConfig" + [assets]="filteredAssets" + ></sp-home-asset-map> + } @else { + <sp-alert-banner + type="info" + [title]=" + 'Map configuration required' | translate + " + [description]=" + 'To enable the map view, a map provider needs to be configured. Admins can configure map providers under Settings -> Sites.' + | translate + " + > + </sp-alert-banner> + } + } @else { + <sp-home-asset-table [assetLinkTypes]="assetLinkTypes" [sites]="sites" [locationConfig]="locationConfig" [assets]="filteredAssets" - ></sp-home-asset-map> - } @else { - <sp-alert-banner - type="info" - [title]=" - 'Map configuration required' | translate - " - [description]=" - 'To enable the map view, a map provider needs to be configured. Admins can configure map providers under Settings -> Sites.' - | translate - " > - </sp-alert-banner> + </sp-home-asset-table> } - } @else { - <sp-home-asset-table - [assetLinkTypes]="assetLinkTypes" - [sites]="sites" - [locationConfig]="locationConfig" - [assets]="filteredAssets" - > - </sp-home-asset-table> - } - </div> + </div> + } @else { + <sp-alert-banner + type="info" + [title]="'No assets found.' | translate" + [description]=" + 'Start by creating an asset in Assets → New Asset. Once created, you can add asset links to better organize and track your resources.' + | translate + " + > + </sp-alert-banner> + } </sp-split-section> } </div> diff --git a/ui/src/app/home/home.component.scss b/ui/src/app/home/home.component.scss index 22f5d440ab..b2f0388e7c 100644 --- a/ui/src/app/home/home.component.scss +++ b/ui/src/app/home/home.component.scss @@ -28,6 +28,7 @@ .asset-section { background: var(--color-bg-0); + margin-bottom: 0; } .map {
