tftpd views
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 5 Oct 2009 12:00:17 +0000 (12:00 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 5 Oct 2009 12:00:17 +0000 (12:00 +0000)
couchdb/tftpd/language [new file with mode: 0644]
couchdb/tftpd/views/ip,path-count/map.js [new file with mode: 0644]
couchdb/tftpd/views/ip,path-count/reduce.js [new file with mode: 0644]
couchdb/tftpd/views/path-count/map.js [new file with mode: 0644]
couchdb/tftpd/views/path-count/reduce.js [new file with mode: 0644]
couchdb/tftpd/views/timeline-doc/map.js [new file with mode: 0644]

diff --git a/couchdb/tftpd/language b/couchdb/tftpd/language
new file mode 100644 (file)
index 0000000..f504a95
--- /dev/null
@@ -0,0 +1 @@
+javascript
\ No newline at end of file
diff --git a/couchdb/tftpd/views/ip,path-count/map.js b/couchdb/tftpd/views/ip,path-count/map.js
new file mode 100644 (file)
index 0000000..dcad679
--- /dev/null
@@ -0,0 +1,4 @@
+function(doc) {
+  if ( doc.package.name == 'tftpd' )
+  emit([doc.ip,doc.path],1);
+}
\ No newline at end of file
diff --git a/couchdb/tftpd/views/ip,path-count/reduce.js b/couchdb/tftpd/views/ip,path-count/reduce.js
new file mode 100644 (file)
index 0000000..d354712
--- /dev/null
@@ -0,0 +1,3 @@
+function (k,v) {
+  return sum(v)
+}
\ No newline at end of file
diff --git a/couchdb/tftpd/views/path-count/map.js b/couchdb/tftpd/views/path-count/map.js
new file mode 100644 (file)
index 0000000..3809884
--- /dev/null
@@ -0,0 +1,4 @@
+function(doc) {
+  if ( doc.package.name == 'tftpd' )
+  emit(doc.path,1);
+}
\ No newline at end of file
diff --git a/couchdb/tftpd/views/path-count/reduce.js b/couchdb/tftpd/views/path-count/reduce.js
new file mode 100644 (file)
index 0000000..d354712
--- /dev/null
@@ -0,0 +1,3 @@
+function (k,v) {
+  return sum(v)
+}
\ No newline at end of file
diff --git a/couchdb/tftpd/views/timeline-doc/map.js b/couchdb/tftpd/views/timeline-doc/map.js
new file mode 100644 (file)
index 0000000..2376583
--- /dev/null
@@ -0,0 +1,4 @@
+function(doc) {
+  if ( doc.package.name == 'tftpd' )
+  emit(doc._id, doc);
+}
\ No newline at end of file