Developing a custom Dashlet, is there a Dashlet Option which allows the reference of a CSS file, rather than using an import rule in the Nagios Fusion CSS?
I'd prefer to keep all associated files in their respective custom Dashlet directories. Please advise.
Dashlet option for custom CSS?
Dashlet option for custom CSS?
Nagios XI 5.9.1 (8 Servers)
Nagios Fusion 2024R1.0.2
Nagios Fusion 2024R1.0.2
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Dashlet option for custom CSS?
Fusion doesn't have the DASHLET_CSS_FILE directive like XI does although I am going to make a feature request to add it.
For the time being I would hardcode the css line as part of the html output for the dashlet, using the path to the dashlet directory in the path, something like this:
For the time being I would hardcode the css line as part of the html output for the dashlet, using the path to the dashlet directory in the path, something like this:
Code: Select all
$output .= "<link rel='stylesheet' type='text/css' href='" . get_base_url() . "includes/dashlets/" . $args[DASHLET_NAME] . "/YOUR_CSS_FILE.css"' />\n";
Re: Dashlet option for custom CSS?
Excellent, thank you.
Nagios XI 5.9.1 (8 Servers)
Nagios Fusion 2024R1.0.2
Nagios Fusion 2024R1.0.2
-
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: Dashlet option for custom CSS?
Locking threadTBT wrote:Excellent, thank you.