All Apps and Add-ons

Does Sideview Utils 3.3.9 allow you to apply custom css without having to upload static files to Splunk Cloud?

xaymaca2020
Engager

I am trying to apply simple css to the text in the HTML module. I see a cssClass parameter, but not sure where I need to put the actual snippet of css code. Using Splunk Cloud (Splunk 6.4.0) with Sideview Utils 3.3.9

0 Karma
1 Solution

sideview
SplunkTrust
SplunkTrust

The cssClass param just helps you attach the class to the module container - it doesn't help you get the CSS rule itself defined. Generally as you've guessed, you would have either
a) application.css in your app's appserver/static, loaded automatically by SplunkWeb when the page was loaded.
or
b) somefile.css living in your app's appserver/static directory and referred to by i) the stylesheet attribute on <view> or ii) the customStylesheet param of the SideviewUtils module.

However all that would require uploading an app or editing fiels on the filesystem, which you can't do yourself in Splunk Cloud.

The only thing I can give you that will work in Splunk Cloud and that you can do yourself (ie without filing a ticket with the Cloud team) , is to use an HTML module to embed CSS directly into the page. Here's an example

<module name="HTML" layoutPanel="viewHeader">
  <param name="html"><![CDATA[

  <style type="text/css">
  body, td {
  font-family:Century Gothic !important;
  }
  </style>

  ]]></param>
</module>

View solution in original post

sideview
SplunkTrust
SplunkTrust

The cssClass param just helps you attach the class to the module container - it doesn't help you get the CSS rule itself defined. Generally as you've guessed, you would have either
a) application.css in your app's appserver/static, loaded automatically by SplunkWeb when the page was loaded.
or
b) somefile.css living in your app's appserver/static directory and referred to by i) the stylesheet attribute on <view> or ii) the customStylesheet param of the SideviewUtils module.

However all that would require uploading an app or editing fiels on the filesystem, which you can't do yourself in Splunk Cloud.

The only thing I can give you that will work in Splunk Cloud and that you can do yourself (ie without filing a ticket with the Cloud team) , is to use an HTML module to embed CSS directly into the page. Here's an example

<module name="HTML" layoutPanel="viewHeader">
  <param name="html"><![CDATA[

  <style type="text/css">
  body, td {
  font-family:Century Gothic !important;
  }
  </style>

  ]]></param>
</module>
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...