<%page args="dashboard,escapedOutput=False"/>\ <%! if cherrypy.config['product_type'] == 'hunk': faviconFile = 'favicon_hunk.ico' elif cherrypy.config['product_type'] == 'enterprise': faviconFile = 'favicon.ico' else: faviconFile = 'favicon.ico' %>\ <% from urlparse import urljoin from urllib import quote CUR_PAGE = "/app/%s/%s" % ( quote(APP['id']), quote(VIEW['id']) ) if escapedOutput else make_url("/app/%s/%s" % ( quote(APP['id']), 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" % 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 urljoin(CUR_PAGE, arg) augment_perf = splunk.util.normalizeBoolean(cherrypy.config.get('simple_xml_perf_debug')) %>\ ${_(dashboard.label if dashboard.label else dashboard.viewName) | h} | Splunk % if splunk.util.normalizeBoolean(cherrypy.config.get('minify_css')): % for css in customCssFiles: % endfor % else: % for css in customCssFiles: % endfor % endif
splunk>
% if dashboard.label:

${_(dashboard.label)|h}

% else:

 

% endif % if dashboard.description is not None:

${_(dashboard.description)|h}

% endif
% if dashboard.fieldset:
% 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 % 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:
\ <% 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
%endfor
% endif % endfor % if augment_perf: % endif % if splunk.util.normalizeBoolean(cherrypy.config.get('minify_js')): % if splunk.util.normalizeBoolean(cherrypy.config.get('js_no_cache')): % endif: % for js in customJsFiles: % endfor