opEvents filter feature allows the user to save a filter for the "Current Events" table in opEvents. This feature also allows to bookmark the url with filter params in it which can be reused or shared with others.
Create a filter:
Use the current events table filter (above the table on right side) to filter the data.
Click on the Save filter button.
A modal will open.
Enter the name for filter and save the filter.
The saved filters will show up in the dropdown next to "Save Filter" button. Selecting a filter from the saved list will apply the filter to the current events table.
Editing/ Deleting a filter:
The filter cannot be edited or deleted using the GUI in this release.
The filter is saved at the below location and can be accessed to modify / delete a filter: /var/filters.json
The JSON file has below structure:
(NOTE: "groups" field has no impact on the filters in the current release)
{ "filters" : [ { "fields" : { "priority" : 1, "node" : "iregex:check" }, "name" : "Filter2", "groups" : [ "network" ] }, { "fields" : { "node" : "iregex:check", "priority" : "1" }, "groups" : [ "network" ], "name" : "Filter1" }, { "groups" : [ "network" ], "name" : "Filter3", "fields" : { "node" : "iregex:check-thor", "priority" : "3" } }, { "fields" : { "node" : "iregex:check-thor-fulla", "priority" : "4" }, "name" : "Filter4", "groups" : [ "network" ] } ] }
Changes in the URL structure:
The new URL for opEvents when filtering the data will look like:
/en/omk/opEvents/active_events#events_filter/?filter={"node"%3A"iregex%3Aomk"%2C"priority"%3A"3"}
The users can now modify the filters parameters in the URL directly which will be reflected in the GUI. Users can also bookmark this URL which will load the correct filtered data when used later.
NOTE: Using the advanced filter or the period selector will override the filter URL.