##// END OF EJS Templates
user-sessions: fix other backend expired count, and fixed some helper text.
marcink -
r1298:db672357 default
parent child Browse files
Show More
@@ -40,7 +40,7 b' class BaseAuthSessions(object):'
40 40 def get_count(self):
41 41 raise NotImplementedError
42 42
43 def get_expired_count(self):
43 def get_expired_count(self, older_than_seconds=None):
44 44 raise NotImplementedError
45 45
46 46 def clean_sessions(self, older_than_seconds=None):
@@ -73,7 +73,7 b' class FileAuthSessions(BaseAuthSessions)'
73 73 def get_count(self):
74 74 return 'NOT AVAILABLE'
75 75
76 def get_expired_count(self):
76 def get_expired_count(self, older_than_seconds=None):
77 77 return self.get_count()
78 78
79 79 def clean_sessions(self, older_than_seconds=None):
@@ -90,7 +90,7 b' class MemcachedAuthSessions(BaseAuthSess'
90 90 def get_count(self):
91 91 return 'NOT AVAILABLE'
92 92
93 def get_expired_count(self):
93 def get_expired_count(self, older_than_seconds=None):
94 94 return self.get_count()
95 95
96 96 def clean_sessions(self, older_than_seconds=None):
@@ -103,7 +103,7 b' class MemoryAuthSessions(BaseAuthSession'
103 103 def get_count(self):
104 104 return 'NOT AVAILABLE'
105 105
106 def get_expired_count(self):
106 def get_expired_count(self, older_than_seconds=None):
107 107 return self.get_count()
108 108
109 109 def clean_sessions(self, older_than_seconds=None):
@@ -30,10 +30,22 b''
30 30 <div class="panel-body">
31 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">
34 ${_('Cleanup all sessions that were not active during choosen time frame')} <br/>
35 ${_('Picking All will log-out all users in the system, and each user will be required to log in again.')}
36 </div>
33 <p>
34 ${_('Cleanup user sessions that were not active during chosen time frame.')} <br/>
35 ${_('After performing this action users whose session will be removed will be required to log in again.')} <br/>
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 49 <select id="expire_days" name="expire_days">
38 50 % for n in [60, 90, 30, 7, 0]:
39 51 <option value="${n}">${'{} days'.format(n) if n != 0 else 'All'}</option>
@@ -48,13 +60,3 b''
48 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