@@ -181,19 +181,8 @@ <h5 class="section-heading">Query Options</h5>
181
181
< select class ="gf-form-input " ng-model ="current.refresh " ng-options ="f.value as f.text for f in refreshOptions "> </ select >
182
182
</ div >
183
183
</ div >
184
- < div class ="gf-form max-width-21 ">
185
- < span class ="gf-form-label width-7 ">
186
- Sort
187
- < info-popover mode ="right-normal ">
188
- How to sort the values of this variable.
189
- </ info-popover >
190
- </ span >
191
- < div class ="gf-form-select-wrapper max-width-14 ">
192
- < select class ="gf-form-input " ng-model ="current.sort " ng-options ="f.value as f.text for f in sortOptions " ng-change ="runQuery() "> </ select >
193
- </ div >
194
- </ div >
195
- </ div >
196
- < div class ="gf-form ">
184
+ </ div >
185
+ < div class ="gf-form ">
197
186
< span class ="gf-form-label width-7 "> Query</ span >
198
187
< input type ="text " class ="gf-form-input " ng-model ='current.query ' placeholder ="metric name or tags query " ng-model-onblur ng-change ="runQuery() "> </ input >
199
188
</ div >
@@ -206,94 +195,105 @@ <h5 class="section-heading">Query Options</h5>
206
195
</ span >
207
196
< input type ="text " class ="gf-form-input " ng-model ='current.regex ' placeholder ="/.*-(.*)-.*/ " ng-model-onblur ng-change ="runQuery() "> </ input >
208
197
</ div >
209
- </ div >
198
+ < div class ="gf-form max-width-21 ">
199
+ < span class ="gf-form-label width-7 ">
200
+ Sort
201
+ < info-popover mode ="right-normal ">
202
+ How to sort the values of this variable.
203
+ </ info-popover >
204
+ </ span >
205
+ < div class ="gf-form-select-wrapper max-width-14 ">
206
+ < select class ="gf-form-input " ng-model ="current.sort " ng-options ="f.value as f.text for f in sortOptions " ng-change ="runQuery() "> </ select >
207
+ </ div >
208
+ </ div >
209
+ </ div >
210
210
211
- < div ng-show ="current.type === 'datasource' " class ="gf-form-group ">
212
- < h5 class ="section-heading "> Data source options</ h5 >
211
+ < div ng-show ="current.type === 'datasource' " class ="gf-form-group ">
212
+ < h5 class ="section-heading "> Data source options</ h5 >
213
213
214
- < div class ="gf-form ">
215
- < label class ="gf-form-label width-12 "> Type</ label >
216
- < div class ="gf-form-select-wrapper max-width-18 ">
217
- < select class ="gf-form-input " ng-model ="current.query " ng-options ="f.value as f.text for f in datasourceTypes " ng-change ="runQuery() "> </ select >
218
- </ div >
219
- </ div >
214
+ < div class ="gf-form ">
215
+ < label class ="gf-form-label width-12 "> Type</ label >
216
+ < div class ="gf-form-select-wrapper max-width-18 ">
217
+ < select class ="gf-form-input " ng-model ="current.query " ng-options ="f.value as f.text for f in datasourceTypes " ng-change ="runQuery() "> </ select >
218
+ </ div >
219
+ </ div >
220
220
221
- < div class ="gf-form ">
222
- < label class ="gf-form-label width-12 ">
223
- Instance name filter
224
- < info-popover mode ="right-normal ">
225
- Regex filter for which data source instances to choose from in
226
- the variable value dropdown. Leave empty for all.
227
- < br > < br >
228
- Example: < code > /^prod/</ code >
221
+ < div class ="gf-form ">
222
+ < label class ="gf-form-label width-12 ">
223
+ Instance name filter
224
+ < info-popover mode ="right-normal ">
225
+ Regex filter for which data source instances to choose from in
226
+ the variable value dropdown. Leave empty for all.
227
+ < br > < br >
228
+ Example: < code > /^prod/</ code >
229
229
230
- </ info-popover >
231
- </ label >
232
- < input type ="text " class ="gf-form-input max-width-18 " ng-model ='current.regex ' placeholder ="/.*-(.*)-.*/ " ng-model-onblur ng-change ="runQuery() "> </ input >
233
- </ div >
234
- </ div >
230
+ </ info-popover >
231
+ </ label >
232
+ < input type ="text " class ="gf-form-input max-width-18 " ng-model ='current.regex ' placeholder ="/.*-(.*)-.*/ " ng-model-onblur ng-change ="runQuery() "> </ input >
233
+ </ div >
234
+ </ div >
235
235
236
236
< div ng-show ="current.type === 'adhoc' " class ="gf-form-group ">
237
- < h5 class ="section-heading "> Options</ h5 >
237
+ < h5 class ="section-heading "> Options</ h5 >
238
238
239
239
< div class ="gf-form max-width-21 ">
240
240
< span class ="gf-form-label width-8 "> Data source</ span >
241
241
< div class ="gf-form-select-wrapper max-width-14 ">
242
242
< select class ="gf-form-input " ng-model ="current.datasource " ng-options ="f.value as f.name for f in datasources "> </ select >
243
243
</ div >
244
244
</ div >
245
- </ div >
245
+ </ div >
246
246
247
- < div class ="section gf-form-group " ng-show ="showSelectionOptions() ">
248
- < h5 class ="section-heading "> Selection Options</ h5 >
249
- < div class ="section ">
250
- < gf-form-switch class ="gf-form "
251
- label ="Multi-value "
252
- label-class ="width-10 "
253
- tooltip ="Enables multiple values to be selected at the same time "
254
- checked ="current.multi "
255
- on-change ="runQuery() ">
256
- </ gf-form-switch >
257
- < gf-form-switch class ="gf-form "
258
- label ="Include All option "
259
- label-class ="width-10 "
260
- checked ="current.includeAll "
261
- on-change ="runQuery() ">
262
- </ gf-form-switch >
263
- </ div >
264
- < div class ="gf-form " ng-if ="current.includeAll ">
265
- < span class ="gf-form-label width-10 "> Custom all value</ span >
266
- < input type ="text " class ="gf-form-input max-width-15 " ng-model ='current.allValue ' placeholder ="blank = auto "> </ input >
267
- </ div >
268
- </ div >
247
+ < div class ="section gf-form-group " ng-show ="current.supportsMulti ">
248
+ < h5 class ="section-heading "> Selection Options</ h5 >
249
+ < div class ="section ">
250
+ < gf-form-switch class ="gf-form "
251
+ label ="Multi-value "
252
+ label-class ="width-10 "
253
+ tooltip ="Enables multiple values to be selected at the same time "
254
+ checked ="current.multi "
255
+ on-change ="runQuery() ">
256
+ </ gf-form-switch >
257
+ < gf-form-switch class ="gf-form "
258
+ label ="Include All option "
259
+ label-class ="width-10 "
260
+ checked ="current.includeAll "
261
+ on-change ="runQuery() ">
262
+ </ gf-form-switch >
263
+ </ div >
264
+ < div class ="gf-form " ng-if ="current.includeAll ">
265
+ < span class ="gf-form-label width-10 "> Custom all value</ span >
266
+ < input type ="text " class ="gf-form-input max-width-15 " ng-model ='current.allValue ' placeholder ="blank = auto "> </ input >
267
+ </ div >
268
+ </ div >
269
269
270
- < div class ="gf-form-group " ng-if ="current.type === 'query' ">
271
- < h5 > Value groups/tags (Experimental feature)</ h5 >
272
- < div class ="gf-form ">
273
- < editor-checkbox text ="Enable " model ="current.useTags " change ="runQuery() "> </ editor-checkbox >
274
- </ div >
275
- < div class ="gf-form last " ng-if ="current.useTags ">
276
- < span class ="gf-form-label width-10 "> Tags query</ span >
277
- < input type ="text " class ="gf-form-input " ng-model ='current.tagsQuery ' placeholder ="metric name or tags query " ng-model-onblur > </ input >
278
- </ div >
279
- < div class ="gf-form " ng-if ="current.useTags ">
280
- < li class ="gf-form-label width-10 "> Tag values query</ li >
281
- < input type ="text " class ="gf-form-input " ng-model ='current.tagValuesQuery ' placeholder ="apps.$tag.* " ng-model-onblur > </ input >
282
- </ div >
283
- </ div >
270
+ < div class ="gf-form-group " ng-if ="current.type === 'query' ">
271
+ < h5 > Value groups/tags (Experimental feature)</ h5 >
272
+ < div class ="gf-form ">
273
+ < editor-checkbox text ="Enable " model ="current.useTags " change ="runQuery() "> </ editor-checkbox >
274
+ </ div >
275
+ < div class ="gf-form last " ng-if ="current.useTags ">
276
+ < span class ="gf-form-label width-10 "> Tags query</ span >
277
+ < input type ="text " class ="gf-form-input " ng-model ='current.tagsQuery ' placeholder ="metric name or tags query " ng-model-onblur > </ input >
278
+ </ div >
279
+ < div class ="gf-form " ng-if ="current.useTags ">
280
+ < li class ="gf-form-label width-10 "> Tag values query</ li >
281
+ < input type ="text " class ="gf-form-input " ng-model ='current.tagValuesQuery ' placeholder ="apps.$tag.* " ng-model-onblur > </ input >
282
+ </ div >
283
+ </ div >
284
284
285
- < div class ="gf-form-group ">
286
- < h5 > Preview of values (shows max 20)</ h5 >
287
- < div class ="gf-form-inline ">
288
- < div class ="gf-form " ng-repeat ="option in current.options | limitTo: 20 ">
289
- < span class ="gf-form-label "> {{option.text}}</ span >
290
- </ div >
291
- </ div >
292
- </ div >
293
- </ div >
285
+ < div class ="gf-form-group ">
286
+ < h5 > Preview of values (shows max 20)</ h5 >
287
+ < div class ="gf-form-inline ">
288
+ < div class ="gf-form " ng-repeat ="option in current.options | limitTo: 20 ">
289
+ < span class ="gf-form-label "> {{option.text}}</ span >
290
+ </ div >
291
+ </ div >
292
+ </ div >
293
+ </ div >
294
294
295
- < div class ="gf-form-button-row p-y-0 ">
296
- < button type ="button " class ="btn btn-success " ng-show ="mode === 'edit' " ng-click ="update(); "> Update</ button >
295
+ < div class ="gf-form-button-row p-y-0 ">
296
+ < button type ="button " class ="btn btn-success " ng-show ="mode === 'edit' " ng-click ="update(); "> Update</ button >
297
297
< button type ="button " class ="btn btn-success " ng-show ="mode === 'new' " ng-click ="add(); "> Add</ button >
298
298
</ div >
299
299
</ div >
0 commit comments