-
-
Notifications
You must be signed in to change notification settings - Fork 79
WIP New devices stats report #316
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please change the quiery as I recommended.
In the mean time I'll check how it looks (and add a screenshot if nice to show)
$domain = $range = $serie = []; | ||
$FlyvemdmAgent = PluginFlyvemdmAgent::getTable(); | ||
$logTable = Log::getTable(); | ||
$query = "SELECT l.`new_value` AS online_date, f.`name` AS agent_name, f.`id` AS agent_id |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you introduce queries un the plugin, use the query builder. RAW SQL queries is deprecated.
http://glpi-developer-documentation.readthedocs.io/en/master/devapi/database/index.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done it on new commit
if we have hundreds or thousands of agents, I think the graph will be unreadable. I think it would be more interesting to count the number of devices online per hour of a day for example. But again, this would be useful only for the current day, or the few last ones. Moreover the current query tracks the is_online changes, not their status at some point of the timeline. As is, I'm not convinced the admin will get useful information from this graph. I think it would be more interesting to get the online ratio per hour for the last few days (week for example ?) Also the logs table may be deleted by a plugin for GLPI X days we have a limited ability to look in the past. |
Also you should filter by search option 11, not 8. 11 is the flag is_online, and it is t imestamped in the logs. |
I'm conscious about having a lot of data on the report. The query is incomplete and the idea is show only a range of days maybe 5 days by default. Let's try first to show the data and then create the default range of info to show |
What about the other points I talked about. Do you plan to show every agent ? Do you plan to show dots for is_online changes ? |
a4aca14
to
9b5fc34
Compare
Signed-off-by: Domingo Oropeza <[email protected]>
Signed-off-by: Domingo Oropeza <[email protected]>
Signed-off-by: Domingo Oropeza <[email protected]>
Signed-off-by: Domingo Oropeza <[email protected]>
9b5fc34
to
67a2c1c
Compare
Changes description
Add a new graph to show the last contacted date and time for agents
Checklist
Please check if your PR fulfills the following specifications:
References
Closes flyve-mdm/glpi-plugin#34