Dashboards & Visualizations

Keyboard shortcut to format html and xml code in dashboard source code editor

vall
New Member

As mentioned in the subject, help me with the keyboard shortcut to format html and xml code in dashboard source code editor.

For example, I want below code to be formatted to the code as shown in "To" section:

<dashboard version="1.1">
<label>Test Dashboard</label>
<row>
<panel>
<html>
<h1>
<b>Some bold text</b>
</h1>
</html>
</panel>
</row>
</dashboard>

 

To:

<dashboard version="1.1">
	<label>Test Dashboard</label>
	<row>
		<panel>
			<html>
				<h1>
					<b>Some bold text</b>
				</h1>
			</html>
		</panel>
	</row>
</dashboard>

 

I tried using Ctrl+Shift+F but it is only formatting the XML code in the dashboard source code editor and html code in the dashboard source code editor is not getting formatted and remaining as is.

Labels (1)
0 Karma

isoutamo
SplunkTrust
SplunkTrust

Hi

I don't know if there is any key combinations for this on Splunk's own edit.

But you can copy this xml file into e.g. Visual Studio Code and format it there. That also gives you to possibility to store it into git or other version control system.

r. Ismo

0 Karma
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 ...