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
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
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
# 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)
|
||||
no changes to commit
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@serve.zone/onebox",
|
||||
"version": "1.18.4",
|
||||
"version": "1.18.5",
|
||||
"exports": "./mod.ts",
|
||||
"tasks": {
|
||||
"test": "deno test --allow-all test/",
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -357,12 +357,26 @@ export class ObViewServices extends DeesElement {
|
||||
}
|
||||
|
||||
private navigateToPlatformDetail(type: string): void {
|
||||
// Reset to list first to force fresh DOM for dees-chart-log
|
||||
this.currentView = 'list';
|
||||
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
|
||||
const serviceType = type as interfaces.data.TPlatformServiceType;
|
||||
appstate.servicesStatePart.dispatchAction(appstate.fetchPlatformServiceStatsAction, { 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 {
|
||||
@@ -381,6 +395,11 @@ export class ObViewServices extends DeesElement {
|
||||
|
||||
return html`
|
||||
<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'; }}>
|
||||
← Back to Services
|
||||
</button>
|
||||
</div>
|
||||
<sz-platform-service-detail-view
|
||||
.service=${platformService
|
||||
? {
|
||||
@@ -400,7 +419,7 @@ export class ObViewServices extends DeesElement {
|
||||
}
|
||||
: null}
|
||||
.logs=${this.servicesState.currentPlatformServiceLogs.map((log) => ({
|
||||
timestamp: new Date(log.timestamp).toLocaleString(),
|
||||
timestamp: new Date(log.timestamp).toISOString(),
|
||||
level: log.level,
|
||||
message: log.message,
|
||||
}))}
|
||||
|
||||
Reference in New Issue
Block a user