1
0
mirror of https://github.com/rancher/steve.git synced 2025-09-14 06:19:31 +00:00

Add a special case handler to sort raw namespaces.

For any namespaces in a project, we want to group them by project,
sorted by the project's human name.  Then display the others.
Sort the names ascending otherwise.

This is a bit hacky -- if the client adds any filter or sort field,
we no longer do the bespoke joining.

It took all day to come up with this SQL to get all the namespaces.
LMK if there's a better way, and especially if you've got a way
to integrate this technique with user-specified filters and sort params.
This commit is contained in:
Eric Promislow
2025-03-21 13:12:09 -07:00
parent e1061a86cd
commit ca28cd31be
3 changed files with 245 additions and 29 deletions

View File

@@ -151,7 +151,9 @@ var (
gvkKey("management.cattle.io", "v3", "NodeTemplate"): {
{"spec", "clusterName"}},
gvkKey("management.cattle.io", "v3", "Project"): {
{"spec", "clusterName"}},
{"spec", "clusterName"},
{"spec", "displayName"},
},
gvkKey("networking.k8s.io", "v1", "Ingress"): {
{"spec", "rules", "host"},
{"spec", "ingressClassName"},