<form stylesheet="ui_simple.css" isVisible="true" version="1.1" theme="dark">
    <label>UI CONFIG, Full Host Configuration viewer</label>
    <description>Extraction of AAA and BBB* configuration sections from Nmon raw data</description>
    <fieldset autoRun="false" submitButton="false">
        <input type="time" token="timerange" searchWhenChanged="true">
            <label>TimeRange:</label>
            <default>
                <earliest>-48h</earliest>
                <latest>now</latest>
            </default>
        </input>
        <input type="dropdown" token="osfilter" searchWhenChanged="true">
            <label>Type of OS:</label>
            <default></default>
            <choice value="">Any OS</choice>
            <choice value="AIX">AIX</choice>
            <choice value="Linux">Linux</choice>
            <choice value="Solaris">Solaris</choice>
            <prefix>OStype="</prefix>
            <suffix>"</suffix>
            <change>
                <condition>
                    <unset token="form.host"></unset>
                </condition>
            </change>
        </input>
        <input type="text" token="host-prefilter" searchWhenChanged="true">
            <label>Optional: Filter hosts populating</label>
            <prefix>host="</prefix>
            <suffix>"</suffix>
            <default>*</default>
            <change>
                <condition>
                    <unset token="form.host"></unset>
                </condition>
            </change>
        </input>
        <input id="host" type="dropdown" token="host" searchWhenChanged="true">
            <label>Host Selection:</label>
            <prefix>host="</prefix>
            <suffix>"</suffix>
            <search>
                <query>| tstats count where `nmon_index` $host-prefilter$ $osfilter$ by host | dedup host | sort host</query>
                <earliest>$timerange.earliest$</earliest>
                <latest>$timerange.latest$</latest>
            </search>
            <fieldForLabel>host</fieldForLabel>
            <fieldForValue>host</fieldForValue>
        </input>
    </fieldset>

    <!-- Help the user -->

    <row rejects="$host$">
        <panel>
            <html>
                <div class="red_help_user">
                    <p>- - - - - - - - - - ACTION REQUIRED: please select your server name(s) in the host selector above - - - - - - - - - -</p>
                </div>
            </html>
        </panel>
    </row>

    <row>
        <panel>
            <input type="text" token="customsearch">
                <label>Search for a pattern (Will be highlighted):</label>
                <default/>
                <suffix>*</suffix>
            </input>
            <event>
                <title>Host Configuration Elements (AAA and BBB sections extracted from NMON) - Last event of selected Period</title>
                <search>
                    <query>eventtype=nmon:config $host$ | head 1 | search $customsearch$</query>
                    <earliest>$timerange.earliest$</earliest>
                    <latest>$timerange.latest$</latest>
                </search>
                <option name="count">10</option>
                <option name="list.drilldown">full</option>
                <option name="list.wrap">1</option>
                <option name="maxLines">0</option>
                <option name="raw.drilldown">full</option>
                <option name="rowNumbers">0</option>
                <option name="table.drilldown">1</option>
                <option name="table.wrap">1</option>
                <option name="type">list</option>
                <fields>[]</fields>
            </event>
        </panel>
    </row>
</form>
