Compare commits

...

1 Commits

Author SHA1 Message Date
3b3d0433cb fix(platform-services): fix detail view navigation and log display
Some checks failed
CI / Build All Platforms (push) Failing after 4s
Publish to npm / npm-publish (push) Failing after 8s
CI / Type Check & Lint (push) Failing after 29s
CI / Build Test (Current Platform) (push) Successful in 1m6s
Release / build-and-release (push) Successful in 3m21s
- Add back button for returning to services list
- Fix DOM lifecycle when switching between platform services
- Fix timestamp format for dees-chart-log compatibility
- Clear previous stats/logs state before fetching new data
2026-03-16 14:48:46 +00:00
4 changed files with 31 additions and 4 deletions

View File

@@ -1,5 +1,13 @@
# Changelog # Changelog
## 2026-03-16 - 1.18.5 - fix(platform-services)
fix platform service detail view navigation and log display
- Add back button to platform service detail view for returning to services list
- Fix DOM lifecycle when switching between platform services (destroy and recreate dees-chart-log)
- Fix timestamp format for log entries to use ISO 8601 for dees-chart-log compatibility
- Clear previous stats/logs state before fetching new platform service data
## 2026-03-16 - 1.18.4 - fix(repo) ## 2026-03-16 - 1.18.4 - fix(repo)
no changes to commit no changes to commit

View File

@@ -1,6 +1,6 @@
{ {
"name": "@serve.zone/onebox", "name": "@serve.zone/onebox",
"version": "1.18.4", "version": "1.18.5",
"exports": "./mod.ts", "exports": "./mod.ts",
"tasks": { "tasks": {
"test": "deno test --allow-all test/", "test": "deno test --allow-all test/",

File diff suppressed because one or more lines are too long

View File

@@ -357,12 +357,26 @@ export class ObViewServices extends DeesElement {
} }
private navigateToPlatformDetail(type: string): void { private navigateToPlatformDetail(type: string): void {
// Reset to list first to force fresh DOM for dees-chart-log
this.currentView = 'list';
this.selectedPlatformType = type; this.selectedPlatformType = type;
// Clear previous stats/logs before fetching new ones
appstate.servicesStatePart.setState({
...appstate.servicesStatePart.getState(),
currentPlatformServiceStats: null,
currentPlatformServiceLogs: [],
});
// Fetch stats and logs for this platform service // Fetch stats and logs for this platform service
const serviceType = type as interfaces.data.TPlatformServiceType; const serviceType = type as interfaces.data.TPlatformServiceType;
appstate.servicesStatePart.dispatchAction(appstate.fetchPlatformServiceStatsAction, { serviceType }); appstate.servicesStatePart.dispatchAction(appstate.fetchPlatformServiceStatsAction, { serviceType });
appstate.servicesStatePart.dispatchAction(appstate.fetchPlatformServiceLogsAction, { serviceType }); appstate.servicesStatePart.dispatchAction(appstate.fetchPlatformServiceLogsAction, { serviceType });
this.currentView = 'platform-detail';
// Switch to detail view on next microtask (ensures fresh DOM)
requestAnimationFrame(() => {
this.currentView = 'platform-detail';
});
} }
private renderPlatformDetailView(): TemplateResult { private renderPlatformDetailView(): TemplateResult {
@@ -381,6 +395,11 @@ export class ObViewServices extends DeesElement {
return html` return html`
<ob-sectionheading>Platform Service</ob-sectionheading> <ob-sectionheading>Platform Service</ob-sectionheading>
<div class="page-actions" style="justify-content: flex-start;">
<button class="deploy-button" style="background: transparent; border: 1px solid var(--ci-shade-2, #27272a); color: inherit;" @click=${() => { this.currentView = 'list'; }}>
&larr; Back to Services
</button>
</div>
<sz-platform-service-detail-view <sz-platform-service-detail-view
.service=${platformService .service=${platformService
? { ? {
@@ -400,7 +419,7 @@ export class ObViewServices extends DeesElement {
} }
: null} : null}
.logs=${this.servicesState.currentPlatformServiceLogs.map((log) => ({ .logs=${this.servicesState.currentPlatformServiceLogs.map((log) => ({
timestamp: new Date(log.timestamp).toLocaleString(), timestamp: new Date(log.timestamp).toISOString(),
level: log.level, level: log.level,
message: log.message, message: log.message,
}))} }))}