Cosmos-Server
Cosmos-Server copied to clipboard
[BUG]: ServApp names with `.` are breaking monitoring tables
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 .
.
(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?
- Add custom ServApp with
.
in name. - Go to Monitoring tab
- 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)
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.
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
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
@c0derMo Made a PR which fixes the table 👍