Feature suggestion: network activity health indicator in Visitors in Real-Time widget

Hi all,
The title almost says it all but I’ll try to elaborate.

What
I think this specific widget (Visitors in Real-Time) needs an icon that will let us know with just a glance whether the widget is still regularly fetching new events from the server. Maybe a plug+socket icon right next to the “Play” icon?

Why
The reason I’m suggesting this additional icon that might seem like unneeded crowding: I have two websites with distinct hosts, I have installed Piwik on both and I have a laptop that I move from office to home and vice-versa, putting it in sleep or hibernation. I OFTEN (actually, almost everyday) notice that the Visitors in Real-Time fails to resume activity like I’m expecting it to. On both sites.

Having Firebug open quite often, I’ve also noticed that a mere 10-second network failure is enough to stall the regular requests. A single 300 or 500 class HTTP error effectively stops the automatic refresh for good.

All that, in my eyes, makes the widget unreliable and it’s a shame.

How
I suggest that an icon informs users of the status of the refresh: the widget loads with a green icon that remains green as long as each successive network request is successfully completed. As soon as a request fails, whatever the reason, the icon turns red.

Even better, when a request fails, the widget moves on to a longer interval timer, say 3 minutes and shows a third icon meaning that the widget has backed off regarding the frequent updates and it is now in active standby. Now, THAT would be a killer widget :slight_smile:

OK, the elaboration turned out longer than I expected but you got the idea.

Can one of the Piwik developers who roam this forum point me to the general location of the widget’s source code? I’m going to do this myself if the code isn’t too convoluted.

the Live widget code is in plugins/Live/templates/ - good luck and maybe post a screenshot of your result.

I’ll get to this soon. In the meantime, I suggest the

be moved (in index.tpl) before the total visits template. That way, we won’t need to scroll down before clicking the Play button. Moreover, it seems more logical to me to have the buttons at the top of the widget since new visits appear at the top.

The widget will then be as shown in the attachment.