All Apps and Add-ons

Advanced XML softwrap simpleresultstable module in sideview Utils

0waste_splunk
Communicator

I am using sideview utils to create advanced XML Dashboard.

Search module push the result to pager and then pushed to simpleresultstable.
i want to assign softwrap to simplereultstable so dashboard doesn't show horizontal scroll bar.

thanks

1 Solution

0waste_splunk
Communicator

@nick the code you provided didn't work its need to be edited to following

.SimpleResultsTable table.simpleResultsTable td {
white-space: pre-line;
}

thanks nick

View solution in original post

0 Karma

0waste_splunk
Communicator

@nick the code you provided didn't work its need to be edited to following

.SimpleResultsTable table.simpleResultsTable td {
white-space: pre-line;
}

thanks nick

0 Karma

sideview
SplunkTrust
SplunkTrust

I would try using the Sideview Table module instead of Splunk's SimpleResultsTable module. Table has a bunch of extra features you might find useful, and Table doesn't have the default "nowrap" behavior that SimpleResultsTable has. So a side effect of switching to Table may very well be that you end up with the layout you want automatically.

If you prefer to stick with SimpleResultsTable, you can modify Splunk's default CSS by placing this into your application.css file. Replace YOURVIEW with the name of your view.

.splView-YOURVIEW .SimpleResultsTable table.simpleResultsTable td {
    white-space: normal
}

Or alternately, include a special file from appserver/static into the view, either with the stylesheet attribute on <view> or by using the customStylesheet param of the SideviewUtils module. In that case of course you can dump the .splView-YOURVIEW prefix.

sideview
SplunkTrust
SplunkTrust

Hm. If you're getting an error in the Sideview Editor when you use the customStylesheet param, my only ideas are a) you have an old Utils version? customStylesheet was introduced in 2.1. Current version is 2.6.4. b) check the casing of customStylesheet ? Note that there's only one capital "S". Aside from that, if you give the param a value with no slash, it'll look in the current app. If you give it "foo/bar.css", it will look in the app "foo", in "/appserver/static/bar.css". It will never look into any subdirectories within appserver static btw - it has to be right in static.

0 Karma

0waste_splunk
Communicator

@nick
I added custom.css in serach app's appserver/static.
with the above code. and then I added serach/custom.css in SideviewUtils's customStylesheet i got error in sideview editor's preview window. and If i add search/custom.css in view's stylesheet its not workin.
please help.
let me know if i am doing any thing wrong?

thanks

0 Karma

0waste_splunk
Communicator

where should i store my customStylesheet, if dashboard is global? can i put it in /etc/system/local?

0 Karma

sideview
SplunkTrust
SplunkTrust

Indeed the SoftWrap module will have no effect on either SimpleResultsTable or Table. If your dashboard is shared across apps then use the customStylesheet param on the SideviewUtils module. The other ways would only work if the view was in one particular app. Pick an app (here "some_app", and put the css above into its appserver/static/ directory.

<module name="SideviewUtils" layoutPanel="appHeader">
  <param name="customStylesheet">some_app/custom.css</param>
</module>

Note you can name the file whatever you like but it must be in appserver/static, not in a subfolder.

0 Karma

0waste_splunk
Communicator

my dashboard is accessible from all apps so can you please tell me in which application.css i should put this code?
also i have try to use SoftWrap Module but it didn't work.
here how my dashboard structure look like
.....->JSChart->SoftWrap->Search->JobProgressIndicator->Pager->SimpleReusltsTable->Search->Pager->SimpleResultsTable.

Can you please tell me the steps for alternative method? it sounds like that will solve me problem.

Sorry I am still beginner here.

thanks nick.

0 Karma
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 ...