Spread our blog

How to Add a Disclaimer Button in Splunk Dashboard Without JS

So today we will add a “Disclaimer” button in our Splunk dashboard. This will open an additional dialog box with regard to information.

In our case we will create a disclaimer button named “Click for dashboard information”, later on, it will open the dialog box which will contain all the information regarding the dashboard, In case you can put your own required information according to the requirement.

This is our dashboard where we will add the button.

Here we will do these without JS.

Click on “Edit” and “Source”.

And do these modifications as shown below.

<row>
    <panel>
      <html>
      <!-- Button trigger-->
      <a href="#" id="btn1" class="btnModalInfo" data-toggle="modal" data-target="#desc1">
        <!-- Text for the button -->
        <span class="icon-large icon-info-circle" aria-hidden="true"/> <b>Click for dashboard information</b>
      </a>
 <div class="modal fade" id="desc1" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
      <div class="modal-dialog">
      <div class="modal-content">
      <div class="modal-header" style="padding-top: 2px; padding-bottom: 2px">
        <!-- Header of pop up -->
        <row>
          <div>
            <h2 class="modal-title text-center" id="myModalLabel">
              
              <!-- Header text -->
              <!--====== DASHBOARD NAME ======= -->
                  Sample Line Chart Dashboard Usage
            </h2>
          </div>
        </row>
      </div>
      <div class="modal-body" style="overflow:auto">
        
        <h1>
          
          <b>Description</b>
        </h1>
        
        <!--====== DASHBOARD FULL DESCRIPTION ======= -->
        This dashboard will show data related all applicable status count using "timechart" command

        <hr/>
        <h1>
          
          <b>Meta Info</b>
  
        </h1>
        <h2>Application Name</h2>Search and Reporting<br/>
        <h2>Usage</h2>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ligula odio, malesuada ut consectetur lobortis, imperdiet ac metus. Vestibulum sagittis vestibulum dolor, quis volutpat mi semper et.<br/>
        <h2>Permission</h2>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ligula odio, malesuada ut consectetur lobortis, imperdiet ac metus. Vestibulum sagittis vestibulum dolor, quis volutpat mi semper et.<br/>
        <h2>Restore as user?</h2>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ligula odio, malesuada ut consectetur lobortis, imperdiet ac metus. Vestibulum sagittis vestibulum dolor, quis volutpat mi semper et.<br/>
        <h2>Scope/Sharing</h2>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ligula odio, malesuada ut consectetur lobortis, imperdiet ac metus. Vestibulum sagittis vestibulum dolor, quis volutpat mi semper et. <br/>Note: Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ligula odio, malesuada ut consectetur lobortis, imperdiet ac metus. Vestibulum sagittis vestibulum dolor, quis volutpat mi semper et.<br/>        
    </div>
      <div class="modal-footer">
      <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
      </div>
      </div>
      </div>
      </div>
    </html>
    </panel>
  </row>

Here you can go through the code and can do all the changes as your own requirement. For better understanding comments have been added with the query.

You can also know about :  How to set colors in cells of a table according to the condition of another cell

Now save the dashboard.

And if we click on the button it will open the dialog box with information.

The complete source code is given below.

I hope all of you have enjoyed this blog ” How to Add a Disclaimer Button in Splunk Dashboard Without JS “. See you all on to the next one.

Happy Splunking!!

What’s your Reaction?
+1
+1
1
+1
+1
+1
2
+1
+1

Spread our blog

LEAVE A REPLY

Please enter your comment!
Please enter your name here