ui, sys fw: reformat how expressions are painted

instead of "== tcp dport 8888" display "tcp dport == 8888"
This commit is contained in:
Gustavo Iñiguez Goia 2023-05-04 15:23:10 +02:00
parent 1ff61a913c
commit 8954145735
Failed to generate hash of commit

View file

@ -274,10 +274,9 @@ class Rules(QObject):
cols.append(rule.Description)
exprs = ""
for e in rule.Expressions:
exprs += "{0} {1} {2}".format(
e.Statement.Op,
exprs += "{0} {1}".format(
e.Statement.Name,
"".join(["{0} {1} ".format(h.Key, h.Value) for h in e.Statement.Values ])
"".join(["{0} {1} {2} ".format(h.Key, e.Statement.Op, h.Value) for h in e.Statement.Values ])
)
cols.append(exprs)
cols.append(rule.Target)