Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: modules/statsmaster/templates/build_static_item.erb

Issue 5667089633247232: Issue 479 - Make AWStats produce daily reports as well (Closed)
Patch Set: Created June 24, 2014, 6:08 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: modules/statsmaster/templates/build_static_item.erb
===================================================================
--- a/modules/statsmaster/templates/build_static_item.erb
+++ b/modules/statsmaster/templates/build_static_item.erb
@@ -1,14 +1,4 @@
-dir = dirtemplate % '<%= title %>'
-if not os.path.exists(dir):
- os.mkdir(dir, 0755)
-
-subprocess.check_output([
- '/usr/share/awstats/tools/awstats_buildstaticpages.pl',
- '-configdir=/var/www/awstatsconf',
- '-config=<%= title %>',
- '-dir=%s' % dir
-] + additional_params)
-
-index = os.path.join(dir, 'index.html')
-if not os.path.exists(index):
- os.symlink(os.path.join(dir, 'awstats.<%= title %>.html'), index)
+build_pages('<%= title %>', dirtemplate % '<%= title %>', 'month')
+if day:
+ dir = os.path.join('/var/www/awstats/daily', '<%= title %>', day)
+ build_pages('<%= title %>', dir, 'day')
« no previous file with comments | « modules/statsmaster/templates/build_static_head.erb ('k') | modules/statsmaster/templates/index_item.html.erb » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld