Splunk Search

Can customized SearchBar be readonly?

royimad
Builder

Hello Splunk Experts,

I have a SearchBar that inherit it's value from a Search

$calculation$

I would like that the SearchBar to be readonly , how to do that?

Thanks,

1 Solution

sideview
SplunkTrust
SplunkTrust

I would use an HTML module, create a <textarea>, mark it readonly and dump $search$ into it.

At it's simplest:

<module name="HTML">
  <param name="html"><![CDATA[
    <textarea readonly>$search$</textarea>
  ]]></param>
</module>

View solution in original post

sideview
SplunkTrust
SplunkTrust

I would use an HTML module, create a <textarea>, mark it readonly and dump $search$ into it.

At it's simplest:

<module name="HTML">
  <param name="html"><![CDATA[
    <textarea readonly>$search$</textarea>
  ]]></param>
</module>

alacercogitatus
SplunkTrust
SplunkTrust

If you don't want the search to change, I wouldn't display the bar. According to Module Ref, there is no readonly option.

http://docs.splunk.com/Documentation/Splunk/5.0.2/AdvancedDev/ModuleReference#SearchBar

Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...