Commits

A Kruger committed c7a92bd

Formatting changes

Comments (0)

Files changed (1)

Automation/psi_mail_stats.py

             )
         ),
         (
-            'Previous Day',
+            'PreviousDay',
             (
                 connections_by_region_template.format('60 hours', '36 hours'),
                 connections_total_template.format('60 hours', '36 hours')
             )
         ),
         (
-            'Previous Day',
+            'PreviousDay',
             (
                 unique_users_by_region_template.format('60 hours', '36 hours'),
                 unique_users_total_template.format('60 hours', '36 hours')
             )
         ),
         (
-            'Previous Day',
+            'PreviousDay',
             (
                 page_views_by_region_template.format('60 hours', '36 hours'),
                 page_views_total_template.format('60 hours', '36 hours')
             psi_ops_stats_credentials.POSTGRES_PORT))
 
     for table in tables:
+        body += '\n'
         body += table[0]
         body += '\n'
         table_dict = {}
                 region = str(row[0])
                 if not region in table_dict:
                     table_dict[region] = defaultdict(int)
-                table_dict[region][column] = row[1]
+                table_dict[region][column] = "{:,}".format(row[1])
 
-        body += ''.join(['%14s' % (header,) for header in ['Region'] + columns])
+        body += ''.join(['%12s' % (header,) for header in ['Region'] + columns])
         body += '\n'
 
         # Sorted by the last column, top 10 (+1 for the total row)
             row.append(region)
             for column in columns:
                 row.append(values[column])
-            body += ''.join(['%14s' % (str(item),) for item in row])
+            body += ''.join(['%12s' % (str(item),) for item in row])
             body += '\n'
 
     db_conn.close()
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.