admin do
show? true
resource_group_labels group_b: "Group B", group_a: "Group A", group_c: "Group C"
end
Currently, resource_group_labels shows labels in ascending alphabetical order and this will result to this in the domain dropdown:
Group A
Group B
Group C
(resources without group)
This PR let resource_group_labels to strictly sort labels as given and this will be the result in the domain dropdown:
Group B
Group A
Group C
(resources without group)
The reason is that when I tried ash_admin with ash_paper_trail, I tried to group all resources with Version in a group called Audit log which starts with an A. There is another group called Domain. As result, Audit log group is always at the top and I wanted to actually put this group under the Domain group.
Let's say, we have this in a domain:
Currently,
resource_group_labels
shows labels in ascending alphabetical order and this will result to this in the domain dropdown:This PR let
resource_group_labels
to strictly sort labels as given and this will be the result in the domain dropdown:The reason is that when I tried
ash_admin
withash_paper_trail
, I tried to group all resources withVersion
in a group calledAudit log
which starts with anA
. There is another group calledDomain
. As result,Audit log
group is always at the top and I wanted to actually put this group under theDomain
group.Follow up to https://github.com/ash-project/ash_admin/pull/15
Contributor checklist