ntop / ntopng

Web-based Traffic and Security Network Traffic Monitoring
http://www.ntop.org
GNU General Public License v3.0
6.17k stars 648 forks source link

Custom theme is not applied #8546

Closed mcodato closed 1 month ago

mcodato commented 1 month ago

Environment:

What happened: The custom theme file is not applied.

How did you reproduce it?

  1. Create the file /usr/share/ntopng/httpdocs/css/custom-theme.css
  2. Refresh the ntopng UI with the dev tools opened
  3. There are no requests that load the custom theme file

Debug Information: The problem seems to be here https://github.com/ntop/ntopng/blob/dev/scripts/lua/modules/page_utils.lua#L377 the custom theme is loaded from /usr/share/ntopng/httpdocs/css/custom-theme.css but the if checks if the file /usr/share/ntopng/css/custom-theme.css exists. Essentially, the two paths differ in the httpdocs folder.

MatteoBiscosi commented 1 month ago

Thanks for the fix @mcodato , your pr is correct, in case the issue persists let me know.

mcodato commented 1 month ago

Thank you @MatteoBiscosi, will the fix be backported to version 6.0?

cardigliano commented 1 month ago

@mcodato a new stable will be released in a few days and will contain the fix