<%page args="dashboard,escapedOutput=False,kw={}"/>\ <% from future.moves.urllib import parse as urllib_parse from splunk.models.view_escaping.forminput import BaseInput from splunk.appserver.mrsparkle.lib import util isLite = util.isLite() CUR_PAGE = "/app/%s/%s" % ( urllib_parse.quote(APP['id']), urllib_parse.quote(VIEW['id']) ) if escapedOutput else make_url("/app/%s/%s" % ( urllib_parse.quote(APP['id']), urllib_parse.quote(VIEW['id']) )) def url(arg): if escapedOutput: if arg[0] == '/' and arg[1] != '/': # server-relative URL return "{{SPLUNKWEB_URL_PREFIX}}%s" % arg elif arg.startswith('http://') or arg.startswith('https://') or arg.startswith('//'): # absolute or scheme-relative URL return arg else: # relative URL return "{{SPLUNKWEB_URL_PREFIX}}%s" % urllib_parse.urljoin(CUR_PAGE, arg) else: if arg[0] == '/' and arg[1] != '/': # server-relative URL return make_url(arg, validate=False) else: # absolute or relative URL return urllib_parse.urljoin(CUR_PAGE, arg) augment_perf = splunk.util.normalizeBoolean(cherrypy.config.get('simple_xml_perf_debug')) hasGlobalTRP = dashboard.hasGlobalTRP() options = dict() for option in ['hideChrome', 'hideSplunkBar', 'hideAppBar', 'hideTitle', 'hideEdit', 'targetTop']: options[option] = splunk.util.normalizeBoolean(kw.get(option, False)) if option in kw else getattr(dashboard, option, False) %>\ % if options['targetTop']: % endif ${_(dashboard.label if dashboard.label else dashboard.viewName) | h} % if isLite: % else: % endif % for css in customCssFiles: % endfor % if isLite: % else: % endif
Skip Navigation > % if (not options['hideChrome']):
% if not isLite: % if (not options['hideSplunkBar']): % endif % if (not options['hideAppBar']):
% endif % endif
% endif
% if (not options['hideTitle']): % if dashboard.label:

${_(dashboard.label)|h}

% else:

 

% endif % if dashboard.description is not None:

${_(dashboard.description)|h}

% endif % endif
% if dashboard.fieldset or dashboard.submitButton:
% for input in dashboard.fieldset: <%include file="elements/${input.__class__.__name__}.html" args="element=input,renderid=True,sourceApp=dashboard.sourceApp,url=url" />\ % endfor %if dashboard.submitButton:
% endif
% endif <%def name="tokenDepsData(obj)">\ % if obj.tokenDeps and obj.tokenDeps.depends: data-depends="${obj.tokenDeps.depends | h}"\ % endif % if obj.tokenDeps and obj.tokenDeps.rejects: data-rejects="${obj.tokenDeps.rejects | h}"\ % endif <%def name="originalId(obj)">\ % if obj.idGenerated is False: data-original-id="${obj.id}"\ % endif % for i,row in enumerate(dashboard.rows): % if len(row.panels): <% width = str(round(100.0/len(row.panels),3))[0:-1].rstrip('0').rstrip('.') + '%' %>\
% for panel in row.panels: % if panel.ref:
% else:
% if panel.title:

${panel.title | h}

% endif % if panel.fieldset:
% for input in panel.fieldset: <%include file="elements/${input.__class__.__name__}.html" args="element=input,renderid=True,sourceApp=dashboard.sourceApp,url=url" />\ % endfor
% endif <% single= False panel_element_width = '100%' %> % for j,element in enumerate(panel.panelElements): % if element.matchTagName == 'single' and single == False:
\ <% single_count = 0 for k in range(j,len(panel.panelElements)): if panel.panelElements[k].matchTagName != 'single': break single_count = single_count + 1 panel_element_width = str(round(100.0/single_count,3))[0:-1].rstrip('0').rstrip('.') + '%' single = True %> % endif % if element.matchTagName != 'single': % if single: <% single= False panel_element_width = '100%' %>
% endif
% endif
% if element.title is not None:

${_(element.title) | h}

% endif <%include file="elements/${element.__class__.__name__}.html" args="element=element,sourceApp=dashboard.sourceApp,url=url" />
% if element.matchTagName != 'single':
% endif % endfor % if single:
% endif
% endif %endfor
% endif % endfor % if augment_perf: % endif % for js in customJsFiles: % endfor