You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ponymail.apache.org by se...@apache.org on 2016/11/03 17:41:46 UTC

incubator-ponymail git commit: Alignment fixes

Repository: incubator-ponymail
Updated Branches:
  refs/heads/master 9dc0225d4 -> 50233de54


Alignment fixes

Project: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/commit/50233de5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/tree/50233de5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ponymail/diff/50233de5

Branch: refs/heads/master
Commit: 50233de547708407e3663b92595ff19b64b9f549
Parents: 9dc0225
Author: Sebb <se...@apache.org>
Authored: Thu Nov 3 17:40:59 2016 +0000
Committer: Sebb <se...@apache.org>
Committed: Thu Nov 3 17:40:59 2016 +0000

----------------------------------------------------------------------
 site/api/stats.lua | 62 +++++++++++++++++++++++--------------------------
 1 file changed, 29 insertions(+), 33 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ponymail/blob/50233de5/site/api/stats.lua
----------------------------------------------------------------------
diff --git a/site/api/stats.lua b/site/api/stats.lua
index 37a3042..46728d3 100644
--- a/site/api/stats.lua
+++ b/site/api/stats.lua
@@ -239,14 +239,14 @@ function handle(r)
                     term = {
                         list_raw = listraw
                     }
-                }
+                  }
     if get.list == "*" then
         wc = true
         sterm = {
                     wildcard = {
                         list = "*." .. get.domain
                     }
-                }
+                 }
     end
     if get.domain == "*" then
         wc = true
@@ -287,7 +287,7 @@ function handle(r)
                                 query = qs
                             }
                         }
-                },
+                    },
                     must_not = {
                         {
                             query_string = {
@@ -295,7 +295,8 @@ function handle(r)
                                 query = nqs
                             }
                         }
-                }}
+                    }
+                }
             },
             size = 1
         }
@@ -323,12 +324,9 @@ function handle(r)
                     }
                 }
             },
-            
             query = {
-                
                 bool = {
                     must = {
-                        
                         {
                             range = {
                                 date = daterange
@@ -341,8 +339,7 @@ function handle(r)
                             }
                         },
                         sterm
-                        
-                },
+                    },
                     must_not = {
                         {
                             query_string = {
@@ -350,8 +347,8 @@ function handle(r)
                                 query = nqs
                             }
                         }
-                }}
-                
+                    }
+                }
             }
         }
         
@@ -403,10 +400,8 @@ function handle(r)
                         }
                     }
                 }
-            
-        }, 
+            }, 
             query = {
-                
                 bool = {
                     must = {
                         {
@@ -425,9 +420,8 @@ function handle(r)
                                 private = false
                             }
                         }
-                        
-                }}
-                
+                    }
+                }
             }
         }
         
@@ -448,15 +442,16 @@ function handle(r)
                 bool = {
                     must = {
                         {
-                        range = {
-                            date = {
-                                gt = "1970/01/01 00:00:00",
+                            range = {
+                                date = {
+                                    gt = "1970/01/01 00:00:00",
+                                }
                             }
-                        }
-                    },sterm
-                }}
+                        },
+                        sterm
+                    }
+                }
             },
-            
             sort = {
                 {
                     date = {
@@ -474,18 +469,19 @@ function handle(r)
     local lastYear = r:ivm_get("lastYear:" .. nowish .. ":" ..get.list .. "@" .. get.domain)
     if (not lastYear or lastYear == "")  and not statsOnly then
         local doc = elastic.raw {
-    
             query = {
                 bool = {
                     must = {
                         {
-                        range = {
-                            date = {
-                                gt = "1970/01/01 00:00:00",
+                            range = {
+                                date = {
+                                    gt = "1970/01/01 00:00:00",
+                                }
                             }
-                        }
-                    },sterm
-                }}
+                        },
+                        sterm
+                    }
+                }
             },
             
             sort = {
@@ -541,9 +537,9 @@ function handle(r)
                                 query = nqs
                             }
                         }
-                }}
+                    }
+                }
             },
-            
             sort = {
                 {
                     epoch = {