-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathindex.html
More file actions
633 lines (566 loc) · 21.9 KB
/
Copy pathindex.html
File metadata and controls
633 lines (566 loc) · 21.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>📚 UModel 文档中心</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
line-height: 1.6;
color: #333;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 1000px;
margin: 0 auto;
background: white;
border-radius: 16px;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
overflow: hidden;
}
.header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 30px;
text-align: center;
}
.header h1 {
font-size: 2.5em;
font-weight: 700;
margin-bottom: 10px;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.header p {
font-size: 1.1em;
opacity: 0.9;
}
.main-content {
padding: 30px;
}
.search-box {
margin-bottom: 25px;
position: relative;
}
.search-input {
width: 100%;
padding: 12px 45px 12px 15px;
font-size: 14px;
border: 2px solid #e1e4e8;
border-radius: 8px;
outline: none;
transition: all 0.3s ease;
}
.search-input:focus {
border-color: #667eea;
box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}
.search-icon {
position: absolute;
right: 12px;
top: 50%;
transform: translateY(-50%);
color: #666;
font-size: 16px;
}
.stats {
display: flex;
gap: 15px;
margin-bottom: 30px;
justify-content: center;
}
.stat-card {
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
color: white;
padding: 15px 25px;
border-radius: 8px;
text-align: center;
box-shadow: 0 4px 15px rgba(240, 147, 251, 0.3);
min-width: 120px;
}
.stat-number {
font-size: 1.8em;
font-weight: 700;
margin-bottom: 2px;
}
.stat-label {
font-size: 0.85em;
opacity: 0.9;
}
.docs-list {
background: #f8f9fa;
border-radius: 8px;
overflow: hidden;
border: 1px solid #e1e4e8;
}
.category-section {
margin-bottom: 0;
}
.category-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
padding: 12px 20px;
font-weight: 600;
font-size: 1.1em;
display: flex;
align-items: center;
gap: 10px;
}
.category-icon {
font-size: 1.2em;
}
.doc-item {
background: white;
border-bottom: 1px solid #e1e4e8;
padding: 15px 20px;
display: flex;
align-items: center;
justify-content: space-between;
transition: all 0.2s ease;
}
.doc-item:hover {
background: #f1f8ff;
border-left: 4px solid #667eea;
padding-left: 16px;
}
.doc-item:last-child {
border-bottom: none;
}
.doc-info {
flex: 1;
display: flex;
align-items: center;
gap: 15px;
}
.doc-icon {
font-size: 1.5em;
width: 40px;
text-align: center;
}
.doc-details {
flex: 1;
}
.doc-title {
font-size: 1.1em;
font-weight: 600;
color: #333;
margin-bottom: 3px;
}
.doc-description {
font-size: 0.9em;
color: #666;
line-height: 1.4;
}
.doc-meta {
display: flex;
align-items: center;
gap: 15px;
font-size: 0.85em;
color: #888;
}
.doc-size {
background: #e3f2fd;
color: #1976d2;
padding: 3px 8px;
border-radius: 4px;
font-weight: 500;
}
.doc-link {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
text-decoration: none;
padding: 8px 16px;
border-radius: 6px;
font-weight: 500;
font-size: 0.9em;
transition: all 0.3s ease;
}
.doc-link:hover {
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}
.no-results {
text-align: center;
padding: 40px 20px;
color: #666;
}
.no-results-icon {
font-size: 3em;
margin-bottom: 15px;
opacity: 0.3;
}
.footer {
background: #f8f9fa;
padding: 20px;
text-align: center;
color: #666;
border-top: 1px solid #e1e4e8;
font-size: 0.9em;
}
.update-info {
background: #e3f2fd;
color: #1976d2;
padding: 8px 15px;
border-radius: 6px;
margin-bottom: 20px;
font-size: 0.9em;
text-align: center;
}
@media (max-width: 768px) {
.header {
padding: 20px;
}
.header h1 {
font-size: 2em;
}
.main-content {
padding: 20px;
}
.stats {
flex-direction: column;
align-items: center;
}
.doc-item {
flex-direction: column;
align-items: flex-start;
gap: 10px;
}
.doc-info {
width: 100%;
}
.doc-meta {
justify-content: space-between;
width: 100%;
}
}
.hidden {
display: none !important;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>📚 UModel 文档中心</h1>
<p>探索 UModel 系统的完整文档和规范</p>
</div>
<div class="main-content">
<div class="update-info">
ℹ️ 本页面自动生成于 2026-03-06 16:32,包含 20 个文档,总大小 1308 KB
</div>
<div class="search-box">
<input type="text" class="search-input" placeholder="搜索文档..." id="searchInput">
<span class="search-icon">🔍</span>
</div>
<div class="stats">
<div class="stat-card">
<div class="stat-number" id="totalDocs">20</div>
<div class="stat-label">文档总数</div>
</div>
<div class="stat-card">
<div class="stat-number" id="totalSize">1308</div>
<div class="stat-label">总大小 (KB)</div>
</div>
</div>
<div class="docs-list" id="docsList">
<!-- 文档列表将通过 JavaScript 动态生成 -->
</div>
<div class="no-results hidden" id="noResults">
<div class="no-results-icon">📄</div>
<h3>未找到匹配的文档</h3>
<p>请尝试使用不同的关键词搜索</p>
</div>
</div>
<div class="footer">
<p>© 2024 UModel 文档中心. 自动生成于 2026-03-06 16:32</p>
<p style="margin-top: 8px; font-size: 0.8em; opacity: 0.7;">
使用 <code>python scripts/converters/generate_index.py</code> 重新生成此页面
</p>
</div>
</div>
<script>
// 文档数据配置(自动生成)
const docs = [
{
"filename": "entity_set.html",
"title": "entity_set",
"subtitle": "实体",
"description": "EntitySet 用于定义实体,实体集是具有相同属性的实体的集合,类似于数据库中的表、编程中的类概念。在建模场景中,可根据需要定义关心的实体,例如IT可观测场景中,需要定义主机、容器、进程、应用、Code Repo、运维人员等。",
"icon": "🏗️",
"size": 80,
"category": "entity"
},
{
"filename": "event_set.html",
"title": "event_set",
"subtitle": "观测数据",
"description": "EventSet 用于定义事件,事件集是具有相同属性的事件的集合。",
"icon": "📊",
"size": 74,
"category": "telemetry"
},
{
"filename": "log_set.html",
"title": "log_set",
"subtitle": "观测数据",
"description": "LogSet 用于定义日志,日志集是具有相同属性的日志的集合。",
"icon": "📊",
"size": 74,
"category": "telemetry"
},
{
"filename": "metric_set.html",
"title": "metric_set",
"subtitle": "观测数据",
"description": "MetricSet 用于定义指标,指标集是具有相同属性的指标的集合,一般用于描述某类可观测实体的一类指标,例如主机的CPU、内存、磁盘等指标。",
"icon": "📊",
"size": 164,
"category": "telemetry"
},
{
"filename": "profile_set.html",
"title": "profile_set",
"subtitle": "观测数据",
"description": "ProfileSet 用于定义 Profile 数据集,Profile 数据集是具有相同属性的 Profile 数据的集合,一般用于描述某类可观测实体的一类 Profile 数据,例如主机的 CPU、内存、磁盘等 Profile 数据。",
"icon": "📊",
"size": 75,
"category": "telemetry"
},
{
"filename": "trace_set.html",
"title": "trace_set",
"subtitle": "观测数据",
"description": "TraceSet 是具有某些共同属性或特征的相关追踪记录的集合。TraceSet 必须包含以下字段:trace_id_field、span_id_field、parent_span_id_field 和 protocol(默认值为opentelemetry)。",
"icon": "📊",
"size": 110,
"category": "telemetry"
},
{
"filename": "data_link.html",
"title": "data_link",
"subtitle": "Link",
"description": "DataLink 用于定义 EntitySet/Link 和 DataSet 之间的关系,同时也可以描述两个 DataSet 之间的关系。DataLink 必须包含源 DataSet 、目标 DataSet 和链接类型。",
"icon": "🔗",
"size": 47,
"category": "connection"
},
{
"filename": "entity_set_link.html",
"title": "entity_set_link",
"subtitle": "Link",
"description": "EntitySetLink 用于定义两个 EntitySet 之间的关系。EntitySetLink 必须包含源 EntitySet 、目标 EntitySet 和链接类型。",
"icon": "🔗",
"size": 48,
"category": "connection"
},
{
"filename": "entity_source_link.html",
"title": "entity_source_link",
"subtitle": "Link",
"description": "EntitySourceLink 用于定义 EntitySource 与 EntitySet 之间的关联关系。",
"icon": "🔗",
"size": 45,
"category": "connection"
},
{
"filename": "explorer_link.html",
"title": "explorer_link",
"subtitle": "Link",
"description": "UModel 系统文档",
"icon": "🔗",
"size": 46,
"category": "connection"
},
{
"filename": "runbook_link.html",
"title": "runbook_link",
"subtitle": "Link",
"description": "RunbookLink 用于定义实体集合与操作手册集合之间的关联关系。",
"icon": "🔗",
"size": 46,
"category": "connection"
},
{
"filename": "storage_link.html",
"title": "storage_link",
"subtitle": "Link",
"description": "StorageLink 用于定义 EntitySet/DataSet 和 Storage 之间的关系。StorageLink 必须包含源 Set 、目标 Storage。",
"icon": "🔗",
"size": 46,
"category": "connection"
},
{
"filename": "aliyun_prometheus.html",
"title": "aliyun_prometheus",
"subtitle": "存储",
"description": "阿里云 Prometheus 实例的定义,用于描述阿里云 Prometheus 实例的配置和连接信息。",
"icon": "💾",
"size": 39,
"category": "storage"
},
{
"filename": "entity_source.html",
"title": "entity_source",
"subtitle": "存储",
"description": "EntitySource 用于定义特定 Entity 数据的导入任务以及其源数据存储(如 SLS LogStore / MetricStore)。",
"icon": "💾",
"size": 39,
"category": "storage"
},
{
"filename": "external_storage.html",
"title": "external_storage",
"subtitle": "存储",
"description": "外部存储,用于存放自定义存储的详细信息。",
"icon": "💾",
"size": 40,
"category": "storage"
},
{
"filename": "sls_entitystore.html",
"title": "sls_entitystore",
"subtitle": "存储",
"description": "SLS EntityStore 存储,一般用于存储可观测实体以及关系数据。",
"icon": "💾",
"size": 39,
"category": "storage"
},
{
"filename": "sls_logstore.html",
"title": "sls_logstore",
"subtitle": "存储",
"description": "SLS LogStore 存储,一般用于存储日志数据。",
"icon": "💾",
"size": 42,
"category": "storage"
},
{
"filename": "sls_metricstore.html",
"title": "sls_metricstore",
"subtitle": "存储",
"description": "SLS MetricStore 存储,一般用于存储指标数据。",
"icon": "💾",
"size": 39,
"category": "storage"
},
{
"filename": "runbook_set.html",
"title": "runbook_set",
"subtitle": "操作手册",
"description": "RunbookSet 用于定义实体、数据的操作手册集合,包含分析工具、操作指南和最佳实践。",
"icon": "📚",
"size": 176,
"category": "runbook"
},
{
"filename": "explorer.html",
"title": "explorer",
"subtitle": "通用",
"description": "UModel 系统文档",
"icon": "📄",
"size": 39,
"category": "general"
}
];
// 按类别分组文档
function groupDocsByCategory(docsToGroup) {
const grouped = {};
docsToGroup.forEach(doc => {
if (!grouped[doc.category]) {
grouped[doc.category] = [];
}
grouped[doc.category].push(doc);
});
return grouped;
}
// 渲染文档列表
function renderDocs(docsToRender = docs) {
const docsList = document.getElementById('docsList');
const noResults = document.getElementById('noResults');
if (docsToRender.length === 0) {
docsList.innerHTML = '';
noResults.classList.remove('hidden');
return;
}
noResults.classList.add('hidden');
const groupedDocs = groupDocsByCategory(docsToRender);
const categoryOrder = ['entity', 'telemetry', 'connection', 'storage', 'runbook', 'general'];
let html = '';
categoryOrder.forEach(category => {
if (groupedDocs[category] && groupedDocs[category].length > 0) {
const categoryName = getCategoryName(category);
const categoryIcon = groupedDocs[category][0].icon;
html += `
<div class="category-section">
<div class="category-header">
<span class="category-icon">${categoryIcon}</span>
<span>${categoryName} (${groupedDocs[category].length})</span>
</div>
`;
groupedDocs[category].forEach(doc => {
html += `
<div class="doc-item">
<div class="doc-info">
<div class="doc-icon">${doc.icon}</div>
<div class="doc-details">
<div class="doc-title">${doc.title}</div>
<div class="doc-description">${doc.description}</div>
</div>
</div>
<div class="doc-meta">
<span class="doc-size">${doc.size} KB</span>
<a href="${doc.filename}" class="doc-link">查看 →</a>
</div>
</div>
`;
});
html += '</div>';
}
});
docsList.innerHTML = html;
}
// 获取类别名称
function getCategoryName(category) {
const categoryNames = {
'entity': '实体',
'telemetry': '观测数据',
'storage': '存储系统',
'connection': 'Link 连接',
'runbook': '操作手册',
'general': '未分类'
};
return categoryNames[category] || category;
}
// 搜索功能
function setupSearch() {
const searchInput = document.getElementById('searchInput');
searchInput.addEventListener('input', (e) => {
const searchTerm = e.target.value.toLowerCase().trim();
if (searchTerm === '') {
renderDocs(docs);
return;
}
const filteredDocs = docs.filter(doc =>
doc.title.toLowerCase().includes(searchTerm) ||
doc.subtitle.toLowerCase().includes(searchTerm) ||
doc.description.toLowerCase().includes(searchTerm) ||
getCategoryName(doc.category).toLowerCase().includes(searchTerm)
);
renderDocs(filteredDocs);
});
}
// 初始化
document.addEventListener('DOMContentLoaded', () => {
renderDocs();
setupSearch();
});
</script>
</body>
</html>