@cloudcare/guance-front-tools 1.0.17 → 1.0.19
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/README.md +64 -0
- package/lib/cjs/package.json +3 -0
- package/lib/cjs/scripts/convert-grafana-dashboard.js +6 -12
- package/lib/esm/package.json +3 -0
- package/lib/esm/scripts/convert-grafana-dashboard.js +0 -9
- package/lib/scripts/convert-grafana-dashboard.js +0 -10
- package/package.json +5 -3
- package/scripts/write-module-package-json.mjs +24 -0
- package/skills/grafana-to-guance-dashboard/SKILL.md +410 -22
- package/skills/grafana-to-guance-dashboard/agents/openai.yaml +2 -2
- package/skills/grafana-to-guance-dashboard/fixtures/grafana-dashboard.guance.json +1029 -0
- package/skills/grafana-to-guance-dashboard/fixtures/grafana-dashboard.json +878 -0
- package/skills/grafana-to-guance-dashboard/package.json +16 -0
- package/skills/grafana-to-guance-dashboard/references/conversion-audit-checklist.md +183 -0
- package/skills/grafana-to-guance-dashboard/references/converter-notes.md +114 -4
- package/skills/grafana-to-guance-dashboard/references/promql-compatibility-cheatsheet.md +172 -0
- package/skills/grafana-to-guance-dashboard/references/unit-inference-cheatsheet.md +174 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/chart-schema.json +84 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/common/chart-link-item-schema.json +48 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/common/chart-links-schema.json +9 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/common/common-chart-types-schema.json +39 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/common/common-vars-item-schema.json +117 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/common/common-vars-schema.json +10 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/dashboard-schema.json +80 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/query/queries-schema.json +10 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/query/query-item-schema.json +60 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/_common-settings-connect-null-schema.json +7 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/_common-settings-gradual-color-schema.json +72 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/_common-settings-groupby-schema.json +22 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/_common-settings-legend-position-schema.json +14 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/_common-settings-legend-values-schema.json +19 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/_common-settings-open-stack-schema.json +8 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/_common-settings-show-label-schema.json +8 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/_common-settings-show-line-schema.json +8 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/_common-settings-stack-content-schema.json +12 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/_common-settings-stack-type-schema.json +11 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-alarm-settings-schema.json +48 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-bar-settings-schema.json +69 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-chinamap-settings-schema.json +102 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-funnel-settings-schema.json +34 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-gauge-settings-schema.json +65 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-heatmap-settings-schema.json +50 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-hexgon-settings-schema.json +90 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-histogram-settings-schema.json +47 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-iframe-settings-schema.json +24 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-log-settings-schema.json +84 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-object-settings-schema.json +52 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-picture-settings-schema.json +46 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-pie-settings-schema.json +90 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-sankey-settings-schema.json +34 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-scatter-bubble-settings-schema.json +31 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-sequence-settings-schema.json +76 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-singlestat-settings-schema.json +163 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-table-settings-schema.json +184 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-text-settings-schema.json +20 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-toplist-settings-schema.json +117 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-topology-settings-schema.json +71 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-treemap-settings-schema.json +66 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/chart-worldmap-settings-schema.json +102 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/common-settings-schema.json +82 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/settings-alias-schema.json +47 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/settings-chart-type-schema.json +27 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/settings-colors-schema.json +46 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/settings-compare-schema.json +58 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/settings-fixed-time-schema.json +49 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/settings-levels-schema.json +33 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/settings-schema.json +79 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/settings-time-schema.json +43 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/settings-unit-items-schema.json +228 -0
- package/skills/grafana-to-guance-dashboard/schemas/charts/settings/settings-units-schema.json +59 -0
- package/skills/grafana-to-guance-dashboard/schemas/dashboard-schema.json +5 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/attribute-mutation-schema.json +21 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/attributes-schema.json +10 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/cdata-node-schema.json +19 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/creation-reason-schema.json +17 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/document-fragment-node-schema.json +35 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/document-node-schema.json +30 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/document-type-node-schema.json +28 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/element-node-schema.json +33 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/frustration-record-schema.json +49 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/full-snapshot-record-schema.json +26 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/incremental-data-schema.json +36 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/incremental-snapshot-record-schema.json +29 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/input-data-schema.json +27 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/input-state-schema.json +27 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/media-interaction-data-schema.json +23 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/media-interaction-schema.json +20 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/mouse-interaction-data-schema.json +23 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/mouse-interaction-schema.json +47 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/mouse-move-data-schema.json +23 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/mouse-position-schema.json +26 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/mutation-data-schema.json +23 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/mutation-payload-schema.json +42 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/node-added-mutation-schema.json +41 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/node-removed-mutation-schema.json +18 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/node-schema.json +28 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/record-schema.json +30 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/scroll-data-schema.json +23 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/scroll-position-schema.json +22 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/segment-metadata-schema.json +28 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/segment-schema.json +25 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/serialized-node-schema.json +15 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/serialized-node-with-id-schema.json +21 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/stylesheet-rule-add-schema.json +28 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/stylesheet-rule-data-schema.json +23 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/stylesheet-rule-delete-schema.json +24 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/stylesheet-rule-schema.json +29 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/stylesheet-schema.json +30 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/text-mutation-schema.json +27 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/browser/text-node-schema.json +23 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/_common-record-schema.json +14 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/_common-segment-metadata-schema.json +30 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/_slot-supported-common-record-schema.json +21 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/focus-record-schema.json +34 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/meta-record-schema.json +42 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/pointer-interaction-data-schema.json +23 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/pointer-interaction-schema.json +34 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/segment-context-schema.json +46 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/view-end-record-schema.json +23 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/viewport-resize-data-schema.json +23 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/viewport-resize-dimension-schema.json +18 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/common/visual-viewport-record-schema.json +50 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/full-snapshot-record-schema.json +14 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/incremental-data-schema.json +14 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/incremental-snapshot-record-schema.json +14 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/_common-shape-wireframe-schema.json +22 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/_common-shape-wireframe-update-schema.json +22 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/_common-wireframe-schema.json +38 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/_common-wireframe-update-schema.json +38 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/full-snapshot-record-schema.json +38 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/image-wireframe-schema.json +43 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/image-wireframe-update-schema.json +43 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/incremental-data-schema.json +21 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/incremental-snapshot-record-schema.json +26 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/mutation-data-schema.json +23 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/mutation-payload-schema.json +55 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/placeholder-wireframe-schema.json +28 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/placeholder-wireframe-update-schema.json +28 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/record-schema.json +27 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/segment-metadata-schema.json +25 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/segment-schema.json +25 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/shape-border-schema.json +25 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/shape-style-schema.json +29 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/shape-wireframe-schema.json +23 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/shape-wireframe-update-schema.json +23 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/text-position-schema.json +57 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/text-style-schema.json +31 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/text-wireframe-schema.json +34 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/text-wireframe-update-schema.json +34 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/touch-data-schema.json +51 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/webview-wireframe-schema.json +33 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/webview-wireframe-update-schema.json +33 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/wireframe-clip-schema.json +29 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/wireframe-schema.json +24 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mobile/wireframe-update-mutation-schema.json +24 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mutation-data-schema.json +14 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/mutation-payload-schema.json +14 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/record-schema.json +14 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/segment-metadata-schema.json +14 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay/segment-schema.json +15 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay-browser-schema.json +5 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay-mobile-schema.json +5 -0
- package/skills/grafana-to-guance-dashboard/schemas/session-replay-schema.json +33 -0
- package/skills/grafana-to-guance-dashboard/scripts/convert-grafana-dashboard.mjs +8 -13
- package/skills/grafana-to-guance-dashboard/scripts/validate-file.mjs +62 -0
- package/skills/grafana-to-guance-dashboard/test/convert.test.mjs +54 -0
- package/test/cli.test.mjs +27 -1
- package/tsconfig.cjs.scripts.json +19 -0
- package/tsconfig.esm.scripts.json +19 -0
- package/scripts/sync-converter.mjs +0 -57
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "charts/chart-schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"description": "图表完整结构",
|
|
6
|
+
"title": "ChartData",
|
|
7
|
+
"required": [
|
|
8
|
+
"extend",
|
|
9
|
+
"name",
|
|
10
|
+
"pos",
|
|
11
|
+
"type",
|
|
12
|
+
"queries"
|
|
13
|
+
],
|
|
14
|
+
"properties": {
|
|
15
|
+
"extend": {
|
|
16
|
+
"type": "object",
|
|
17
|
+
"additionalProperties": true,
|
|
18
|
+
"properties": {
|
|
19
|
+
"links": {
|
|
20
|
+
"$ref": "common/chart-links-schema.json"
|
|
21
|
+
},
|
|
22
|
+
"settings": {
|
|
23
|
+
"$ref": "settings/settings-schema.json"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"group": {
|
|
28
|
+
"type": "object",
|
|
29
|
+
"properties": {
|
|
30
|
+
"name": {
|
|
31
|
+
"oneOf": [
|
|
32
|
+
{
|
|
33
|
+
"type": "string",
|
|
34
|
+
"description": "分组名称"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"type": "null",
|
|
38
|
+
"description": "分组名称"
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"name": {
|
|
45
|
+
"type": "string",
|
|
46
|
+
"description": "图表名称"
|
|
47
|
+
},
|
|
48
|
+
"pos": {
|
|
49
|
+
"description": "图表位置信息",
|
|
50
|
+
"type": "object",
|
|
51
|
+
"required": [
|
|
52
|
+
"h",
|
|
53
|
+
"w",
|
|
54
|
+
"x",
|
|
55
|
+
"y"
|
|
56
|
+
],
|
|
57
|
+
"properties": {
|
|
58
|
+
"h": {
|
|
59
|
+
"description": "图表高度,每行的高度默认为10像素,比如 h 为12, 则实际高度为 12 * 10",
|
|
60
|
+
"type": "number"
|
|
61
|
+
},
|
|
62
|
+
"w": {
|
|
63
|
+
"type": "number",
|
|
64
|
+
"description": "图表宽度,栅格系统的最大列数为 24, 比如 w为12,则显示宽度则为容器宽度的 1/2 倍 "
|
|
65
|
+
},
|
|
66
|
+
"x": {
|
|
67
|
+
"type": "number",
|
|
68
|
+
"description": "图表距离容器的水平距离,栅格系统的最大列数为 24, 比如 x为12,则图表距离容器左边的水平距离为容器宽度 1/2 倍 "
|
|
69
|
+
},
|
|
70
|
+
"y": {
|
|
71
|
+
"type": "number",
|
|
72
|
+
"description": "图表距离容器垂直距离,每行的高度默认为10像素,比如 y为12, 则实际高度为 12 * 10"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"type": {
|
|
77
|
+
"description": "图表类型",
|
|
78
|
+
"$ref": "common/common-chart-types-schema.json"
|
|
79
|
+
},
|
|
80
|
+
"queries": {
|
|
81
|
+
"$ref": "query/queries-schema.json"
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "charts/common/chart-link-item-schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"description": "图表联动跳转项",
|
|
6
|
+
"required": [
|
|
7
|
+
"url",
|
|
8
|
+
"open",
|
|
9
|
+
"show",
|
|
10
|
+
"type",
|
|
11
|
+
"showChanged"
|
|
12
|
+
],
|
|
13
|
+
"properties": {
|
|
14
|
+
"url": {
|
|
15
|
+
"type": "string",
|
|
16
|
+
"description": "跳转地址"
|
|
17
|
+
},
|
|
18
|
+
"open": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"description": "打开方式",
|
|
21
|
+
"enum": [
|
|
22
|
+
"newWin",
|
|
23
|
+
"curWin",
|
|
24
|
+
"drawerWin"
|
|
25
|
+
]
|
|
26
|
+
},
|
|
27
|
+
"show": {
|
|
28
|
+
"type": "boolean",
|
|
29
|
+
"description": "是否展示"
|
|
30
|
+
},
|
|
31
|
+
"type": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "跳转类型",
|
|
34
|
+
"enum": [
|
|
35
|
+
"logging",
|
|
36
|
+
"container",
|
|
37
|
+
"processes",
|
|
38
|
+
"tracing",
|
|
39
|
+
"host",
|
|
40
|
+
"custom"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
"showChanged": {
|
|
44
|
+
"type": "boolean",
|
|
45
|
+
"description": "是否修改过显示状态"
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
package/skills/grafana-to-guance-dashboard/schemas/charts/common/common-chart-types-schema.json
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "charts/common/common-chart-types-schema.json",
|
|
4
|
+
"type": "string",
|
|
5
|
+
"title": "ChartType",
|
|
6
|
+
"description": "支持图表类型枚举",
|
|
7
|
+
"enum": [
|
|
8
|
+
"group",
|
|
9
|
+
"sequence",
|
|
10
|
+
"singlestat",
|
|
11
|
+
"pie",
|
|
12
|
+
"bar",
|
|
13
|
+
"histogram",
|
|
14
|
+
"slo",
|
|
15
|
+
"toplist",
|
|
16
|
+
"gauge",
|
|
17
|
+
"scatter",
|
|
18
|
+
"bubble",
|
|
19
|
+
"table",
|
|
20
|
+
"treemap",
|
|
21
|
+
"funnel",
|
|
22
|
+
"chinamap",
|
|
23
|
+
"worldmap",
|
|
24
|
+
"hexgon",
|
|
25
|
+
"heatmap",
|
|
26
|
+
"topology",
|
|
27
|
+
"sankey",
|
|
28
|
+
"change",
|
|
29
|
+
"log",
|
|
30
|
+
"object",
|
|
31
|
+
"monitor",
|
|
32
|
+
"alarm",
|
|
33
|
+
"text",
|
|
34
|
+
"video",
|
|
35
|
+
"picture",
|
|
36
|
+
"command",
|
|
37
|
+
"iframe"
|
|
38
|
+
]
|
|
39
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "charts/common/common-vars-item-schema.json",
|
|
4
|
+
"title": "chartVarsItem",
|
|
5
|
+
"description": "图表视图变量完整结构",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"properties": {
|
|
9
|
+
"definition": {
|
|
10
|
+
"type": "object",
|
|
11
|
+
"properties": {
|
|
12
|
+
"tag": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "定义 type 为 metrc 类型对应的指标 tag"
|
|
15
|
+
},
|
|
16
|
+
"field": {
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "定义 type 为 metrc,object,custom_object, logging, tracing,rum,securit 类型对应的 field"
|
|
19
|
+
},
|
|
20
|
+
"value": {
|
|
21
|
+
"type": "string",
|
|
22
|
+
"description": "定义 type 为 dql,promql,custom_object类型对应的 dql、promql,或者以‘,’号分割的自定义字符串数据"
|
|
23
|
+
},
|
|
24
|
+
"metric": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"description": "1.type 为 metric 对应指标集 2. type 为 logging,rum 对应 source。"
|
|
27
|
+
},
|
|
28
|
+
"object": {
|
|
29
|
+
"type": "string",
|
|
30
|
+
"description": "type 为 object, custom_object 对应对象 source"
|
|
31
|
+
},
|
|
32
|
+
"defaultVal": {
|
|
33
|
+
"description": "视图变量默认填充值",
|
|
34
|
+
"type": "object",
|
|
35
|
+
"properties": {
|
|
36
|
+
"label": {
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "默认填充值 label,如果没有则和 value 保持一致"
|
|
39
|
+
},
|
|
40
|
+
"value": {
|
|
41
|
+
"type": "string",
|
|
42
|
+
"description": "默认填充值 value"
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
"type": {
|
|
49
|
+
"description": "视图变量查询类型,对应关系分别为 QUERY:【DQL】,PROMQL_QUERY:【PROMQL】,TAG:【指标】,FIELD:【基础对象】,FIELD:【自定义对象】,LOGGING:【日志】,TRACING:【应用性能】,RUM:【用户访问】,SECURITY:【安全巡检】,CUSTOM_LIST:【自定义】",
|
|
50
|
+
"type": "string",
|
|
51
|
+
"enum": [
|
|
52
|
+
"QUERY",
|
|
53
|
+
"PROMQL_QUERY",
|
|
54
|
+
"FIELD",
|
|
55
|
+
"TAG",
|
|
56
|
+
"LOGGING",
|
|
57
|
+
"TRACING",
|
|
58
|
+
"RUM",
|
|
59
|
+
"SECURITY",
|
|
60
|
+
"CUSTOM_LIST"
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
"code": {
|
|
64
|
+
"type": "string",
|
|
65
|
+
"description": "需要被替换的变量名"
|
|
66
|
+
},
|
|
67
|
+
"datasource": {
|
|
68
|
+
"type": "string",
|
|
69
|
+
"enum": [
|
|
70
|
+
"dataflux",
|
|
71
|
+
"ftinfluxdb",
|
|
72
|
+
"custom",
|
|
73
|
+
"object",
|
|
74
|
+
"custom_object"
|
|
75
|
+
],
|
|
76
|
+
"description": "对应关系分别为 dataflux:【DQL】,dataflux:【PROMQL】,ftinfluxdb:【指标】,object:【基础对象】,custom_object:【自定义对象】,dataflux:【日志】,dataflux:【应用性能】,dataflux:【用户访问】,dataflux:【安全巡检】,custom:【自定义】"
|
|
77
|
+
},
|
|
78
|
+
"name": {
|
|
79
|
+
"type": "string",
|
|
80
|
+
"description": "视图变量显示名称"
|
|
81
|
+
},
|
|
82
|
+
"seq": {
|
|
83
|
+
"type": "integer",
|
|
84
|
+
"description": "当前项视图变量在列表中的顺序",
|
|
85
|
+
"examples": [
|
|
86
|
+
0,
|
|
87
|
+
1,
|
|
88
|
+
2
|
|
89
|
+
]
|
|
90
|
+
},
|
|
91
|
+
"hide": {
|
|
92
|
+
"type": "integer",
|
|
93
|
+
"description": "是否隐藏该项视图变量",
|
|
94
|
+
"enum": [
|
|
95
|
+
0,
|
|
96
|
+
1
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
"multiple": {
|
|
100
|
+
"type": "boolean",
|
|
101
|
+
"description": "设置视图变量是否能多选",
|
|
102
|
+
"default": true
|
|
103
|
+
},
|
|
104
|
+
"includeStar": {
|
|
105
|
+
"type": "boolean",
|
|
106
|
+
"description": "设置视图变量列出值是否包含 * "
|
|
107
|
+
},
|
|
108
|
+
"valueSort": {
|
|
109
|
+
"type": "string",
|
|
110
|
+
"description": "列出值排序",
|
|
111
|
+
"enum": [
|
|
112
|
+
"asc",
|
|
113
|
+
"desc"
|
|
114
|
+
]
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "charts/dashboard-schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"title": "DashboardData",
|
|
6
|
+
"description": "观测云仪表板完整结构",
|
|
7
|
+
"additionalProperties": true,
|
|
8
|
+
"properties": {
|
|
9
|
+
"title": {
|
|
10
|
+
"type": "string",
|
|
11
|
+
"description": "仪表板标题"
|
|
12
|
+
},
|
|
13
|
+
"main": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"description": "仪表板图表结构",
|
|
16
|
+
"properties": {
|
|
17
|
+
"vars": {
|
|
18
|
+
"$ref": "common/common-vars-schema.json"
|
|
19
|
+
},
|
|
20
|
+
"charts": {
|
|
21
|
+
"type": "array",
|
|
22
|
+
"description": "图表合集配置",
|
|
23
|
+
"items": {
|
|
24
|
+
"$ref": "chart-schema.json"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"groups": {
|
|
28
|
+
"type": "array",
|
|
29
|
+
"description": "分组配置",
|
|
30
|
+
"items": {
|
|
31
|
+
"type": "object",
|
|
32
|
+
"properties": {
|
|
33
|
+
"name": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "图表分组名称"
|
|
36
|
+
},
|
|
37
|
+
"extend": {
|
|
38
|
+
"type": "object",
|
|
39
|
+
"description": "分组的额外配置,比如背景颜色",
|
|
40
|
+
"properties": {
|
|
41
|
+
"bgColor": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "分组块的背景颜色"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
"type": {
|
|
51
|
+
"description": "仪表板主体类型,现有数据中常缺省,存在时固定为 template",
|
|
52
|
+
"anyOf": [
|
|
53
|
+
{
|
|
54
|
+
"type": "string",
|
|
55
|
+
"const": "template"
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"type": "null"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
"dashboardExtend": {
|
|
65
|
+
"description": "仪表板额外配置信息",
|
|
66
|
+
"type": "object",
|
|
67
|
+
"additionalProperties": true,
|
|
68
|
+
"properties": {
|
|
69
|
+
"groupUnfoldStatus": {
|
|
70
|
+
"type": "object",
|
|
71
|
+
"description": "分组是否收起打开配置信息,图表名称为 key, value 为 boolean。 false 为关闭,true 为打开",
|
|
72
|
+
"additionalProperties": {
|
|
73
|
+
"type": "boolean",
|
|
74
|
+
"description": "图表名称"
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "charts/query/query-item-schema.json",
|
|
4
|
+
"type": "object",
|
|
5
|
+
"description": "图表查询语句结构",
|
|
6
|
+
"title": "ChartQueryItem",
|
|
7
|
+
"properties": {
|
|
8
|
+
"type": {
|
|
9
|
+
"description": "冗余字段,图表类型",
|
|
10
|
+
"$ref": "../common/common-chart-types-schema.json"
|
|
11
|
+
},
|
|
12
|
+
"datasource": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "冗余字段,固定值",
|
|
15
|
+
"const": "dataflux"
|
|
16
|
+
},
|
|
17
|
+
"qtype": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "查询语句类型,目前支持 dql 以及promql",
|
|
20
|
+
"enum": [
|
|
21
|
+
"dql",
|
|
22
|
+
"promql"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
"query": {
|
|
26
|
+
"type": "object",
|
|
27
|
+
"description": "查询语句的额外信息",
|
|
28
|
+
"additionalProperties": true,
|
|
29
|
+
"properties": {
|
|
30
|
+
"q": {
|
|
31
|
+
"type": "string",
|
|
32
|
+
"description": "图表查询语句,可以是 dql语句,也可以是 promql 语句"
|
|
33
|
+
},
|
|
34
|
+
"content": {
|
|
35
|
+
"type": "string",
|
|
36
|
+
"description": "文本图内容,支持 HTML 或 Markdown 文本"
|
|
37
|
+
},
|
|
38
|
+
"code": {
|
|
39
|
+
"type": "string",
|
|
40
|
+
"description": "查询语句的唯一标识,由单个大写英文字母构成"
|
|
41
|
+
},
|
|
42
|
+
"type": {
|
|
43
|
+
"type": "string",
|
|
44
|
+
"description": "查询语句类型冗余字段,实际数据中可能是 promql/dql,也可能是 default/simple 这类查询模式",
|
|
45
|
+
"enum": [
|
|
46
|
+
"default",
|
|
47
|
+
"simple",
|
|
48
|
+
"dql",
|
|
49
|
+
"promql"
|
|
50
|
+
]
|
|
51
|
+
},
|
|
52
|
+
"promqlCode": {
|
|
53
|
+
"type": "integer",
|
|
54
|
+
"description": "PromQL 查询顺序编号"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"additionalProperties": true
|
|
60
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "charts/settings/_common-settings-gradual-color-schema.json",
|
|
4
|
+
"title": "CommonGradualColorSettings",
|
|
5
|
+
"description": "热力图配置信息",
|
|
6
|
+
"type": "object",
|
|
7
|
+
"properties": {
|
|
8
|
+
"gradualColor": {
|
|
9
|
+
"description": "颜色匹配设置",
|
|
10
|
+
"type": "object",
|
|
11
|
+
"required": [
|
|
12
|
+
"type",
|
|
13
|
+
"colorKey",
|
|
14
|
+
"levelCount"
|
|
15
|
+
],
|
|
16
|
+
"properties": {
|
|
17
|
+
"type": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"enum": [
|
|
20
|
+
"auto",
|
|
21
|
+
"custom"
|
|
22
|
+
],
|
|
23
|
+
"description": "颜色匹配设置模式,可以根据颜色色系,自动匹配数值对应色块"
|
|
24
|
+
},
|
|
25
|
+
"colorKey": {
|
|
26
|
+
"type": "string",
|
|
27
|
+
"description": "提供选择的色系",
|
|
28
|
+
"enum": [
|
|
29
|
+
"interpolateYlOrBr",
|
|
30
|
+
"interpolateBuPu",
|
|
31
|
+
"interpolatePuBu",
|
|
32
|
+
"interpolateBuGn"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
"minVal": {
|
|
36
|
+
"description": "在自动模式下,可以手动设置区间范围最小值",
|
|
37
|
+
"type": "integer"
|
|
38
|
+
},
|
|
39
|
+
"maxVal": {
|
|
40
|
+
"description": "在自动模式下,可以手动设置的区间范围最大值",
|
|
41
|
+
"type": "integer"
|
|
42
|
+
},
|
|
43
|
+
"levelCount": {
|
|
44
|
+
"type": "integer",
|
|
45
|
+
"description": "在渐变区间发范围内,可以手动填写生成的色块数量"
|
|
46
|
+
},
|
|
47
|
+
"levels": {
|
|
48
|
+
"type": "array",
|
|
49
|
+
"description": "自定义模式下,设置的区间映射列表",
|
|
50
|
+
"items": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"required": [
|
|
53
|
+
"color"
|
|
54
|
+
],
|
|
55
|
+
"properties": {
|
|
56
|
+
"min": {
|
|
57
|
+
"description": "自定义区间块最小值"
|
|
58
|
+
},
|
|
59
|
+
"max": {
|
|
60
|
+
"description": "自定义区间块最大值"
|
|
61
|
+
},
|
|
62
|
+
"color": {
|
|
63
|
+
"description": "自定义区间块颜色色值"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
},
|
|
69
|
+
"additionalProperties": false
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "charts/settings/_common-settings-groupby-schema.json",
|
|
4
|
+
"title": "CommonChartGroupbySettings",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"description": "图表分组排序相关配置",
|
|
7
|
+
"properties": {
|
|
8
|
+
"slimit": {
|
|
9
|
+
"type": "integer",
|
|
10
|
+
"description": "当分组存在时,最大显示分组数量"
|
|
11
|
+
},
|
|
12
|
+
"sorderByOrder": {
|
|
13
|
+
"type": "string",
|
|
14
|
+
"description": "当分组存在时,分组返回的排序",
|
|
15
|
+
"enum": [
|
|
16
|
+
"asc",
|
|
17
|
+
"desc"
|
|
18
|
+
],
|
|
19
|
+
"default": "desc"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "charts/settings/_common-settings-legend-position-schema.json",
|
|
4
|
+
"title": "CommonChartLegendPositionSettings",
|
|
5
|
+
"type": "string",
|
|
6
|
+
"description": "图表图列位置显示配置信息",
|
|
7
|
+
"enum": [
|
|
8
|
+
"none",
|
|
9
|
+
"bottom",
|
|
10
|
+
"right",
|
|
11
|
+
"circle"
|
|
12
|
+
],
|
|
13
|
+
"default": "none"
|
|
14
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "charts/settings/_common-settings-legend-values-schema.json",
|
|
4
|
+
"title": "CommonChartLegendValuesSettings",
|
|
5
|
+
"type": "array",
|
|
6
|
+
"items": {
|
|
7
|
+
"type": "string",
|
|
8
|
+
"description": "图表图列需要显示的统计指标",
|
|
9
|
+
"enum": [
|
|
10
|
+
"first",
|
|
11
|
+
"last",
|
|
12
|
+
"avg",
|
|
13
|
+
"min",
|
|
14
|
+
"max",
|
|
15
|
+
"sum",
|
|
16
|
+
"count"
|
|
17
|
+
]
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "charts/settings/_common-settings-stack-content-schema.json",
|
|
4
|
+
"title": "CommonChartStackContentSettings",
|
|
5
|
+
"type": "string",
|
|
6
|
+
"description": "柱状图堆叠模式下,横坐标显示类型",
|
|
7
|
+
"enum": [
|
|
8
|
+
"group",
|
|
9
|
+
"index"
|
|
10
|
+
],
|
|
11
|
+
"default": "group"
|
|
12
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
3
|
+
"$id": "charts/settings/_common-settings-stack-type-schema.json",
|
|
4
|
+
"title": "CommonChartStackTypeSettings",
|
|
5
|
+
"type": "string",
|
|
6
|
+
"description": "柱状图堆叠模式",
|
|
7
|
+
"enum": [
|
|
8
|
+
"time",
|
|
9
|
+
"percent"
|
|
10
|
+
]
|
|
11
|
+
}
|