You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jetspeed-dev@portals.apache.org by Mikko Wuokko <mi...@evtek.fi> on 2007/04/17 11:43:01 UTC

Ajax api enhancements

Hi.

I've made some enhancements to the AJAX Api to fit our needs and thought 
if you would be interested of them as well. There's two API actions, one 
to get the information of the current logged in users and the second one 
to get information of all the logged in users and optionally offline 
users and number of guest sessions active. The first one could be used 
for example to pass login information for an AJAX enabled portlet and 
the second one for users statistics and monitoring. We have a simple 
portlet building which would show a realtime status of the online users.

The online/offline user statistics api can be easily secured to be used 
for admin only by setting the RoleSecurityBehavior. Data that it will 
produce for online users is:

- status (online/offline)
- username
- ipaddress
- number of sessios
- all the userinfo there is (first name, last name,...)

For offline user it will be the same except no sesssion number as it 
would be zero anyway.

I've made some changes to the PortalStatistics(Impl) and UserStats(Impl) 
to store also the ip address and and it will now use that to distinguish 
the sessions of a user from another. In other words, the same user 
connecting from two different ip will be shown as separate users. If 
used just one ip, but two browsers (sessions) the sessions value will be 
increased. After some testing it would seem to work :D. Also getting the 
number guest sessions or any sessions needed a new method to 
PortalSessionManager.

Does this make any sense or attach your interest?

Regards,

Mikko

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Re: Ajax api enhancements

Posted by Mikko Wuokko <mi...@evtek.fi>.
Thanks.

I tested couple of times with a clean trunk build so there shouldn't 
(*knocking the wood*) be anything.

Heres the quick links to check the apis.

http://localhost:8080/jetspeed/ajaxapi?action=getuserlist&all=true
http://localhost:8080/jetspeed/ajaxapi?action=getuserinfo

-Mikko

David Sean Taylor wrote:
> Looks good, I will review it and commit it if I don't have any problems
> 
> On Apr 19, 2007, at 1:52 PM, Mikko Wuokko wrote:
> 
>> Added Jira issue and patch
>>
>> https://issues.apache.org/jira/browse/JS2-685
>>
>> -Mikko
>>
>> David Sean Taylor wrote:
>>> On Apr 17, 2007, at 11:43 AM, Mikko Wuokko wrote:
>>>> Hi.
>>>>
>>>> I've made some enhancements to the AJAX Api to fit our needs and 
>>>> thought if you would be interested of them as well. There's two API 
>>>> actions, one to get the information of the current logged in users 
>>>> and the second one to get information of all the logged in users and 
>>>> optionally offline users and number of guest sessions active. The 
>>>> first one could be used for example to pass login information for an 
>>>> AJAX enabled portlet and the second one for users statistics and 
>>>> monitoring. We have a simple portlet building which would show a 
>>>> realtime status of the online users.
>>>>
>>>> The online/offline user statistics api can be easily secured to be 
>>>> used for admin only by setting the RoleSecurityBehavior. Data that 
>>>> it will produce for online users is:
>>>>
>>>> - status (online/offline)
>>>> - username
>>>> - ipaddress
>>>> - number of sessios
>>>> - all the userinfo there is (first name, last name,...)
>>>>
>>>> For offline user it will be the same except no sesssion number as it 
>>>> would be zero anyway.
>>>>
>>>> I've made some changes to the PortalStatistics(Impl) and 
>>>> UserStats(Impl) to store also the ip address and and it will now use 
>>>> that to distinguish the sessions of a user from another. In other 
>>>> words, the same user connecting from two different ip will be shown 
>>>> as separate users. If used just one ip, but two browsers (sessions) 
>>>> the sessions value will be increased. After some testing it would 
>>>> seem to work :D. Also getting the number guest sessions or any 
>>>> sessions needed a new method to PortalSessionManager.
>>>>
>>>> Does this make any sense or attach your interest?
>>>>
>>> It sounds like a very useful contribution.
>>> Please create a JIRA issue and attach a patch, and I will review and 
>>> commit it
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
>> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
>>
>>
> 
> 
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Re: Ajax api enhancements

Posted by David Sean Taylor <da...@bluesunrise.com>.
Looks good, I will review it and commit it if I don't have any problems

On Apr 19, 2007, at 1:52 PM, Mikko Wuokko wrote:

> Added Jira issue and patch
>
> https://issues.apache.org/jira/browse/JS2-685
>
> -Mikko
>
> David Sean Taylor wrote:
>> On Apr 17, 2007, at 11:43 AM, Mikko Wuokko wrote:
>>> Hi.
>>>
>>> I've made some enhancements to the AJAX Api to fit our needs and  
>>> thought if you would be interested of them as well. There's two  
>>> API actions, one to get the information of the current logged in  
>>> users and the second one to get information of all the logged in  
>>> users and optionally offline users and number of guest sessions  
>>> active. The first one could be used for example to pass login  
>>> information for an AJAX enabled portlet and the second one for  
>>> users statistics and monitoring. We have a simple portlet  
>>> building which would show a realtime status of the online users.
>>>
>>> The online/offline user statistics api can be easily secured to  
>>> be used for admin only by setting the RoleSecurityBehavior. Data  
>>> that it will produce for online users is:
>>>
>>> - status (online/offline)
>>> - username
>>> - ipaddress
>>> - number of sessios
>>> - all the userinfo there is (first name, last name,...)
>>>
>>> For offline user it will be the same except no sesssion number as  
>>> it would be zero anyway.
>>>
>>> I've made some changes to the PortalStatistics(Impl) and UserStats 
>>> (Impl) to store also the ip address and and it will now use that  
>>> to distinguish the sessions of a user from another. In other  
>>> words, the same user connecting from two different ip will be  
>>> shown as separate users. If used just one ip, but two browsers  
>>> (sessions) the sessions value will be increased. After some  
>>> testing it would seem to work :D. Also getting the number guest  
>>> sessions or any sessions needed a new method to  
>>> PortalSessionManager.
>>>
>>> Does this make any sense or attach your interest?
>>>
>> It sounds like a very useful contribution.
>> Please create a JIRA issue and attach a patch, and I will review  
>> and commit it
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
> For additional commands, e-mail: jetspeed-dev-help@portals.apache.org
>
>





Re: Ajax api enhancements

Posted by Mikko Wuokko <mi...@evtek.fi>.
Added Jira issue and patch

https://issues.apache.org/jira/browse/JS2-685

-Mikko

David Sean Taylor wrote:
> 
> On Apr 17, 2007, at 11:43 AM, Mikko Wuokko wrote:
> 
>> Hi.
>>
>> I've made some enhancements to the AJAX Api to fit our needs and 
>> thought if you would be interested of them as well. There's two API 
>> actions, one to get the information of the current logged in users and 
>> the second one to get information of all the logged in users and 
>> optionally offline users and number of guest sessions active. The 
>> first one could be used for example to pass login information for an 
>> AJAX enabled portlet and the second one for users statistics and 
>> monitoring. We have a simple portlet building which would show a 
>> realtime status of the online users.
>>
>> The online/offline user statistics api can be easily secured to be 
>> used for admin only by setting the RoleSecurityBehavior. Data that it 
>> will produce for online users is:
>>
>> - status (online/offline)
>> - username
>> - ipaddress
>> - number of sessios
>> - all the userinfo there is (first name, last name,...)
>>
>> For offline user it will be the same except no sesssion number as it 
>> would be zero anyway.
>>
>> I've made some changes to the PortalStatistics(Impl) and 
>> UserStats(Impl) to store also the ip address and and it will now use 
>> that to distinguish the sessions of a user from another. In other 
>> words, the same user connecting from two different ip will be shown as 
>> separate users. If used just one ip, but two browsers (sessions) the 
>> sessions value will be increased. After some testing it would seem to 
>> work :D. Also getting the number guest sessions or any sessions needed 
>> a new method to PortalSessionManager.
>>
>> Does this make any sense or attach your interest?
>>
> It sounds like a very useful contribution.
> Please create a JIRA issue and attach a patch, and I will review and 
> commit it
> 
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Re: Ajax api enhancements

Posted by David Sean Taylor <da...@bluesunrise.com>.
On Apr 17, 2007, at 11:43 AM, Mikko Wuokko wrote:

> Hi.
>
> I've made some enhancements to the AJAX Api to fit our needs and  
> thought if you would be interested of them as well. There's two API  
> actions, one to get the information of the current logged in users  
> and the second one to get information of all the logged in users  
> and optionally offline users and number of guest sessions active.  
> The first one could be used for example to pass login information  
> for an AJAX enabled portlet and the second one for users statistics  
> and monitoring. We have a simple portlet building which would show  
> a realtime status of the online users.
>
> The online/offline user statistics api can be easily secured to be  
> used for admin only by setting the RoleSecurityBehavior. Data that  
> it will produce for online users is:
>
> - status (online/offline)
> - username
> - ipaddress
> - number of sessios
> - all the userinfo there is (first name, last name,...)
>
> For offline user it will be the same except no sesssion number as  
> it would be zero anyway.
>
> I've made some changes to the PortalStatistics(Impl) and UserStats 
> (Impl) to store also the ip address and and it will now use that to  
> distinguish the sessions of a user from another. In other words,  
> the same user connecting from two different ip will be shown as  
> separate users. If used just one ip, but two browsers (sessions)  
> the sessions value will be increased. After some testing it would  
> seem to work :D. Also getting the number guest sessions or any  
> sessions needed a new method to PortalSessionManager.
>
> Does this make any sense or attach your interest?
>
It sounds like a very useful contribution.
Please create a JIRA issue and attach a patch, and I will review and  
commit it