Commit 91047ffa by bergquist

tech(singlestat): convert to gf-form

parent b42064ac
<div class="editor-row"> <div class="editor-row">
<div class="section tight-form-container" style="margin-bottom: 20px"> <div class="gf-form-group">
<div class="tight-form"> <div class="gf-form">
<ul class="tight-form-list"> <span class="gf-form-label">
<li class="tight-form-item"> Type
Type </span>
</li> <div class="gf-form-select-wrapper">
<li> <select class="gf-form-input" ng-model="ctrl.panel.mappingType"
<select class="input-medium tight-form-input" ng-model="ctrl.panel.mappingType" ng-options="f.value as f.name for f in ctrl.panel.mappingTypes" ng-change="ctrl.render()"></select>
ng-options="f.value as f.name for f in ctrl.panel.mappingTypes" ng-change="ctrl.render()"></select> </div>
</li> </div>
</ul> </div>
<div class="clearfix"></div>
</div>
</div>
</div> </div>
<div class="editor-row" ng-if="ctrl.panel.mappingType==1"> <div class="editor-row" ng-if="ctrl.panel.mappingType==1">
<div class="section" style="margin-bottom: 20px"> <h5 class="page-heading">Set valuea mappings</h5>
<div class="tight-form last"> <div class="gf-form-group">
<ul class="tight-form-list"> <div class="gf-form" ng-repeat="map in ctrl.panel.valueMaps">
<li class="tight-form-item"> <span class="gf-form-label">
<strong>Value to text mapping</strong> <i class="fa fa-remove pointer" ng-click="ctrl.removeValueMap(map)"></i>
</li> </span>
<li class="tight-form-item" ng-repeat-start="map in ctrl.panel.valueMaps"> <input type="text" ng-model="map.value" placeholder="value" class="gf-form-input max-width-6" ng-blur="ctrl.render()">
<i class="fa fa-remove pointer" ng-click="ctrl.removeValueMap(map)"></i> <span class="gf-form-label">
</li> <i class="fa fa-arrow-right"></i>
<li> </span>
<input type="text" ng-model="map.value" placeholder="value" class="input-mini tight-form-input" ng-blur="ctrl.render()"> <input type="text" placeholder="text" ng-model="map.text" class="gf-form-input max-width-8" ng-blur="ctrl.render()">
</li> </div>
<li class="tight-form-item">
<i class="fa fa-arrow-right"></i>
</li>
<li ng-repeat-end>
<input type="text" placeholder="text" ng-model="map.text" class="input-mini tight-form-input" ng-blur="ctrl.render()">
</li>
<li> <div class="gf-form-button-row">
<a class="pointer tight-form-item last" ng-click="ctrl.addValueMap();"> <button class="btn btn-inverse" ng-click="ctrl.addValueMap();">
<i class="fa fa-plus"></i> <i class="fa fa-plus"></i>
</a> Add a value mapping
</li> </button>
</div>
</ul> </div>
<div class="clearfix"></div>
</div>
</div>
</div> </div>
<div class="editor-row" ng-if="ctrl.panel.mappingType==2"> <div class="editor-row" ng-if="ctrl.panel.mappingType==2">
<h5>Set range mappings</h5> <h5 class="page-heading">Set range mappings</h5>
<div class="section gf-form-group"> <div class="gf-form-group">
<div class="tight-form-container"> <div class="gf-form" ng-repeat="rangeMap in ctrl.panel.rangeMaps">
<div class="tight-form" ng-repeat="rangeMap in ctrl.panel.rangeMaps"> <span class="gf-form-label">
<ul class="tight-form-list"> <i class="fa fa-remove pointer" ng-click="ctrl.removeRangeMap(rangeMap)"></i>
<li class="tight-form-item"> </span>
<i class="fa fa-remove pointer" ng-click="ctrl.removeRangeMap(rangeMap)"></i> <span class="gf-form-label">From</span>
</li> <input type="text" ng-model="rangeMap.from" class="gf-form-input max-width-6" ng-blur="ctrl.render()">
<li class="tight-form-item"> <span class="gf-form-label">To</span>
From <input type="text" ng-model="rangeMap.to" class="gf-form-input max-width-6" ng-blur="ctrl.render()">
</li> <span class="gf-form-label">Text</span>
<li> <input type="text" ng-model="rangeMap.text" class="gf-form-input max-width-8" ng-blur="ctrl.render()">
<input type="text" ng-model="rangeMap.from" class="input-mini tight-form-input" ng-blur="ctrl.render()"> </div>
</li>
<li class="tight-form-item">
To
</li>
<li>
<input type="text" ng-model="rangeMap.to" class="input-mini tight-form-input" ng-blur="ctrl.render()">
</li>
<li class="tight-form-item">
Text
</li>
<li>
<input type="text" ng-model="rangeMap.text" class="input-mini tight-form-input" ng-blur="ctrl.render()">
</li>
</ul>
<div class="clearfix"></div>
</div>
</div>
<button class="btn btn-inverse" style="margin-top: 20px" ng-click="ctrl.addRangeMap()"> <div class="gf-form-button-row">
Add a range mapping <button class="btn btn-inverse" ng-click="ctrl.addRangeMap()">
</button> <i class="fa fa-plus"></i>
</div> Add a range mapping
</button>
</div>
</div>
</div> </div>
...@@ -81,7 +81,7 @@ class SingleStatCtrl extends MetricsPanelCtrl { ...@@ -81,7 +81,7 @@ class SingleStatCtrl extends MetricsPanelCtrl {
onInitEditMode() { onInitEditMode() {
this.fontSizes = ['20%', '30%','50%','70%','80%','100%', '110%', '120%', '150%', '170%', '200%']; this.fontSizes = ['20%', '30%','50%','70%','80%','100%', '110%', '120%', '150%', '170%', '200%'];
this.addEditorTab('Options', 'public/app/plugins/panel/singlestat/editor.html', 2); this.addEditorTab('Options', 'public/app/plugins/panel/singlestat/editor.html', 2);
this.addEditorTab('Mappings', 'public/app/plugins/panel/singlestat/mappings.html', 3); this.addEditorTab('Value Mappings', 'public/app/plugins/panel/singlestat/mappings.html', 3);
this.unitFormats = kbn.getUnitFormats(); this.unitFormats = kbn.getUnitFormats();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment