[Kimchi-devel] [PATCH] [Wok] Wok BugFix - session message appearing on login

Aline Manera alinefm at linux.vnet.ibm.com
Mon Aug 22 18:15:43 UTC 2016



On 08/03/2016 10:51 AM, Daniel Henrique Barboza wrote:
> My first comment is that I see this session message every time
> I open the login window (access wokd URL). I think it has something
> to do with the brief opening of the User Log view for like 1 second
> before showing the login window. It is easily reproducible: just open
> wok URL without logging in. You'll see the User Log + this session
> message flashing for a moment every time.
>

Hi Daniel,

I could not see the issue you said when accessing the login page.
I can only see the issue right after the login.

> I am saying this because you patch is trying to fix the issue
> when logging in and, perhaps, we can look at this scenario
> pre-login as well (don't need to be in this same patch).
>
> More comments below.
>
>
>
> On 08/02/2016 05:22 PM, peterpnns at gmail.com wrote:
>> From: peterpennings <peterpnns at gmail.com>
>>
>> Signed-off-by: peterpennings <peterpnns at gmail.com>
>> ---
>>   ui/js/src/wok.api.js | 3 +++
>>   1 file changed, 3 insertions(+)
>>
>> diff --git a/ui/js/src/wok.api.js b/ui/js/src/wok.api.js
>> index e2829ab..2c3206c 100644
>> --- a/ui/js/src/wok.api.js
>> +++ b/ui/js/src/wok.api.js
>> @@ -43,6 +43,9 @@ var wok = {
>>           settings['wok'] = true;
>>           settings['complete'] = function(req) {
>>               wok.session.remainingSessionTime = 
>> req.getResponseHeader('Session-Expires-On');
>> +            if (wok.session.remainingSessionTime == null) {
>> +                wok.session.remainingSessionTime = 30;
>> +            }
>
> I don't like how we are hardcoding the '30'. These are the instances
> I've found of this timer (with your patch applied):
>
> [danielhb at arthas src]$ grep -R '30' .
> ./wok.session.js:    remaingTimeToShowAlert: 30000,
> ./wok.session.js:            $("#session-expiring-alert 
> p").html("<script>var message = i18n['WOKSESS0001M'].replace('%1', 30);"
> ./wok.session.js:                + "var n = 30;"
> ./wok.api.js:                wok.session.remainingSessionTime = 30;
> [danielhb at arthas src]$
>
> We need to put this 30 in a variable to be accessible by all these
> instances. Otherwise any change of this timer will require searching
> for every hardcoded instance of it.
>
>
> Daniel
>
>
>
>
>> wok.session.remainingSessionTime = 
>> (parseInt(wok.session.remainingSessionTime, 10) * 1000);
>>               if (!wok.session.flagInTimer) {
>>                   wok.session.refreshExpiringCounter();
>
> _______________________________________________
> Kimchi-devel mailing list
> Kimchi-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/kimchi-devel
>




More information about the Kimchi-devel mailing list