<%namespace name="helpers" file="_helpers.html"/>
<%!
    title = 'Splunk Admin Server Control'
%>
<%namespace name="lib" file="//lib.html" import="*"/>
<%inherit file="//layout/admin.html" />
<%
import splunk
from splunk.appserver.mrsparkle.lib import util, i18n
from splunk.appserver.mrsparkle.lib.msg_pool import MsgPoolMgr, UI_MSG_POOL
%>

<%
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


<div class="dataInputsWrapper">
    <br>
    <h1>${_('Distributed search')}</h1>
    <div class="dataInputsDesc">${_('Perform a search across multiple Splunk indexers.')}</div>

    <table class="splTable">
		<tr>
            <th>${_('')}</th>
            <th>${_('Actions')}</th>
        </tr>
        <tr>
            <td class="input_name"><a href="${make_url(['manager', namespace, 'search', 'distributed', 'config', 'distributedSearch'], dict(action='edit'))}">${_('Distributed search setup')}</a></td>
            <td></td>
        </tr>
        % if not distSearchDisabled:
        <tr>
            <td class="input_name"><a href="${make_url(['manager', namespace, 'search', 'distributed', 'peers'])}">${_('Search peers')}</a></td>
            % if not isClusteringEnabled:
                 <td><a href="${make_url(['manager', namespace, 'search', 'distributed', 'peers', '_new'], dict(action='edit'))}">${_('Add new')}</a></td>
            % else: 
                 <td></td>
            % endif
        </tr>
        % endif
    </table>
</div>
