Thor77
e4212f28fb
Log total execution time to info
2017-03-24 23:17:58 +01:00
Matthew
a83d6de253
Add ability to pass a directory for --log option ( #17 )
...
If you pass a directory, it will now tack a '*.log' glob on the end of
the path to automatically use all log files inside this directory.
2017-03-08 22:54:07 +01:00
Thor77
aaf5f2b851
Convert filter to list
...
because filters are (non-subscriptable) objects in py3
2017-03-04 00:02:41 +01:00
Thor77
a694a2bc58
Refactor test_onlinetime
...
to require only one iteration and simplify testing
2017-03-03 23:59:24 +01:00
Thor77
cd01eb433a
Use hyperlinks instead of onclick-events
...
to link to positions.
Disabled color-change and text-decoration to keep a clean and consisten
look.
2017-02-27 22:16:16 +01:00
Thor77
6c35aed767
Only log to file if not logging to stdout
2017-02-27 13:37:05 +01:00
Thor77
8f49c3e95d
Add debugstdout flag/config-directive
...
to enable debug logging to stdout
Fix #15
2017-02-27 13:37:04 +01:00
Thor77
0033ce186f
Move logger-setup to tsstats.logger
...
and handlers are now attached as desired in __main__.cli
2017-02-27 13:37:00 +01:00
Thor77
2753f548fe
Test disconnect on server-stop
2017-02-23 21:51:42 +01:00
Thor77
962fd486af
Test reading config from disk again
2017-02-23 21:38:59 +01:00
Thor77
709c573b65
Refactor config-tests
...
by just testing the return-value of tsstats.config.load instead of
writing and reading a config-file from disk as there's absolutely no
need to test that as it's just basic ConfigParser-functionality
2017-02-22 22:00:09 +01:00
Thor77
5e19e38965
Fix E501 (line too long)
2017-02-19 17:17:14 +01:00
Matthew
5968dc31dd
Support for a nicer structure for ID maps ( #12 )
...
This adds support for a more expressive (albeit more verbose) IdentMap
structure. It makes it easier to annotate the structure with additional
data (such as names to associate with the IDs), to assist with
maintaining the IdentMap.
2017-02-18 14:58:23 +01:00
Thor77
2816c2ecfa
Merge pull request #13 from djmattyg007/mobile_improvements
...
Improve presentation on mobile devices
2017-02-18 14:19:52 +01:00
Thor77
4adfb9cfc1
Make all datetime-objects timezone-aware
...
Because the tool is using utc-timestamps everywhere, this emphasizes
this fact (by default) in the output.
If you don't want timezones behind each datetime in your output, just
remove the "%Z" from the `datetimeformat`.
Fix #9
2017-02-16 22:44:51 +01:00
Matthew Gamble
531f5c57d2
Improve presentation at mobile
...
- Add custom hint--medium--xs style, to make the tooltips wrap neatly
- Add meta viewport tag
2017-02-16 18:17:29 +11:00
Thor77
d5c3f312df
Merge pull request #8 from djmattyg007/template_fixes
...
Fix closing header tag
2017-02-14 22:39:40 +01:00
Thor77
ab96dd42f9
Merge pull request #5 from djmattyg007/readme_update
...
Update readme to emphasise fact that no ServerQuery account is required
2017-02-14 22:38:26 +01:00
Matthew Gamble
3824eeac10
Fix closing header tag
2017-02-15 08:36:01 +11:00
Matthew Gamble
69557a94a6
Update CLI help text to match readme
2017-02-15 08:33:17 +11:00
Thor77
ae35a73a64
Merge pull request #7 from djmattyg007/template_security
...
* Add rel=noopener to the github link to prevent window.opener attacks.
* Add no-referrer referrer policy to prevent leakage of sensitive info such as private domain names.
2017-02-14 16:07:37 +01:00
Matthew Gamble
96156ca622
Add no-referrer referrer policy to prevent leakage of sensitive info
...
This prevents Referer headers from being sent when requesting any
external assets, and when clicking on any offsite links. This includes
the github link in the footer. This helps to prevent the leakage of
sensitive details, such as private domain names.
2017-02-14 18:17:35 +11:00
Matthew Gamble
e94e117242
Add rel=noopener to prevent window.opener attacks
...
This is highly unlikely, but it never hurts to be cautious.
2017-02-14 18:14:59 +11:00
Matthew Gamble
13ad296459
Add doctype to main template
2017-02-14 18:11:35 +11:00
Thor77
72c1eb78f8
Use fixture for providing clients
...
for test_client and test_ident_map
2017-02-12 21:38:29 +01:00
Thor77
22f6402bce
Add nick-history functionality
...
hover a nickname to show previous nicks
2017-02-11 22:14:34 +01:00
Thor77
6366d3ebb1
Show last-seen hint only in Onlinetime-section
...
currently by filtering by headline (probably not a good long-term-solution)
2017-02-10 23:34:23 +01:00
Thor77
f97f309b85
Move last-seen hint to value
...
and display it on the left side because last-seen is related to onlinetime and not
to the nick.
2017-02-10 23:33:57 +01:00
Thor77
8d2e0c1345
Add funcdoc for tsstats.template.prepare_clients
2016-11-24 22:57:56 +01:00
Thor77
cb449558e0
Fix onlinetime_threshold not used
2016-11-23 21:23:20 +01:00
Thor77
17a486bb7d
Fix incorrectly sorted imports
2016-11-23 21:19:21 +01:00
Thor77
ba47122f50
Sort servers by sid for consistent output
2016-11-23 21:09:11 +01:00
Thor77
ef66b45e21
Prefix clientlist-filter with section-filter
...
because navbar-entries are also li
2016-11-23 21:06:55 +01:00
Thor77
2cdcdd1e5b
Use new, sid-prefixed section-id
2016-11-23 21:06:11 +01:00
Thor77
a96200dafa
Update test_debug for new debug-label
2016-11-23 21:04:51 +01:00
Thor77
a3d4cdde5b
Use render_servers instead of render_template
2016-11-23 21:02:05 +01:00
Thor77
418be10603
Use render_servers for utf8-write-test
2016-11-22 23:08:49 +01:00
Thor77
42796be9d8
Use render_servers instead of render_template
...
* limit to one output file for all virtual servers
2016-11-22 23:04:18 +01:00
Thor77
5915664605
Set index.jinja2 as default for General.template
2016-11-22 23:03:51 +01:00
Thor77
062da49244
Rename render_template to render_servers
...
also includes refactoring for multiserver-output
* now accepts list of servers instead of clients as input
* index.jinja2 is now the default template
2016-11-22 23:02:26 +01:00
Thor77
9a686f7a2f
Refactor template(s) for multiserver-display
...
* all virtual servers are now included in one single outputfile
* navbar for navigation between virtual servers
2016-11-22 22:59:57 +01:00
Thor77
51225175ce
Refactor clients preperation into prepare_clients
2016-11-19 22:50:28 +01:00
Thor77
75c5ebb575
Adapt to new return type of tsstats.log.parse_logs
...
in this case using list- instead of dict-indexing
2016-11-19 22:28:34 +01:00
Thor77
f0dc95a583
Adapt to new return type of tsstats.log.parse_logs
2016-11-19 22:27:44 +01:00
Thor77
fdbde18856
parse_logs: Return Server instead of dict
...
because it's easier to iterate and access contained information
2016-11-19 22:25:57 +01:00
Thor77
117dff2486
Use TemplateStream.dump for writing template
...
instead of manually opening a file and writing to it
2016-11-18 22:11:14 +01:00
Thor77
273a01bec6
Rename default template to stats.jinja2
...
from template.html
2016-11-18 21:52:30 +01:00
Thor77
9a38e0e7cb
Rename template_path to template
2016-11-18 21:46:38 +01:00
Thor77
4bed26dac8
Move default template into new templates-subdir
2016-11-18 21:44:53 +01:00
Thor77
b8d2df4650
Load templates from templates-subdirectory
...
instead of package-root
2016-11-18 21:42:27 +01:00
Thor77
d522ce648a
Add testcase for tsstats.utils.filter_threshold
2016-11-11 18:41:51 +01:00
Thor77
5637a11b2b
Add onlinetimethreshold config and cli-option
...
to set render_template.onlinetime_threshold.
Default value is -1 => no filtering to not cause confusion
2016-11-11 18:40:52 +01:00
Thor77
4ac27143a6
Add onlinetime_threshold-arg to render_template
...
and filter_threshold-function to tsstats.utils.
Only display clients in onlinetime-section with a onlinetime
greater than onlinetime_threshold seconds
2016-11-11 18:40:30 +01:00
Thor77
414054c243
Link to section-list from section-heading
2016-11-10 21:57:30 +01:00
Thor77
15a437ea2c
Bump hint.css-version to 2.4.1
2016-11-10 21:50:45 +01:00
Thor77
1ec0a37480
Add testcase for #3 (encoding issues)
2016-11-07 20:24:08 +01:00
Thor77
03c0941962
Add safety-measure to ensure clients disconnect at server stop
2016-11-06 19:23:00 +01:00
Thor77
c8955bee5e
Remove double-iteratation over logfiles
...
by passing the iterator returned by glob.glob direclty to _bundle_logs
2016-11-06 19:18:21 +01:00
Thor77
679473f7b4
Use utcnow for creation_time
...
because utc timestamps are used in logs and for online_dc, too.
2016-11-04 20:05:02 +01:00
Thor77
812916f179
Use list-comprehension for reconnect
...
to make this action more obvious and understandable
2016-11-04 20:03:46 +01:00
Thor77
ba8e082e64
Reconnect clients only for last log (online_dc)
...
because doing it after every log would lead to insane onlinetimes
and only the last log should have online clients, anyways.
Fix #4
2016-11-03 22:52:05 +01:00
Thor77
7cd057d3c5
Write template-output as utf-8
2016-11-02 21:24:19 +01:00
Thor77
c0096a7c52
Read logs as utf-8
2016-11-02 21:24:07 +01:00
Thor77
37b8b7bc26
Bump hint.css-version to 2.4.0
2016-10-28 23:24:31 +02:00
Thor77
2d80ba6804
Add action-group to re_dis_connect.
...
Used to not rely on position in message
for correct action-parsing.
2016-10-27 00:08:28 +02:00
Thor77
b6e73e733d
Fix adding server/clientgroup-actions to clients.
...
This was caused, because the used regex was very generic.
Therefore it parsed these lines without any problems,
a timestamp wasn't added but it was already in the clients-dict,
when these checks (conn or disconnect) were performed.
2016-10-27 00:02:56 +02:00
Thor77
80df2c02f0
Add testcase for logs with server/clientgroup-actions
2016-10-27 00:02:17 +02:00
Thor77
1b1ed86750
Add session-time on disconnect to debug-log
2016-10-04 15:21:05 +02:00
Thor77
040b451c7d
Add timestamp for (dis)connect to debug-log
2016-10-04 15:18:08 +02:00
Thor77
f7669792c1
Set default for General.output to tsstats.html
2016-09-22 15:35:39 +02:00
Thor77
3a1d51a60b
Remove default for output-flag
...
default still set through config-defaults, though
Providing a default here suppressed config-option "output"
2016-09-22 15:28:42 +02:00
Thor77
d1627d369f
Add debug-logging-output to tsstats.template.render_template
...
* bump version to 0.11.1
2016-09-18 21:51:24 +02:00
Thor77
ddd220d629
Include datetime_fmt in funcdoc of tsstats.template.render_template
2016-09-17 22:49:05 +02:00
Thor77
799f622201
Use RawConfigParser instead of ConfigParser in tsstats.config
...
because General.datetimeformat creates problems with string-interpolation.
These are solved by swichting to RawConfigParser, which doesn't support this feature.
2016-09-17 22:42:32 +02:00
Thor77
52fc1b487c
Add cli-flag for datetimeformat and pass config-option to funccall
2016-09-17 22:41:38 +02:00
Thor77
4078e4b06b
Add config-option datetimeformat
...
for tsstats.template.render_template(datetime_fmt)
2016-09-17 22:41:03 +02:00
Thor77
1ecf24b9b2
Add datetime_fmt-arg to tsstats.template.render_template
...
Specify a custom datetime-format for various datetime-renderings (creation-time, last
online)
2016-09-17 22:38:30 +02:00
Thor77
5c52ab1995
Pass template config/cli-option to render_template in tsstats.__main__.main
2016-08-10 22:49:16 +02:00
Thor77
bbd2ff7a46
Add template_path-kwarg to tsstats.template.render_template
2016-08-10 22:47:19 +02:00
Thor77
604fefe286
Add 'template' config-option
2016-08-10 22:45:14 +02:00
Thor77
07b61d86ce
Add -t/--template cli-arg
2016-08-10 22:44:48 +02:00
Thor77
3f140b8d6a
Don't add sid-suffix to output if only one vserver occured in parsed logs
...
* bump version to 0.10.5
2016-08-09 20:37:20 +02:00
Thor77
a475caa7c7
Fix not calling str() on value before adding to config in __main__.cli
...
* bump version to 0.10.4
2016-08-08 22:25:57 +02:00
Thor77
5ff08e0163
Delay debugfile-creation to suppress needless creation if not in debugmode
...
* bump version to 0.10.3
2016-08-08 22:10:30 +02:00
Thor77
cfb593ba9c
use py2-compatible way to check for section-existance in tsstats.config.load
...
* bump version to 0.10.2
2016-08-06 21:42:54 +02:00
Thor77
87f9bf43fc
rewrite config-tests to work with new return-value of tsstats.config.load
...
* bump version to 0.10.1
2016-08-06 21:39:36 +02:00
Thor77
708f071033
replace tsstats.config.parse_config with tsstats.config.load, which just returns a configparser.ConfigParser-instance for easier extension
...
tsstats.__main__.main: now accepts only a configparser.ConfigParser-instance and extracts values from it
tsstats.__main__.cli: defaults from argparser are now suppressed and given cli-args override values from config
* bump version to 0.10.0
2016-08-06 21:36:17 +02:00
Thor77
2a1ab472bb
update bootstrap and hint.css version
...
* bump version to 0.9.1
2016-08-03 22:02:56 +02:00
Thor77
67c08330d8
reduce size of section-headers (h1 -> h2)
2016-07-04 21:17:34 +02:00
Thor77
402040e2dc
add title (configurable) as headline to template
2016-07-04 21:16:58 +02:00
Thor77
60bdcb7aab
add credit and render-date/time to template-footer
2016-07-04 21:14:29 +02:00
Thor77
477ca7d739
add timezone to output of tsstats.template.render_template.frmttime
2016-07-04 21:11:34 +02:00
Thor77
34e682cf81
remove unused var-assignment in __main__.cli
2016-06-25 20:42:50 +02:00
Thor77
bb808ca8c0
rename noonlinedc to onlinedc in __main__.main to correctly represent it's function
...
* rename noonlinedc to onlinedc in value-dict returned by .parse_args
* rename keyword-arg from noonlinedc to onlinedc in __main__.main
2016-06-25 20:42:50 +02:00
Thor77
892680fe4d
add onlinedc config-option
...
* inverse of --noonlinedc
2016-06-25 20:42:46 +02:00
Thor77
573838c35e
Merge branch 'multi_vserver'
2016-06-24 21:43:51 +02:00
Thor77
487a50508f
add -nod/--noonlinedc cli-flag
2016-06-23 21:43:40 +02:00
Thor77
95c22dde35
make __main__.main work with new output of tsstats.log.parse_logs
...
* if sid given, add .<sid> to outputpath
2016-06-22 20:47:12 +02:00
Thor77
eafc98f548
add test for tsstats.log.parse_logs
2016-06-22 20:40:55 +02:00
Thor77
0b667f55b7
check for None instead of False to allow empty clients as arg to tsstats.log._parse_details
2016-06-22 20:40:30 +02:00