Commit graph

192 commits

Author SHA1 Message Date
Gustavo Iñiguez Goia
6522a94937 ui: make pop-up dialogs optionals
If the default timeout is set to 0, do not display the pop-up dialog and
apply the default configured actions.

Fixed typo in preferences dialog.
2020-10-25 23:56:10 +01:00
Gustavo Iñiguez Goia
d815d4c2cc ui, preferences: display configuration result
Display if the configuration sent to a node has been applied correctly.
2020-10-25 01:06:10 +02:00
Gustavo Iñiguez Goia
1c3a9d1ba4 ui: fixed viewing stats of a node
clicking from the General tab
2020-10-24 22:19:00 +02:00
Gustavo Iñiguez Goia
6637861f33 ui, ruleseditor: set and load case-sensitive field correctly 2020-10-23 23:36:39 +02:00
Gustavo Iñiguez Goia
ab46cca43a added priority and case-sensitive rules, fixes
nodes:
 - added WA for backward compatibility with older protobuf libs.

stats:
 - added sensitive and priority rules columns
 - fixed selecting a node from the General tab.
 - if DstHost is empty, display the IP instead.
 - Hosts tab nw only lists hosts.

rules editor:
 - added options to define if a rule has precedence and if it's
   case-sensitive (for all fields for now). Default is case-insensitive.

closes #36
2020-10-23 01:04:49 +02:00
Gustavo Iñiguez Goia
e919bd557c ui: refresh rules list after rules deletion
It was not being refresh properly. Mentioned here #28#issuecomment-633700103
2020-10-19 23:51:53 +02:00
Gustavo Iñiguez Goia
d3d8aa9029 ui: set an alternative theme if the default one fails
In some scenarios some button icons are not available.

In these cases we'll first try to use the fallback theme, f it's
configured. If the buttons are still not available, list the themes
installed, and determine which one has the buttons we need, then use it.

If all this fails, then display a warning message to the user.

closes #53
2020-10-19 23:12:01 +02:00
Gustavo Iñiguez Goia
3f3e2d6de0 ui: added backward compatibility with old protobuf package 2020-10-19 19:03:04 +02:00
Gustavo Iñiguez Goia
0921ca46e3 ui,systray icon: display IP if dst_host is empty 2020-10-19 19:01:19 +02:00
Gustavo Iñiguez Goia
c5da68d8e1 ui: if dst_host is empty, display the IP
Destination host field can be empty sometimes. In these cases display
the IP.
2020-10-19 18:57:26 +02:00
Gustavo Iñiguez Goia
1f6a2db964 ui: don't set the focus on the action buttons
Sometimes you can deny/allow a connection unintentionally while typing.
Now the focus is set to the "+" button, and you can jump to the deny or
allow button with the arrow keys.

Issue #58.
2020-10-14 23:35:05 +02:00
Gustavo Iñiguez Goia
7deb2f3212 ui: fixed python3 system libs path on OpenSuse
/usr/lib/python3/dist-packages/ was missing on OpenSuse TumbleWeed.
Maybe it's not the best solution, but solves the problem for now.

Reported by zaggynl here #59.
2020-09-26 01:13:32 +02:00
Gustavo Iñiguez Goia
d137a50d41 check GUI and daemon versions granularly
Do not display the warning dialog about diferent versions
(daemon<->GUI), if we only have relesed fixes or minor changes.
2020-07-28 22:38:53 +02:00
Gustavo Iñiguez Goia
dba0c83ced fixed crash when clicking on a General tab wrong column
Reported here: https://github.com/gustavo-iniguez-goya/opensnitch/issues/38#issuecomment-665006899
2020-07-28 18:23:21 +02:00
Gustavo Iñiguez Goia
ace124ad6a added the host to the options of the pop-up dialog
The host to where a process is connecting to was missing in the options
list, when the connection to allow was a query to resolve the domain
name. Reported here: #48

Also added the connection port to the rule name.
2020-07-20 23:59:14 +02:00
Gustavo Iñiguez Goia
97139ecc6b UI: shorten default rules name
Default rules name can be extremely long when the rule is of type list.
It still will be in some cases, but should work in most cases.

closes #37
2020-06-26 22:47:44 +02:00
Gustavo Iñiguez Goia
8494bfd982 UI: changed preferences dialog title 2020-06-26 21:53:17 +02:00
Gustavo Iñiguez Goia
0d80af45c2 UI: force to bring the allow/deny pop-up to the front
This solves an issue where the pop-up was only displayed on the same
screen/desktop/workspace where the main window was.
2020-06-25 18:52:29 +02:00
Gustavo Iñiguez Goia
de00e89302 UI: set pop-up action buttons focus
Set the focus of the action buttons deny/allow, based on the configured
action.
2020-06-23 02:09:35 +02:00
Gustavo Iñiguez Goia
db02c4a394 UI: improved general tab fields filtering 2020-06-23 02:04:25 +02:00
Gustavo Iñiguez Goia
0af606d348 UI: fixed columns sorting after restoring settings
When restoring columns size state, the clicked events of the headers
(qtableview) were being fired, so the sort order was being not
respected.

Ensure also that changes to the general tab only affects to that tab.
2020-06-23 00:48:48 +02:00
Gustavo Iñiguez Goia
fe639887f0 UI: save settings on hiding stats window
Since we show and hide the stats window just by clicking on the systray
icon, the window is not closed, or at least the closEvent() is not being
fired, so the settings were not being saved.
2020-06-22 17:03:08 +02:00
Gustavo Iñiguez Goia
3011d9fd53 UI: show/hide stats window by clicking on the systray icon
closes #39
2020-06-21 00:40:01 +02:00
Gustavo Iñiguez Goia
73eb5b65eb UI: display process path if it's hidden
If a process path does not appear in the app name or the process
cmdline, display it on the pop-up dialog.
2020-06-21 00:14:20 +02:00
Gustavo Iñiguez Goia
0c640806f9 UI: added CWD field.
Added Current Working Directory of a process.
2020-06-19 18:26:03 +02:00
Gustavo Iñiguez Goia
c8b1722f3e UI: reset rule name when creating a new one 2020-06-19 18:17:39 +02:00
Gustavo Iñiguez Goia
e217dedef7 UI: fixed crash when clicking on a user name
fixes #38
2020-06-17 20:32:12 +02:00
Gustavo Iñiguez Goia
970d04f961 UI: added help menu to rules editor dialog 2020-06-13 18:44:00 +02:00
Gustavo Iñiguez Goia
10f74b97cd UI: save nodes columns size
and restore them on startup.
2020-06-13 17:42:12 +02:00
Gustavo Iñiguez Goia
36dd601019 UI: fixed events limit on General tab 2020-06-13 16:40:14 +02:00
Gustavo Iñiguez Goia
a9e622017d UI: allow to resize rules table columns and remember position 2020-06-11 01:18:47 +02:00
Gustavo Iñiguez Goia
39015bd4f5 UI: updated grpc protocol 2020-06-08 00:00:15 +02:00
Gustavo Iñiguez Goia
12d62f548b UI: revert main columns autosizing, allow to restore defined size
Reported here: #23

Now if a user resize a column manually on the first tab, or
adjust it to the column contents by double clicking on the middle
of the columns, the next time the UI is shown the columns size will
be restored.
2020-06-07 00:44:15 +02:00
Gustavo Iñiguez Goia
301e3db0cb UI: improved pop-up dialog widgets resizing 2020-06-07 00:40:33 +02:00
Gustavo Iñiguez Goia
374c5e2f90 UI: fixed pop-up dialog settings
Fixed default settings when it's the first time it's shown.
Fixed default action settings key
Fixed default target configured from the preferences dialog.
Set default pop-up dialog size on shown event.
2020-06-07 00:35:41 +02:00
Gustavo Iñiguez Goia
3df6783b75 UI: changed Action combo by 2 buttons, CWD label
By changing the Action combobox by 2 buttons (allow/deny), we ease the
task of allowing or denying a connection.

Added a label to display from what directory a process was executed.

Pop-up GUI reorganized.

closes #13
2020-06-05 10:35:07 +02:00
Gustavo Iñiguez Goia
41b6020fef UI: allow to filter data in all tabs
Requested here: #28

Previously we could filter data only in the General tab, but the Hosts
and Addresses lists tend to be huge, so allowing to filter it helps to
find a host or IP quickly.
2020-06-01 02:07:43 +02:00
Gustavo Iñiguez Goia
ef8fe0a6b9 UI: fixed double clicking on the main table 2020-05-30 01:47:25 +02:00
Gustavo Iñiguez Goia
53d4959360 UI: refresh rules list after deleting a rule.
reported here #28
2020-05-25 22:05:47 +02:00
Gustavo Iñiguez Goia
61a65a3951 UI: fixed high cpu usage while notification is shown
closes #30
2020-05-25 01:13:07 +02:00
Gustavo Iñiguez Goia
59c8a01a66 UI: fixed columns sort order
Now when you enter into the details of a view (rules -> view rule), when
going back to the main view the order is preserved.
2020-05-24 23:55:54 +02:00
Gustavo Iñiguez Goia
08cfd6472f UI: allow to delete rules in batch
It helps to delete temporary rules.
2020-05-23 15:22:09 +02:00
Gustavo Iñiguez Goia
8cd41878f4 UI: fixed back icon
Should fix #26
2020-05-23 12:33:44 +02:00
Gustavo Iñiguez Goia
9523b0b051 UI: added missing ruleseditor.py
reported by @Ph0rk0z, I totally forgot it. Thank you!
2020-05-12 13:29:43 +02:00
Gustavo Iñiguez Goia
1101c1efab UI: allow to configure max allowed clients.
Default set to 10 instead of 4.
2020-05-12 01:18:40 +02:00
Gustavo Iñiguez Goia
74fe3b8734 UI: kill any running instance of the UI after login in
Fixes #15

Maybe not the proper way of doing it, but solves this particular
problem.
2020-05-12 00:12:28 +02:00
Gustavo Iñiguez Goia
53aa721b28 UI: added dialog to add/modify rules from the UI
Allow to add or modify rules from the UI.

The rules of all nodes are listed in the tab Rules.
Clicking on the name of the rule will display the connections that
matched the rule.

In this view 2 buttons are displayed: edit rule and delete rule.

Editing a rule will edit the rule for a particular node. If you want
the changes to be applied to all nodes you have to select that option.

All fields can have a regular expression. If the regular expression is
not valid, a message will be displayed on the dialog.

If the rule is applied correctly, "Rule applied" will be shown.
Otherwise an error will appear.

Bear in mind that this still a WIP commit. Bugs and errors will
appear that we'll have to fix.
2020-05-10 18:21:18 +02:00
Gustavo Iñiguez Goia
f1fd7a04eb UI: improved details views, added PID field
- Added PID field to the details views.
- Improved details queries, grouping more fields.
- Some fields reorganized.
2020-04-27 21:37:40 +02:00
Gustavo Iñiguez Goia
039a393ab1 UI: fixed race condition, improved UI performance
- Fixed race condition when adding stats to the db, specially when there
  were several nodes connected.
- Colorized allow/deny and online/offline words, to improve visual
  experience.
- UI performance has been improved, specially when there're multiple
  nodes sendings stats.
2020-04-26 19:54:52 +02:00
Gustavo Iñiguez Goia
dac78eb883 UI: improve db thread locking 2020-04-26 19:39:18 +02:00