This is an automated email from the ASF dual-hosted git repository. riemer pushed a commit to branch fix-migration-issues in repository https://gitbox.apache.org/repos/asf/streampipes.git
commit 354c627c9482f4c83b2fb4de95b33daff84c25fe Author: Dominik Riemer <[email protected]> AuthorDate: Thu Dec 18 09:35:13 2025 +0100 fix: Migration issues when importing exported resources --- .../v099/UniqueDashboardIdMigration.java | 10 ++++----- .../chart-container/chart-container.component.html | 3 ++- .../datalake-configuration.component.html | 4 ++-- .../asset-table-link-preview.component.html | 26 ++++++++++++---------- .../asset-table-link-preview.component.ts | 1 + .../asset-table/home-asset-table.component.ts | 2 +- ui/src/app/home/components/status.component.scss | 1 - ui/src/app/home/home.component.html | 1 - ui/src/app/home/home.component.scss | 4 +++- 9 files changed, 28 insertions(+), 24 deletions(-) diff --git a/streampipes-service-core/src/main/java/org/apache/streampipes/service/core/migrations/v099/UniqueDashboardIdMigration.java b/streampipes-service-core/src/main/java/org/apache/streampipes/service/core/migrations/v099/UniqueDashboardIdMigration.java index 4bdd2bfe6b..47c286ab5f 100644 --- a/streampipes-service-core/src/main/java/org/apache/streampipes/service/core/migrations/v099/UniqueDashboardIdMigration.java +++ b/streampipes-service-core/src/main/java/org/apache/streampipes/service/core/migrations/v099/UniqueDashboardIdMigration.java @@ -44,7 +44,9 @@ public class UniqueDashboardIdMigration implements Migration { .stream() .anyMatch(d -> d.getWidgets() .stream() - .anyMatch(w -> Objects.nonNull(w.getId()) && w.getId().startsWith(Prefix))); + .anyMatch(w -> + Objects.nonNull(w.getId()) + && (w.getId().startsWith(Prefix) || Objects.isNull(w.getDataViewElementId())))); } @Override @@ -53,11 +55,9 @@ public class UniqueDashboardIdMigration implements Migration { allDashboards.forEach(d -> { d.getWidgets().forEach(w -> { - if (Objects.nonNull(w.getId()) && w.getId().startsWith(Prefix)) { + if (Objects.nonNull(w.getId()) && (w.getId().startsWith(Prefix) || Objects.isNull(w.getDataViewElementId()))) { w.setDataViewElementId(w.getId()); - var uniqueDashboardWidgetId = Objects.nonNull(w.getId()) - ? w.getId() - : RandomStringUtils.randomAlphanumeric(16); + var uniqueDashboardWidgetId = RandomStringUtils.randomAlphanumeric(16); w.setId(uniqueDashboardWidgetId); w.setWidgetId(null); } diff --git a/ui/src/app/chart-shared/components/chart-container/chart-container.component.html b/ui/src/app/chart-shared/components/chart-container/chart-container.component.html index 57f2f3585f..b1320438a1 100644 --- a/ui/src/app/chart-shared/components/chart-container/chart-container.component.html +++ b/ui/src/app/chart-shared/components/chart-container/chart-container.component.html @@ -43,8 +43,9 @@ configuredWidget.baseAppearanceConfig .widgetTitle }} - @if (editMode) { + @if (!dataViewMode && editMode) { <button + class="ml-xs" mat-icon-button (click)="startEditingName()" > diff --git a/ui/src/app/dataset/components/datalake-configuration/datalake-configuration.component.html b/ui/src/app/dataset/components/datalake-configuration/datalake-configuration.component.html index d7a58c29a4..18cbb3b042 100644 --- a/ui/src/app/dataset/components/datalake-configuration/datalake-configuration.component.html +++ b/ui/src/app/dataset/components/datalake-configuration/datalake-configuration.component.html @@ -120,8 +120,8 @@ class="material-icons" [ngStyle]="{ color: configurationEntry?.retention - ? 'green' - : 'red' + ? 'var(--color-success)' + : 'var(--color-neutral' }" >history</i > diff --git a/ui/src/app/home/components/asset-table/asset-table-link-preview/asset-table-link-preview.component.html b/ui/src/app/home/components/asset-table/asset-table-link-preview/asset-table-link-preview.component.html index 1eac4b94ae..a9e15ca5a7 100644 --- a/ui/src/app/home/components/asset-table/asset-table-link-preview/asset-table-link-preview.component.html +++ b/ui/src/app/home/components/asset-table/asset-table-link-preview/asset-table-link-preview.component.html @@ -16,16 +16,18 @@ ~ --> -<button - type="button" - class="link-chip" - [style.--link-color]="currentLinkType.linkColor" - (click)="openPreview(); $event.stopPropagation()" - [attr.aria-label]="assetLink.linkLabel" -> - <i class="material-icons link-icon">{{ currentLinkType.linkIcon }}</i> +@if (currentLinkType) { + <button + type="button" + class="link-chip" + [style.--link-color]="currentLinkType.linkColor" + (click)="openPreview(); $event.stopPropagation()" + [attr.aria-label]="assetLink.linkLabel" + > + <i class="material-icons link-icon">{{ currentLinkType.linkIcon }}</i> - <span class="chip-expander"> - <span class="link-label">{{ assetLink.linkLabel }}</span> - </span> -</button> + <span class="chip-expander"> + <span class="link-label">{{ assetLink.linkLabel }}</span> + </span> + </button> +} diff --git a/ui/src/app/home/components/asset-table/asset-table-link-preview/asset-table-link-preview.component.ts b/ui/src/app/home/components/asset-table/asset-table-link-preview/asset-table-link-preview.component.ts index 8981b9167a..8dee9221d3 100644 --- a/ui/src/app/home/components/asset-table/asset-table-link-preview/asset-table-link-preview.component.ts +++ b/ui/src/app/home/components/asset-table/asset-table-link-preview/asset-table-link-preview.component.ts @@ -38,6 +38,7 @@ export class AssetTableLinkPreviewComponent implements OnInit { private featureCardService = inject(FeatureCardService); ngOnInit() { + console.log(this.assetLinkTypes); this.currentLinkType = this.assetLinkTypes[this.assetLink.linkType]; } diff --git a/ui/src/app/home/components/asset-table/home-asset-table.component.ts b/ui/src/app/home/components/asset-table/home-asset-table.component.ts index 6bcc3f421a..fa8b5406cf 100644 --- a/ui/src/app/home/components/asset-table/home-asset-table.component.ts +++ b/ui/src/app/home/components/asset-table/home-asset-table.component.ts @@ -86,7 +86,7 @@ export class HomeAssetTableComponent implements OnChanges { if (!asset.assetSite?.siteId) { return '-'; } else { - return this.sites[asset.assetSite.siteId].label; + return this.sites[asset.assetSite.siteId]?.label || '-'; } } diff --git a/ui/src/app/home/components/status.component.scss b/ui/src/app/home/components/status.component.scss index 95f3fa93f4..f976008bfd 100644 --- a/ui/src/app/home/components/status.component.scss +++ b/ui/src/app/home/components/status.component.scss @@ -35,7 +35,6 @@ border-radius: 14px; margin-bottom: 20px; - border: 1px solid var(--color-bg-2); background: var(--status-box-bg); color: var(--status-box-color); diff --git a/ui/src/app/home/home.component.html b/ui/src/app/home/home.component.html index 16393f5210..247aa67d00 100644 --- a/ui/src/app/home/home.component.html +++ b/ui/src/app/home/home.component.html @@ -35,7 +35,6 @@ <div fxFlex class="assets-wrapper"> @if (contentLoaded) { <sp-split-section - fxFlex [level]="2" [title]="'Assets' | translate" class="asset-section" diff --git a/ui/src/app/home/home.component.scss b/ui/src/app/home/home.component.scss index b2f0388e7c..0ffb38eb3a 100644 --- a/ui/src/app/home/home.component.scss +++ b/ui/src/app/home/home.component.scss @@ -23,12 +23,14 @@ } .assets-wrapper > .section-body { - height: 100%; + min-height: 100%; } .asset-section { background: var(--color-bg-0); margin-bottom: 0; + flex: 0 0 auto; /* do NOT stretch */ + min-height: 100%; /* keep current minimum */ } .map {
