Skip to content

Commit

Permalink
added SKIP and OK tokens for reports
Browse files Browse the repository at this point in the history
  • Loading branch information
giumas committed Nov 3, 2024
1 parent 78305c5 commit a5c911e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
4 changes: 3 additions & 1 deletion examples/app/report/ex_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
r += "OK"

r += "Check 2 [CHECK]"
r += "An issue"
r += "[SKIP] An issue"
r += "[ERROR] An issue"
r += "[WARNING] An issue"

r += "Section 2 [SKIP_SEC]"

Expand Down
20 changes: 17 additions & 3 deletions hyo2/abc2/app/report/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,21 +376,35 @@ def print_page_template():
if first_item == "[ERROR]":
if use_colors:
painter.setPen(red_pen)
painter.drawText(row_area, lc_flags, content_item)
painter.drawText(row_area, lc_flags, content_item[len("[ERROR] "):])
if use_colors:
painter.setPen(black_pen)

elif first_item == "[WARNING]":
if use_colors:
painter.setPen(orange_pen)
painter.drawText(row_area, lc_flags, content_item)
painter.drawText(row_area, lc_flags, content_item[len("[WARNING] "):])
if use_colors:
painter.setPen(black_pen)

elif first_item == "[INFO]":
if use_colors:
painter.setPen(magenta_pen)
painter.drawText(row_area, lc_flags, content_item)
painter.drawText(row_area, lc_flags, content_item[len("[INFO] "):])
if use_colors:
painter.setPen(black_pen)

elif first_item == "[SKIP]":
if use_colors:
painter.setPen(gray_pen)
painter.drawText(row_area, lc_flags, content_item[len("[SKIP] "):])
if use_colors:
painter.setPen(black_pen)

elif first_item == "[OK]":
if use_colors:
painter.setPen(gray_pen)
painter.drawText(row_area, lc_flags, content_item[len("[OK] "):])
if use_colors:
painter.setPen(black_pen)

Expand Down

0 comments on commit a5c911e

Please sign in to comment.