简体   繁体   English

下拉列表中的索引器分组

[英]Indexer grouping in dropdown

I have 20 indexes where we want to display them in drop down in grouping manner..how can we group them in a query?我有 20 个索引,我们希望以分组方式在下拉列表中显示它们。我们如何在查询中对它们进行分组? for example:-例如:-

index1,Index2,index3 should come with name abc.... Index 4, index 2, index 5 should come with name efg... index1,Index2,index3 应该带有名称 abc.... 索引 4、索引 2、索引 5 应该带有名称 efg...

so in drop down we should see only value as abc, efg.所以在下拉菜单中,我们应该只看到 abc, efg 的值。 so once will select abc the below pannel should show graph accordingly..所以一旦 select abc 下面的面板应该相应地显示图形..

Putting the following at the start of your form/dashboard will give you a dropdown list, from which you have options abc and def , corresponding to the set of indexes you mentioned.将以下内容放在表单/仪表板的开头将为您提供一个下拉列表,您可以从中选择abcdef ,对应于您提到的索引集。

<form>
  <label>Index Group Test</label>
  <fieldset submitButton="false">
    <input type="dropdown" token="indexes">
      <label>Index Group</label>
      <choice value="index=index1 OR index=index2 OR index=index3">abc</choice>
      <choice value="index=index4 OR index=index5 OR index=index6">def</choice>
      <selectFirstChoice>true</selectFirstChoice>
    </input>
  </fieldset>
</form>

You would then use the token $indexes$ in your query to get the selected index data.然后,您将在查询中使用标记$indexes$来获取选定的索引数据。 For example,例如,

<form>
  <label>Index Group Test</label>
  <fieldset submitButton="false">
    <input type="dropdown" token="indexes">
      <label>Index Group</label>
      <choice value="index=index1 OR index=index2 OR index=index3">abc</choice>
      <choice value="index=index4 OR index=index5 OR index=index6">def</choice>
      <selectFirstChoice>true</selectFirstChoice>
    </input>
  </fieldset>
  <row>
    <panel>
      <event>
        <title>Event Data</title>
        <search>
          <query>$indexes$</query>
          <earliest>-24h@h</earliest>
          <latest>now</latest>
        </search>
        <option name="list.drilldown">none</option>
      </event>
    </panel>
  </row>
</form>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM