Repository navigation
Expand file tree
/
Copy pathColumn.example.yaml
More file actions
195 lines (195 loc) · 7.33 KB
/
Copy pathColumn.example.yaml
File metadata and controls
195 lines (195 loc) · 7.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# Empty items array
# Target: simulate a column configuration that defines no child widgets.
# Expected behavior: renders an empty column with no content, leaving the area visually blank.
# This helps validate that the layout system gracefully handles intentionally empty structures.
kind: Column
apiVersion: widgets.templates.krateo.io/v1beta1
metadata:
name: example-column-empty
namespace: krateo-system
spec:
widgetData:
allowedResources: [barcharts, buttons, columns, datagrids, eventlists, filters, flowcharts, forms, linecharts, markdowns, panels, paragraphs, piecharts, rows, tables, tablists, yamlviewers]
items: []
size: 12
resourcesRefs:
items: []
---
# Missing resource resolution
# Target: simulate a situation where an item references a child widget that cannot be resolved
# because the corresponding resourceRefId is not listed in resourcesRefs.
# Expected behavior: skips rendering that specific child (returns null),
# but continues rendering other valid items if present.
kind: Column
apiVersion: widgets.templates.krateo.io/v1beta1
metadata:
name: example-column-missing-ref
namespace: krateo-system
spec:
widgetData:
allowedResources: [barcharts, buttons, columns, datagrids, eventlists, filters, flowcharts, forms, linecharts, markdowns, panels, paragraphs, piecharts, rows, tables, tablists, yamlviewers]
items:
- resourceRefId: button-nonexistent
size: 8
resourcesRefs:
items: []
---
# Zero-sized column
# Target: simulate a column with size=0.
# Expected behavior: column is effectively hidden (occupies no visible horizontal space),
# ensuring layout calculations remain consistent in multi-column grids.
kind: Column
apiVersion: widgets.templates.krateo.io/v1beta1
metadata:
name: example-column-zero-size
namespace: krateo-system
spec:
widgetData:
allowedResources: [barcharts, buttons, columns, datagrids, eventlists, filters, flowcharts, forms, linecharts, markdowns, panels, paragraphs, piecharts, rows, tables, tablists, yamlviewers]
items:
- resourceRefId: example-table-basic
size: 0
resourcesRefs:
items:
- id: example-table-basic
apiVersion: widgets.templates.krateo.io/v1beta1
name: example-table-basic
namespace: krateo-system
resource: tables
verb: GET
---
# Single child
# Target: validate that a simple column with one valid child widget renders correctly.
# Expected behavior: displays one resource inside a vertically stacked layout space.
# This case confirms that a single resolved child is passed through the WidgetRenderer without issues.
kind: Column
apiVersion: widgets.templates.krateo.io/v1beta1
metadata:
name: example-column-single-child
namespace: krateo-system
spec:
widgetData:
allowedResources: [barcharts, buttons, columns, datagrids, eventlists, filters, flowcharts, forms, linecharts, markdowns, panels, paragraphs, piecharts, rows, tables, tablists, yamlviewers]
items:
- resourceRefId: example-table-basic
size: 12
resourcesRefs:
items:
- id: example-table-basic
apiVersion: widgets.templates.krateo.io/v1beta1
name: example-table-basic
namespace: krateo-system
resource: tables
verb: GET
---
# Single child full screen
# Target: validate that a simple column with one valid child widget renders correctly and occupies all available space.
# Expected behavior: displays one resource inside a vertically stacked layout space full screen.
# This case confirms that a single resolved child is passed through the WidgetRenderer without issues.
kind: Column
apiVersion: widgets.templates.krateo.io/v1beta1
metadata:
name: example-column-single-child-full-screen
namespace: krateo-system
spec:
widgetData:
allowedResources: [barcharts, buttons, columns, datagrids, eventlists, filters, flowcharts, forms, linecharts, markdowns, panels, paragraphs, piecharts, rows, tables, tablists, yamlviewers]
items:
- resourceRefId: example-table-basic
resourcesRefs:
items:
- id: example-table-basic
apiVersion: widgets.templates.krateo.io/v1beta1
name: example-table-basic
namespace: krateo-system
resource: tables
verb: GET
---
# Mixed valid and invalid children
# Target: simulate a partially broken layout where one of the referenced widgets cannot be resolved.
# Expected behavior: valid child widgets are rendered normally,
# while unresolved references are silently ignored without breaking layout continuity.
kind: Column
apiVersion: widgets.templates.krateo.io/v1beta1
metadata:
name: example-column-mixed
namespace: krateo-system
spec:
widgetData:
allowedResources: [barcharts, buttons, columns, datagrids, eventlists, filters, flowcharts, forms, linecharts, markdowns, panels, paragraphs, piecharts, rows, tables, tablists, yamlviewers]
items:
- resourceRefId: non-existent-widget
- resourceRefId: example-table-basic
size: 16
resourcesRefs:
items:
- id: example-table-basic
apiVersion: widgets.templates.krateo.io/v1beta1
name: example-table-basic
namespace: krateo-system
resource: tables
verb: GET
---
# Multiple child widgets
# Target: confirm that multiple widgets can be rendered inside the same column,
# preserving vertical stacking and consistent spacing.
# Expected behavior: both child widgets appear in order, each occupying its logical vertical slot
# within the column.
kind: Column
apiVersion: widgets.templates.krateo.io/v1beta1
metadata:
name: example-column-multiple-child
namespace: krateo-system
spec:
widgetData:
allowedResources: [barcharts, buttons, columns, datagrids, eventlists, filters, flowcharts, forms, linecharts, markdowns, panels, paragraphs, piecharts, rows, tables, tablists, yamlviewers]
items:
- resourceRefId: example-linechart-multi
- resourceRefId: example-table-basic
size: 12
resourcesRefs:
items:
- id: example-linechart-multi
apiVersion: widgets.templates.krateo.io/v1beta1
name: example-linechart-multi
namespace: krateo-system
resource: linecharts
verb: GET
- id: example-table-basic
apiVersion: widgets.templates.krateo.io/v1beta1
name: example-table-basic
namespace: krateo-system
resource: tables
verb: GET
---
# Nested column (layout composition)
# Target: demonstrate that a column can include another column,
# confirming the recursive nature of layout widgets.
# Expected behavior: outer column renders correctly and the nested column is properly
# delegated to WidgetRenderer, producing a consistent layout hierarchy.
kind: Column
apiVersion: widgets.templates.krateo.io/v1beta1
metadata:
name: example-column-nested
namespace: krateo-system
spec:
widgetData:
allowedResources: [columns, buttons, rows, paragraphs, tables]
items:
- resourceRefId: example-table-basic
- resourceRefId: example-column-multiple-child
size: 12
resourcesRefs:
items:
- id: example-table-basic
apiVersion: widgets.templates.krateo.io/v1beta1
name: example-table-basic
namespace: krateo-system
resource: tables
verb: GET
- id: example-column-multiple-child
apiVersion: widgets.templates.krateo.io/v1beta1
name: example-column-multiple-child
namespace: krateo-system
resource: columns
verb: GET