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!

Introducing the Splunk Community Dashboard Challenge!

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

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer Certification at ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...