feat(platform-services): add platform service log retrieval and display in the services UI

This commit is contained in:
2026-03-16 13:51:43 +00:00
parent ec32c19300
commit 713fda2a86
11 changed files with 104 additions and 15 deletions

View File

@@ -108,6 +108,7 @@ export class ObViewServices extends DeesElement {
platformServices: [],
currentPlatformService: null,
currentPlatformServiceStats: null,
currentPlatformServiceLogs: [],
};
@state()
@@ -357,10 +358,10 @@ export class ObViewServices extends DeesElement {
private navigateToPlatformDetail(type: string): void {
this.selectedPlatformType = type;
// Fetch stats for this platform service
appstate.servicesStatePart.dispatchAction(appstate.fetchPlatformServiceStatsAction, {
serviceType: type as interfaces.data.TPlatformServiceType,
});
// Fetch stats and logs for this platform service
const serviceType = type as interfaces.data.TPlatformServiceType;
appstate.servicesStatePart.dispatchAction(appstate.fetchPlatformServiceStatsAction, { serviceType });
appstate.servicesStatePart.dispatchAction(appstate.fetchPlatformServiceLogsAction, { serviceType });
this.currentView = 'platform-detail';
}
@@ -398,7 +399,11 @@ export class ObViewServices extends DeesElement {
metrics,
}
: null}
.logs=${[]}
.logs=${this.servicesState.currentPlatformServiceLogs.map((log) => ({
timestamp: new Date(log.timestamp).toLocaleString(),
level: log.level,
message: log.message,
}))}
@back=${() => {
this.currentView = 'list';
}}