Hi,
How many logs do you think the page should display? Should we use pagination? I think
since Ginger already included jQuery Boogrid in Wok maybe we can use this library
however...
-The search/filter will look for any word typed by the user. I mean, the filter function
will look up for any string in a row, we can't put a button to "Search by
date" or "search by request", if the user types a date, it will filter this
date. If the user filter "Kimchi" and there's a user named
"kimchiuser", the log will show all records starting with "kimchi" and
will display all actions done in Kimchi plugin and actions in other plugins done by
kimchiuser.
Here's an example that uses selection and includes filter, sorting and pagination:
http://www.jquery-bootgrid.com/Examples#selection
My only concern is that this datatable is slightly different than the other tables that we
use in Kimchi and Ginger. I think we can customize it with CSS to look like wok.datagrid()
widget. If we have to add pagination, then we'll use jQuery Bootgrid. If we don't
need to page the records, then we'll use wok.datagrid().
Samuel
-----Original Message-----
From: kimchi-devel-bounces(a)ovirt.org [mailto:kimchi-devel-bounces@ovirt.org] On Behalf Of
Lucio Correia
Sent: sexta-feira, 5 de fevereiro de 2016 18:52
To: Kimchi Devel <kimchi-devel(a)ovirt.org>
Subject: [Kimchi-devel] [RFC] [Wok] Feature: User Activity Log
User Activity Log functionality
-------------------------------
Host admin wants to have access to all actions performed by Wok users, either through API,
web user interface, with the option to download User Acitivity Log in a text file.
REST API
--------
Only one API will be exposed:
- GET /logs - Collection of log entries for all installed plugins.
Examples of filtering:
/logs?plugin=kimchi - All log entries for Kimchi plugin /logs?user=admin - All log entries
from admin user /logs?request=PUT - All log entries relative to PUT requests
/logs?date=20160110 - All Jan 10th's log entries
Backend design
--------------
- Define activity texts for each currently implemented activity of all plugins
- Implement method to retrieve the activity texts in Wok and all plugins
- Log events to a JSON file in the host file system. Each user request received by Wok
will generate an entry in the respective log file.
Fields to be saved for each entry: plugin, datetime, user, request type (PUT, POST, GET,
DELETE), activity text (i.e. "create guest 'vm-sample'")
- Implement code for retrieving and filtering log events by the fields above
Web User interface design
-------------------------
Create a new tab: "User Activity" - available only to Wok admins
- Search fields to filter log events by installed plugin, date, user, and/or request type
- Show search results in a table containing plugin, datetime, user, request type, activity
text
- User may sort the table by plugin, datetime, user or request type
- Button for downloading current search results as a txt file
--
Lucio Correia
Software Engineer
IBM LTC Brazil
_______________________________________________
Kimchi-devel mailing list
Kimchi-devel(a)ovirt.org
http://lists.ovirt.org/mailman/listinfo/kimchi-devel