|
|
|
@ -143,7 +143,13 @@ class ViewSessionInfo (QtGui.QWidget):
|
|
|
|
|
pass
|
|
|
|
|
self.layout.addWidget(LabelWordWrap(_('Your IP adress - ')+ip, self))
|
|
|
|
|
self.layout.addWidget(LabelWordWrap(_('Your MAC adress - ')+mac, self))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Add clear cache Button
|
|
|
|
|
self.clear_cache_button = QtGui.QPushButton \
|
|
|
|
|
(_('Clear your cache session'), self)
|
|
|
|
|
self.clear_cache_button.clicked.connect(self.clear_cache(client, sid))
|
|
|
|
|
self.layout.addWidget(self.clear_cache_button)
|
|
|
|
|
|
|
|
|
|
Quit_button = QtGui.QPushButton(_("Quit"), self)
|
|
|
|
|
|
|
|
|
|
self.layout.addWidget(Quit_button)
|
|
|
|
@ -160,4 +166,17 @@ class ViewSessionInfo (QtGui.QWidget):
|
|
|
|
|
window.geometry().y() + window.geometry().height() / 2 \
|
|
|
|
|
- self.size().height() / 2)
|
|
|
|
|
# for clear memory after closed this window
|
|
|
|
|
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
|
|
|
|
|
self.setAttribute(QtCore.Qt.WA_DeleteOnClose)
|
|
|
|
|
|
|
|
|
|
def clear_cache(self, client, sid):
|
|
|
|
|
def wrapper():
|
|
|
|
|
try:
|
|
|
|
|
res = client.service.clear_session_cache(sid)
|
|
|
|
|
except Exception, e:
|
|
|
|
|
show_msg(e, 'Error')
|
|
|
|
|
return 1
|
|
|
|
|
if res:
|
|
|
|
|
show_msg('Error clearing session cache')
|
|
|
|
|
else:
|
|
|
|
|
show_msg('Session cache is cleared')
|
|
|
|
|
return wrapper
|