Skip to content

Commit

Permalink
Merge branch 'zoneless' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
ralfaron committed Jun 6, 2024
2 parents b345cf0 + b0c6653 commit 83b4dac
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion projects/aas-lib/src/lib/aas-tree/aas-tree.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -127,5 +127,5 @@
</tbody>
</table>
} @else {
<div class="alert alert-info text-center mt-2" role="alert">{{'INFO_NO_SHELL_AVAILABLE' | translate}}</div>
<div class="alert alert-info text-center mt-2" role="alert">{{message}}</div>
}
16 changes: 10 additions & 6 deletions projects/aas-lib/src/lib/aas-tree/aas-tree.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -214,14 +214,18 @@ export class AASTreeComponent implements OnInit, OnChanges, OnDestroy {
}

public get message(): string {
if (!this.document || this.document.content) {
return '';
if (this.document) {
if (this.document.content) {
return '';
}

return stringFormat(
this.translate.instant('INFO_AAS_OFFLINE'),
new Date(this.document.timestamp).toLocaleString(this.translate.currentLang),
);
}

return stringFormat(
this.translate.instant('TEXT_AAS_OFFLINE'),
new Date(this.document.timestamp).toLocaleString(this.translate.currentLang),
);
return this.translate.instant('INFO_NO_SHELL_AVAILABLE');
}

public ngOnDestroy(): void {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import { Component, Input, OnChanges, SimpleChanges } from '@angular/core';
import { NgbPagination } from '@ng-bootstrap/ng-bootstrap';
import { TranslateModule } from '@ngx-translate/core';
import { Library } from 'common';

export interface LibraryRow extends Library {
Expand All @@ -19,7 +20,7 @@ export interface LibraryRow extends Library {
templateUrl: './library-table.component.html',
styleUrls: ['./library-table.component.scss'],
standalone: true,
imports: [NgbPagination],
imports: [NgbPagination, TranslateModule],
})
export class LibraryTableComponent implements OnChanges {
@Input()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*****************************************************************************/

import { Component, Input, OnChanges, OnDestroy, QueryList, SimpleChanges, ViewChildren } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { TranslateModule, TranslateService } from '@ngx-translate/core';
import { Message } from 'common';
import { Subscription } from 'rxjs';
import { SortEvent, SortableHeaderDirective } from '../sortable-header.directive';
Expand All @@ -26,7 +26,7 @@ interface MessageTableState {
templateUrl: './message-table.component.html',
styleUrls: ['./message-table.component.scss'],
standalone: true,
imports: [SortableHeaderDirective, NgbPagination],
imports: [SortableHeaderDirective, NgbPagination, TranslateModule],
})
export class MessageTableComponent implements OnChanges, OnDestroy {
private readonly dateTimeOptions: Intl.DateTimeFormatOptions = {
Expand Down
2 changes: 2 additions & 0 deletions projects/aas-portal/src/app/aas/aas.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
!---------------------------------------------------------------------------->

<div id="aas-container" class="container-fluid">
@if (document) {
<div class="row mt-1">
<div class="d-flex flex-row">
<div class="border border-secondary rounded p-1">
Expand All @@ -30,6 +31,7 @@
</div>
</div>
</div>
}
<div class="row">
<fhg-aas-tree #aasTree [state]="state" [search]="search" [document]="document" [(selected)]="selectedElements">
</fhg-aas-tree>
Expand Down
2 changes: 1 addition & 1 deletion projects/aas-portal/src/assets/i18n/de-de.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@
"INFO_NO_SUBMODEL": "Kein Submodel verfügbar.",
"INFO_NO_SHELLS_AVAILABLE": "Keine Verwaltungsschalen verfügbar.",
"INFO_EMPTY_DISPLAY": "Keine Elemente zur Anzeige verfügbar.",
"INFO_AAS_OFFLINE": "Die Verwaltungsschale ist offline. Letzte Aktualisierung: {0}",
"CONFIRM_DELETE_FILE": "{0} unwiderruflich löschen?",
"CONFIRM_DELETE_FILES": "{0} Dateien unwiderruflich löschen?",
"CONFIRM_RESET_CONFIGURATION": "Möchten Sie die AASServer Standardkonfiguration wiederherstellen?",
Expand All @@ -173,7 +174,6 @@
"OPTION_BAR_HORIZONTAL_CHART": "Balkendiagramm horizontal",
"TEXT_ADD_FAVORITE": "1 Favorit hinzufügen ({0}).",
"TEXT_ADD_FAVORITES": "{0} Favoriten hinzufügen ({1}).",
"TEXT_AAS_OFFLINE": "Die Verwaltungsschale ist offline. Letzte Aktualisierung: {0}",
"AASEndpointType": {
"FileSystem": "Verzeichnis",
"AASServer": "AAS-Server",
Expand Down
2 changes: 1 addition & 1 deletion projects/aas-portal/src/assets/i18n/en-us.json
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,7 @@
"INFO_NO_SHELL_AVAILABLE": "No Asset Administration Shell selected.",
"INFO_NO_SHELLS_AVAILABLE": "No Asset Administration Shells available.",
"INFO_EMPTY_DISPLAY": "No elements available for display.",
"INFO_AAS_OFFLINE": "The Asset Administration Shell is offline. Last update: {0}",
"CONFIRM_DELETE_FILE": "Permanently delete {0}?",
"CONFIRM_DELETE_FILES": "Permanently delete {0} files?",
"CONFIRM_RESET_CONFIGURATION": "Do you want to restore the default AASServer configuration?",
Expand All @@ -172,7 +173,6 @@
"OPTION_BAR_HORIZONTAL_CHART": "Horizontal bar chart",
"TEXT_ADD_FAVORITE": "Add 1 favorite ({0}).",
"TEXT_ADD_FAVORITES": "Add {0} favorites ({1}).",
"TEXT_AAS_OFFLINE": "The Asset Administration Shell is offline. Last update: {0}",
"AASEndpointType": {
"FileSystem": "File system",
"AASServer": "AAS server",
Expand Down

0 comments on commit 83b4dac

Please sign in to comment.