|
@@ -71,29 +71,34 @@
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div ng-if="mode === 'edit' || mode === 'new'">
|
|
<div ng-if="mode === 'edit' || mode === 'new'">
|
|
|
- <h5>Variable</h5>
|
|
|
|
|
|
|
+ <h5 class="section-heading">Variable</h5>
|
|
|
<div class="gf-form-group">
|
|
<div class="gf-form-group">
|
|
|
<div class="gf-form-inline">
|
|
<div class="gf-form-inline">
|
|
|
<div class="gf-form">
|
|
<div class="gf-form">
|
|
|
- <span class="gf-form-label width-7">Name</span>
|
|
|
|
|
- <input type="text" class="gf-form-input max-width-14" placeholder="name" ng-model='current.name'></input>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="gf-form">
|
|
|
|
|
- <span class="gf-form-label width-7">Type</span>
|
|
|
|
|
- <div class="gf-form-select-wrapper max-width-10">
|
|
|
|
|
- <select class="gf-form-input max-width-10" ng-model="current.type" ng-options="f for f in ['query', 'interval', 'custom']" ng-change="typeChanged()"></select>
|
|
|
|
|
|
|
+ <span class="gf-form-label width-7">Name</span>
|
|
|
|
|
+ <input type="text" class="gf-form-input max-width-14" placeholder="name" ng-model='current.name'></input>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="gf-form">
|
|
|
|
|
+ <span class="gf-form-label width-7">Type</span>
|
|
|
|
|
+ <div class="gf-form-select-wrapper max-width-10">
|
|
|
|
|
+ <select class="gf-form-input max-width-10" ng-model="current.type" ng-options="f for f in ['query', 'interval', 'custom']" ng-change="typeChanged()"></select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="gf-form">
|
|
|
|
|
+ <span class="gf-form-label width-7" ng-show="current.type === 'query'">Data source</span>
|
|
|
|
|
+ <div class="gf-form-select-wrapper" ng-show="current.type === 'query'">
|
|
|
|
|
+ <select class="gf-form-input max-width-14" ng-model="current.datasource" ng-options="f.value as f.name for f in datasources"></select>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="gf-form">
|
|
<div class="gf-form">
|
|
|
- <span class="gf-form-label width-7" ng-show="current.type === 'query'">Data source</span>
|
|
|
|
|
- <div class="gf-form-select-wrapper" ng-show="current.type === 'query'">
|
|
|
|
|
- <select class="gf-form-input max-width-14" ng-model="current.datasource" ng-options="f.value as f.name for f in datasources"></select>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <span class="gf-form-label width-7">Label</span>
|
|
|
|
|
+ <input type="text" class="gf-form-input max-width-14" ng-model='current.label' placeholder="optional display name"></input>
|
|
|
|
|
+ <editor-checkbox class="width-13" text="Hide label" model="current.hideLabel" change="runQuery()"></editor-checkbox>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <h5>Value Options</h5>
|
|
|
|
|
-
|
|
|
|
|
|
|
+ <h5 class="section-heading">Value Options</h5>
|
|
|
<div ng-show="current.type === 'interval'" class="gf-form-group">
|
|
<div ng-show="current.type === 'interval'" class="gf-form-group">
|
|
|
<div class="gf-form">
|
|
<div class="gf-form">
|
|
|
<span class="gf-form-label width-7">Values</span>
|
|
<span class="gf-form-label width-7">Values</span>
|
|
@@ -116,16 +121,16 @@
|
|
|
<input type="text" class="gf-form-input max-width-22" ng-model='current.query' ng-blur="runQuery()" placeholder="1, 10, 20, myvalue"></input>
|
|
<input type="text" class="gf-form-input max-width-22" ng-model='current.query' ng-blur="runQuery()" placeholder="1, 10, 20, myvalue"></input>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="gf-form ">
|
|
<div class="gf-form ">
|
|
|
- <editor-checkbox class="width-13" text="All value" model="current.includeAll" change="runQuery()"></editor-checkbox>
|
|
|
|
|
- <input ng-show="current.includeAll" type="text" class="gf-form-input max-width-22" ng-model='current.options[0].value' style="margin-left: 4px;"></input>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="gf-form">
|
|
|
|
|
- <span class="gf-form-label width-13" ng-show="current.includeAll">All format</span>
|
|
|
|
|
- <div class="gf-form-select-wrapper max-width-10" ng-show="current.includeAll">
|
|
|
|
|
- <select class="gf-form-input" ng-model="current.allFormat" ng-change="runQuery()" ng-options="f for f in ['glob', 'wildcard', 'regex wildcard', 'regex values', 'lucene', 'pipe']"></select>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <editor-checkbox class="width-13" text="All value" model="current.includeAll" change="runQuery()"></editor-checkbox>
|
|
|
|
|
+ <input ng-show="current.includeAll" type="text" class="gf-form-input max-width-22" ng-model='current.options[0].value' style="margin-left: 4px;"></input>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="gf-form">
|
|
|
|
|
+ <span class="gf-form-label width-13" ng-show="current.includeAll">All format</span>
|
|
|
|
|
+ <div class="gf-form-select-wrapper max-width-10" ng-show="current.includeAll">
|
|
|
|
|
+ <select class="gf-form-input" ng-model="current.allFormat" ng-change="runQuery()" ng-options="f for f in ['glob', 'wildcard', 'regex wildcard', 'regex values', 'lucene', 'pipe']"></select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
<div ng-show="current.type === 'query'" class="gf-form-group">
|
|
<div ng-show="current.type === 'query'" class="gf-form-group">
|
|
|
<div class="gf-form">
|
|
<div class="gf-form">
|
|
@@ -140,42 +145,35 @@
|
|
|
<input type="text" class="gf-form-input" ng-model='current.regex' placeholder="/.*-(.*)-.*/" ng-model-onblur ng-change="runQuery()"></input>
|
|
<input type="text" class="gf-form-input" ng-model='current.regex' placeholder="/.*-(.*)-.*/" ng-model-onblur ng-change="runQuery()"></input>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="gf-form">
|
|
<div class="gf-form">
|
|
|
- <editor-checkbox class="width-13" text="All value" model="current.includeAll" change="runQuery()"></editor-checkbox>
|
|
|
|
|
- <input ng-show="current.includeAll" type="text" class="gf-form-input" ng-model='current.options[0].value'></input>
|
|
|
|
|
- <span class="gf-form-label" ng-show="current.includeAll">All format</span>
|
|
|
|
|
- <div class="gf-form-select-wrapper max-width-10" ng-show="current.includeAll">
|
|
|
|
|
- <select class="gf-form-input" ng-model="current.allFormat" ng-change="runQuery()" ng-options="f for f in ['glob', 'wildcard', 'regex wildcard', 'regex values', 'lucene', 'pipe']"></select>
|
|
|
|
|
|
|
+ <span class="gf-form-label width-7">All value</span>
|
|
|
|
|
+ <editor-checkbox class="width-13" text="Enable" model="current.includeAll" change="runQuery()"></editor-checkbox>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="gf-form-inline" ng-show="current.includeAll">
|
|
|
|
|
+ <div class="gf-form">
|
|
|
|
|
+ <span class="gf-form-label width-7">All format</span>
|
|
|
|
|
+ <div class="gf-form-select-wrapper">
|
|
|
|
|
+ <select class="gf-form-input" ng-model="current.allFormat" ng-change="runQuery()" ng-options="f for f in ['glob', 'wildcard', 'regex wildcard', 'regex values', 'lucene', 'pipe']"></select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="gf-form max-width-30">
|
|
|
|
|
+ <span class="gf-form-label width-7">All value</span>
|
|
|
|
|
+ <input type="text" class="gf-form-input" ng-model='current.options[0].value'></input>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
-
|
|
|
|
|
<div class="gf-form">
|
|
<div class="gf-form">
|
|
|
- <editor-checkbox class="width-13" text="Refresh on load" model="current.refresh"></editor-checkbox>
|
|
|
|
|
|
|
+ <span class="gf-form-label width-7">Update</span>
|
|
|
|
|
+ <editor-checkbox text="On Dashboard Load" model="current.refresh"></editor-checkbox>
|
|
|
<tip>Check if you want values to be updated on dashboard load, will slow down dashboard load time</tip>
|
|
<tip>Check if you want values to be updated on dashboard load, will slow down dashboard load time</tip>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div class="row">
|
|
|
|
|
- <div class="col-md-6">
|
|
|
|
|
- <div class="gf-form-group">
|
|
|
|
|
- <h5>Display options</h5>
|
|
|
|
|
- <div class="gf-form">
|
|
|
|
|
- <span class="gf-form-label width-8">Variable Label</span>
|
|
|
|
|
- <input type="text" class="gf-form-input max-width-12" ng-model='current.label' placeholder=""></input>
|
|
|
|
|
- <editor-checkbox class="width-13" text="Hide label" model="current.hideLabel" change="runQuery()"></editor-checkbox>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
- <div class="col-md-6" ng-hide="current.type === 'interval'">
|
|
|
|
|
- <div class="gf-form-group" >
|
|
|
|
|
- <h5>Multi-value selection <tip>Enables multiple values to be selected at the same time</tip></h5>
|
|
|
|
|
- <div class="gf-form">
|
|
|
|
|
- <editor-checkbox text="Enable" model="current.multi" change="runQuery()"></editor-checkbox>
|
|
|
|
|
-
|
|
|
|
|
- <span class="gf-form-label" ng-show="current.multi">Multi format</span>
|
|
|
|
|
- <div class="gf-form-select-wrapper max-width-10" ng-show="current.multi">
|
|
|
|
|
- <select class="gf-form-input" ng-model="current.multiFormat" ng-change="runQuery()" ng-options="f for f in ['glob', 'regex values', 'lucene', 'pipe']"></select>
|
|
|
|
|
- </div>
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div class="gf-form-group" >
|
|
|
|
|
+ <h5 class="section-heading">Multi-value selection <tip>Enables multiple values to be selected at the same time</tip></h5>
|
|
|
|
|
+ <div class="gf-form">
|
|
|
|
|
+ <editor-checkbox text="Enable" model="current.multi" change="runQuery()"></editor-checkbox>
|
|
|
|
|
+ <span class="gf-form-label" ng-show="current.multi">Multi format</span>
|
|
|
|
|
+ <div class="gf-form-select-wrapper max-width-10" ng-show="current.multi">
|
|
|
|
|
+ <select class="gf-form-input" ng-model="current.multiFormat" ng-change="runQuery()" ng-options="f for f in ['glob', 'regex values', 'lucene', 'pipe']"></select>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -205,7 +203,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div class="gf-form-button-row" style="margin-top: 20px">
|
|
|
|
|
|
|
+ <div class="gf-form-button-row p-y-0">
|
|
|
<button type="button" class="btn btn-success" ng-show="mode === 'edit'" ng-click="update();">Update</button>
|
|
<button type="button" class="btn btn-success" ng-show="mode === 'edit'" ng-click="update();">Update</button>
|
|
|
<button type="button" class="btn btn-success" ng-show="mode === 'new'" ng-click="add();">Add</button>
|
|
<button type="button" class="btn btn-success" ng-show="mode === 'new'" ng-click="add();">Add</button>
|
|
|
</div>
|
|
</div>
|