Dashboards & Visualizations

How can i call an dashboard panel or report or prebuilt panle into an HTML dashboard?

Shan
Builder

Hai All,

I have a requirement like calling an dashboard panel into the HTML Dashboard. I have attached the HTML dashboard code below. Can you please help me out, how can i call dashboard panel into HTML dashboard code..

 <form>
  <label>Test HTML Management Overview Dashboard Test</label>
  <fieldset submitButton="false">
    <input type="dropdown" token="year">
      <label>YEAR</label>
      <default>2018</default>
      <initialValue>2018</initialValue>
      <fieldForLabel>year</fieldForLabel>
      <fieldForValue>year</fieldForValue>
      <search>
        <query>| gentimes start=01/01/2017 | bin span=1yr endtime | stats count by endtime | eval year=strftime(endtime, "%Y") | table year | reverse</query>
        <earliest>0</earliest>
        <latest></latest>
      </search>
    </input>
    <input type="dropdown" token="month">
      <label>MONTH</label>
      <default>February</default>
      <initialValue>February</initialValue>
      <fieldForLabel>month</fieldForLabel>
      <fieldForValue>month</fieldForValue>
      <search>
        <query>| gentimes start=01/01/$year$ | bin span=1mon endtime | stats count by endtime | eval month=strftime(endtime, "%B") | table month | dedup month | reverse</query>
        <earliest>0</earliest>
        <latest></latest>
      </search>
    </input>
  </fieldset>

  <search>
    <query>`M_O1("Masterdata","$month$","$year$")`
        | table STATUS_01  
</query>
    <done>
      <set token="STATUS_01">$result.STATUS_01$</set>
    </done>
  </search>
  <search>
    <query>`M_02("Masterdata","$month$","$year$")`
| eval    M_02_value=if((M_02>=80),1,0)
| table   M_02 M_02_value
| appendcols [ search `M_O2_2("Masterdata","$month$","$year$")`
| eval    M_O2_valuess=if((M_O2>=80),1,0)
| table   M_O2 M_O2_valuess]
| eval O2_STATUS=if((M_02_value=1 AND M_O2_valuess =1),1,0)
| table O2_STATUS
</query>
    <done>
      <set token="O2_STATUS">$result.O2_STATUS$</set>
    </done>
  </search>

<row>
    <panel>
      <html>
<head>
 <style>
 table, th, td {
     border: 1px solid black;
     border-collapse: collapse;
 }
 th, td {

     text-align: left;    
 }
 </style>   
 </head>
<body>
 <table style="width:100%">
<tr>
<td></td>
<td colspan="4"> Group 1</td>
<td colspan="4"> Group 2</td>
</tr>
<tr>
<td>Service Name</td>
<td>01</td>
<td>02</td>
<td>03</td>
<td>Track</td>
<td>01</td>
<td>02</td>
<td>03</td>
<td>Track</td>
</tr>
<tr>
</tr>
<tr>
<td>Masterdata</td>
<td>$STATUS_01$</td>
<td>$O2_STATUS$</td>
<td>Track</td>
<td>01</td>
<td>02</td>
<td>03</td>
</tr>
 </table>

 </body>

 </html>
    </panel>
  </row>

</form>

Kindly need your help on calling an dashboard panel or Report or prebuilt panel into the above HTML dashboard query..

Thanks in advance..

0 Karma

niketn
Legend

@shankarananth, if by report you mean saved search or scheduled saved search, you can use savedsearch or loadjob command respectively. You can create a New Search Manager and specific view that you need to display the result using Splunk JS Stack in HTML Dashboard.

In order to transition from Simple XML to HTML Dashboard, you can add all the required elements to Simple XML and then covert the same to HTML Dashboard using Save As option. You can take out specific elements from HTML Dashboard if you need to apply the same to different dashboards as per your needs.

Hope this is what you are looking for!

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

Shan
Builder

Hai All,

If anyone have idea about above mentioned scenario .. please make your comments.
Thanks in advance ...

0 Karma
Get Updates on the Splunk Community!

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

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