@svadmin/lite 0.27.0 → 0.31.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.
- package/dist/components/LiteAbacPolicyMatrix.svelte +128 -0
- package/dist/components/LiteAbacPolicyMatrix.svelte.d.ts +16 -0
- package/dist/components/LiteApiPlayground.svelte +103 -0
- package/dist/components/LiteApiPlayground.svelte.d.ts +10 -0
- package/dist/components/LiteApprovalChainBuilder.svelte +120 -0
- package/dist/components/LiteApprovalChainBuilder.svelte.d.ts +15 -0
- package/dist/components/LiteAuditTrailInspector.svelte +166 -0
- package/dist/components/LiteAuditTrailInspector.svelte.d.ts +23 -0
- package/dist/components/LiteBillingInvoiceDrawer.svelte +100 -0
- package/dist/components/LiteBillingInvoiceDrawer.svelte.d.ts +16 -0
- package/dist/components/LiteChartAnnotationOverlay.svelte +101 -0
- package/dist/components/LiteChartAnnotationOverlay.svelte.d.ts +16 -0
- package/dist/components/LiteColumnMappingTable.svelte +105 -0
- package/dist/components/LiteColumnMappingTable.svelte.d.ts +14 -0
- package/dist/components/LiteCronExpressionBuilder.svelte +4 -1
- package/dist/components/LiteDashboardGridLayout.svelte +108 -0
- package/dist/components/LiteDashboardGridLayout.svelte.d.ts +16 -0
- package/dist/components/LiteDashboardLayoutStorage.svelte +88 -0
- package/dist/components/LiteDashboardLayoutStorage.svelte.d.ts +16 -0
- package/dist/components/LiteDataImportDropzone.svelte +89 -0
- package/dist/components/LiteDataImportDropzone.svelte.d.ts +10 -0
- package/dist/components/LiteDataLineageGraph.svelte +100 -0
- package/dist/components/LiteDataLineageGraph.svelte.d.ts +15 -0
- package/dist/components/LiteDataMaskPolicyEngine.svelte +131 -0
- package/dist/components/LiteDataMaskPolicyEngine.svelte.d.ts +16 -0
- package/dist/components/LiteDataScreenContainer.svelte +34 -0
- package/dist/components/LiteDataScreenContainer.svelte.d.ts +9 -0
- package/dist/components/LiteElectronicSealStamp.svelte +56 -0
- package/dist/components/LiteElectronicSealStamp.svelte.d.ts +9 -0
- package/dist/components/LiteEnvVariableEditor.svelte +114 -0
- package/dist/components/LiteEnvVariableEditor.svelte.d.ts +15 -0
- package/dist/components/LiteFormulaField.svelte +44 -0
- package/dist/components/LiteFormulaField.svelte.d.ts +11 -0
- package/dist/components/LiteGeoScatterMap.svelte +117 -0
- package/dist/components/LiteGeoScatterMap.svelte.d.ts +16 -0
- package/dist/components/LiteGrid.svelte +10 -10
- package/dist/components/LiteHmacSignatureCalculator.svelte +84 -0
- package/dist/components/LiteHmacSignatureCalculator.svelte.d.ts +10 -0
- package/dist/components/LiteImportPreviewValidator.svelte +136 -0
- package/dist/components/LiteImportPreviewValidator.svelte.d.ts +16 -0
- package/dist/components/LiteLiveStreamLogViewer.svelte +84 -0
- package/dist/components/LiteLiveStreamLogViewer.svelte.d.ts +14 -0
- package/dist/components/LiteMicroAppRouteSync.svelte +72 -0
- package/dist/components/LiteMicroAppRouteSync.svelte.d.ts +9 -0
- package/dist/components/LiteMicroAppSandbox.svelte +74 -0
- package/dist/components/LiteMicroAppSandbox.svelte.d.ts +9 -0
- package/dist/components/LiteMicroAppStateBusIndicator.svelte +70 -0
- package/dist/components/LiteMicroAppStateBusIndicator.svelte.d.ts +7 -0
- package/dist/components/LiteOmnibarCommandPalette.svelte +111 -0
- package/dist/components/LiteOmnibarCommandPalette.svelte.d.ts +15 -0
- package/dist/components/LitePeriodComparisonCard.svelte +60 -0
- package/dist/components/LitePeriodComparisonCard.svelte.d.ts +11 -0
- package/dist/components/LitePermissionSimulator.svelte +90 -0
- package/dist/components/LitePermissionSimulator.svelte.d.ts +14 -0
- package/dist/components/LitePivotMatrix.svelte +138 -0
- package/dist/components/LitePivotMatrix.svelte.d.ts +18 -0
- package/dist/components/LitePlanUsageQuotaBar.svelte +96 -0
- package/dist/components/LitePlanUsageQuotaBar.svelte.d.ts +15 -0
- package/dist/components/LitePopconfirm.svelte +2 -0
- package/dist/components/LiteQueryAiExplainer.svelte +85 -0
- package/dist/components/LiteQueryAiExplainer.svelte.d.ts +10 -0
- package/dist/components/LiteScheduledJobManager.svelte +116 -0
- package/dist/components/LiteScheduledJobManager.svelte.d.ts +16 -0
- package/dist/components/LiteScreenAntiLeakGuard.svelte +56 -0
- package/dist/components/LiteScreenAntiLeakGuard.svelte.d.ts +8 -0
- package/dist/components/LiteSecureDataExporter.svelte +101 -0
- package/dist/components/LiteSecureDataExporter.svelte.d.ts +12 -0
- package/dist/components/LiteSpace.svelte +6 -6
- package/dist/components/LiteSpin.svelte +4 -2
- package/dist/components/LiteSpin.svelte.d.ts +2 -0
- package/dist/components/LiteSqlConsole.svelte +128 -0
- package/dist/components/LiteSqlConsole.svelte.d.ts +16 -0
- package/dist/components/LiteStatusTabs.svelte +1 -1
- package/dist/components/LiteSystemCapacityForecastCard.svelte +88 -0
- package/dist/components/LiteSystemCapacityForecastCard.svelte.d.ts +11 -0
- package/dist/components/LiteSystemHealthCheckDashboard.svelte +142 -0
- package/dist/components/LiteSystemHealthCheckDashboard.svelte.d.ts +18 -0
- package/dist/components/LiteTableAggregationFooter.svelte +76 -0
- package/dist/components/LiteTableAggregationFooter.svelte.d.ts +14 -0
- package/dist/components/LiteTenantContextSwitcher.svelte +173 -0
- package/dist/components/LiteTenantContextSwitcher.svelte.d.ts +27 -0
- package/dist/components/LiteTenantQuotasMatrix.svelte +117 -0
- package/dist/components/LiteTenantQuotasMatrix.svelte.d.ts +17 -0
- package/dist/components/LiteThreadedCommentDrawer.svelte +60 -0
- package/dist/components/LiteThreadedCommentDrawer.svelte.d.ts +15 -0
- package/dist/components/LiteTierFeatureComparison.svelte +97 -0
- package/dist/components/LiteTierFeatureComparison.svelte.d.ts +18 -0
- package/dist/components/LiteTwoFactorStepper.svelte +1 -1
- package/dist/components/LiteVirtualTreeSelect.svelte +4 -1
- package/dist/components/LiteWebhookSimulator.svelte +120 -0
- package/dist/components/LiteWebhookSimulator.svelte.d.ts +11 -0
- package/dist/components/LiteWorkflowNodeInspector.svelte +79 -0
- package/dist/components/LiteWorkflowNodeInspector.svelte.d.ts +11 -0
- package/dist/index.d.ts +43 -0
- package/dist/index.js +51 -0
- package/package.json +2 -2
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface LineageItem {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
type: string;
|
|
6
|
+
owner: string;
|
|
7
|
+
rows?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
title?: string;
|
|
12
|
+
nodes?: LineageItem[];
|
|
13
|
+
class?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let {
|
|
17
|
+
title = '数据全链路血缘溯源',
|
|
18
|
+
nodes = [
|
|
19
|
+
{ id: '1', name: 'src_erp_orders', type: '源数据表', owner: 'ERP 业务库', rows: '1.2M 行' },
|
|
20
|
+
{ id: '2', name: 'dwd_orders_cleaned', type: 'ETL 清洗', owner: 'Flink 流清洗' },
|
|
21
|
+
{ id: '3', name: 'dws_finance_monthly', type: '财务数仓宽表', owner: '财务数仓宽表', rows: '120K 行' },
|
|
22
|
+
{ id: '4', name: '上市公司经营报表', type: '消费报表', owner: '经营分析大屏' }
|
|
23
|
+
],
|
|
24
|
+
class: className = '',
|
|
25
|
+
}: Props = $props();
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<div
|
|
29
|
+
class="lite-lineage-graph {className}"
|
|
30
|
+
data-svadmin-component="LiteDataLineageGraph"
|
|
31
|
+
role="region"
|
|
32
|
+
aria-label="Data Lineage Graph"
|
|
33
|
+
>
|
|
34
|
+
<header class="lite-lineage-header">
|
|
35
|
+
<h4 class="lite-lineage-title">{title}</h4>
|
|
36
|
+
<span class="lite-lineage-count">{nodes.length} 个血缘节点</span>
|
|
37
|
+
</header>
|
|
38
|
+
|
|
39
|
+
<div class="lite-lineage-body">
|
|
40
|
+
{#each nodes as node, idx (node.id)}
|
|
41
|
+
<div class="lite-lineage-step">
|
|
42
|
+
<div class="lite-step-num">{idx + 1}</div>
|
|
43
|
+
<div class="lite-step-info">
|
|
44
|
+
<div class="lite-step-top">
|
|
45
|
+
<span class="lite-step-name font-mono">{node.name}</span>
|
|
46
|
+
<span class="lite-step-type">{node.type}</span>
|
|
47
|
+
</div>
|
|
48
|
+
<div class="lite-step-owner">归属: {node.owner} {#if node.rows}· {node.rows}{/if}</div>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
{/each}
|
|
52
|
+
</div>
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<style>
|
|
56
|
+
.lite-lineage-graph {
|
|
57
|
+
border: 1px solid #e5e6eb;
|
|
58
|
+
border-radius: 6px;
|
|
59
|
+
background: #ffffff;
|
|
60
|
+
font-size: 12px;
|
|
61
|
+
overflow: hidden;
|
|
62
|
+
}
|
|
63
|
+
.lite-lineage-header {
|
|
64
|
+
display: flex;
|
|
65
|
+
justify-content: space-between;
|
|
66
|
+
align-items: center;
|
|
67
|
+
padding: 10px 14px;
|
|
68
|
+
background: #f7f8fa;
|
|
69
|
+
border-bottom: 1px solid #e5e6eb;
|
|
70
|
+
}
|
|
71
|
+
.lite-lineage-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
|
|
72
|
+
.lite-lineage-count { font-size: 11px; color: #86909c; }
|
|
73
|
+
.lite-lineage-body { padding: 12px 14px; }
|
|
74
|
+
.lite-lineage-step {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: flex-start;
|
|
77
|
+
padding-bottom: 10px;
|
|
78
|
+
margin-bottom: 10px;
|
|
79
|
+
border-bottom: 1px dashed #e5e6eb;
|
|
80
|
+
}
|
|
81
|
+
.lite-lineage-step:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
|
|
82
|
+
.lite-step-num {
|
|
83
|
+
width: 20px;
|
|
84
|
+
height: 20px;
|
|
85
|
+
line-height: 20px;
|
|
86
|
+
text-align: center;
|
|
87
|
+
border-radius: 50%;
|
|
88
|
+
background: #165dff;
|
|
89
|
+
color: #ffffff;
|
|
90
|
+
font-size: 10px;
|
|
91
|
+
font-weight: 700;
|
|
92
|
+
margin-right: 10px;
|
|
93
|
+
}
|
|
94
|
+
.lite-step-info { flex: 1; }
|
|
95
|
+
.lite-step-top { display: flex; justify-content: space-between; align-items: center; }
|
|
96
|
+
.lite-step-name { font-weight: 600; color: #1d2129; }
|
|
97
|
+
.font-mono { font-family: monospace; }
|
|
98
|
+
.lite-step-type { font-size: 10px; background: #e8f3ff; color: #165dff; padding: 1px 6px; border-radius: 3px; }
|
|
99
|
+
.lite-step-owner { font-size: 11px; color: #86909c; margin-top: 2px; }
|
|
100
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface LineageItem {
|
|
2
|
+
id: string;
|
|
3
|
+
name: string;
|
|
4
|
+
type: string;
|
|
5
|
+
owner: string;
|
|
6
|
+
rows?: string;
|
|
7
|
+
}
|
|
8
|
+
interface Props {
|
|
9
|
+
title?: string;
|
|
10
|
+
nodes?: LineageItem[];
|
|
11
|
+
class?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const LiteDataLineageGraph: import("svelte").Component<Props, {}, "">;
|
|
14
|
+
type LiteDataLineageGraph = ReturnType<typeof LiteDataLineageGraph>;
|
|
15
|
+
export default LiteDataLineageGraph;
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface PolicyItem {
|
|
3
|
+
id: string;
|
|
4
|
+
fieldName: string;
|
|
5
|
+
ruleType: string;
|
|
6
|
+
level: string;
|
|
7
|
+
exemptRole: string;
|
|
8
|
+
enabled: boolean;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
interface Props {
|
|
12
|
+
title?: string;
|
|
13
|
+
policies?: PolicyItem[];
|
|
14
|
+
class?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
title = '动态数据脱敏策略中心',
|
|
19
|
+
policies = [
|
|
20
|
+
{ id: 'p1', fieldName: 'mobile_phone', ruleType: '手机号脱敏', level: 'L3 机密', exemptRole: '超级管理员', enabled: true },
|
|
21
|
+
{ id: 'p2', fieldName: 'resident_id_card', ruleType: '居民身份证', level: 'L4 极高', exemptRole: '合规风控员', enabled: true },
|
|
22
|
+
{ id: 'p3', fieldName: 'bank_card_number', ruleType: '银行借记卡', level: 'L4 极高', exemptRole: '财务主管', enabled: true },
|
|
23
|
+
{ id: 'p4', fieldName: 'corporate_email', ruleType: '电子邮箱前缀', level: 'L2 内部', exemptRole: '全员', enabled: false }
|
|
24
|
+
],
|
|
25
|
+
class: className = '',
|
|
26
|
+
}: Props = $props();
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<div
|
|
30
|
+
class="lite-mask-policy {className}"
|
|
31
|
+
data-svadmin-component="LiteDataMaskPolicyEngine"
|
|
32
|
+
role="region"
|
|
33
|
+
aria-label="Data Mask Policy Engine"
|
|
34
|
+
>
|
|
35
|
+
<header class="lite-mask-header">
|
|
36
|
+
<div>
|
|
37
|
+
<h4 class="lite-mask-title">{title}</h4>
|
|
38
|
+
<span class="lite-mask-meta">基于密级与角色动态下发,纯前端算法沙箱</span>
|
|
39
|
+
</div>
|
|
40
|
+
<span class="lite-policy-count">{policies.length} 项脱敏策略</span>
|
|
41
|
+
</header>
|
|
42
|
+
|
|
43
|
+
<div class="lite-mask-table-wrap">
|
|
44
|
+
<table class="lite-mask-table">
|
|
45
|
+
<thead>
|
|
46
|
+
<tr>
|
|
47
|
+
<th>字段标识</th>
|
|
48
|
+
<th>算法类型</th>
|
|
49
|
+
<th>安全密级</th>
|
|
50
|
+
<th>豁免角色</th>
|
|
51
|
+
<th>状态</th>
|
|
52
|
+
</tr>
|
|
53
|
+
</thead>
|
|
54
|
+
<tbody>
|
|
55
|
+
{#each policies as p (p.id)}
|
|
56
|
+
<tr class:lite-tr-disabled={!p.enabled}>
|
|
57
|
+
<td class="lite-td-field font-mono">{p.fieldName}</td>
|
|
58
|
+
<td>{p.ruleType}</td>
|
|
59
|
+
<td>
|
|
60
|
+
<span
|
|
61
|
+
class="lite-level-badge"
|
|
62
|
+
class:lite-lvl-high={p.level.includes('L4')}
|
|
63
|
+
class:lite-lvl-warn={p.level.includes('L3')}
|
|
64
|
+
>
|
|
65
|
+
{p.level}
|
|
66
|
+
</span>
|
|
67
|
+
</td>
|
|
68
|
+
<td><span class="lite-role-badge">{p.exemptRole}</span></td>
|
|
69
|
+
<td>
|
|
70
|
+
<span class="lite-status-badge" class:lite-st-on={p.enabled}>
|
|
71
|
+
{p.enabled ? '已启用' : '已停用'}
|
|
72
|
+
</span>
|
|
73
|
+
</td>
|
|
74
|
+
</tr>
|
|
75
|
+
{/each}
|
|
76
|
+
</tbody>
|
|
77
|
+
</table>
|
|
78
|
+
</div>
|
|
79
|
+
</div>
|
|
80
|
+
|
|
81
|
+
<style>
|
|
82
|
+
.lite-mask-policy {
|
|
83
|
+
border: 1px solid #e5e6eb;
|
|
84
|
+
border-radius: 6px;
|
|
85
|
+
background: #ffffff;
|
|
86
|
+
font-size: 12px;
|
|
87
|
+
overflow: hidden;
|
|
88
|
+
}
|
|
89
|
+
.lite-mask-header {
|
|
90
|
+
display: flex;
|
|
91
|
+
justify-content: space-between;
|
|
92
|
+
align-items: center;
|
|
93
|
+
padding: 10px 14px;
|
|
94
|
+
background: #f7f8fa;
|
|
95
|
+
border-bottom: 1px solid #e5e6eb;
|
|
96
|
+
}
|
|
97
|
+
.lite-mask-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
|
|
98
|
+
.lite-mask-meta { font-size: 11px; color: #86909c; display: block; margin-top: 2px; }
|
|
99
|
+
.lite-policy-count { font-size: 11px; color: #165dff; font-weight: 600; }
|
|
100
|
+
.lite-mask-table-wrap { overflow-x: auto; }
|
|
101
|
+
.lite-mask-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
|
|
102
|
+
.lite-mask-table th {
|
|
103
|
+
padding: 8px 12px;
|
|
104
|
+
background: #f2f3f5;
|
|
105
|
+
border-bottom: 1px solid #e5e6eb;
|
|
106
|
+
color: #4e5969;
|
|
107
|
+
font-weight: 600;
|
|
108
|
+
}
|
|
109
|
+
.lite-mask-table td {
|
|
110
|
+
padding: 8px 12px;
|
|
111
|
+
border-bottom: 1px solid #f2f3f5;
|
|
112
|
+
color: #1d2129;
|
|
113
|
+
}
|
|
114
|
+
.lite-tr-disabled { opacity: 0.6; }
|
|
115
|
+
.lite-td-field { font-weight: 600; }
|
|
116
|
+
.font-mono { font-family: monospace; }
|
|
117
|
+
.lite-level-badge {
|
|
118
|
+
display: inline-block;
|
|
119
|
+
padding: 1px 6px;
|
|
120
|
+
border-radius: 3px;
|
|
121
|
+
font-size: 10px;
|
|
122
|
+
font-weight: 600;
|
|
123
|
+
background: #f2f3f5;
|
|
124
|
+
color: #4e5969;
|
|
125
|
+
}
|
|
126
|
+
.lite-lvl-high { background: #ffece8; color: #f53f3f; }
|
|
127
|
+
.lite-lvl-warn { background: #fff7e8; color: #ff7d00; }
|
|
128
|
+
.lite-role-badge { background: #e8f3ff; color: #165dff; padding: 1px 6px; border-radius: 3px; font-size: 10px; }
|
|
129
|
+
.lite-status-badge { font-size: 10px; color: #86909c; }
|
|
130
|
+
.lite-st-on { color: #00b42a; font-weight: 600; }
|
|
131
|
+
</style>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
interface PolicyItem {
|
|
2
|
+
id: string;
|
|
3
|
+
fieldName: string;
|
|
4
|
+
ruleType: string;
|
|
5
|
+
level: string;
|
|
6
|
+
exemptRole: string;
|
|
7
|
+
enabled: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface Props {
|
|
10
|
+
title?: string;
|
|
11
|
+
policies?: PolicyItem[];
|
|
12
|
+
class?: string;
|
|
13
|
+
}
|
|
14
|
+
declare const LiteDataMaskPolicyEngine: import("svelte").Component<Props, {}, "">;
|
|
15
|
+
type LiteDataMaskPolicyEngine = ReturnType<typeof LiteDataMaskPolicyEngine>;
|
|
16
|
+
export default LiteDataMaskPolicyEngine;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import type { Snippet } from 'svelte';
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
title?: string;
|
|
6
|
+
class?: string;
|
|
7
|
+
children?: Snippet;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
let {
|
|
11
|
+
title = 'Data Dashboard',
|
|
12
|
+
class: className = '',
|
|
13
|
+
children,
|
|
14
|
+
}: Props = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<div
|
|
18
|
+
class="lite-datascreen-container {className}"
|
|
19
|
+
data-svadmin-component="LiteDataScreenContainer"
|
|
20
|
+
>
|
|
21
|
+
<header class="lite-datascreen-header">
|
|
22
|
+
<h2 class="lite-datascreen-title">{title}</h2>
|
|
23
|
+
</header>
|
|
24
|
+
<main class="lite-datascreen-body">
|
|
25
|
+
{#if children}{@render children()}{/if}
|
|
26
|
+
</main>
|
|
27
|
+
</div>
|
|
28
|
+
|
|
29
|
+
<style>
|
|
30
|
+
.lite-datascreen-container { background: #0f172a; color: #f8fafc; border-radius: 8px; padding: 24px; min-height: 480px; }
|
|
31
|
+
.lite-datascreen-header { border-bottom: 1px solid #334155; padding-bottom: 14px; margin-bottom: 20px; }
|
|
32
|
+
.lite-datascreen-title { font-size: 18px; font-weight: 700; color: #f8fafc; margin: 0; }
|
|
33
|
+
.lite-datascreen-body { width: 100%; }
|
|
34
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
title?: string;
|
|
4
|
+
class?: string;
|
|
5
|
+
children?: Snippet;
|
|
6
|
+
}
|
|
7
|
+
declare const LiteDataScreenContainer: import("svelte").Component<Props, {}, "">;
|
|
8
|
+
type LiteDataScreenContainer = ReturnType<typeof LiteDataScreenContainer>;
|
|
9
|
+
export default LiteDataScreenContainer;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
companyName?: string;
|
|
4
|
+
sealTitle?: string;
|
|
5
|
+
serialNumber?: string;
|
|
6
|
+
class?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
let {
|
|
10
|
+
companyName = '上海创智多租户研发网络科技有限公司',
|
|
11
|
+
sealTitle = '电子审批专用章',
|
|
12
|
+
serialNumber = '3101040098214',
|
|
13
|
+
class: className = '',
|
|
14
|
+
}: Props = $props();
|
|
15
|
+
</script>
|
|
16
|
+
|
|
17
|
+
<div
|
|
18
|
+
class="lite-seal-stamp {className}"
|
|
19
|
+
data-svadmin-component="LiteElectronicSealStamp"
|
|
20
|
+
role="img"
|
|
21
|
+
aria-label="{companyName} {sealTitle}"
|
|
22
|
+
>
|
|
23
|
+
<div class="lite-seal-circle">
|
|
24
|
+
<div class="lite-seal-company">{companyName}</div>
|
|
25
|
+
<div class="lite-seal-star">★</div>
|
|
26
|
+
<div class="lite-seal-title">{sealTitle}</div>
|
|
27
|
+
<div class="lite-seal-serial font-mono">{serialNumber}</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<style>
|
|
32
|
+
.lite-seal-stamp {
|
|
33
|
+
display: inline-block;
|
|
34
|
+
padding: 8px;
|
|
35
|
+
transform: rotate(-5deg);
|
|
36
|
+
}
|
|
37
|
+
.lite-seal-circle {
|
|
38
|
+
width: 140px;
|
|
39
|
+
height: 140px;
|
|
40
|
+
border: 3px solid #f53f3f;
|
|
41
|
+
border-radius: 50%;
|
|
42
|
+
color: #f53f3f;
|
|
43
|
+
text-align: center;
|
|
44
|
+
box-sizing: border-box;
|
|
45
|
+
padding: 8px 6px;
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-direction: column;
|
|
48
|
+
justify-content: space-between;
|
|
49
|
+
align-items: center;
|
|
50
|
+
}
|
|
51
|
+
.lite-seal-company { font-size: 9px; font-weight: bold; line-height: 1.1; }
|
|
52
|
+
.lite-seal-star { font-size: 22px; line-height: 1; }
|
|
53
|
+
.lite-seal-title { font-size: 11px; font-weight: bold; letter-spacing: 1px; }
|
|
54
|
+
.lite-seal-serial { font-size: 8px; font-family: monospace; letter-spacing: 1px; }
|
|
55
|
+
.font-mono { font-family: monospace; }
|
|
56
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
companyName?: string;
|
|
3
|
+
sealTitle?: string;
|
|
4
|
+
serialNumber?: string;
|
|
5
|
+
class?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const LiteElectronicSealStamp: import("svelte").Component<Props, {}, "">;
|
|
8
|
+
type LiteElectronicSealStamp = ReturnType<typeof LiteElectronicSealStamp>;
|
|
9
|
+
export default LiteElectronicSealStamp;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface EnvItem {
|
|
3
|
+
key: string;
|
|
4
|
+
value: string;
|
|
5
|
+
isSecret?: boolean;
|
|
6
|
+
scope?: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
interface Props {
|
|
10
|
+
title?: string;
|
|
11
|
+
environment?: string;
|
|
12
|
+
variables?: EnvItem[];
|
|
13
|
+
class?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let {
|
|
17
|
+
title = '环境变量与配置字典',
|
|
18
|
+
environment = 'production',
|
|
19
|
+
variables = [
|
|
20
|
+
{ key: 'DATABASE_URL', value: 'postgresql://postgres:******@db.cluster:5432/main', isSecret: true, scope: 'server' },
|
|
21
|
+
{ key: 'REDIS_HOST', value: 'redis-master.internal', isSecret: false, scope: 'all' },
|
|
22
|
+
{ key: 'STORAGE_BUCKET_NAME', value: 'corp-assets-prod', isSecret: false, scope: 'server' },
|
|
23
|
+
{ key: 'OIDC_CLIENT_SECRET', value: 'sec_live_9941a8******', isSecret: true, scope: 'auth' }
|
|
24
|
+
],
|
|
25
|
+
class: className = '',
|
|
26
|
+
}: Props = $props();
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<div
|
|
30
|
+
class="lite-env-editor {className}"
|
|
31
|
+
data-svadmin-component="LiteEnvVariableEditor"
|
|
32
|
+
role="region"
|
|
33
|
+
aria-label="Environment Variable Editor"
|
|
34
|
+
>
|
|
35
|
+
<header class="lite-env-header">
|
|
36
|
+
<div>
|
|
37
|
+
<h4 class="lite-env-title">{title}</h4>
|
|
38
|
+
<span class="lite-env-env-tag">环境: {environment}</span>
|
|
39
|
+
</div>
|
|
40
|
+
<span class="lite-env-count">{variables.length} 项环境变量</span>
|
|
41
|
+
</header>
|
|
42
|
+
|
|
43
|
+
<div class="lite-env-list">
|
|
44
|
+
{#each variables as v (v.key)}
|
|
45
|
+
<div class="lite-env-item">
|
|
46
|
+
<div class="lite-env-key-wrap">
|
|
47
|
+
<code class="lite-env-key">{v.key}</code>
|
|
48
|
+
{#if v.isSecret}
|
|
49
|
+
<span class="lite-env-badge-secret">加密机密</span>
|
|
50
|
+
{/if}
|
|
51
|
+
{#if v.scope}
|
|
52
|
+
<span class="lite-env-badge-scope">{v.scope}</span>
|
|
53
|
+
{/if}
|
|
54
|
+
</div>
|
|
55
|
+
<div class="lite-env-val-wrap">
|
|
56
|
+
<code class="lite-env-value">{v.isSecret ? '●●●●●●●●●●●●' : v.value}</code>
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
{/each}
|
|
60
|
+
</div>
|
|
61
|
+
</div>
|
|
62
|
+
|
|
63
|
+
<style>
|
|
64
|
+
.lite-env-editor {
|
|
65
|
+
border: 1px solid #e5e6eb;
|
|
66
|
+
border-radius: 6px;
|
|
67
|
+
background: #ffffff;
|
|
68
|
+
font-size: 12px;
|
|
69
|
+
overflow: hidden;
|
|
70
|
+
}
|
|
71
|
+
.lite-env-header {
|
|
72
|
+
display: flex;
|
|
73
|
+
justify-content: space-between;
|
|
74
|
+
align-items: center;
|
|
75
|
+
padding: 10px 14px;
|
|
76
|
+
background: #f7f8fa;
|
|
77
|
+
border-bottom: 1px solid #e5e6eb;
|
|
78
|
+
}
|
|
79
|
+
.lite-env-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
|
|
80
|
+
.lite-env-env-tag { font-size: 11px; color: #165dff; font-weight: 600; display: block; margin-top: 2px; }
|
|
81
|
+
.lite-env-count { font-size: 11px; color: #86909c; }
|
|
82
|
+
.lite-env-list { padding: 8px 14px; }
|
|
83
|
+
.lite-env-item {
|
|
84
|
+
display: flex;
|
|
85
|
+
justify-content: space-between;
|
|
86
|
+
align-items: center;
|
|
87
|
+
padding: 8px 0;
|
|
88
|
+
border-bottom: 1px solid #f2f3f5;
|
|
89
|
+
}
|
|
90
|
+
.lite-env-item:last-child { border-bottom: none; }
|
|
91
|
+
.lite-env-key-wrap { display: flex; align-items: center; }
|
|
92
|
+
.lite-env-key-wrap > * + * { margin-left: 6px; }
|
|
93
|
+
.lite-env-key { font-weight: 600; color: #1d2129; font-family: monospace; font-size: 11px; }
|
|
94
|
+
.lite-env-badge-secret {
|
|
95
|
+
font-size: 10px;
|
|
96
|
+
padding: 1px 4px;
|
|
97
|
+
border-radius: 3px;
|
|
98
|
+
background: #ffece8;
|
|
99
|
+
color: #f53f3f;
|
|
100
|
+
font-weight: 500;
|
|
101
|
+
}
|
|
102
|
+
.lite-env-badge-scope {
|
|
103
|
+
font-size: 10px;
|
|
104
|
+
padding: 1px 4px;
|
|
105
|
+
border-radius: 3px;
|
|
106
|
+
background: #f2f3f5;
|
|
107
|
+
color: #4e5969;
|
|
108
|
+
}
|
|
109
|
+
.lite-env-value {
|
|
110
|
+
color: #4e5969;
|
|
111
|
+
font-family: monospace;
|
|
112
|
+
font-size: 11px;
|
|
113
|
+
}
|
|
114
|
+
</style>
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface EnvItem {
|
|
2
|
+
key: string;
|
|
3
|
+
value: string;
|
|
4
|
+
isSecret?: boolean;
|
|
5
|
+
scope?: string;
|
|
6
|
+
}
|
|
7
|
+
interface Props {
|
|
8
|
+
title?: string;
|
|
9
|
+
environment?: string;
|
|
10
|
+
variables?: EnvItem[];
|
|
11
|
+
class?: string;
|
|
12
|
+
}
|
|
13
|
+
declare const LiteEnvVariableEditor: import("svelte").Component<Props, {}, "">;
|
|
14
|
+
type LiteEnvVariableEditor = ReturnType<typeof LiteEnvVariableEditor>;
|
|
15
|
+
export default LiteEnvVariableEditor;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface Props {
|
|
3
|
+
label?: string;
|
|
4
|
+
formula?: string;
|
|
5
|
+
value?: number | string | null;
|
|
6
|
+
prefix?: string;
|
|
7
|
+
suffix?: string;
|
|
8
|
+
class?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
let {
|
|
12
|
+
label = 'Formula Field',
|
|
13
|
+
formula = 'a * b',
|
|
14
|
+
value = 0,
|
|
15
|
+
prefix = '',
|
|
16
|
+
suffix = '',
|
|
17
|
+
class: className = '',
|
|
18
|
+
}: Props = $props();
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<div
|
|
22
|
+
class="lite-formula-field {className}"
|
|
23
|
+
data-svadmin-component="LiteFormulaField"
|
|
24
|
+
>
|
|
25
|
+
<div class="lite-formula-header">
|
|
26
|
+
<span class="lite-formula-label">{label}</span>
|
|
27
|
+
<span class="lite-formula-badge">f(x): {formula}</span>
|
|
28
|
+
</div>
|
|
29
|
+
<div class="lite-formula-box">
|
|
30
|
+
{#if prefix}<span class="lite-formula-prefix">{prefix}</span>{/if}
|
|
31
|
+
<span class="lite-formula-val">{value ?? '0.00'}</span>
|
|
32
|
+
{#if suffix}<span class="lite-formula-suffix">{suffix}</span>{/if}
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
|
|
36
|
+
<style>
|
|
37
|
+
.lite-formula-field { margin-bottom: 12px; font-size: 12px; }
|
|
38
|
+
.lite-formula-header { display: flex; justify-content: space-between; margin-bottom: 4px; }
|
|
39
|
+
.lite-formula-label { font-weight: 600; color: #4e5969; }
|
|
40
|
+
.lite-formula-badge { font-family: monospace; font-size: 11px; background: #e8f3ff; color: #165dff; padding: 1px 6px; border-radius: 4px; }
|
|
41
|
+
.lite-formula-box { background: #f7f8fa; border: 1px solid #e5e6eb; border-radius: 4px; padding: 6px 10px; font-family: monospace; font-weight: 600; color: #1d2129; }
|
|
42
|
+
.lite-formula-prefix { margin-right: 4px; color: #86909c; }
|
|
43
|
+
.lite-formula-suffix { margin-left: 4px; color: #86909c; }
|
|
44
|
+
</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface Props {
|
|
2
|
+
label?: string;
|
|
3
|
+
formula?: string;
|
|
4
|
+
value?: number | string | null;
|
|
5
|
+
prefix?: string;
|
|
6
|
+
suffix?: string;
|
|
7
|
+
class?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const LiteFormulaField: import("svelte").Component<Props, {}, "">;
|
|
10
|
+
type LiteFormulaField = ReturnType<typeof LiteFormulaField>;
|
|
11
|
+
export default LiteFormulaField;
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
interface RegionItem {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
value: number;
|
|
6
|
+
status?: 'normal' | 'warning' | 'critical' | 'highlight';
|
|
7
|
+
subtext?: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
interface Props {
|
|
11
|
+
title?: string;
|
|
12
|
+
metricLabel?: string;
|
|
13
|
+
regions?: RegionItem[];
|
|
14
|
+
class?: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let {
|
|
18
|
+
title = '业务地域空间分布与负载排行',
|
|
19
|
+
metricLabel = '并发连接数',
|
|
20
|
+
regions = [
|
|
21
|
+
{ id: 'east', name: '华东大区 (上海/江浙)', value: 4820, status: 'highlight', subtext: '含5个超级算力中心' },
|
|
22
|
+
{ id: 'north', name: '华北大区 (京津冀)', value: 4120, status: 'normal', subtext: '主核心控制节点' },
|
|
23
|
+
{ id: 'south', name: '华南大区 (广深/港澳)', value: 3650, status: 'normal', subtext: '跨境核心中继集群' },
|
|
24
|
+
{ id: 'southwest', name: '西南大区 (成渝/云贵)', value: 3100, status: 'warning', subtext: '水冷水电高能效算力' },
|
|
25
|
+
{ id: 'central', name: '华中大区 (两湖/河南)', value: 2450, status: 'normal', subtext: '灾备冷备存储仓' }
|
|
26
|
+
],
|
|
27
|
+
class: className = '',
|
|
28
|
+
}: Props = $props();
|
|
29
|
+
|
|
30
|
+
const maxVal = $derived(Math.max(...regions.map(r => r.value), 1));
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<div
|
|
34
|
+
class="lite-geo-map {className}"
|
|
35
|
+
data-svadmin-component="LiteGeoScatterMap"
|
|
36
|
+
role="region"
|
|
37
|
+
aria-label="Geo Distribution Map"
|
|
38
|
+
>
|
|
39
|
+
<header class="lite-geo-header">
|
|
40
|
+
<div>
|
|
41
|
+
<h4 class="lite-geo-title">{title}</h4>
|
|
42
|
+
<span class="lite-geo-metric">指标基准: {metricLabel}</span>
|
|
43
|
+
</div>
|
|
44
|
+
</header>
|
|
45
|
+
|
|
46
|
+
<div class="lite-geo-body">
|
|
47
|
+
<div class="lite-geo-list">
|
|
48
|
+
{#each regions as r, idx (r.id)}
|
|
49
|
+
{@const pct = Math.round((r.value / maxVal) * 100)}
|
|
50
|
+
<div class="lite-geo-item">
|
|
51
|
+
<div class="lite-item-top">
|
|
52
|
+
<div class="lite-item-left">
|
|
53
|
+
<span class="lite-rank-num" class:lite-rank-top={idx === 0}>{idx + 1}</span>
|
|
54
|
+
<span class="lite-region-name">{r.name}</span>
|
|
55
|
+
</div>
|
|
56
|
+
<span class="lite-region-val font-mono">{r.value.toLocaleString()}</span>
|
|
57
|
+
</div>
|
|
58
|
+
<div class="lite-track">
|
|
59
|
+
<div
|
|
60
|
+
class="lite-bar"
|
|
61
|
+
class:lite-bar-warn={r.status === 'warning'}
|
|
62
|
+
class:lite-bar-danger={r.status === 'critical'}
|
|
63
|
+
style="width: {pct}%;"
|
|
64
|
+
></div>
|
|
65
|
+
</div>
|
|
66
|
+
{#if r.subtext}
|
|
67
|
+
<div class="lite-item-sub">{r.subtext}</div>
|
|
68
|
+
{/if}
|
|
69
|
+
</div>
|
|
70
|
+
{/each}
|
|
71
|
+
</div>
|
|
72
|
+
</div>
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<style>
|
|
76
|
+
.lite-geo-map {
|
|
77
|
+
border: 1px solid #e5e6eb;
|
|
78
|
+
border-radius: 6px;
|
|
79
|
+
background: #ffffff;
|
|
80
|
+
font-size: 12px;
|
|
81
|
+
overflow: hidden;
|
|
82
|
+
}
|
|
83
|
+
.lite-geo-header {
|
|
84
|
+
padding: 10px 14px;
|
|
85
|
+
background: #f7f8fa;
|
|
86
|
+
border-bottom: 1px solid #e5e6eb;
|
|
87
|
+
}
|
|
88
|
+
.lite-geo-title { margin: 0; font-size: 13px; font-weight: 600; color: #1d2129; }
|
|
89
|
+
.lite-geo-metric { font-size: 11px; color: #86909c; display: block; margin-top: 2px; }
|
|
90
|
+
.lite-geo-body { padding: 12px 14px; }
|
|
91
|
+
.lite-geo-item { margin-bottom: 12px; }
|
|
92
|
+
.lite-geo-item:last-child { margin-bottom: 0; }
|
|
93
|
+
.lite-item-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
|
|
94
|
+
.lite-item-left { display: flex; align-items: center; }
|
|
95
|
+
.lite-item-left > * + * { margin-left: 8px; }
|
|
96
|
+
.lite-rank-num {
|
|
97
|
+
display: inline-block;
|
|
98
|
+
width: 16px;
|
|
99
|
+
height: 16px;
|
|
100
|
+
line-height: 16px;
|
|
101
|
+
text-align: center;
|
|
102
|
+
border-radius: 3px;
|
|
103
|
+
background: #f2f3f5;
|
|
104
|
+
color: #4e5969;
|
|
105
|
+
font-size: 10px;
|
|
106
|
+
font-weight: 700;
|
|
107
|
+
}
|
|
108
|
+
.lite-rank-top { background: #165dff; color: #ffffff; }
|
|
109
|
+
.lite-region-name { font-weight: 600; color: #1d2129; font-size: 12px; }
|
|
110
|
+
.lite-region-val { font-size: 12px; font-weight: 700; color: #165dff; }
|
|
111
|
+
.font-mono { font-family: monospace; }
|
|
112
|
+
.lite-track { height: 6px; background: #f2f3f5; border-radius: 3px; overflow: hidden; }
|
|
113
|
+
.lite-bar { height: 100%; background: #165dff; border-radius: 3px; }
|
|
114
|
+
.lite-bar-warn { background: #ff7d00; }
|
|
115
|
+
.lite-bar-danger { background: #f53f3f; }
|
|
116
|
+
.lite-item-sub { font-size: 11px; color: #86909c; margin-top: 3px; }
|
|
117
|
+
</style>
|