<%namespace file="../lib.html" import="fillform"/> <%namespace file="../lib.html" import="script_tags"/> <%namespace file="../lib.html" import="stylesheet_tags"/> <%namespace file="_helpers.html" import="generateFormRow"/> <%namespace name="helpers" file="_helpers.html"/> <% sessionId = cherrypy.session.id scriptFiles = ['/static/js/contrib/json2.js'] import splunk.auth import splunk.entity as en from splunk.appserver.mrsparkle.lib.msg_pool import MsgPoolMgr, UI_MSG_POOL %> <%call expr="script_tags(scriptFiles)"> <%call expr="stylesheet_tags(cssFiles)"> % if uiHelper: % endif <% msg_obj = MsgPoolMgr.get_poolmgr_instance()[UI_MSG_POOL].pop(msgid) %> % if msg_obj: <%helpers:message content="${msg_obj.text}" level="${msg_obj.severity}"/> % endif
${_('Loading...')}
% if form_defaults: <% if isCloneAction: save_to = "_new" else: save_to = entity_name %> <% actionPath = make_url(["manager", namespace, endpoint_base, en.quoteEntity(save_to)]) eaiAttributes = form_defaults['eai:attributes'] edit_links = filter((lambda x: x[0] == 'edit'), entity.links) entity['__ns'] = entity.namespace %> <%doc>

uiHelper:

${uiHelper}
% if entity.name != "_new" and not edit_links: ${_("You do not have permissions to edit this configuration.")} % endif ## Used to display errors inside a popup window instead of using the messenger
% if not '__ns' in uiHelper_elements: % endif % if uiHelper: <%call expr="fillform(form_defaults, form_errors)"> % for element in uiHelper["elements"]: <% if entity.name != "_new" and not edit_links: element['disabled'] = '1' %> <%call expr="generateFormRow(element, eaiAttributes, form_defaults)"> % endfor % if not eleOnly:
% if edit_links and entity.name != "_new" and not isCloneAction: % endif % if edit_links or entity.name == "_new": % endif
% endif % endif
% endif