mirror of
https://github.com/rancher/steve.git
synced 2025-09-10 20:00:23 +00:00
Fix CRD Created At
field (#723)
* Add Tokens and Kubeconfig fields to date mapping * Fix missing cols in transform func for watch * Mark CRDs as.. CRD * Don't transform CRD's date field
This commit is contained in:
@@ -152,6 +152,20 @@ func SetAPIResource(s *types.APISchema, resource v1.APIResource) {
|
||||
SetNamespaced(s, resource.Namespaced)
|
||||
}
|
||||
|
||||
func MarkCRD(s *types.APISchema) {
|
||||
if s.Attributes == nil {
|
||||
s.Attributes = map[string]interface{}{}
|
||||
}
|
||||
s.Attributes["crd"] = true
|
||||
}
|
||||
|
||||
func IsCRD(s *types.APISchema) bool {
|
||||
if crd, ok := s.Attributes["crd"]; ok {
|
||||
return crd.(bool)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
func SetColumns(s *types.APISchema, columns interface{}) {
|
||||
if s.Attributes == nil {
|
||||
s.Attributes = map[string]interface{}{}
|
||||
|
Reference in New Issue
Block a user