%page args="namespace, view_id, view_object, panel_sequence, chart_drilldown_types, table_drilldown_types, APP" /> <%namespace name="lib" file="//lib.html" import="*"/> <%! import splunk.util, splunk.entity %> <% savedSearches = splunk.entity.getEntities('saved/searches', namespace=APP['id'], count=500) panelObject = view_object.getPanelBySequence(panel_sequence) panelClass = panelObject.matchTagName panelClassTypes = [ ('table', _('Data table')), ('chart', _('Chart')), ('single', _('Single value')), ('event', _('Event viewer')) ] inlineSearchString = panelObject.searchCommand if panelObject.searchMode == 'string' else '' %> <%doc> In general creating an option.foo tag is much simpler than this however since the defaults depend on the panelClass, we need to create two sets of radios that both end up being a single option key... NOTE: in viewmaster.js, these elements are actually removed from the form right before we submit. %doc> <%def name="buildDrilldownRadios(drilldown_types, panelClass, default)"> <% selectedDrilldown = panelObject.options.get("drilldown", default); # TODO - the second argument to get() above appears to do nothing in mako. Patching manually. if (not selectedDrilldown) : selectedDrilldown = default; %> % for drilldown in drilldown_types : % endfor %def>