feat(elements): add demoGroups metadata, filter demo view wrappers in wcctools, and update demo payloads
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
*/
|
||||
export const commitinfo = {
|
||||
name: '@serve.zone/catalog',
|
||||
version: '1.0.1',
|
||||
version: '1.1.0',
|
||||
description: 'UI component catalog for serve.zone'
|
||||
}
|
||||
|
||||
@@ -24,6 +24,8 @@ export class SzCertificatesCard extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Network'];
|
||||
|
||||
@property({ type: Number })
|
||||
public accessor validCount: number = 0;
|
||||
|
||||
|
||||
@@ -103,6 +103,8 @@ export class SzDashboardView extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Dashboard'];
|
||||
|
||||
@property({ type: Object })
|
||||
public accessor data: IDashboardData = {
|
||||
cluster: {
|
||||
|
||||
@@ -25,6 +25,8 @@ export class SzDnsSslCard extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Network'];
|
||||
|
||||
@property({ type: Boolean })
|
||||
public accessor dnsConfigured: boolean = false;
|
||||
|
||||
|
||||
@@ -78,6 +78,8 @@ export class SzDomainDetailView extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Network'];
|
||||
|
||||
@property({ type: Object })
|
||||
public accessor domain: IDomainDetail | null = null;
|
||||
|
||||
|
||||
@@ -22,6 +22,8 @@ export class SzLoginView extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Auth & Settings'];
|
||||
|
||||
@property({ type: Boolean })
|
||||
public accessor loading: boolean = false;
|
||||
|
||||
|
||||
@@ -37,6 +37,8 @@ export class SzNetworkDnsView extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Network'];
|
||||
|
||||
@property({ type: Array })
|
||||
public accessor records: IDnsRecord[] = [];
|
||||
|
||||
|
||||
@@ -39,6 +39,8 @@ export class SzNetworkDomainsView extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Network'];
|
||||
|
||||
@property({ type: Array })
|
||||
public accessor domains: IDomainRecord[] = [];
|
||||
|
||||
|
||||
@@ -58,6 +58,8 @@ export class SzNetworkProxyView extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Network'];
|
||||
|
||||
@property({ type: String })
|
||||
public accessor proxyStatus: 'running' | 'stopped' = 'stopped';
|
||||
|
||||
|
||||
@@ -70,6 +70,8 @@ export class SzPlatformServiceDetailView extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Platform'];
|
||||
|
||||
@property({ type: Object })
|
||||
public accessor service: IPlatformServiceDetail | null = null;
|
||||
|
||||
|
||||
@@ -36,6 +36,8 @@ export class SzPlatformServicesCard extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Platform'];
|
||||
|
||||
@property({ type: Array })
|
||||
public accessor services: IPlatformService[] = [];
|
||||
|
||||
|
||||
@@ -36,6 +36,8 @@ export class SzQuickActionsCard extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Dashboard'];
|
||||
|
||||
@property({ type: Array })
|
||||
public accessor actions: IQuickAction[] = [];
|
||||
|
||||
|
||||
@@ -35,6 +35,8 @@ export class SzRegistryExternalView extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Auth & Settings'];
|
||||
|
||||
@property({ type: Array })
|
||||
public accessor registries: IExternalRegistry[] = [];
|
||||
|
||||
|
||||
@@ -25,6 +25,8 @@ export class SzRegistryOneboxView extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Auth & Settings'];
|
||||
|
||||
@property({ type: String })
|
||||
public accessor status: 'running' | 'stopped' = 'stopped';
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@ export class SzResourceUsageCard extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Dashboard'];
|
||||
|
||||
@property({ type: Object })
|
||||
public accessor data: IResourceUsage = {
|
||||
cpu: 0,
|
||||
|
||||
@@ -28,6 +28,8 @@ export class SzReverseProxyCard extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Network'];
|
||||
|
||||
@property({ type: String })
|
||||
public accessor httpPort: string = '80';
|
||||
|
||||
|
||||
@@ -63,6 +63,8 @@ export class SzServiceCreateView extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Services'];
|
||||
|
||||
@property({ type: Array })
|
||||
public accessor registries: IRegistry[] = [];
|
||||
|
||||
|
||||
@@ -88,6 +88,8 @@ export class SzServiceDetailView extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Services'];
|
||||
|
||||
@property({ type: Object })
|
||||
public accessor service: IServiceDetail = {
|
||||
name: '',
|
||||
|
||||
@@ -50,6 +50,8 @@ export class SzServicesBackupsView extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Services'];
|
||||
|
||||
@property({ type: Array })
|
||||
public accessor schedules: IBackupSchedule[] = [];
|
||||
|
||||
|
||||
@@ -36,6 +36,8 @@ export class SzServicesListView extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Services'];
|
||||
|
||||
@property({ type: Array })
|
||||
public accessor services: IService[] = [];
|
||||
|
||||
|
||||
@@ -47,6 +47,8 @@ export class SzSettingsView extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Auth & Settings'];
|
||||
|
||||
@property({ type: Object })
|
||||
public accessor settings: ISettings = {
|
||||
darkMode: false,
|
||||
|
||||
@@ -53,6 +53,8 @@ export class SzStatCard extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Dashboard'];
|
||||
|
||||
@property({ type: String })
|
||||
public accessor label: string = '';
|
||||
|
||||
|
||||
@@ -38,6 +38,8 @@ export class SzStatusGridCluster extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Dashboard Grids'];
|
||||
|
||||
@property({ type: Object })
|
||||
public accessor stats: IClusterStats = {
|
||||
totalServices: 0,
|
||||
|
||||
@@ -36,6 +36,8 @@ export class SzStatusGridInfra extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Dashboard Grids'];
|
||||
|
||||
@property({ type: Boolean })
|
||||
public accessor dnsConfigured: boolean = false;
|
||||
|
||||
|
||||
@@ -40,16 +40,15 @@ export class SzStatusGridNetwork extends DeesElement {
|
||||
<div style="padding: 24px; max-width: 1400px;">
|
||||
<sz-status-grid-network
|
||||
.traffic=${{
|
||||
totalRequests: 125420,
|
||||
requestsPerMinute: 847,
|
||||
errorRate: 0.12,
|
||||
avgResponseTime: 45,
|
||||
statusDistribution: {
|
||||
'2xx': 95.2,
|
||||
'3xx': 2.1,
|
||||
'4xx': 2.3,
|
||||
'5xx': 0.4,
|
||||
},
|
||||
requests: 125420,
|
||||
errors: 150,
|
||||
errorPercent: 0.12,
|
||||
avgResponse: 45,
|
||||
reqPerMin: 847,
|
||||
status2xx: 95.2,
|
||||
status3xx: 2.1,
|
||||
status4xx: 2.3,
|
||||
status5xx: 0.4,
|
||||
}}
|
||||
.proxy=${{
|
||||
httpPort: '80',
|
||||
@@ -67,6 +66,8 @@ export class SzStatusGridNetwork extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Dashboard Grids'];
|
||||
|
||||
@property({ type: Object })
|
||||
public accessor traffic: ITrafficData = {
|
||||
requests: 0,
|
||||
|
||||
@@ -26,25 +26,29 @@ export class SzStatusGridServices extends DeesElement {
|
||||
<div style="padding: 24px; max-width: 1200px;">
|
||||
<sz-status-grid-services
|
||||
.resourceUsage=${{
|
||||
cpu: { percentage: 45, label: 'CPU Usage' },
|
||||
memory: { percentage: 62, label: 'Memory', used: '4.96 GB', total: '8 GB' },
|
||||
network: { percentage: 23, label: 'Network I/O', rate: '1.2 MB/s' },
|
||||
cpu: 45,
|
||||
memoryUsed: '4.96 GB',
|
||||
memoryTotal: '8 GB',
|
||||
networkIn: '1.2 MB/s',
|
||||
networkOut: '0.8 MB/s',
|
||||
topConsumers: [
|
||||
{ name: 'api-service', cpu: 25, memory: 512 },
|
||||
{ name: 'web-frontend', cpu: 15, memory: 256 },
|
||||
{ name: 'worker', cpu: 5, memory: 128 },
|
||||
{ name: 'api-service', memory: '512 MB' },
|
||||
{ name: 'web-frontend', memory: '256 MB' },
|
||||
{ name: 'worker', memory: '128 MB' },
|
||||
],
|
||||
}}
|
||||
.platformServices=${[
|
||||
{ name: 'MongoDB', status: 'running' },
|
||||
{ name: 'S3 Storage', status: 'running' },
|
||||
{ name: 'ClickHouse', status: 'stopped' },
|
||||
{ name: 'Redis Cache', status: 'running' },
|
||||
{ name: 'MongoDB', status: '1 DB', running: true },
|
||||
{ name: 'S3 Storage', status: '1 bucket', running: true },
|
||||
{ name: 'ClickHouse', status: 'Stopped', running: false },
|
||||
{ name: 'Redis Cache', status: 'Running', running: true },
|
||||
]}
|
||||
></sz-status-grid-services>
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Dashboard Grids'];
|
||||
|
||||
@property({ type: Object })
|
||||
public accessor resourceUsage: IResourceUsage = {
|
||||
cpu: 0,
|
||||
|
||||
@@ -40,6 +40,8 @@ export class SzTokensView extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Auth & Settings'];
|
||||
|
||||
@property({ type: Array })
|
||||
public accessor globalTokens: IToken[] = [];
|
||||
|
||||
|
||||
@@ -46,6 +46,8 @@ export class SzTrafficCard extends DeesElement {
|
||||
</div>
|
||||
`;
|
||||
|
||||
public static demoGroups = ['Dashboard'];
|
||||
|
||||
@property({ type: Object })
|
||||
public accessor data: ITrafficData = {
|
||||
requests: 0,
|
||||
|
||||
Reference in New Issue
Block a user