<div class="panel-query-meta row-fluid" style="width:260px">

  <style>
    .panel-query-meta fieldset label {
      margin-top: 3px;
    }
  </style>

  <fieldset>
    <select class="input-small" ng-model="querySrv.list[id].type" ng-change="typeChange(querySrv.list[id])">
      <option ng-repeat="type in queryTypes|esVersion:'require'">{{type.name}}</option>
    </select> &nbsp<a href="" class="small" ng-click="queryHelp(querySrv.list[id].type)"> About the {{querySrv.list[id].type}} query</a>

    <hr class="small">

    <label class="small">Legend value</label>
    <input type="text" ng-model="querySrv.list[id].alias" placeholder="Alias...">
  </fieldset>

  <div ng-include src="queryConfig(querySrv.list[id].type)"></div>


  <hr class="small">
  <div>
    <i ng-repeat="color in querySrv.colors" class="pointer" ng-class="{'icon-circle-blank':querySrv.list[id].color == color,'icon-circle':querySrv.list[id].color != color}" ng-style="{color:color}" ng-click="querySrv.list[id].color = color;render();"> </i>
  </div>


  <div class="pull-right">
    <a class="btn btn-mini" ng-click="querySrv.list[id].enable=false;dashboard.refresh();dismiss();" class="pointer">Deactivate</a>
    <a class="btn btn-mini" ng-class="{active:querySrv.list[id].pin}" ng-click="toggle_pin(id);dismiss();" class="pointer">Pin <i class="icon-pushpin"></i></a>
    <input class="btn btn-mini" ng-click="dashboard.refresh();dismiss();" type="submit"/ value="Close">
  </div>
</div>