feat(dataview-statusobject): add last updated footer to status object and refresh demo data

This commit is contained in:
2026-03-18 15:28:21 +00:00
parent 42317459ff
commit 4d8ba1fefc
6 changed files with 75 additions and 23 deletions

View File

@@ -3,6 +3,6 @@
*/
export const commitinfo = {
name: '@design.estate/dees-catalog',
version: '3.48.5',
version: '3.49.0',
description: 'A comprehensive library that provides dynamic web components for building sophisticated and modern web applications using JavaScript and TypeScript.'
}

View File

@@ -50,6 +50,7 @@ export const demoFunc = () => html` <style>
.statusObject=${{
id: '1',
name: 'API Gateway Service',
lastUpdated: Date.now(),
combinedStatus: 'ok',
combinedStatusText: 'All systems operational',
details: [
@@ -89,6 +90,7 @@ export const demoFunc = () => html` <style>
.statusObject=${{
id: '2',
name: 'PostgreSQL Cluster',
lastUpdated: Date.now() - 3600000,
combinedStatus: 'partly_ok',
combinedStatusText: 'Minor issues detected',
details: [
@@ -128,6 +130,7 @@ export const demoFunc = () => html` <style>
.statusObject=${{
id: '3',
name: 'CI/CD Pipeline',
lastUpdated: Date.now() - 86400000,
combinedStatus: 'not_ok',
combinedStatusText: 'Build failure',
details: [

View File

@@ -128,7 +128,7 @@ export class DeesDataviewStatusobject extends DeesElement {
grid-template-columns: 48px auto;
border-top: 1px solid ${cssManager.bdTheme('hsl(0 0% 94%)', 'hsl(0 0% 14.9%)')};
transition: background-color 0.15s ease;
padding-right: 16px;
padding: 0 16px;
cursor: context-menu;
}
@@ -148,7 +148,7 @@ export class DeesDataviewStatusobject extends DeesElement {
.detail .detailsText .label {
font-size: 12px;
font-weight: 500;
color: ${cssManager.bdTheme('hsl(0 0% 45.1%)', 'hsl(0 0% 63.9%)')}
color: ${cssManager.bdTheme('hsl(0 0% 45.1%)', 'hsl(0 0% 63.9%)')};
margin-bottom: 2px;
letter-spacing: -0.01em;
}
@@ -159,6 +159,28 @@ export class DeesDataviewStatusobject extends DeesElement {
color: ${cssManager.bdTheme('hsl(0 0% 15%)', 'hsl(0 0% 90%)')};
line-height: 1.5;
}
.bottomBar {
position: relative;
color: ${cssManager.bdTheme('hsl(0 0% 45.1%)', 'hsl(0 0% 63.9%)')};
background: ${cssManager.bdTheme('hsl(0 0% 97%)', 'hsl(0 0% 7%)')};
border-top: 1px solid ${cssManager.bdTheme('hsl(0 0% 89.8%)', 'hsl(0 0% 14.9%)')};
height: 28px;
font-size: 12px;
line-height: 28px;
display: flex;
justify-content: flex-end;
align-items: stretch;
overflow: hidden;
flex-shrink: 0;
}
.bottomBar .statusLabel {
padding: 0 16px;
display: flex;
align-items: center;
font-weight: 500;
}
`,
];
@@ -209,6 +231,11 @@ export class DeesDataviewStatusobject extends DeesElement {
</div>
`;
})}
<div class="bottomBar">
<div class="statusLabel">${this.statusObject?.lastUpdated
? `Last updated: ${new Date(this.statusObject.lastUpdated).toLocaleString()}`
: ''}</div>
</div>
</div>
`;
}