When selecting the db name from the Preferences dialog, it's possible to
enter a relative path as name, like: mydir/my.db
In this case we were failing to use the db, because the path doesn't
exist. We should only allow to select file names.
See: #1463
The main window has been refactorized into smaller components, to
improve maintainability and scalability.
This is the first step toward a more complete GUI.
- Added a base class with common methods for widget manipulation.
Plugins should call these methods rather than accessing directly
the widgets by name.
- Functionality grouped into their own classes and files:
Config: views global definitions.
Views: functionality related with the interaction of the widgets.
Queries: common methods for querying and filtering data.
Menus: methods for building (contextual) menus.
Tasks: background related tasks (netstat, node monitoring, ...)
- New functionality:
* added advanced search: allow to select fields to build complex
queries.
- Fixed crash when refreshing the views with multiple nodes connected.
- Avoid excessive view refreshes:
The GenericTableView overrides the resizeEvent() to refresh the views
when the user resizes the window.
Unfortunately resizeEvent() is fired on more situations, like when
enter into a detailed view or when going back to the generic view.
This was causing excessive view refreshes, and crashes.
Originally we had one single function to check connection properties
against rules, which accepted only strings.
As we've added new functionality, this single function has been made
generic, to accept any type of data. From a code readability point of
view, it has worked well, but at the cost of a slight performance
penalty.
Now in order to gain a little bit of performance by avoiding types
conversion, we'll use 2 callbacks:
- a generic callback that accepts data of any type.
- and a simple one that accepts strings.
When a node connects to the GUI (server) for the first time, it's
identified by the connection (src_port:address:dst_port).
We save it to identify and manage the node.
When a node disconnects from the server (GUI), the session and the
node address are the same, so we update the status accordingly.
However, if a node does not respond for some time (minutes, hours,...), and then
reconnects again, it'll connect with a new sesion address
(src_port:addr:dst_port).
In this situation, the old session still exists on the server, and when
it exceeds the maximum lifetime, the server closes it and reporting the old
session address.
Therefore, to prevent the current node from being marked as 'offline',
we ignore this notification.
- Connect the hyperlink signal only when configuring the plugin.
Once we'll be able to configure the plugin from the GUI, we'll also
need to disconnect it first.
- Allow to configure server (UI) keepalive and keepalive timeout values.
- Increase spinBox values using the single-step defined value.
- Translate left panel section names.
Main window split into two areas:
- a left panel listing the main configuration sections.
- a right panel containing the configurable options.
We were running out of space, so this should help to organize all the
options a bit better.