fix(ui): Fix color generation for pod name in logs viewer. Fixes #17704 (#17706)

* Fix color generation for pod name in logs viewer

Signed-off-by: Philipp Trulson <der-eismann@users.noreply.github.com>

* Add rebuy to users.md

Signed-off-by: Philipp Trulson <der-eismann@users.noreply.github.com>

---------

Signed-off-by: Philipp Trulson <der-eismann@users.noreply.github.com>
This commit is contained in:
Philipp Trulson 2024-04-02 22:12:06 +02:00 committed by GitHub
parent 405949b127
commit affd1cb251
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View file

@ -243,6 +243,7 @@ Currently, the following organizations are **officially** using Argo CD:
1. [QuintoAndar](https://quintoandar.com.br)
1. [Quipper](https://www.quipper.com/)
1. [RapidAPI](https://www.rapidapi.com/)
1. [rebuy](https://www.rebuy.de/)
1. [Recreation.gov](https://www.recreation.gov/)
1. [Red Hat](https://www.redhat.com/)
1. [Redpill Linpro](https://www.redpill-linpro.com/)

View file

@ -64,7 +64,7 @@ function stringHashCode(str: string) {
// ansi color for pod name
function podColor(podName: string) {
return colors[stringHashCode(podName) % colors.length];
return colors[Math.abs(stringHashCode(podName) % colors.length)];
}
// https://2ality.com/2012/09/empty-regexp.html