Skip to content

Commit

Permalink
fix(ui): Fix color generation for pod name in logs viewer. Fixes #17704
Browse files Browse the repository at this point in the history
… (#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>
  • Loading branch information
der-eismann committed Apr 2, 2024
1 parent 405949b commit affd1cb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions USERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit affd1cb

Please sign in to comment.