Skip to content

Commit

Permalink
ui,stats: added dst_ip column to rules details
Browse files Browse the repository at this point in the history
Display dst_ip column when filtering connections by rule (tabs
Rule->double click on a rule).
  • Loading branch information
gustavo-iniguez-goya committed Jul 27, 2023
1 parent e638b00 commit cb57c11
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions ui/opensnitch/dialogs/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -2256,27 +2256,26 @@ def _set_rules_query(self, rule_name="", node=""):
"c.uid as {3}, " \
"c.protocol as {4}, " \
"c.dst_port as {5}, " \
"CASE c.dst_host WHEN ''" \
" THEN c.dst_ip " \
" ELSE c.dst_host " \
"END {6}, " \
"c.process as {7}, " \
"c.process_args as {8}, " \
"c.dst_ip as {6}, " \
"c.dst_host as {7}, " \
"c.process as {8}, " \
"c.process_args as {9}, " \
"c.process_cwd as CWD " \
"FROM connections as c " \
"WHERE {9} GROUP BY c.process, c.process_args, c.uid, {10}, c.dst_port {11}".format(
"WHERE {10} GROUP BY c.process, c.process_args, c.uid, c.dst_ip, c.dst_host, c.dst_port {11}".format(
self.COL_STR_TIME,
self.COL_STR_NODE,
self.COL_STR_HITS,
self.COL_STR_UID,
self.COL_STR_PROTOCOL,
self.COL_STR_DST_PORT,
self.COL_STR_DESTINATION,
self.COL_STR_DST_IP,
self.COL_STR_DST_HOST,
self.COL_STR_PROCESS,
self.COL_STR_PROC_CMDLINE,
condition,
self.COL_STR_DESTINATION,
self._get_order() + self._get_limit()))
self._get_order() + self._get_limit()
))

def _set_hosts_query(self, data):
model = self._get_active_table().model()
Expand Down

0 comments on commit cb57c11

Please sign in to comment.