Commit graph

21 commits

Author SHA1 Message Date
Gustavo Iñiguez Goia
9d5823c48b
ui: improved nodes management
- Fixed reconfiguring nodes address from/to unix sockets <-> net
   sockets.
 - Fixed updating nodes status when connecting/disconnecting.
2023-01-02 19:54:15 +01:00
Gustavo Iñiguez Goia
31d2cd550d
ui: fixed launcher import 2022-11-17 00:07:42 +01:00
Gustavo Iñiguez Goia
915b325a00
ui: allow to configure (local) server address
Up until now, the daemon communicated with the GUI via a unix socket,
stored in /tmp.

/tmp however can be erased at any time (tmpreaper, systemd-tmpfiles.d),
which may lead to remove our unix socket file, and hence losing
connectiong with the daemon.

Now the user has the option to store the socket file under
/run/user/$uid/opensnitch/
https://www.linuxbase.org/betaspecs/fhs/fhs.html#runRuntimeVariableData

In the future we may switch to this path by default.
2022-10-06 13:57:52 +02:00
Gustavo Iñiguez Goia
f54eb789ff ui: improved shutting down
We needed to close the Notifications channel of each node on close.
Closing only grpc's server was not enough.

Closes #677
2022-06-24 13:23:38 +02:00
Gustavo Iñiguez Goia
0aef656c42 ui: allow to use GUI themes
Now the user can personalize GUI's appearance (#424).

There're 15 default themes, dark and light, that will help integrating
on some environments (#303, #335).

More themes can be added, by creating a new xml under
~/.config/opensnitch/themes/ or
/usr/lib/python3/dist-packages/opensnitch/

The lib used is https://github.com/UN-GCPDS/qt-material.
https://github.com/UN-GCPDS/qt-material#custom-colors
2022-03-22 13:16:18 +01:00
Gustavo Iñiguez Goia
fd231e7645 ui: set app icon on all dialogs, misc.
- Use a good quality icon on all dialogs.
- Set the icon off when closing, to let the user know that we're
  exiting.
- Decreased time to wait to exit to 5secs.
2022-01-10 19:40:39 +01:00
Gustavo Iñiguez Goia
a2a0b8be20 ui: misc improvements
- If sys.exit() fails, force exit after 10s.
- Close db connection on exit.
- When closing the GUI (server), set connected nodes to offline.
  The status will be updated when nodes connect again / when the server
  is available again.
  Otherwise, we may end up with nodes marked as _online_ when in reality
  they're not connected.
- Add nodes on the main thread.
2022-01-04 00:21:30 +01:00
Gustavo Iñiguez Goia
4332469fc2 improved nodes connectivity handling
problem:
 - after losing network connectivity node<->server, the node didn't restore
   the connection. In reality, the connection with the server was not
   closed, but the notifications channel was closed due to inactivity
   after 20s.

set inactivity timeouts to 20s on both node and server. Previous
timeouts were 2h for the main connection and 20s for the streaming
channels (notifications).

- get rid of the logic to determine if the server is alive or not based
  on sending pings.
  Instead, use the connection events when a node connects/disconnects
  (Subscribe).
  The Ping call is still used to send the statistics.

other:
- fixed exception when updating the status of a node.
2021-04-11 20:55:14 +02:00
Gustavo Iñiguez Goia
a6d1e585e1 ui, bin: fixed typo that prevented loading translations 2021-01-03 00:50:35 +01:00
Gustavo Iñiguez Goia
e05cb3a865 added support for internazionalization
Read ui/i18n/README.md for information about how to add new
languages.

requested here: #319
2021-01-02 21:40:19 +01:00
Gustavo Iñiguez Goia
c25f49d8a7 ui: fixed launching the UI on more environments
Better resolve where the UI python package is.

related #59
2020-11-28 11:02:03 +01: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
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
c4a9a21afa fixed HighDpi scaling
This should fix the warning message:
"Attribute Qt::AA_EnableHighDpiScaling must be set before
QCoreApplication is created."

Which should fix the small fonts reported by some users.
We may also need AA_UseHighDpiPixmaps.
2020-02-22 00:48:19 +01:00
Gustavo Iñiguez Goia
b409eca0ed Fixed UI crash when configuring high dpi scaling on some systems
On LinuxMint18 even with a compatible PyQt lib, it crashes, so just
don't set this option.
2020-02-19 01:04:58 +01:00
Gustavo Iñiguez Goia
1e6d2c0b67 Unified UI config files
Originally UI config file was saved to ~/.opensnitch/ui-config.json

Now those values are saved to ~/.config/opensnitch/settings.conf, along
with new ones.

Closes #3
2020-02-09 20:56:26 +01:00
Gustavo Iñiguez Goia
77018a82a1 EnableHighDpiScaling only if qt version >= 5.6.0
It was addded in 5.6 version
https://doc-snapshots.qt.io/qtforpython/PySide2/QtCore/Qt.html
2019-11-25 21:41:25 +01:00
MiWCryptAnalytics
f8ede5ed0e
Add UI Scaling for HiDPi Support
This fixes the scaling issue on hi dpi displays (4K, etc) that render the window too small with overlapping widgets.
2018-09-17 23:52:51 -04:00
evilsocket
1833e78177
UI default behaviour can now be configured with a JSON file (closes #153) 2018-04-16 12:54:25 +02:00
evilsocket
ec6ecea8b4
UI is now using python3 2018-04-11 15:35:29 +02:00
evilsocket
2355c3c400
made ui application pip installable (ref #118) 2018-04-10 16:56:29 +02:00