Skip to content

Commit 0a9e1d0

Browse files
authored
Update column style info (#90)
Signed-off-by: Tamal Saha <[email protected]>
1 parent 7102452 commit 0a9e1d0

15 files changed

+159
-260
lines changed

artifacts/render-default-layout-response.yaml

+84-84
Large diffs are not rendered by default.

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ require (
3030
kmodules.xyz/authorizer v0.0.0-20211121124031-167d0ef7c671
3131
kmodules.xyz/client-go v0.0.0-20220118044154-b361db150f28
3232
kmodules.xyz/custom-resources v0.0.0-20220104014416-7dcc448afcaf
33-
kmodules.xyz/resource-metadata v0.8.2-0.20220120082202-5237d4dba818
33+
kmodules.xyz/resource-metadata v0.8.2-0.20220120094707-bcf0fa0b102b
3434
kmodules.xyz/resource-metrics v0.0.7-0.20220113235224-64b74ecbc4f8
3535
kmodules.xyz/sets v0.0.0-20220102205946-ac2b95a10ab2
3636
sigs.k8s.io/cli-utils v0.26.1

go.sum

+2-2
Original file line numberDiff line numberDiff line change
@@ -957,8 +957,8 @@ kmodules.xyz/custom-resources v0.0.0-20220104014416-7dcc448afcaf h1:f0c2Irsxf+Px
957957
kmodules.xyz/custom-resources v0.0.0-20220104014416-7dcc448afcaf/go.mod h1:noID+Lv6uVm7qZOu0rH4t5Ost2OxS7oFhovlXJOT3lc=
958958
kmodules.xyz/offshoot-api v0.0.0-20210829122105-6f4d481b0c61 h1:J56UGmRFddu6tERRd8BELmP5QbXxievzb+6vAjFptiM=
959959
kmodules.xyz/offshoot-api v0.0.0-20210829122105-6f4d481b0c61/go.mod h1:3LECbAL3FgbyK80NP3V3Pmiuo/a3hFWg/PR6SPFhTns=
960-
kmodules.xyz/resource-metadata v0.8.2-0.20220120082202-5237d4dba818 h1:/MrMekXdaMkSSkBuh+xJFKdop10sbtuIOoZa3GxALSY=
961-
kmodules.xyz/resource-metadata v0.8.2-0.20220120082202-5237d4dba818/go.mod h1:1SGviU14pH9nhwp+hBGI9mVqvv0MRt8r/j7B8eMFIj0=
960+
kmodules.xyz/resource-metadata v0.8.2-0.20220120094707-bcf0fa0b102b h1:UnwFlowiu+ihiGkqjyAbNj96FZoA1ZfF/en0AWut6ro=
961+
kmodules.xyz/resource-metadata v0.8.2-0.20220120094707-bcf0fa0b102b/go.mod h1:1SGviU14pH9nhwp+hBGI9mVqvv0MRt8r/j7B8eMFIj0=
962962
kmodules.xyz/resource-metrics v0.0.6/go.mod h1:M7rWuo2qh3BpHhogiEVPnvGY9Xx4Pfygqn1Rex8YbgM=
963963
kmodules.xyz/resource-metrics v0.0.7-0.20220113235224-64b74ecbc4f8 h1:2d1DaCOswP7e6D0gokB5ByeIkuve4AA8e8FOc/Yt8GE=
964964
kmodules.xyz/resource-metrics v0.0.7-0.20220113235224-64b74ecbc4f8/go.mod h1:M7rWuo2qh3BpHhogiEVPnvGY9Xx4Pfygqn1Rex8YbgM=

vendor/kmodules.xyz/resource-metadata/apis/meta/v1alpha1/openapi_generated.go

+3-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

vendor/kmodules.xyz/resource-metadata/apis/meta/v1alpha1/resourcedescriptor_types.go

+2-12
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,6 @@ type SortHeader struct {
278278
}
279279

280280
type AttributeDefinition struct {
281-
Enable bool `json:"enable,omitempty"`
282281
Template string `json:"template,omitempty"`
283282
}
284283

@@ -290,17 +289,9 @@ const (
290289
ShapePill ShapeProperty = "Pill"
291290
)
292291

293-
// +kubebuilder:validation:Enum=Foreground;Background
294-
type ColorProperty string
295-
296-
const (
297-
ColorForeground ColorProperty = "Foreground"
298-
ColorBackground ColorProperty = "Background"
299-
)
300-
301292
type ColorDefinition struct {
302-
Color ColorProperty `json:"color,omitempty"`
303-
Template string `json:"template,omitempty"`
293+
// Available color codes: success,danger,neutral,warning,info
294+
Template string `json:"template,omitempty"`
304295
}
305296

306297
type ResourceColumn struct {
@@ -323,7 +314,6 @@ type ResourceColumn struct {
323314
Link bool `json:"link,omitempty"`
324315
Shape ShapeProperty `json:"shape,omitempty"`
325316
Icon bool `json:"icon,omitempty"`
326-
Color ColorProperty `json:"color,omitempty"`
327317
}
328318

329319
type ResourceSubTableDefinition struct {

vendor/kmodules.xyz/resource-metadata/apis/meta/v1alpha1/table_helpers.go

+2-5
Original file line numberDiff line numberDiff line change
@@ -50,17 +50,14 @@ func Convert_ResourceColumnDefinition_To_ResourceColumn(def ResourceColumnDefini
5050
Format: def.Sort.Format,
5151
}
5252
}
53-
if def.Link != nil && def.Link.Enable {
53+
if def.Link != nil && def.Link.Template != "" {
5454
col.Link = true
5555
}
56-
if def.Icon != nil && def.Icon.Enable {
56+
if def.Icon != nil && def.Icon.Template != "" {
5757
col.Icon = true
5858
}
5959
if def.Shape != "" {
6060
col.Shape = def.Shape
6161
}
62-
if def.Color != nil && def.Color.Color != "" {
63-
col.Color = def.Color.Color
64-
}
6562
return col
6663
}

vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourceblockdefinitions.yaml

+1-9
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,8 @@ spec:
105105
properties:
106106
color:
107107
properties:
108-
color:
109-
enum:
110-
- Foreground
111-
- Background
112-
type: string
113108
template:
109+
description: 'Available color codes: success,danger,neutral,warning,info'
114110
type: string
115111
type: object
116112
description:
@@ -126,15 +122,11 @@ spec:
126122
type: string
127123
icon:
128124
properties:
129-
enable:
130-
type: boolean
131125
template:
132126
type: string
133127
type: object
134128
link:
135129
properties:
136-
enable:
137-
type: boolean
138130
template:
139131
type: string
140132
type: object

vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcedescriptors.yaml

+2-18
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,8 @@ spec:
4848
properties:
4949
color:
5050
properties:
51-
color:
52-
enum:
53-
- Foreground
54-
- Background
55-
type: string
5651
template:
52+
description: 'Available color codes: success,danger,neutral,warning,info'
5753
type: string
5854
type: object
5955
description:
@@ -69,15 +65,11 @@ spec:
6965
type: string
7066
icon:
7167
properties:
72-
enable:
73-
type: boolean
7468
template:
7569
type: string
7670
type: object
7771
link:
7872
properties:
79-
enable:
80-
type: boolean
8173
template:
8274
type: string
8375
type: object
@@ -462,12 +454,8 @@ spec:
462454
properties:
463455
color:
464456
properties:
465-
color:
466-
enum:
467-
- Foreground
468-
- Background
469-
type: string
470457
template:
458+
description: 'Available color codes: success,danger,neutral,warning,info'
471459
type: string
472460
type: object
473461
description:
@@ -483,15 +471,11 @@ spec:
483471
type: string
484472
icon:
485473
properties:
486-
enable:
487-
type: boolean
488474
template:
489475
type: string
490476
type: object
491477
link:
492478
properties:
493-
enable:
494-
type: boolean
495479
template:
496480
type: string
497481
type: object

vendor/kmodules.xyz/resource-metadata/crds/meta.k8s.appscode.com_resourcelayouts.yaml

+5-45
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,8 @@ spec:
106106
properties:
107107
color:
108108
properties:
109-
color:
110-
enum:
111-
- Foreground
112-
- Background
113-
type: string
114109
template:
110+
description: 'Available color codes: success,danger,neutral,warning,info'
115111
type: string
116112
type: object
117113
description:
@@ -127,15 +123,11 @@ spec:
127123
type: string
128124
icon:
129125
properties:
130-
enable:
131-
type: boolean
132126
template:
133127
type: string
134128
type: object
135129
link:
136130
properties:
137-
enable:
138-
type: boolean
139131
template:
140132
type: string
141133
type: object
@@ -283,12 +275,8 @@ spec:
283275
properties:
284276
color:
285277
properties:
286-
color:
287-
enum:
288-
- Foreground
289-
- Background
290-
type: string
291278
template:
279+
description: 'Available color codes: success,danger,neutral,warning,info'
292280
type: string
293281
type: object
294282
description:
@@ -305,15 +293,11 @@ spec:
305293
type: string
306294
icon:
307295
properties:
308-
enable:
309-
type: boolean
310296
template:
311297
type: string
312298
type: object
313299
link:
314300
properties:
315-
enable:
316-
type: boolean
317301
template:
318302
type: string
319303
type: object
@@ -461,12 +445,8 @@ spec:
461445
properties:
462446
color:
463447
properties:
464-
color:
465-
enum:
466-
- Foreground
467-
- Background
468-
type: string
469448
template:
449+
description: 'Available color codes: success,danger,neutral,warning,info'
470450
type: string
471451
type: object
472452
description:
@@ -483,15 +463,11 @@ spec:
483463
type: string
484464
icon:
485465
properties:
486-
enable:
487-
type: boolean
488466
template:
489467
type: string
490468
type: object
491469
link:
492470
properties:
493-
enable:
494-
type: boolean
495471
template:
496472
type: string
497473
type: object
@@ -637,12 +613,8 @@ spec:
637613
properties:
638614
color:
639615
properties:
640-
color:
641-
enum:
642-
- Foreground
643-
- Background
644-
type: string
645616
template:
617+
description: 'Available color codes: success,danger,neutral,warning,info'
646618
type: string
647619
type: object
648620
description:
@@ -659,15 +631,11 @@ spec:
659631
type: string
660632
icon:
661633
properties:
662-
enable:
663-
type: boolean
664634
template:
665635
type: string
666636
type: object
667637
link:
668638
properties:
669-
enable:
670-
type: boolean
671639
template:
672640
type: string
673641
type: object
@@ -845,12 +813,8 @@ spec:
845813
properties:
846814
color:
847815
properties:
848-
color:
849-
enum:
850-
- Foreground
851-
- Background
852-
type: string
853816
template:
817+
description: 'Available color codes: success,danger,neutral,warning,info'
854818
type: string
855819
type: object
856820
description:
@@ -866,15 +830,11 @@ spec:
866830
type: string
867831
icon:
868832
properties:
869-
enable:
870-
type: boolean
871833
template:
872834
type: string
873835
type: object
874836
link:
875837
properties:
876-
enable:
877-
type: boolean
878838
template:
879839
type: string
880840
type: object

0 commit comments

Comments
 (0)