Dashboards & Visualizations

How to get line breaks in table cells?

BenTreeser
Explorer

Hello,

in old dashboard versions I was able to  create multi line strings in table cells. However, in Dashboard Studio it doesn't work. Is there a workaround?

example for dashboard studio:

{
    "dataSources": {
        "ds_search_1": {
            "type""ds.search",
            "options": {
                "query""| makeresults | eval value=\"line1\r\nline2\r\nline3\" \r\n| table value",
                "queryParameters": {
                    "earliest""-24h@h",
                    "latest""now"
                }
            }
        }
    },
    "visualizations": {
        "viz_table_1": {
            "type""splunk.table",
            "options": {
                "count"100,
                "dataOverlayMode""none",
                "drilldown""none",
                "percentagesRow"false,
                "rowNumbers"false,
                "totalsRow"false,
                "wrap"true
            },
            "dataSources": {
                "primary""ds_search_1"
            }
        }
    },
    "inputs": {
        "input_global_trp": {
            "type""input.timerange",
            "options": {
                "token""global_time",
                "defaultValue""-24h@h,now"
            },
            "title""Global Time Range"
        }
    },
    "layout": {
        "type""grid",
        "options": {},
        "structure": [
            {
                "item""viz_table_1",
                "type""block",
                "position": {
                    "x"0,
                    "y"0,
                    "w"1200,
                    "h"250
                }
            }
        ],
        "globalInputs": [
            "input_global_trp"
        ]
    },
    "title""dashboardstudio",
    "defaults": {
        "dataSources": {
            "ds.search": {
                "options": {
                    "queryParameters": {
                        "latest""$global_time.latest$",
                        "earliest""$global_time.earliest$"
                    }
                }
            }
        }
    }
}
 
 
examle for xml dashboard:

 

 

<dashboard version="1.1">
  <label>delete_me_8</label>
  <row>
    <panel>
      <table>
        <search>
          <query>| makeresults | eval value="line1
line2
line3" 
| table value</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
          <sampleRatio>1</sampleRatio>
        </search>
        <option name="count">100</option>
        <option name="dataOverlayMode">none</option>
        <option name="drilldown">none</option>
        <option name="percentagesRow">false</option>
        <option name="rowNumbers">false</option>
        <option name="totalsRow">false</option>
        <option name="wrap">true</option>
      </table>
    </panel>
  </row>
</dashboard>

 

 

Labels (2)
Tags (1)
0 Karma

BenTreeser
Explorer

I found out, in classic Splunk white-space: pre-wrap was used, which allowed line breaks in cells of table, but in Splunk Dashboard Studio white-space: normal is used, which doesn't allow line breaks.

Also, custom CSS is not supported in Dashboard Studio as it is stated here: https://docs.splunk.com/Documentation/SplunkCloud/8.1.2103/DashStudio/IntroFrame?_gl=1*4jf9w5*_ga*OT... 

If it weren't for the link graph I would instantly go back to classic Splunk ...

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

Announcing Modern Navigation: A New Era of Splunk User Experience

We are excited to introduce the Modern Navigation feature in the Splunk Platform, available to both cloud and ...

Observability Simplified: Combining User Experience, Application Performance & ...

Tech Talk Observability Simplified: Combining User Experience, Application Performance & Network ...

Event Series May & June: From Network Visibility to Service Intelligence

Unifying the Network: Moving from Alert Noise to Service Intelligence with Splunk ITSI In today’s hybrid ...