Commit e186c9b8 by Torkel Ödegaard

experimenting with new func editor

parent bd0f694f
......@@ -17,4 +17,21 @@ function (angular) {
};
}]);
angular
.module('kibana.directives')
.directive('dynamicWidth', function() {
return {
restrict: 'A',
link: function postLink(scope, elem, attrs) {
var startVal = scope.$eval(attrs.ngModel);
elem[0].style.width = ((startVal.length) * 11) + 'px';
elem.keyup(function() {
elem[0].style.width = ((elem.val().length * 11)) + 'px';
});
}
};
});
});
\ No newline at end of file
......@@ -76,9 +76,19 @@
</ul>
</li>
<li ng-repeat="func in functions">
<a class="grafana-target-segment grafana-target-function dropdown-toggle" bs-popover="'app/partials/graphite/funcEditor.html'" data-placement="bottom">
{{func.text}}
</a>
<!-- <a class="grafana-target-segment grafana-target-function dropdown-toggle"
bs-popover="'app/partials/graphite/funcEditor.html'"
data-placement="bottom">
{{func.def.name}}
</a> -->
<span class="grafana-target-segment grafana-target-function">
<span>{{func.def.name}}(</span><span ng-repeat="param in func.def.params">
<input type="text"
class="input-mini grafana-function-param-input"
dynamic-width
ng-model="func.params[$index]"></input>
</span><span>)</span>
</span>
</li>
<li class="dropdown" graphite-add-func>
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -281,6 +281,13 @@
}
}
input[type=text].grafana-function-param-input {
background: transparent;
border: none;
margin: 0;
padding: 0;
}
.grafana-target-controls-left {
list-style: none;
float: left;
......
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