1<div id="query_prefs_dialog" class="dialog-med">
2  <div class="panel-header">
3    <h2>Run-Time Preferences</h2>
4  </div>
5
6  <form class="forms" name="prefs_form" novalidate>
7    <div class="panel-content">
8      <div class="formrow" ng-hide="mode == 'analytics'">
9        <input id="for-collect-timings" type="checkbox" ng-model="options.timings">
10        <label for="for-collect-timings" class="checkbox inline margin-right-zero">Collect query timings</label>
11        <span
12           class="fa-stack icon-info"
13           uib-tooltip="Collects per-operator query timings during query execution and displays them in the query plan. This preference is ON by default.">
14           <span class="icon fa-circle-thin fa-stack-2x"></span>
15           <span class="icon fa-info fa-stack-1x"></span>
16        </span>
17      </div>
18      <div class="formrow" ng-hide="mode == 'analytics'">
19        <input id="for-auto-infer" type="checkbox" ng-model="options.auto_infer">
20        <label for="for-auto-infer" class="checkbox inline margin-right-zero">Automatically infer bucket schemas</label>
21        <span
22           class="fa-stack icon-info"
23           uib-tooltip="When you launch the query workbench, automatically infer bucket schemas to make field names available for autocompletion. In some cases this may impact server performance.">
24           <span class="icon fa-circle-thin fa-stack-2x"></span>
25           <span class="icon fa-info fa-stack-1x"></span>
26        </span>
27      </div>
28      <div class="formrow" ng-hide="mode == 'analytics'">
29        <label class="inline">Max Parallelism</label>
30        <input type="text" id="pwd" ng-model="options.max_parallelism"></input>
31      </div>
32      <div class="formrow" ng-hide="mode == 'analytics'">
33        <label>Scan Consistency</label>
34        <select ng-model="options.scan_consistency">
35          <option value="not_bounded">not_bounded</option>
36          <option value="request_plus">request_plus</option>
37          <option value="statement_plus">statement_plus</option>
38        </select>
39      </div>
40      <div class="formrow">
41        <div class="row">
42          <label>Positional Parameters</label>
43          <span>
44            <button type="button" class="outline btn-small" title="Add a parameter" ng-click="options.positional_parameters.push('')">+</button>
45            <button type="button" class="outline btn-small" title="Remove parameter" ng-click="options.positional_parameters.splice(-1,1)" ng-disabled="options.positional_parameters.length < 1">-</button>
46          </span>
47        </div>
48          <div style="margin:.5rem 0;" ng-repeat="param in options.positional_parameters track by $index">
49            <span class="input-prepend">
50              ${{$index + 1}} = &nbsp;
51              <input type="text" name="position_{{$index}}" ng-model="options.positional_parameters[$index]" qw-valid-json>
52            </span>
53          </div>
54      </div>
55      <div class="formrow">
56        <div class="row">
57          <label>Named Parameters</label>
58          <span>
59            <button type="button" class="outline btn-small" title="Add parameter" ng-click="options.named_parameters.push({name:'',value:''})" >+</button>
60            <button type="button" class="outline btn-small" title="Remove parameter" ng-click="options.named_parameters.splice(-1,1)" ng-disabled="options.named_parameters.length < 1">-</button>
61          </span>
62        </div>
63        <div class="row" ng-repeat="param in options.named_parameters track by $index">
64          <div class="column width-6" style="margin-bottom:.5rem">
65            <label>name</label>
66            <span class="input-prepend">
67              <input type="text" ng-model="options.named_parameters[$index].name">
68            </span>
69          </div>
70          <div class="column width-6" style="margin-bottom:.5rem">
71            <label>value</label>
72            <input type="text" ng-model="options.named_parameters[$index].value"  qw-valid-json>
73          </div>
74        </div>
75      </div>
76
77      <div class="formrow">
78          <label>Query Timeout</label>
79          <input type="number" id="pwd" ng-model="options.query_timeout"></input>
80      </div>
81
82    </div>
83
84    <div class="panel-footer">
85      <a
86         href=""
87         ng-click="$dismiss('cancel')">
88        Cancel
89      </a>
90      <button type="submit" ng-click="$close('ok')" ng-disabled="prefs_form.$invalid">
91      Save Preferences</button>
92    </div>
93  </form>
94</div>
95