hi
i have done a css file but i dont know to to put it in the xml file
which tags are mandatory?
i'm looking for a xml example file with css Inside
thanks
Hi jip31,
You can refer the below sample and let me know if you have got any more queries..
<dashboard>
<label>Test</label>
<row>
<panel>
<html>
<style>
#sla_table {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#sla_table td, #sla_table th {
border: 1px solid #ddd;
padding: 2px;
}
#sla_table th {
padding-top: 2px;
padding-bottom: 2px;
text-align: left;
background-color: #C0C0C0;
color: black;
}
</style>
<table id = "sla_table">
<tr>
<th>Duration</th>
<th>Start Time</th>
<th>Result Rows</th>
</tr>
<tr>
<td>$duration$</td>
<td>$starttime$</td>
<td>$resultcount$</td>
</tr>
</table>
</html>
</panel>
</row>
</dashboard>
Hi @jip31 ,
You can use <dashboard stylesheet="<style_filename>.css" script="<script_filename>.js">
in your XML
Reference : https://docs.splunk.com/Documentation/Splunk/7.1.1/AdvancedDev/UseCSS
many thanks!
@jip31 kindly unaccept your comment and accept the answer below which has resolved your issue.
@jip31
My name is Anam and I am the Community Content Specialist for Splunk Answers. As @niketnilay mentioned earlier to you, refrain from accepting your own answers and please accept the answer that has worked for you in this question. You also accepted another one of your own answers in this question as well: https://answers.splunk.com/answers/669860/plus-and-minus-in-a-trend-calcul.html which was fixed. We have awesome contributors in this community and their effort should be appreciated and encouraged!