@serve.zone/catalog 2.3.0 → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,165 @@
1
+ import {
2
+ DeesElement,
3
+ customElement,
4
+ html,
5
+ css,
6
+ cssManager,
7
+ type TemplateResult,
8
+ } from '@design.estate/dees-element';
9
+ import type { IConfigField, IConfigSectionAction } from './sz-config-section.js';
10
+ import './index.js';
11
+
12
+ declare global {
13
+ interface HTMLElementTagNameMap {
14
+ 'sz-demo-view-config': SzDemoViewConfig;
15
+ }
16
+ }
17
+
18
+ @customElement('sz-demo-view-config')
19
+ export class SzDemoViewConfig extends DeesElement {
20
+ public static styles = [
21
+ cssManager.defaultStyles,
22
+ css`
23
+ :host {
24
+ display: block;
25
+ padding: 24px;
26
+ height: 100%;
27
+ overflow-y: auto;
28
+ box-sizing: border-box;
29
+ }
30
+ `,
31
+ ];
32
+
33
+ public render(): TemplateResult {
34
+ const systemFields: IConfigField[] = [
35
+ { key: 'Base Directory', value: '/home/user/.serve.zone/dcrouter' },
36
+ { key: 'Data Directory', value: '/home/user/.serve.zone/dcrouter/data' },
37
+ { key: 'Public IP', value: '203.0.113.50' },
38
+ { key: 'Proxy IPs', value: ['203.0.113.10', '203.0.113.11'], type: 'pills' },
39
+ { key: 'Uptime', value: '3d 14h 22m' },
40
+ { key: 'Storage Backend', value: 'filesystem', type: 'badge' },
41
+ ];
42
+
43
+ const proxyFields: IConfigField[] = [
44
+ { key: 'Route Count', value: 12 },
45
+ { key: 'ACME Enabled', value: true, type: 'boolean' },
46
+ { key: 'Account Email', value: 'admin@serve.zone' },
47
+ { key: 'Use Production', value: true, type: 'boolean' },
48
+ { key: 'Auto Renew', value: true, type: 'boolean' },
49
+ { key: 'Renew Threshold', value: '30 days' },
50
+ ];
51
+
52
+ const emailFields: IConfigField[] = [
53
+ { key: 'Ports', value: ['25', '465', '587'], type: 'pills' },
54
+ { key: 'Hostname', value: 'mail.serve.zone' },
55
+ { key: 'Domains', value: ['serve.zone', 'mail.serve.zone'], type: 'pills' },
56
+ { key: 'Email Routes', value: 5 },
57
+ { key: 'Received Path', value: '/data/emails' },
58
+ ];
59
+
60
+ const dnsFields: IConfigField[] = [
61
+ { key: 'Port', value: 53 },
62
+ { key: 'NS Domains', value: ['ns1.serve.zone', 'ns2.serve.zone'], type: 'pills' },
63
+ { key: 'Scopes', value: ['serve.zone', 'example.com'], type: 'pills' },
64
+ { key: 'Record Count', value: 24 },
65
+ { key: 'DNS Challenge', value: true, type: 'boolean' },
66
+ ];
67
+
68
+ const tlsFields: IConfigField[] = [
69
+ { key: 'Contact Email', value: 'admin@serve.zone' },
70
+ { key: 'Domain', value: 'serve.zone' },
71
+ { key: 'Source', value: 'acme', type: 'badge' },
72
+ { key: 'Certificate Path', value: null },
73
+ { key: 'Key Path', value: null },
74
+ ];
75
+
76
+ const cacheFields: IConfigField[] = [
77
+ { key: 'Storage Path', value: '/home/user/.serve.zone/dcrouter/tsmdb' },
78
+ { key: 'DB Name', value: 'dcrouter' },
79
+ { key: 'Default TTL', value: '30 days' },
80
+ { key: 'Cleanup Interval', value: '1 hour' },
81
+ ];
82
+
83
+ const radiusFields: IConfigField[] = [
84
+ { key: 'Auth Port', value: null },
85
+ { key: 'Accounting Port', value: null },
86
+ ];
87
+
88
+ const remoteIngressFields: IConfigField[] = [
89
+ { key: 'Tunnel Port', value: 8443 },
90
+ { key: 'Hub Domain', value: 'hub.serve.zone' },
91
+ { key: 'TLS Configured', value: true, type: 'boolean' },
92
+ ];
93
+
94
+ return html`
95
+ <sz-config-overview
96
+ infoText="This view displays the current running configuration. DcRouter is configured through code or remote management."
97
+ >
98
+ <sz-config-section
99
+ title="System"
100
+ subtitle="Base paths and infrastructure"
101
+ icon="lucide:server"
102
+ status="enabled"
103
+ .fields=${systemFields}
104
+ ></sz-config-section>
105
+
106
+ <sz-config-section
107
+ title="SmartProxy"
108
+ subtitle="HTTP/HTTPS and TCP/SNI reverse proxy"
109
+ icon="lucide:network"
110
+ status="enabled"
111
+ .fields=${proxyFields}
112
+ .actions=${[{ label: 'View Routes', icon: 'lucide:arrow-right', event: 'navigate', detail: { view: 'routes' } }] as IConfigSectionAction[]}
113
+ ></sz-config-section>
114
+
115
+ <sz-config-section
116
+ title="Email Server"
117
+ subtitle="SMTP email handling with smartmta"
118
+ icon="lucide:mail"
119
+ status="enabled"
120
+ .fields=${emailFields}
121
+ ></sz-config-section>
122
+
123
+ <sz-config-section
124
+ title="DNS Server"
125
+ subtitle="Authoritative DNS with smartdns"
126
+ icon="lucide:globe"
127
+ status="enabled"
128
+ .fields=${dnsFields}
129
+ ></sz-config-section>
130
+
131
+ <sz-config-section
132
+ title="TLS / Certificates"
133
+ subtitle="Certificate management and ACME"
134
+ icon="lucide:shield-check"
135
+ status="enabled"
136
+ .fields=${tlsFields}
137
+ ></sz-config-section>
138
+
139
+ <sz-config-section
140
+ title="Cache Database"
141
+ subtitle="Persistent caching with smartdata"
142
+ icon="lucide:database"
143
+ status="enabled"
144
+ .fields=${cacheFields}
145
+ ></sz-config-section>
146
+
147
+ <sz-config-section
148
+ title="RADIUS Server"
149
+ subtitle="Network authentication and VLAN assignment"
150
+ icon="lucide:wifi"
151
+ status="not-configured"
152
+ .fields=${radiusFields}
153
+ ></sz-config-section>
154
+
155
+ <sz-config-section
156
+ title="Remote Ingress"
157
+ subtitle="Edge tunnel nodes"
158
+ icon="lucide:cloud"
159
+ status="enabled"
160
+ .fields=${remoteIngressFields}
161
+ ></sz-config-section>
162
+ </sz-config-overview>
163
+ `;
164
+ }
165
+ }