Просмотр исходного кода

Merge pull request #194 from danharvey/add-hitcount-function

Added hitcount Transform function.
Torkel Ödegaard 11 лет назад
Родитель
Сommit
336cf768d8
2 измененных файлов с 12 добавлено и 5 удалено
  1. 5 5
      CONTRIBUTING.md
  2. 7 0
      src/app/services/graphite/gfunc.js

+ 5 - 5
CONTRIBUTING.md

@@ -3,12 +3,12 @@ And if you have time clone this repo and submit a pull request and help me make
 kickass metrics & devops dashboard we all dream about!
 
 Prerequisites:
-Nodejs (for jshint & grunt & development server)
+ - Nodejs (for jshint & grunt & development server)
 
 Clone repository:
 
-npm install
-grunt server (starts development web server in src folder)
-grunt (runs jshint and less -> css compilation)
+    npm install
+    grunt server (starts development web server in src folder)
+    grunt (runs jshint and less -> css compilation)
 
-Please remember to run grunt before doing pull request to verify that your code passes all the jshint validations.
+Please remember to run grunt before doing pull request to verify that your code passes all the jshint validations.

+ 7 - 0
src/app/services/graphite/gfunc.js

@@ -213,6 +213,13 @@ function (_) {
     category: categories.Transform,
   });
 
+  addFuncDef({
+    name: 'hitcount',
+    category: categories.Transform,
+    params: [ { name: "interval", type: "string" }],
+    defaultParams: ['10s']
+  });
+
   addFuncDef({
     name: 'averageAbove',
     category: categories.Filter,