Splunk Search
Highlighted

How can you change the width of a column in a table(HTML) or add a new line break to a field?

Communicator

Hello! So I am running into a problem where my table visualization looks weird because one of my columns is too long. The column that is too long is grabbing from a csv lookup file and I was trying to add a new line break in the csv file and doing the lookup in Splunk but it doesn't take in the new line break. So, I was wondering if there is a way to set that columns size on the table so the field will auto line break or if theres a way to change the field to have the line break or how to do it with the csv lookup file. thanks

Highlighted

Re: How can you change the width of a column in a table(HTML) or add a new line break to a field?

Legend

Hi kdimaria,
I know that you don't want css or javascripts but the easiest way is css and in the Splunk 7.x Dashboard Examples you can find an useful example to do this.
In this app you can find also a way to change panels width using a javascript.

It's also possible to insert in a dashboard some html tags to modify a panel, but anyway you use a css element in a Splunk dashboard: e.g. I have four Single Values in a panel and I want to be sure that they are two for each row, to do this you can insert between panel tags

  <html>
     <style type="text/css">
        .single {
   width: 50% !important;
          }
  </style>
 </html>

Anyway you're using css elements.

Bye.
Giuseppe

0 Karma
Highlighted

Re: How can you change the width of a column in a table(HTML) or add a new line break to a field?

Communicator

Isn't this XML? my whole dashboard is now in HTML and I do all the modifications in HTML. Is there a way to use Javascript to change the column sizes?

0 Karma
Highlighted

Re: How can you change the width of a column in a table(HTML) or add a new line break to a field?

Legend

Hi kdimaria,
Usually Splunk dashboards are in XML, but in the above way it's possible to insert in XML a css element without modifying css.

Using Javascripts, it's possible to modify panels width not column width, to modify column width the only way is css.
Bye.
Giuseppe

0 Karma