Graphite: Fix for nonNegativeDerivative function, now possible to not include optional first parameter maxValue, Closes #702

This commit is contained in:
Torkel Ödegaard committed 2014-09-02 07:58:29 +02:00
1 parent 4ee455fad2
commit cb479d737b
4 files changed
+5 -8

No files matched your search

+2 -2
View File
@@ -147,7 +147,7 @@ function (angular, _, $) {
$funcLink.appendTo(elem);
_.each(funcDef.params, function(param, index) {
if (param.optional && !func.params[index]) {
if (param.optional && func.params.length !== index + 1) {
return;
}
@@ -239,4 +239,4 @@ function (angular, _, $) {
});
});
});
@@ -21,10 +21,6 @@ function (angular, _, $) {
}
};
$scope.onAppEvent('dashboard-saved', function() {
self.update({ fullscreen: false });
});
$scope.onAppEvent('$routeUpdate', function() {
var urlState = self.getQueryStringState();
if (self.needsSync(urlState)) {
+2 -2
View File
@@ -280,8 +280,8 @@ function (_) {
addFuncDef({
name: 'nonNegativeDerivative',
category: categories.Transform,
params: [{ name: "max value or 0", type: "int", }],
defaultParams: [0]
params: [{ name: "max value or 0", type: "int", optional: true }],
defaultParams: ['']
});
addFuncDef({