Dashboards & Visualizations

Increasing size of textbox input

mbasharat
Builder

Hi,

I need to increase the size of text box filters in my dashboard. I need to be able to increase size of all or select textbox filter. I found below solution from a previous post but it is not working in Splunk Enterprise versions 7.x and 8.x. Can someone assist pls? Thanks in -advance!!!

https://community.splunk.com/t5/Dashboards-Visualizations/How-to-increase-the-textbox-size-when-you-... 

<form>
  <label>Text Box Size</label>
  <fieldset submitButton="false">
  </fieldset>
  <row>
    <panel depends="$alwaysHideCSSStyle$">
      <html>
        <style>
          #text4 .splunk-textinput
          {
            width: 300px !important;
          }
          #text4 .splunk-textinput input{
            width: 300px !important;
          }           
          #text5
          {
            padding-left:95px !important;
          }
          #text5 .splunk-textinput
          {
            width: 300px !important;
          }
          #text5 .splunk-textinput input{
            width: 300px !important;
          }
        </style>
      </html>
    </panel>
    <panel>
      <input id="text1" type="text" token="field1">
        <label>field1</label>
      </input>
      <input id="text2" type="text" token="field2">
        <label>field2</label>
      </input>
      <input id="text3" type="text" token="field3">
        <label>field3</label>
      </input>
      <input id="text4" type="text" token="field4">
        <label>field4</label>
      </input>
      <input id="text5" type="text" token="field5">
        <label>field5</label>
      </input>      
    </panel>
  </row>
</form>

Splunk Enterprise  

Labels (4)
Tags (1)

niketn
Legend

@mbasharat All 7.x do not have same DOM structure for Splunk Dashboards. Since the CSS override is not working in 8.x as well. I am guessing you are on 7.1+ or 7.2 or higher. (even 7.1.x and 7.2.x may have different DOMs, but I have no way to check).

Nevertheless, check out the following answer of mine which changes the width of all inputs using CSS override for ver 7.2.x+: https://community.splunk.com/t5/Dashboards-Visualizations/Why-is-the-dropdown-input-width-not-increa...

Please try out for Text Box and confirm as per your use case.

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"

mbasharat
Builder

Hi @ niketnilay,

I have tried this solution and it did not work for me. I am @ Splunk Enterprise 7.3.3

0 Karma

niketn
Legend

@mbasharat I wished you had mentioned specific version 7.3.3 instead of 7.x which becomes vague for us to assist you better. Please refer to one of my older answers about the known issue while applying CSS extension directly through Dashboard XML. PS: You should always move CSS style from dashboard XML (which should be only meant for testing) to CSS static file in the appserver/static for better reusability, reduction of developer errors, separation of concerns and too many overrides for the same node.

https://community.splunk.com/t5/Dashboards-Visualizations/How-to-include-CSS-in-Dashboards-with-the-...

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma

thambisetty
SplunkTrust
SplunkTrust

May be cache problem. You should run below to see change you make.

http[s]://yourinstance:webport/en-US/_bump

————————————
If this helps, give a like below.

mbasharat
Builder

Hi @ thambisetty,

I tried this approach well and no luck so far 😞

Nisha18789
Builder

Hi @mbasharat , above example dashboard works perfectly fine for me on Splunk Version 8.x

Are you trying above example in a fresh dashboard or you are trying the logic in your dashboard when you say its not working?

mbasharat
Builder

Hi @Nisha18789 ,

I havent implemented this in my dashboard yet because I wanted to test first. I simply created a new view by copy/paste of code then tried different sizes in code but textbox sizes never changed.

Get Updates on the Splunk Community!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...