mirror of
https://github.com/argoproj/argo-cd.git
synced 2026-02-20 01:28:45 +01:00
feat(ui): support custom icons (#20864)
Signed-off-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
This commit is contained in:
15
hack/generate-icons-typescript.sh
Executable file
15
hack/generate-icons-typescript.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Users may configure custom resource icons in resource_customizations. This script generates a list of those icons so
|
||||
# that the UI knows which icons are available.
|
||||
|
||||
{
|
||||
echo "// Code generated by hack/generate-icons-typescript.sh; DO NOT EDIT.";
|
||||
echo "/* eslint-disable prettier/prettier */";
|
||||
echo "";
|
||||
echo "// resourceIconGroups is a map of resource kind globs to whether or not a custom icon exists for that kind.";
|
||||
echo "// Each glob corresponds to a directory under ui/src/assets/images/resources, where any asterisk is represented as an underscore (_).";
|
||||
echo "export const resourceIconGroups = {";
|
||||
find ui/src/assets/images/resources -name icon.svg | sort | sed "s/ui\/src\/assets\/images\/resources\// '/" | sed "s/\/icon.svg/': true,/" | sed 's/_/*/';
|
||||
echo "};";
|
||||
} > ui/src/app/applications/components/resource-customizations.ts
|
||||
Reference in New Issue
Block a user