All Apps and Add-ons

How to hide a search within dashboard XML?

sfatnass
Contributor

Hi

I want to hide a search request within dashboard XML for just using D3 forced directed graphs in an App (Splunk 6.x Dashboard Examples)

thx

0 Karma
1 Solution

kbarker302
Communicator

I see - in that case, there are a couple of ways this could be done:

JavaScript

Edit the following JavaScript file used by the dashboard:

$SPLUNK_HOME$\etc\apps\simple_xml_examples\appserver\static\autodiscover.js

and add these three lines to the bottom of the file, before the last });

$('#panel2').hide();
$('#panel1').width('100%');
$('#panel2').width('0%');

CSS

Edit the following CSS file used by the dashboard:

$SPLUNK_HOME$\etc\apps\simple_xml_examples\appserver\static\dashboard.css

and add these lines to the bottom of the file:

div#panel1 {    
   width: 100% !important;
}

div#panel2 {    
   width: 0% !important;    
   display: none !important;
}

View solution in original post

0 Karma

kbarker302
Communicator

I see - in that case, there are a couple of ways this could be done:

JavaScript

Edit the following JavaScript file used by the dashboard:

$SPLUNK_HOME$\etc\apps\simple_xml_examples\appserver\static\autodiscover.js

and add these three lines to the bottom of the file, before the last });

$('#panel2').hide();
$('#panel1').width('100%');
$('#panel2').width('0%');

CSS

Edit the following CSS file used by the dashboard:

$SPLUNK_HOME$\etc\apps\simple_xml_examples\appserver\static\dashboard.css

and add these lines to the bottom of the file:

div#panel1 {    
   width: 100% !important;
}

div#panel2 {    
   width: 0% !important;    
   display: none !important;
}
0 Karma

kbarker302
Communicator

If I understand correctly, make a copy of

$SPLUNK_HOME\etc\apps\<your app>\default\data\ui\nav\default.xml

and place it in

$SPLUNK_HOME$\etc\apps\<your app>\local\data\ui\nav\default.xml

(You may need to create the local folder structure if it doesn't already exist.)

Then, you can edit your local copy of default.xml. You can either comment out or remove entirely the following line:

<view name="search" default='true' />

Restart Splunk and you should no longer see Search in the top nav.

0 Karma

sfatnass
Contributor

nop

i have a dashboard based on D3 forced directed (please see the APP "Splunk 6.x Dashboard Examples")

then in this dashboard there is two panel (the graph and the table stat)

i want to hide the panel contain table stat

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...