Bug 4655 - Extend session information in tlwebadmin
Summary: Extend session information in tlwebadmin
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: Web Administration (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.2.0
Assignee: Henrik Andersson
URL:
Keywords: astrand_tester, relnotes
Depends on:
Blocks:
 
Reported: 2013-05-24 08:24 CEST by Henrik Andersson
Modified: 2014-05-06 13:53 CEST (History)
0 users

See Also:
Acceptance Criteria:


Attachments

Description Henrik Andersson cendio 2013-05-24 08:24:32 CEST
When working with sessions using Web Admin UI, there is 2 important
fields that is missing;

Session Created - The date/time of when session was created
Session Connection - Shows when the last connection was made or if currently connected.
Comment 1 Aaron Sowry cendio 2013-12-02 12:48:35 CET
Which agent the session is running on is also a common request.
Comment 2 Henrik Andersson cendio 2014-02-11 11:21:33 CET
Session store is updated with connectionstatus in commit 28397.

Added use of filters and verify/update session data to vsmserver get_sessions xmlrpc call in commit 28398.

Added use of filters and verify update when querying the details for a user sessions in commit 28399.

Commit 28400 adds connection status and last connection to detailed user sessions template.
Comment 3 Henrik Andersson cendio 2014-02-17 07:27:29 CET
Autotests failed and commit r28436 fixes the use of handler_getsession without parameters.
Comment 4 Henrik Andersson cendio 2014-02-18 08:41:19 CET
Cleanup the xmlrpc api change and dont try to be backward compatible which is not possible.
Comment 5 Henrik Andersson cendio 2014-02-18 08:42:51 CET
(In reply to comment #4)
> Cleanup the xmlrpc api change and dont try to be backward compatible which is
> not possible.

Commit 28445 cleanup of api, get_sessions takes to arguments, verify(bool) and filter(dict).
Comment 6 Henrik Andersson cendio 2014-02-18 09:06:16 CET
Commit 28446 is a refactor of verify sessions to indices instead of a referens to session store that got modified by the logics..
Comment 7 Henrik Andersson cendio 2014-02-18 09:14:43 CET
Identify other usages of get_sessions and fix the api calls.
Comment 8 Henrik Andersson cendio 2014-02-18 09:48:25 CET
(In reply to comment #7)
> Identify other usages of get_sessions and fix the api calls.

Commit 28449 updates autotests/tests/*

Commit 28450 updates printer/modulesthinlinc/tlprinter.py
Comment 9 Henrik Andersson cendio 2014-02-18 09:49:57 CET
Tester should verify autotests, limit printers and webadmin session connectstatus.
Comment 10 Henrik Andersson cendio 2014-02-24 12:29:19 CET
Commit r28439 is not complete and is fixed with commit r28506.
Comment 11 Henrik Andersson cendio 2014-02-24 12:49:32 CET
Commit 28508 fixes the missing 'connectstatus' key in verifyinfo test.
Comment 12 Henrik Andersson cendio 2014-02-24 15:34:08 CET
Commit r28511 fixes tests in oldserver.py
Comment 13 Pierre Ossman cendio 2014-02-27 13:28:58 CET
Boom:

2014-02-27 13:27:19 ERROR tlwebadm[48669]: code 500, message Internal error on page '/status/'
2014-02-27 13:27:19 INFO tlwebadm[48669]: "GET /status/ HTTP/1.1" 500 -
2014-02-27 13:27:19 ERROR tlwebadm[48669]: ----------------------------------------
2014-02-27 13:27:19 ERROR tlwebadm[48669]: Traceback (most recent call last):
2014-02-27 13:27:19 ERROR tlwebadm[48669]:   File "/opt/thinlinc/sbin/tlwebadm", line 264, in post_or_get
2014-02-27 13:27:19 ERROR tlwebadm[48669]:     IIIIii , OOooOO000 = getattr ( O0OOO , action ) ( iIIi1i1 , I1I1IiI1 , IIIIii )
2014-02-27 13:27:19 ERROR tlwebadm[48669]:   File "/opt/thinlinc/modules/thinlinc/tlwebadm/main.py", line 109, in do_GET
2014-02-27 13:27:19 ERROR tlwebadm[48669]:     self . _GET_METHODS . get ( page_name , self . error_404 ) ( query ) )
2014-02-27 13:27:19 ERROR tlwebadm[48669]:   File "/opt/thinlinc/modules/thinlinc/tlwebadm/status.py", line 54, in home
2014-02-27 13:27:19 ERROR tlwebadm[48669]:     ooO0oo0oO0 [ 'num_sessions' ] += len ( o00oOoo )
2014-02-27 13:27:19 ERROR tlwebadm[48669]: TypeError: object of type 'int' has no len()
2014-02-27 13:27:19 ERROR tlwebadm[48669]: ----------------------------------------
Comment 14 Henrik Andersson cendio 2014-02-27 13:58:39 CET
(In reply to comment #13)
> Boom:
> 
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]: code 500, message Internal error on
> page '/status/'
> 2014-02-27 13:27:19 INFO tlwebadm[48669]: "GET /status/ HTTP/1.1" 500 -
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]:
> ----------------------------------------
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]: Traceback (most recent call last):
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]:   File
> "/opt/thinlinc/sbin/tlwebadm", line 264, in post_or_get
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]:     IIIIii , OOooOO000 = getattr (
> O0OOO , action ) ( iIIi1i1 , I1I1IiI1 , IIIIii )
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]:   File
> "/opt/thinlinc/modules/thinlinc/tlwebadm/main.py", line 109, in do_GET
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]:     self . _GET_METHODS . get (
> page_name , self . error_404 ) ( query ) )
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]:   File
> "/opt/thinlinc/modules/thinlinc/tlwebadm/status.py", line 54, in home
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]:     ooO0oo0oO0 [ 'num_sessions' ] +=
> len ( o00oOoo )
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]: TypeError: object of type 'int' has
> no len()
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]:
> ----------------------------------------

(In reply to comment #13)
> Boom:
> 
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]: code 500, message Internal error on
> page '/status/'
> 2014-02-27 13:27:19 INFO tlwebadm[48669]: "GET /status/ HTTP/1.1" 500 -
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]:
> ----------------------------------------
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]: Traceback (most recent call last):
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]:   File
> "/opt/thinlinc/sbin/tlwebadm", line 264, in post_or_get
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]:     IIIIii , OOooOO000 = getattr (
> O0OOO , action ) ( iIIi1i1 , I1I1IiI1 , IIIIii )
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]:   File
> "/opt/thinlinc/modules/thinlinc/tlwebadm/main.py", line 109, in do_GET
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]:     self . _GET_METHODS . get (
> page_name , self . error_404 ) ( query ) )
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]:   File
> "/opt/thinlinc/modules/thinlinc/tlwebadm/status.py", line 54, in home
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]:     ooO0oo0oO0 [ 'num_sessions' ] +=
> len ( o00oOoo )
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]: TypeError: object of type 'int' has
> no len()
> 2014-02-27 13:27:19 ERROR tlwebadm[48669]:
> ----------------------------------------

I had uncommited changes in my WC, change was splitted into to commits, 28539 and 28540. And 28540 fixes this traceback.
Comment 15 Henrik Andersson cendio 2014-03-17 14:17:54 CET
Code assumes there always will be a client ip which is not true when client connectes through webaccess...
Comment 16 Henrik Andersson cendio 2014-03-17 14:26:01 CET
(In reply to comment #15)
> Code assumes there always will be a client ip which is not true when client
> connectes through webaccess...

Fixed in commit 28648.
Comment 17 Peter Åstrand cendio 2014-04-02 10:34:04 CEST
"Session Created" is not implemented.
Comment 18 Henrik Andersson cendio 2014-04-02 10:47:40 CEST
(In reply to comment #17)
> "Session Created" is not implemented.

Fixed in commit 28784.
Comment 20 Peter Åstrand cendio 2014-05-06 13:53:55 CEST
Tested build 4346 on SLED11. Seems to work fine. Sample "new" output from tlwebadm:

Created 	2014-05-06 07:18:43
Connection Status 	connected
Last Connection 	2014-05-06 07:21:01 from 10.47.1.211

Note You need to log in before you can comment on or make changes to this bug.