and amt
authorDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 30 Aug 2009 17:24:40 +0000 (17:24 +0000)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Sun, 30 Aug 2009 17:24:40 +0000 (17:24 +0000)
couchdb/amt/views/ip,SystemPowerState-count/map.js [new file with mode: 0644]
couchdb/amt/views/ip,SystemPowerState-count/reduce.js [new file with mode: 0644]

diff --git a/couchdb/amt/views/ip,SystemPowerState-count/map.js b/couchdb/amt/views/ip,SystemPowerState-count/map.js
new file mode 100644 (file)
index 0000000..831730a
--- /dev/null
@@ -0,0 +1,4 @@
+function(doc) {
+  if ( doc.package.name == 'amt' && doc.package.caller == 'power_state')
+  emit([doc.ip,doc.SystemPowerState],1);
+}
\ No newline at end of file
diff --git a/couchdb/amt/views/ip,SystemPowerState-count/reduce.js b/couchdb/amt/views/ip,SystemPowerState-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