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!

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Splunk Community Dashboard Challenge for Your Chance to Win!

The Splunk Community Dashboard Challenge is underway! This is your chance to showcase your skills in creating ...

.conf24 | Session Scheduler is Live!!

.conf24 is happening June 11 - 14 in Las Vegas, and we are thrilled to announce that the conference catalog ...