@next-bricks/data-view 1.12.11 → 1.12.13

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.
Files changed (184) hide show
  1. package/dist/bricks.json +11 -11
  2. package/dist/chunks/{1889.c7ee1fb2.js → 1889.6af39981.js} +2 -2
  3. package/dist/chunks/{1889.c7ee1fb2.js.map → 1889.6af39981.js.map} +1 -1
  4. package/dist/chunks/{2145.65311b68.js → 2145.a81e35fa.js} +2 -2
  5. package/dist/chunks/2145.a81e35fa.js.map +1 -0
  6. package/dist/chunks/3171.0b9bbc30.js +2 -0
  7. package/dist/chunks/3171.0b9bbc30.js.map +1 -0
  8. package/dist/chunks/5399.fd40a11e.js +2 -0
  9. package/dist/chunks/5399.fd40a11e.js.map +1 -0
  10. package/dist/chunks/5552.5f907b58.js +2 -0
  11. package/dist/chunks/5552.5f907b58.js.map +1 -0
  12. package/dist/chunks/6376.6c11ee6d.js +2 -0
  13. package/dist/chunks/6376.6c11ee6d.js.map +1 -0
  14. package/dist/chunks/9118.cfcd7581.js +3 -0
  15. package/dist/chunks/9118.cfcd7581.js.LICENSE.txt +11 -0
  16. package/dist/chunks/9118.cfcd7581.js.map +1 -0
  17. package/dist/chunks/948.c3df313a.js +3 -0
  18. package/dist/chunks/948.c3df313a.js.map +1 -0
  19. package/dist/chunks/app-wall-card-item.7c32b915.js.map +1 -1
  20. package/dist/chunks/app-wall-relation-line.0445cf9d.js.map +1 -1
  21. package/dist/chunks/app-wall-system-card.aa2b5b84.js.map +1 -1
  22. package/dist/chunks/app-wall.126608d6.js.map +1 -1
  23. package/dist/chunks/basic-index-group.c555b165.js.map +1 -1
  24. package/dist/chunks/battery-chart.554d378f.js.map +1 -1
  25. package/dist/chunks/brick-notification.ae523413.js.map +1 -1
  26. package/dist/chunks/bubbles-indicator.e7b47e1e.js.map +1 -1
  27. package/dist/chunks/cabinet-app-layer.6a1a78c4.js.map +1 -1
  28. package/dist/chunks/cabinet-container.49872d09.js.map +1 -1
  29. package/dist/chunks/cabinet-graph.6aa32783.js.map +1 -1
  30. package/dist/chunks/china-map-chart.56dc9a9f.js.map +1 -1
  31. package/dist/chunks/china-map.a7c98bf0.js.map +1 -1
  32. package/dist/chunks/{complex-search.cbeec078.js → complex-search.666d9179.js} +2 -2
  33. package/dist/chunks/{complex-search.cbeec078.js.map → complex-search.666d9179.js.map} +1 -1
  34. package/dist/chunks/dropdown-menu.5c9a12d7.js.map +1 -1
  35. package/dist/chunks/globe-with-gear-indicator.123e65c1.js.map +1 -1
  36. package/dist/chunks/globe-with-halo-indicator.01b2c9a2.js.map +1 -1
  37. package/dist/chunks/globe-with-orbit-indicator.45415b04.js.map +1 -1
  38. package/dist/chunks/lights-component-title.0cccad81.js.map +1 -1
  39. package/dist/chunks/main.f208d7dd.js +2 -0
  40. package/dist/chunks/main.f208d7dd.js.map +1 -0
  41. package/dist/chunks/{modern-style-treemap.24ddab63.js → modern-style-treemap.87f2ea87.js} +3 -3
  42. package/dist/chunks/modern-style-treemap.87f2ea87.js.map +1 -0
  43. package/dist/chunks/progress-bar-list.8b0651c1.js.map +1 -1
  44. package/dist/chunks/tabs-drawer.ae7c57ad.js.map +1 -1
  45. package/dist/chunks/tabs-page-title.c696bb65.js.map +1 -1
  46. package/dist/chunks/tech-mesh-base-view.4c3b548e.js.map +1 -1
  47. package/dist/examples.json +59 -59
  48. package/dist/index.a683e2ca.js +2 -0
  49. package/dist/index.a683e2ca.js.map +1 -0
  50. package/dist/manifest.json +241 -216
  51. package/dist/types.json +421 -422
  52. package/dist-types/app-wall/card-item/index.d.ts +1 -0
  53. package/dist-types/app-wall/relation-line/index.d.ts +2 -4
  54. package/dist-types/app-wall/system-card/index.d.ts +6 -30
  55. package/dist-types/basic-index-group/index.d.ts +1 -0
  56. package/dist-types/battery-chart/index.d.ts +7 -20
  57. package/dist-types/brick-notification/index.d.ts +4 -4
  58. package/dist-types/bubbles-indicator/index.d.ts +1 -0
  59. package/dist-types/cabinet/cabinet-app-layer/index.d.ts +3 -8
  60. package/dist-types/cabinet/index.d.ts +3 -12
  61. package/dist-types/china-map/index.d.ts +1 -1
  62. package/dist-types/globe-with-gear-indicator/index.d.ts +2 -0
  63. package/dist-types/globe-with-halo-indicator/index.d.ts +2 -0
  64. package/dist-types/globe-with-orbit-indicator/index.d.ts +2 -0
  65. package/dist-types/lights-component-title/index.d.ts +4 -4
  66. package/dist-types/modern-style-treemap/index.d.ts +7 -7
  67. package/dist-types/progress-bar-list/index.d.ts +6 -4
  68. package/dist-types/tabs-page-title/index.d.ts +1 -1
  69. package/dist-types/tech-mesh-base-view/index.d.ts +2 -1
  70. package/docs/app-wall-card-item.md +23 -1
  71. package/docs/app-wall-card-item.react.md +52 -0
  72. package/docs/app-wall-relation-line.md +19 -1
  73. package/docs/app-wall-relation-line.react.md +36 -0
  74. package/docs/app-wall-system-card.md +35 -2
  75. package/docs/app-wall-system-card.react.md +89 -0
  76. package/docs/app-wall.md +118 -1469
  77. package/docs/app-wall.react.md +235 -0
  78. package/docs/basic-index-group.md +22 -1
  79. package/docs/basic-index-group.react.md +132 -0
  80. package/docs/battery-chart.md +44 -1
  81. package/docs/battery-chart.react.md +137 -0
  82. package/docs/brick-notification.md +22 -1
  83. package/docs/brick-notification.react.md +45 -0
  84. package/docs/bubbles-indicator.md +23 -1
  85. package/docs/bubbles-indicator.react.md +52 -0
  86. package/docs/cabinet-app-layer.md +49 -1
  87. package/docs/cabinet-app-layer.react.md +58 -0
  88. package/docs/cabinet-button.md +19 -1
  89. package/docs/cabinet-button.react.md +39 -0
  90. package/docs/cabinet-container.md +55 -1
  91. package/docs/cabinet-container.react.md +84 -0
  92. package/docs/cabinet-graph.md +61 -1
  93. package/docs/cabinet-graph.react.md +131 -0
  94. package/docs/cabinet-node.md +39 -1
  95. package/docs/cabinet-node.react.md +66 -0
  96. package/docs/cabinet-thumbnail.md +44 -1
  97. package/docs/cabinet-thumbnail.react.md +88 -0
  98. package/docs/china-map-chart.md +42 -2
  99. package/docs/china-map-chart.react.md +117 -0
  100. package/docs/china-map.md +26 -1
  101. package/docs/china-map.react.md +78 -0
  102. package/docs/complex-search.md +77 -1
  103. package/docs/complex-search.react.md +101 -0
  104. package/docs/crystal-ball-indicator.md +57 -1
  105. package/docs/crystal-ball-indicator.react.md +70 -0
  106. package/docs/data-display-flipper-fifth.md +76 -1
  107. package/docs/data-display-flipper-fifth.react.md +89 -0
  108. package/docs/data-display-flipper-sixth.md +39 -5
  109. package/docs/data-display-flipper-sixth.react.md +47 -0
  110. package/docs/data-display-flipper.md +68 -2
  111. package/docs/data-display-flipper.react.md +91 -0
  112. package/docs/dropdown-menu.md +62 -13
  113. package/docs/dropdown-menu.react.md +68 -0
  114. package/docs/gauge-chart.md +68 -19
  115. package/docs/gauge-chart.react.md +80 -0
  116. package/docs/gear-background.md +41 -8
  117. package/docs/gear-background.react.md +56 -0
  118. package/docs/globe-with-gear-indicator.md +67 -1
  119. package/docs/globe-with-gear-indicator.react.md +69 -0
  120. package/docs/globe-with-halo-indicator.md +67 -1
  121. package/docs/globe-with-halo-indicator.react.md +69 -0
  122. package/docs/globe-with-orbit-indicator.md +67 -1
  123. package/docs/globe-with-orbit-indicator.react.md +70 -0
  124. package/docs/graph-layout-grid.md +108 -85
  125. package/docs/graph-layout-grid.react.md +172 -0
  126. package/docs/graph-node.md +25 -7
  127. package/docs/graph-node.react.md +36 -0
  128. package/docs/graph-text.md +24 -6
  129. package/docs/graph-text.react.md +34 -0
  130. package/docs/grid-background.md +21 -1
  131. package/docs/grid-background.react.md +45 -0
  132. package/docs/hi-tech-button.md +63 -2
  133. package/docs/hi-tech-button.react.md +106 -0
  134. package/docs/indicator-card.md +26 -1
  135. package/docs/indicator-card.react.md +86 -0
  136. package/docs/lights-component-title.md +23 -1
  137. package/docs/lights-component-title.react.md +49 -0
  138. package/docs/loading-panel.md +31 -1
  139. package/docs/loading-panel.react.md +62 -0
  140. package/docs/modern-style-component-title.md +39 -2
  141. package/docs/modern-style-component-title.react.md +76 -0
  142. package/docs/modern-style-page-title.md +43 -1
  143. package/docs/modern-style-page-title.react.md +56 -0
  144. package/docs/modern-style-treemap.md +71 -373
  145. package/docs/modern-style-treemap.react.md +131 -0
  146. package/docs/particle-animation.md +45 -1
  147. package/docs/particle-animation.react.md +64 -0
  148. package/docs/progress-bar-list.md +19 -1
  149. package/docs/progress-bar-list.react.md +47 -0
  150. package/docs/radar-chart.md +97 -31
  151. package/docs/radar-chart.react.md +75 -0
  152. package/docs/simple-card-item.md +79 -3
  153. package/docs/simple-card-item.react.md +83 -0
  154. package/docs/tabs-drawer.md +81 -2
  155. package/docs/tabs-drawer.react.md +117 -0
  156. package/docs/tabs-page-title.md +40 -1
  157. package/docs/tabs-page-title.react.md +87 -0
  158. package/docs/tech-mesh-base-view.md +22 -1
  159. package/docs/tech-mesh-base-view.react.md +55 -0
  160. package/docs/title-text.md +41 -1
  161. package/docs/title-text.react.md +67 -0
  162. package/docs/top-title-bar.md +25 -2
  163. package/docs/top-title-bar.react.md +50 -0
  164. package/package.json +2 -2
  165. package/dist/chunks/2145.65311b68.js.map +0 -1
  166. package/dist/chunks/3171.1af9074e.js +0 -2
  167. package/dist/chunks/3171.1af9074e.js.map +0 -1
  168. package/dist/chunks/4837.80094357.js +0 -2
  169. package/dist/chunks/4837.80094357.js.map +0 -1
  170. package/dist/chunks/5399.bc04d692.js +0 -2
  171. package/dist/chunks/5399.bc04d692.js.map +0 -1
  172. package/dist/chunks/5552.bc6a55e1.js +0 -2
  173. package/dist/chunks/5552.bc6a55e1.js.map +0 -1
  174. package/dist/chunks/7218.7a1bbf3a.js +0 -2
  175. package/dist/chunks/7218.7a1bbf3a.js.map +0 -1
  176. package/dist/chunks/948.c2aa593f.js +0 -3
  177. package/dist/chunks/948.c2aa593f.js.map +0 -1
  178. package/dist/chunks/main.71e1cf26.js +0 -2
  179. package/dist/chunks/main.71e1cf26.js.map +0 -1
  180. package/dist/chunks/modern-style-treemap.24ddab63.js.map +0 -1
  181. package/dist/index.3a389e66.js +0 -2
  182. package/dist/index.3a389e66.js.map +0 -1
  183. /package/dist/chunks/{948.c2aa593f.js.LICENSE.txt → 948.c3df313a.js.LICENSE.txt} +0 -0
  184. /package/dist/chunks/{modern-style-treemap.24ddab63.js.LICENSE.txt → modern-style-treemap.87f2ea87.js.LICENSE.txt} +0 -0
@@ -1,9 +1,30 @@
1
- 构件 `data-view.bubbles-indicator`
1
+ ---
2
+ tagName: data-view.bubbles-indicator
3
+ displayName: WrappedDataViewBubblesIndicator
4
+ description: 气泡样式的数据展示构件。
5
+ category: big-screen-content
6
+ source: "@next-bricks/data-view"
7
+ ---
8
+
9
+ # data-view.bubbles-indicator
10
+
11
+ > 气泡样式的数据展示构件。
12
+
13
+ ## Props
14
+
15
+ | 属性 | 类型 | 必填 | 默认值 | 说明 |
16
+ | ---------------- | ------------------ | ---- | ------ | ------------------------------------------------ |
17
+ | dataSource | `DataItem[]` | 否 | - | 指标数据列表(显示在环上),注意最多显示12项数据 |
18
+ | centerDataSource | `DataItem` | 否 | - | 中心数据(显示在中心水晶球内) |
19
+ | cornerDataSource | `CornerDataItem[]` | 否 | - | 左上角指标数据列表 |
20
+ | maxScale | `number` | 否 | `1` | 最大缩放比例 |
2
21
 
3
22
  ## Examples
4
23
 
5
24
  ### Basic
6
25
 
26
+ 展示气泡指标构件的基本用法,包含中心数据、环上指标数据及左上角角标数据(仅在暗色主题下生效)。
27
+
7
28
  ```yaml preview height="660px"
8
29
  brick: div
9
30
  properties:
@@ -33,6 +54,7 @@ children:
33
54
  - label: 资产减少
34
55
  value: 21
35
56
  color: green
57
+ maxScale: 1
36
58
  # Currently this brick only works within dark theme
37
59
  lifeCycle:
38
60
  onPageLoad:
@@ -0,0 +1,52 @@
1
+ ---
2
+ tagName: data-view.bubbles-indicator
3
+ displayName: WrappedDataViewBubblesIndicator
4
+ description: 气泡样式的数据展示构件。
5
+ category: big-screen-content
6
+ source: "@next-bricks/data-view"
7
+ ---
8
+
9
+ # WrappedDataViewBubblesIndicator
10
+
11
+ > 气泡样式的数据展示构件。
12
+
13
+ ## 导入
14
+
15
+ ```tsx
16
+ import { WrappedDataViewBubblesIndicator } from "@easyops/wrapped-components";
17
+ ```
18
+
19
+ ## Props
20
+
21
+ | 属性 | 类型 | 必填 | 默认值 | 说明 |
22
+ | ---------------- | ------------------ | ---- | ------ | ------------------------------------------------ |
23
+ | dataSource | `DataItem[]` | 否 | - | 指标数据列表(显示在环上),注意最多显示12项数据 |
24
+ | centerDataSource | `DataItem` | 否 | - | 中心数据(显示在中心水晶球内) |
25
+ | cornerDataSource | `CornerDataItem[]` | 否 | - | 左上角指标数据列表 |
26
+ | maxScale | `number` | 否 | `1` | 最大缩放比例 |
27
+
28
+ ## Examples
29
+
30
+ ### Basic
31
+
32
+ 展示气泡指标构件的基本用法,包含中心数据、环上指标数据及左上角角标数据(仅在暗色主题下生效)。
33
+
34
+ ```tsx
35
+ <div style={{ height: "calc(100vh - 2em)" }}>
36
+ <WrappedDataViewBubblesIndicator
37
+ centerDataSource={{ label: "资产总数", value: 30123 }}
38
+ dataSource={[
39
+ { label: "低值易耗品", value: 3889 },
40
+ { label: "摊销资产", value: 2087 },
41
+ { label: "固定资产", value: 12088 },
42
+ { label: "无形资产", value: 1082 },
43
+ { label: "在建工程", value: 10997 },
44
+ ]}
45
+ cornerDataSource={[
46
+ { label: "资产增长", value: 43, color: "red" },
47
+ { label: "资产减少", value: 21, color: "green" },
48
+ ]}
49
+ maxScale={1}
50
+ />
51
+ </div>
52
+ ```
@@ -1,9 +1,28 @@
1
- data-view.cabinet-app-layer
1
+ ---
2
+ tagName: data-view.cabinet-app-layer
3
+ displayName: WrappedDataViewCabinetAppLayer
4
+ description: cabinet子构件----应用层
5
+ category: big-screen-content
6
+ source: "@next-bricks/data-view"
7
+ ---
8
+
9
+ # data-view.cabinet-app-layer
10
+
11
+ > cabinet子构件----应用层
12
+
13
+ ## Props
14
+
15
+ | 属性 | 类型 | 必填 | 默认值 | 说明 |
16
+ | -------- | --------------------- | ---- | ------ | -------- |
17
+ | appTitle | `string` | 是 | - | 标题 |
18
+ | status | `"active" \| "faded"` | 否 | - | 当前状态 |
2
19
 
3
20
  ## Examples
4
21
 
5
22
  ### Basic
6
23
 
24
+ 展示 cabinet 应用层子构件的基本用法。
25
+
7
26
  ```yaml preview
8
27
  - brick: data-view.cabinet-app-layer
9
28
  properties:
@@ -12,3 +31,32 @@ data-view.cabinet-app-layer
12
31
  width: 600px
13
32
  background-color: "#1c1e21"
14
33
  ```
34
+
35
+ ### Status
36
+
37
+ 展示不同状态下的 cabinet 应用层。
38
+
39
+ ```yaml preview
40
+ - brick: div
41
+ properties:
42
+ textContent: active 状态
43
+ - brick: data-view.cabinet-app-layer
44
+ properties:
45
+ appTitle: inventory-api
46
+ status: active
47
+ style:
48
+ width: 600px
49
+ background-color: "#1c1e21"
50
+ - brick: div
51
+ properties:
52
+ textContent: faded 状态
53
+ style:
54
+ margin-top: 20px
55
+ - brick: data-view.cabinet-app-layer
56
+ properties:
57
+ appTitle: inventory-api
58
+ status: faded
59
+ style:
60
+ width: 600px
61
+ background-color: "#1c1e21"
62
+ ```
@@ -0,0 +1,58 @@
1
+ ---
2
+ tagName: data-view.cabinet-app-layer
3
+ displayName: WrappedDataViewCabinetAppLayer
4
+ description: cabinet子构件----应用层
5
+ category: big-screen-content
6
+ source: "@next-bricks/data-view"
7
+ ---
8
+
9
+ # WrappedDataViewCabinetAppLayer
10
+
11
+ > cabinet子构件----应用层
12
+
13
+ ## 导入
14
+
15
+ ```tsx
16
+ import { WrappedDataViewCabinetAppLayer } from "@easyops/wrapped-components";
17
+ ```
18
+
19
+ ## Props
20
+
21
+ | 属性 | 类型 | 必填 | 默认值 | 说明 |
22
+ | -------- | --------------------- | ---- | ------ | -------- |
23
+ | appTitle | `string` | 是 | - | 标题 |
24
+ | status | `"active" \| "faded"` | 否 | - | 当前状态 |
25
+
26
+ ## Examples
27
+
28
+ ### Basic
29
+
30
+ 展示 cabinet 应用层子构件的基本用法。
31
+
32
+ ```tsx
33
+ <WrappedDataViewCabinetAppLayer
34
+ style={{ width: "600px", backgroundColor: "#1c1e21" }}
35
+ appTitle="inventory-api"
36
+ />
37
+ ```
38
+
39
+ ### Status
40
+
41
+ 展示不同状态下的 cabinet 应用层。
42
+
43
+ ```tsx
44
+ <>
45
+ <div>active 状态</div>
46
+ <WrappedDataViewCabinetAppLayer
47
+ style={{ width: "600px", backgroundColor: "#1c1e21" }}
48
+ appTitle="inventory-api"
49
+ status="active"
50
+ />
51
+ <div style={{ marginTop: "20px" }}>faded 状态</div>
52
+ <WrappedDataViewCabinetAppLayer
53
+ style={{ width: "600px", backgroundColor: "#1c1e21" }}
54
+ appTitle="inventory-api"
55
+ status="faded"
56
+ />
57
+ </>
58
+ ```
@@ -1,9 +1,27 @@
1
- data-view.cabinet-button
1
+ ---
2
+ tagName: data-view.cabinet-button
3
+ displayName: WrappedDataViewCabinetButton
4
+ description: 大屏按钮
5
+ category: ""
6
+ source: "@next-bricks/data-view"
7
+ ---
8
+
9
+ # data-view.cabinet-button
10
+
11
+ > 大屏按钮
12
+
13
+ ## Props
14
+
15
+ | 属性 | 类型 | 必填 | 默认值 | 说明 |
16
+ | ----------- | --------------------- | ---- | ------ | ---------- |
17
+ | buttonStyle | `React.CSSProperties` | 否 | - | 按钮的样式 |
2
18
 
3
19
  ## Examples
4
20
 
5
21
  ### Basic
6
22
 
23
+ 展示一个带自定义样式的大屏关闭按钮。
24
+
7
25
  ```yaml preview
8
26
  - brick: data-view.cabinet-button
9
27
  properties:
@@ -0,0 +1,39 @@
1
+ ---
2
+ tagName: data-view.cabinet-button
3
+ displayName: WrappedDataViewCabinetButton
4
+ description: 大屏按钮
5
+ category: ""
6
+ source: "@next-bricks/data-view"
7
+ ---
8
+
9
+ # WrappedDataViewCabinetButton
10
+
11
+ > 大屏按钮
12
+
13
+ ## 导入
14
+
15
+ ```tsx
16
+ import { WrappedDataViewCabinetButton } from "@easyops/wrapped-components";
17
+ ```
18
+
19
+ ## Props
20
+
21
+ | 属性 | 类型 | 必填 | 默认值 | 说明 |
22
+ | ----------- | --------------------- | ---- | ------ | ---------- |
23
+ | buttonStyle | `React.CSSProperties` | 否 | - | 按钮的样式 |
24
+
25
+ ## Examples
26
+
27
+ ### Basic
28
+
29
+ 展示一个带自定义样式的大屏关闭按钮。
30
+
31
+ ```tsx
32
+ <WrappedDataViewCabinetButton
33
+ buttonStyle={{
34
+ width: "50px",
35
+ height: "50px",
36
+ background: "#1c1e21",
37
+ }}
38
+ />
39
+ ```
@@ -1,9 +1,37 @@
1
- data-view.cabinet-container
1
+ ---
2
+ tagName: data-view.cabinet-container
3
+ displayName: WrappedDataViewCabinetContainer
4
+ description: 大屏集群容器构件
5
+ category: ""
6
+ source: "@next-bricks/data-view"
7
+ ---
8
+
9
+ # data-view.cabinet-container
10
+
11
+ > 大屏集群容器构件
12
+
13
+ ## Props
14
+
15
+ | 属性 | 类型 | 必填 | 默认值 | 说明 |
16
+ | ----------- | --------------------- | ---- | -------- | ----------------------------------------------------- |
17
+ | type | `ContainerType` | 是 | `"host"` | 容器类型,host、k8s(主题橙色)、k8s-blue(蓝色主题) |
18
+ | data | `CabinetNodeProps[]` | 是 | `[]` | 数据 |
19
+ | status | `"active" \| "faded"` | 否 | - | 当前状态,是否高亮或者淡化 |
20
+ | customTitle | `string \| undefined` | 否 | - | 容器标题 |
21
+
22
+ ## Events
23
+
24
+ | 事件 | detail | 说明 |
25
+ | ----------------- | ---------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
26
+ | container.click | `ClickEventDataType` — { type: 点击对象类型("node" 或 "container"), data: 被点击节点的数据(点击容器本身时为 undefined) } | 节点或者container 点击事件 |
27
+ | container.dbclick | `ClickEventDataType` — { type: 点击对象类型("node" 或 "container"), data: 被双击节点的数据(双击容器本身时为 undefined) } | 节点或者container 双击事件 |
2
28
 
3
29
  ## Examples
4
30
 
5
31
  ### Basic
6
32
 
33
+ 展示一个基本的大屏集群容器,包含若干物理机节点。
34
+
7
35
  ```yaml preview
8
36
  - brick: data-view.cabinet-container
9
37
  properties:
@@ -20,6 +48,8 @@ data-view.cabinet-container
20
48
 
21
49
  ### Status
22
50
 
51
+ 展示高亮状态下的集群容器。
52
+
23
53
  ```yaml preview
24
54
  - brick: data-view.cabinet-container
25
55
  properties:
@@ -34,3 +64,27 @@ data-view.cabinet-container
34
64
  width: 400px
35
65
  height: 500px
36
66
  ```
67
+
68
+ ### Click events
69
+
70
+ 演示节点和容器的点击与双击事件处理。
71
+
72
+ ```yaml preview
73
+ - brick: data-view.cabinet-container
74
+ properties:
75
+ type: k8s
76
+ customTitle: K8S集群
77
+ data:
78
+ - type: container-group
79
+ nodeTitle: "容器组A"
80
+ - type: pod
81
+ nodeTitle: "Pod-1"
82
+ style:
83
+ width: 400px
84
+ height: 500px
85
+ events:
86
+ container.click:
87
+ - action: console.log
88
+ container.dbclick:
89
+ - action: console.log
90
+ ```
@@ -0,0 +1,84 @@
1
+ ---
2
+ tagName: data-view.cabinet-container
3
+ displayName: WrappedDataViewCabinetContainer
4
+ description: 大屏集群容器构件
5
+ category: ""
6
+ source: "@next-bricks/data-view"
7
+ ---
8
+
9
+ # WrappedDataViewCabinetContainer
10
+
11
+ > 大屏集群容器构件
12
+
13
+ ## 导入
14
+
15
+ ```tsx
16
+ import { WrappedDataViewCabinetContainer } from "@easyops/wrapped-components";
17
+ ```
18
+
19
+ ## Props
20
+
21
+ | 属性 | 类型 | 必填 | 默认值 | 说明 |
22
+ | ----------- | --------------------- | ---- | -------- | ----------------------------------------------------- |
23
+ | type | `ContainerType` | 是 | `"host"` | 容器类型,host、k8s(主题橙色)、k8s-blue(蓝色主题) |
24
+ | data | `CabinetNodeProps[]` | 是 | `[]` | 数据 |
25
+ | status | `"active" \| "faded"` | 否 | - | 当前状态,是否高亮或者淡化 |
26
+ | customTitle | `string \| undefined` | 否 | - | 容器标题 |
27
+
28
+ ## Events
29
+
30
+ | 事件 | detail | 说明 |
31
+ | ------------------ | ---------------------------------------------------------------------------------------------------------------------------- | -------------------------- |
32
+ | onContainerClick | `ClickEventDataType` — { type: 点击对象类型("node" 或 "container"), data: 被点击节点的数据(点击容器本身时为 undefined) } | 节点或者container 点击事件 |
33
+ | onContainerDbclick | `ClickEventDataType` — { type: 点击对象类型("node" 或 "container"), data: 被双击节点的数据(双击容器本身时为 undefined) } | 节点或者container 双击事件 |
34
+
35
+ ## Examples
36
+
37
+ ### Basic
38
+
39
+ 展示一个基本的大屏集群容器,包含若干物理机节点。
40
+
41
+ ```tsx
42
+ <WrappedDataViewCabinetContainer
43
+ customTitle="集群容器"
44
+ data={[
45
+ { type: "physical-machine", nodeTitle: "255.255.255" },
46
+ { type: "physical-machine", nodeTitle: "255.255.255" },
47
+ ]}
48
+ style={{ width: "400px", height: "500px" }}
49
+ />
50
+ ```
51
+
52
+ ### Status
53
+
54
+ 展示高亮状态下的集群容器。
55
+
56
+ ```tsx
57
+ <WrappedDataViewCabinetContainer
58
+ customTitle="集群容器"
59
+ status="active"
60
+ data={[
61
+ { type: "physical-machine", nodeTitle: "255.255.255" },
62
+ { type: "physical-machine", nodeTitle: "255.255.255" },
63
+ ]}
64
+ style={{ width: "400px", height: "500px" }}
65
+ />
66
+ ```
67
+
68
+ ### Click events
69
+
70
+ 演示节点和容器的点击与双击事件处理。
71
+
72
+ ```tsx
73
+ <WrappedDataViewCabinetContainer
74
+ type="k8s"
75
+ customTitle="K8S集群"
76
+ data={[
77
+ { type: "container-group", nodeTitle: "容器组A" },
78
+ { type: "pod", nodeTitle: "Pod-1" },
79
+ ]}
80
+ style={{ width: "400px", height: "500px" }}
81
+ onContainerClick={(e) => console.log(e.detail)}
82
+ onContainerDbclick={(e) => console.log(e.detail)}
83
+ />
84
+ ```
@@ -1,9 +1,37 @@
1
- data-view.cabinet-graph 部署架构拓扑
1
+ ---
2
+ tagName: data-view.cabinet-graph
3
+ displayName: WrappedDataViewCabinetGraph
4
+ description: cabinet 部署架构拓扑
5
+ category: big-screen-content
6
+ source: "@next-bricks/data-view"
7
+ ---
8
+
9
+ # data-view.cabinet-graph
10
+
11
+ > cabinet 部署架构拓扑
12
+
13
+ ## Props
14
+
15
+ | 属性 | 类型 | 必填 | 默认值 | 说明 |
16
+ | -------------- | -------------------- | ---- | ------ | -------------------- |
17
+ | dataSource | `AppData` | 是 | - | 数据源 |
18
+ | activeKey | `string \| string[]` | 否 | - | 选中项,支持数组 |
19
+ | hiddenCloseBtn | `boolean` | 否 | - | 取消按钮是否需要展示 |
20
+
21
+ ## Events
22
+
23
+ | 事件 | detail | 说明 |
24
+ | ------------------ | ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------- |
25
+ | close.button.click | `void` | 关闭按钮点击事件 |
26
+ | cabinet.click | `{ type: ChangeType, data: Record<string, any> }` — { type: 点击类型(node/cluster/layer),data: 对应节点或集群数据 } | 节点或外层的点击事件 |
27
+ | cabinet.dbclick | `{ type: ChangeType, data: Record<string, any> }` — { type: 双击类型(node/cluster),data: 对应节点或集群数据 } | 节点或外层的双击事件,目前不支持应用层 |
2
28
 
3
29
  ## Examples
4
30
 
5
31
  ### Basic
6
32
 
33
+ 展示 cabinet 部署架构拓扑构件的基本用法,包含物理机、虚拟机和容器组节点。
34
+
7
35
  ```yaml preview
8
36
  - brick: data-view.cabinet-graph
9
37
  properties:
@@ -51,4 +79,36 @@ data-view.cabinet-graph 部署架构拓扑
51
79
  - nodeTitle: b容器组
52
80
  key: bb
53
81
  type: pod
82
+ events:
83
+ cabinet.click:
84
+ action: console.log
85
+ cabinet.dbclick:
86
+ action: console.log
87
+ close.button.click:
88
+ action: console.log
89
+ ```
90
+
91
+ ### 隐藏关闭按钮
92
+
93
+ 展示隐藏关闭按钮的部署架构拓扑。
94
+
95
+ ```yaml preview
96
+ - brick: data-view.cabinet-graph
97
+ properties:
98
+ hiddenCloseBtn: true
99
+ activeKey: k8s-cluster
100
+ dataSource:
101
+ appName: my-app
102
+ key: my-app
103
+ clusters:
104
+ - clusterName: K8S集群
105
+ key: k8s-cluster
106
+ type: k8s
107
+ nodes:
108
+ - nodeTitle: web容器组
109
+ key: web-pod
110
+ type: container-group
111
+ - nodeTitle: api容器组
112
+ key: api-pod
113
+ type: container-group
54
114
  ```
@@ -0,0 +1,131 @@
1
+ ---
2
+ tagName: data-view.cabinet-graph
3
+ displayName: WrappedDataViewCabinetGraph
4
+ description: cabinet 部署架构拓扑
5
+ category: big-screen-content
6
+ source: "@next-bricks/data-view"
7
+ ---
8
+
9
+ # WrappedDataViewCabinetGraph
10
+
11
+ > cabinet 部署架构拓扑
12
+
13
+ ## 导入
14
+
15
+ ```tsx
16
+ import { WrappedDataViewCabinetGraph } from "@easyops/wrapped-components";
17
+ ```
18
+
19
+ ## Props
20
+
21
+ | 属性 | 类型 | 必填 | 默认值 | 说明 |
22
+ | -------------- | -------------------- | ---- | ------ | -------------------- |
23
+ | dataSource | `AppData` | 是 | - | 数据源 |
24
+ | activeKey | `string \| string[]` | 否 | - | 选中项,支持数组 |
25
+ | hiddenCloseBtn | `boolean` | 否 | - | 取消按钮是否需要展示 |
26
+
27
+ ## Events
28
+
29
+ | 事件 | detail | 说明 |
30
+ | ------------------ | ---------------------------------------------------------------------------------------------------------------------- | -------------------------------------- |
31
+ | onCloseButtonClick | `void` | 关闭按钮点击事件 |
32
+ | onCabinetClick | `{ type: ChangeType, data: Record<string, any> }` — { type: 点击类型(node/cluster/layer),data: 对应节点或集群数据 } | 节点或外层的点击事件 |
33
+ | onCabinetDbclick | `{ type: ChangeType, data: Record<string, any> }` — { type: 双击类型(node/cluster),data: 对应节点或集群数据 } | 节点或外层的双击事件,目前不支持应用层 |
34
+
35
+ ## Examples
36
+
37
+ ### Basic
38
+
39
+ 展示 cabinet 部署架构拓扑构件的基本用法,包含物理机、虚拟机和容器组节点。
40
+
41
+ ```tsx
42
+ <WrappedDataViewCabinetGraph
43
+ dataSource={{
44
+ appName: "inventory-api",
45
+ key: "inventory-api",
46
+ clusters: [
47
+ {
48
+ clusterName: "inventory-api##aaaaa",
49
+ key: "inventory-api##aaaaa",
50
+ type: "host",
51
+ nodes: [
52
+ {
53
+ nodeTitle: "244.244.244.244",
54
+ key: "244.244.244.244",
55
+ type: "physical-machine",
56
+ isAlert: true,
57
+ },
58
+ {
59
+ nodeTitle: "244.244.244.245",
60
+ key: "244.244.244.245",
61
+ type: "virtual-machine",
62
+ isAlert: true,
63
+ },
64
+ {
65
+ nodeTitle: "244.244.245.245",
66
+ key: "244.244.245.245",
67
+ type: "physical-machine",
68
+ },
69
+ {
70
+ nodeTitle: "244.244.245.244",
71
+ key: "244.244.245.244",
72
+ type: "virtual-machine",
73
+ },
74
+ ],
75
+ },
76
+ {
77
+ clusterName: "K8S集群xxx",
78
+ key: "k8s-cluster",
79
+ type: "k8s",
80
+ nodes: [
81
+ {
82
+ nodeTitle: "a容器组",
83
+ key: "aa",
84
+ type: "container-group",
85
+ isAlert: true,
86
+ },
87
+ { nodeTitle: "b容器组", key: "bb", type: "container-group" },
88
+ ],
89
+ },
90
+ {
91
+ clusterName: "K8S集群xx",
92
+ key: "xxxx",
93
+ type: "k8s-blue",
94
+ nodes: [
95
+ { nodeTitle: "a容器组", key: "aa", type: "pod", isAlert: true },
96
+ { nodeTitle: "b容器组", key: "bb", type: "pod" },
97
+ ],
98
+ },
99
+ ],
100
+ }}
101
+ onCabinetClick={(e) => console.log(e.detail)}
102
+ onCabinetDbclick={(e) => console.log(e.detail)}
103
+ onCloseButtonClick={(e) => console.log(e.detail)}
104
+ />
105
+ ```
106
+
107
+ ### 隐藏关闭按钮
108
+
109
+ 展示隐藏关闭按钮的部署架构拓扑。
110
+
111
+ ```tsx
112
+ <WrappedDataViewCabinetGraph
113
+ hiddenCloseBtn={true}
114
+ activeKey="k8s-cluster"
115
+ dataSource={{
116
+ appName: "my-app",
117
+ key: "my-app",
118
+ clusters: [
119
+ {
120
+ clusterName: "K8S集群",
121
+ key: "k8s-cluster",
122
+ type: "k8s",
123
+ nodes: [
124
+ { nodeTitle: "web容器组", key: "web-pod", type: "container-group" },
125
+ { nodeTitle: "api容器组", key: "api-pod", type: "container-group" },
126
+ ],
127
+ },
128
+ ],
129
+ }}
130
+ />
131
+ ```