Cosmos-Server icon indicating copy to clipboard operation
Cosmos-Server copied to clipboard

[BUG]: ServApp names with `.` are breaking monitoring tables

Open c0derMo opened this issue 11 months ago • 4 comments

What happened?

I've created a custom ServApp with a . in the container / App name. Afterwards, when visiting the Monitoring tab, the "Containers - Average Resources" table and the "Containers - Average Network" table show an additional column, splitting the container name at the ..

image (Container is called Wiki.js)

What should have happened?

Container name should not be splitted and no additional column should be added.

How to reproduce the bug?

  1. Add custom ServApp with . in name.
  2. Go to Monitoring tab
  3. Observe tables

Relevant log output

No response

Other details

No response

System details

  • Cosmos Version: 0.14.6
  • Cosmos Host OS: Debian 11 running on Raspberry Pi 3B+
  • Client Browser: Vivaldi (Chromium based)

c0derMo avatar Feb 28 '24 14:02 c0derMo

I am confused, how did you manage to create a container with name as . I always get an error

[ERROR] Rolling back changes because of -- Container creation error: Error response from daemon: Invalid container name (.), only [a-zA-Z0-9][a-zA-Z0-9_.-] are allowed[OPERATION FAILED]. CHANGES HAVE BEEN ROLLEDBACK.

BearTS avatar Jun 07 '24 14:06 BearTS

The full name of the container was Wiki.js, I think the first character can't be a ., but subsequent characters can, as indicated by the regex [a-zA-Z0-9][a-zA-Z0-9_.-] in the logs you posted

c0derMo avatar Jun 08 '24 09:06 c0derMo

Oh that's what you mean, let me try this locally and see if I can make a PR to fix this :)

Edit: sorry I did not see

(Container is called Wiki.js)

Gotcha

Edit 2: am able to reproduce the bug

BearTS avatar Jun 08 '24 10:06 BearTS

@c0derMo Made a PR which fixes the table 👍

BearTS avatar Jun 08 '24 14:06 BearTS