Hi,
I'm using the Gantt chart visualization from the Gantt chart app to show the status of batch processes. Currently if I click the gantt chart it takes me to the search query instead I want to open another gantt chart.
The problem now is I'm having a hard time getting the Gantt chart to drilldown into another Gantt chart when I click the bar(as shown in below image) of the gantt chart. What I'm trying to achieve is to have the user be taken to another Gantt chart that shows the history of the process (say part 7 days) of the bar he clicked on in the original Gantt chart.
Any lead or reference would help 🙂
Below is the main gantt chart which I have, when i click on the bar it should drilldown to another gantt chart and pass the process as token so the new gantt chart where I have the history of processes for past 7 days.
<form script="gantt:autodiscover.js">
<label>Process Monitoring</label>
<fieldset submitButton="false">
<input type="dropdown" token="tko_posting_date" searchWhenChanged="true">
<label>Posting Date</label>
<search>
<query>| gentimes start=-31 end=1 | sort -starttime
| eval date=strftime(starttime,"%d-%m-%Y %a")
| eval pdate=strftime(starttime,"%Y%m%d")
| eval today=strftime(now(), "%d-%m-%Y %a")
| eval yesterday=strftime(relative_time(now(),"-1d@d"), "%d-%m-%Y %a")
| eval adate=case(date = today, "Today", date = yesterday, "Yesterday", 1=1 , date)
| eval sortd=case(date = today, "1", date = yesterday, "2", 1=1 , "0")
| eval endtime=endtime+43200
| table pdate adate sortd starttime endtime
| sort sortd, pdate desc</query>
</search>
<fieldForLabel>adate</fieldForLabel>
<fieldForValue>pdate</fieldForValue>
<selectFirstChoice>true</selectFirstChoice>
<change>
<set token="tko_set_earliest">$row.starttime$</set>
<set token="tko_set_latest">$row.endtime$</set>
</change>
</input>
<input type="dropdown" token="tko_inst" searchWhenChanged="true">
<label>Select Institution</label>
<fieldForLabel>institution_name</fieldForLabel>
<fieldForValue>institution_number</fieldForValue>
<search>
<query>| inputlookup institution_name.csv
| table institution_name institution_number</query>
<earliest>-15m</earliest>
<latest>now</latest>
</search>
<default></default>
<initialValue>*</initialValue>
<choice value="*">ALL</choice>
</input>
<input type="dropdown" token="tko_emins" searchWhenChanged="true">
<label>Elapsed Mins</label>
<choice value="1">Non-Zero Values</choice>
<choice value="0">All Values</choice>
<default>1</default>
</input>
</fieldset>
<row>
<panel>
<html>
<h2>Gantt Chart demo</h2>
<div id="demo-search" class="splunk-manager" data-require="splunkjs/mvc/searchmanager"
data-options="{
"search": { "type": "token_safe", "value": "| inputlookup jobs.csv | search institution_number=$$tko_inst$$ posting_date=$$tko_posting_date$$ duration>=$$tko_emins$$ " },
"earliest_time": { "type": "token_safe", "value": "$$tko_set_earliest$$" },
"latest_time": { "type": "token_safe", "value": "$$tko_set_latest$$" },
"cancelOnUnload": true,
"preview": true
}">
</div>
<div id="demo-view" class="splunk-view" data-require="app/gantt/components/gantt/gantt" data-options="{
"managerid": "demo-search",
"startField": "startField",
"durationField": "duration",
"categoryLabel": "Process",
"categoryField": "process"
}">
</div>
</html>
</panel>
</row>
</form>
Any thoughts?