mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
ux(): updated graphite editor
This commit is contained in:
@@ -11,10 +11,10 @@ function (angular, _, $, gfunc) {
|
|||||||
.module('grafana.directives')
|
.module('grafana.directives')
|
||||||
.directive('graphiteAddFunc', function($compile) {
|
.directive('graphiteAddFunc', function($compile) {
|
||||||
var inputTemplate = '<input type="text"'+
|
var inputTemplate = '<input type="text"'+
|
||||||
' class="tight-form-input input-medium tight-form-input"' +
|
' class="gf-form-input"' +
|
||||||
' spellcheck="false" style="display:none"></input>';
|
' spellcheck="false" style="display:none"></input>';
|
||||||
|
|
||||||
var buttonTemplate = '<a class="tight-form-item tight-form-func dropdown-toggle"' +
|
var buttonTemplate = '<a class="gf-form-label query-part dropdown-toggle"' +
|
||||||
' tabindex="1" gf-dropdown="functionMenu" data-toggle="dropdown">' +
|
' tabindex="1" gf-dropdown="functionMenu" data-toggle="dropdown">' +
|
||||||
'<i class="fa fa-plus"></i></a>';
|
'<i class="fa fa-plus"></i></a>';
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,25 @@
|
|||||||
<query-editor-row ctrl="ctrl">
|
<query-editor-row ctrl="ctrl">
|
||||||
|
|
||||||
<li class="tight-form-flex-wrapper" ng-show="ctrl.target.textEditor">
|
<div class="gf-form" ng-show="ctrl.target.textEditor">
|
||||||
<input type="text" class="tight-form-clear-input" style="width: 100%;" ng-model="ctrl.target.target" give-focus="ctrl.target.textEditor" spellcheck='false' ng-model-onblur ng-change="ctrl.targetTextChanged()"></input>
|
<input type="text" class="gf-form-input" ng-model="ctrl.target.query" spellcheck="false" ng-blur="ctrl.refresh()"></input>
|
||||||
</li>
|
</div>
|
||||||
|
|
||||||
<li ng-hide-start="ctrl.target.textEditor"></li>
|
<div ng-hide="ctrl.target.textEditor">
|
||||||
|
<div class="gf-form-inline">
|
||||||
|
<div ng-repeat="segment in ctrl.segments" role="menuitem" class="gf-form">
|
||||||
|
<metric-segment segment="segment" get-options="ctrl.getAltSegments($index)" on-change="ctrl.segmentValueChanged(segment, $index)"></metric-segment>
|
||||||
|
</div>
|
||||||
|
|
||||||
<li ng-repeat="segment in ctrl.segments" role="menuitem">
|
<div ng-repeat="func in ctrl.functions" class="gf-form">
|
||||||
<metric-segment segment="segment" get-options="ctrl.getAltSegments($index)" on-change="ctrl.segmentValueChanged(segment, $index)"></metric-segment>
|
<span graphite-func-editor class="gf-form-label query-part"></span>
|
||||||
</li>
|
</div>
|
||||||
<li ng-repeat="func in ctrl.functions">
|
|
||||||
<span graphite-func-editor class="tight-form-item tight-form-func">
|
|
||||||
</span>
|
|
||||||
</li>
|
|
||||||
<li class="dropdown" graphite-add-func>
|
|
||||||
</li>
|
|
||||||
|
|
||||||
<li ng-hide-end></li>
|
<div class="gf-form dropdown">
|
||||||
|
<span graphite-add-func></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="gf-form-filler"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</query-editor-row>
|
</query-editor-row>
|
||||||
|
|||||||
Reference in New Issue
Block a user