Show More
@@ -40,7 +40,7 b' class BaseAuthSessions(object):' | |||||
40 | def get_count(self): |
|
40 | def get_count(self): | |
41 | raise NotImplementedError |
|
41 | raise NotImplementedError | |
42 |
|
42 | |||
43 | def get_expired_count(self): |
|
43 | def get_expired_count(self, older_than_seconds=None): | |
44 | raise NotImplementedError |
|
44 | raise NotImplementedError | |
45 |
|
45 | |||
46 | def clean_sessions(self, older_than_seconds=None): |
|
46 | def clean_sessions(self, older_than_seconds=None): | |
@@ -73,7 +73,7 b' class FileAuthSessions(BaseAuthSessions)' | |||||
73 | def get_count(self): |
|
73 | def get_count(self): | |
74 | return 'NOT AVAILABLE' |
|
74 | return 'NOT AVAILABLE' | |
75 |
|
75 | |||
76 | def get_expired_count(self): |
|
76 | def get_expired_count(self, older_than_seconds=None): | |
77 | return self.get_count() |
|
77 | return self.get_count() | |
78 |
|
78 | |||
79 | def clean_sessions(self, older_than_seconds=None): |
|
79 | def clean_sessions(self, older_than_seconds=None): | |
@@ -90,7 +90,7 b' class MemcachedAuthSessions(BaseAuthSess' | |||||
90 | def get_count(self): |
|
90 | def get_count(self): | |
91 | return 'NOT AVAILABLE' |
|
91 | return 'NOT AVAILABLE' | |
92 |
|
92 | |||
93 | def get_expired_count(self): |
|
93 | def get_expired_count(self, older_than_seconds=None): | |
94 | return self.get_count() |
|
94 | return self.get_count() | |
95 |
|
95 | |||
96 | def clean_sessions(self, older_than_seconds=None): |
|
96 | def clean_sessions(self, older_than_seconds=None): | |
@@ -103,7 +103,7 b' class MemoryAuthSessions(BaseAuthSession' | |||||
103 | def get_count(self): |
|
103 | def get_count(self): | |
104 | return 'NOT AVAILABLE' |
|
104 | return 'NOT AVAILABLE' | |
105 |
|
105 | |||
106 | def get_expired_count(self): |
|
106 | def get_expired_count(self, older_than_seconds=None): | |
107 | return self.get_count() |
|
107 | return self.get_count() | |
108 |
|
108 | |||
109 | def clean_sessions(self, older_than_seconds=None): |
|
109 | def clean_sessions(self, older_than_seconds=None): |
@@ -30,10 +30,22 b'' | |||||
30 | <div class="panel-body"> |
|
30 | <div class="panel-body"> | |
31 | ${h.secure_form(h.url('admin_settings_sessions_cleanup'), method='post')} |
|
31 | ${h.secure_form(h.url('admin_settings_sessions_cleanup'), method='post')} | |
32 |
|
32 | |||
33 | <div style="margin: 0 0 20px 0" class="fake-space"> |
|
33 | <p> | |
34 |
${_('Cleanup |
|
34 | ${_('Cleanup user sessions that were not active during chosen time frame.')} <br/> | |
35 |
${_(' |
|
35 | ${_('After performing this action users whose session will be removed will be required to log in again.')} <br/> | |
36 | </div> |
|
36 | <strong>${_('Picking `All` will log-out you, and all users in the system.')}</strong> | |
|
37 | </p> | |||
|
38 | ||||
|
39 | <script type="text/javascript"> | |||
|
40 | $(document).ready(function() { | |||
|
41 | $('#expire_days').select2({ | |||
|
42 | containerCssClass: 'drop-menu', | |||
|
43 | dropdownCssClass: 'drop-menu-dropdown', | |||
|
44 | dropdownAutoWidth: true, | |||
|
45 | minimumResultsForSearch: -1 | |||
|
46 | }); | |||
|
47 | }); | |||
|
48 | </script> | |||
37 | <select id="expire_days" name="expire_days"> |
|
49 | <select id="expire_days" name="expire_days"> | |
38 | % for n in [60, 90, 30, 7, 0]: |
|
50 | % for n in [60, 90, 30, 7, 0]: | |
39 | <option value="${n}">${'{} days'.format(n) if n != 0 else 'All'}</option> |
|
51 | <option value="${n}">${'{} days'.format(n) if n != 0 else 'All'}</option> | |
@@ -48,13 +60,3 b'' | |||||
48 | </div> |
|
60 | </div> | |
49 |
|
61 | |||
50 |
|
62 | |||
51 | <script type="text/javascript"> |
|
|||
52 | $(document).ready(function() { |
|
|||
53 | $('#expire_days').select2({ |
|
|||
54 | containerCssClass: 'drop-menu', |
|
|||
55 | dropdownCssClass: 'drop-menu-dropdown', |
|
|||
56 | dropdownAutoWidth: true, |
|
|||
57 | minimumResultsForSearch: -1 |
|
|||
58 | }); |
|
|||
59 | }); |
|
|||
60 | </script> No newline at end of file |
|
General Comments 0
You need to be logged in to leave comments.
Login now