From 3059870b485baecba04cfe27c7176afd1da41db6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Sat, 21 Dec 2013 09:53:28 +0100 Subject: [PATCH] func editor starting to work --- src/app/controllers/graphiteTarget.js | 5 +- src/app/panels/graphite/editor.html | 5 +- src/app/panels/graphite/funcEditor.html | 69 +++++++++++++++++++++++++ 3 files changed, 76 insertions(+), 3 deletions(-) create mode 100644 src/app/panels/graphite/funcEditor.html diff --git a/src/app/controllers/graphiteTarget.js b/src/app/controllers/graphiteTarget.js index 530fd6ef124..157c0635867 100644 --- a/src/app/controllers/graphiteTarget.js +++ b/src/app/controllers/graphiteTarget.js @@ -132,11 +132,12 @@ function (angular, _, config) { $scope.functions = _.without($scope.functions, func); }; - $scope.functionParmsChanged = function(func) { - func.text = func.name + '('; + $scope.functionParamsChanged = function(func) { + func.text = func.def.name + '('; _.each(func.def.params, function(param) { func.text += func.params[param.name]; }); + func.text += ')'; }; $scope.addFunction = function() { diff --git a/src/app/panels/graphite/editor.html b/src/app/panels/graphite/editor.html index 506acb11496..ea2ee724310 100644 --- a/src/app/panels/graphite/editor.html +++ b/src/app/panels/graphite/editor.html @@ -95,8 +95,11 @@