You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
smart-top/couchdb/monitor-config.js

12 lines
658 B
JavaScript

{
"_id": "_design/config",
"language": "javascript",
"views": {
"apps": {
"map": "function(doc) {\n\tif(doc.config != null){\n\t\tif(doc.config.apps != null){\n\t\t\temit(doc._id,doc.config.apps)\n\t\t}\n\t}else{\n\t\t\temit(doc._id,{})\n\t\t}\n}"
},
"folders": {
"map": "function(doc) {\n\tthreshold = null\n\tif(doc.config != null){\n\t\tif(doc.config.folders != null){\n\t\t\tfolders = doc.config.folders ;\n\t\t\tif (folders.threshold != null){ \n\t\t\t\tthreshold = folders.threshold\n\t\t\t}\n\t\t}\n\t}\n\tthreshold = (threshold == null)?\"5 MB\" : threshold ;\n\tr = {threshold:threshold}\n\temit(doc._id,r)\n}"
}
}
}