Skip to content

Commit

Permalink
Stage 1 prep for html GUI
Browse files Browse the repository at this point in the history
Issue #319
  • Loading branch information
damies13 committed Nov 11, 2024
1 parent 7870f69 commit d2ce867
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 6 deletions.
21 changes: 17 additions & 4 deletions rfswarm_manager/rfswarm.py
Original file line number Diff line number Diff line change
Expand Up @@ -2387,6 +2387,10 @@ def __init__(self, master=None):
parser.add_argument('-e', '--ipaddress', help='IP Address to bind the server to')
parser.add_argument('-p', '--port', help='Port number to bind the server to')
parser.add_argument('-c', '--create', help='ICON : Create application icon / shortcut')
# to be deprecated by version 2.1
parser.add_argument('--tkinter', help='Run v1.x tkinter GUI')
parser.add_argument('--html', help='Run v2.x html GUI')

base.args = parser.parse_args()

base.debugmsg(6, "base.args: ", base.args)
Expand Down Expand Up @@ -2588,7 +2592,16 @@ def __init__(self, master=None):
if not base.args.run:
base.args.run = True
else:
base.gui = RFSwarmGUI()
if base.args.tkinter:
base.gui = RFSwarmGUItk()

if base.args.html:
base.gui = RFSwarmGUIhtml()

if not base.args.tkinter and not base.args.html:
# run default
base.gui = RFSwarmGUItk()
# base.gui = RFSwarmGUIhtml()

self.BuildCore()

Expand Down Expand Up @@ -3956,7 +3969,7 @@ def delayed_UpdateAgents(self):
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #


class RFSwarmGUI(tk.Frame):
class RFSwarmGUItk(tk.Frame):
# titleprefix = 'Robot Framework Swarm'
titleprefix = 'RFSwarm'

Expand Down Expand Up @@ -6832,9 +6845,9 @@ def sr_users_validate(self, *args):
except Exception:
pass
return True
base.debugmsg(9, "RFSwarmGUI: grid_size:", self.scriptgrid.grid_size())
base.debugmsg(9, "grid_size:", self.scriptgrid.grid_size())
for r in range(self.scriptgrid.grid_size()[1]):
base.debugmsg(9, "RFSwarmGUI: r:", r)
base.debugmsg(9, "r:", r)
if r > 0:
usrs = self.scriptgrid.grid_slaves(column=self.plancolusr, row=r)[0].get()
base.debugmsg(9, "Row:", r, "Robots:", usrs)
Expand Down
17 changes: 15 additions & 2 deletions rfswarm_reporter/rfswarm_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -3500,6 +3500,10 @@ def __init__(self, master=None):
# parser.add_argument('--odt', help='Generate an OpenOffice/LibreOffice Writer report', action='store_true')
# parser.add_argument('--ods', help='Generate an OpenOffice/LibreOffice Calc report', action='store_true')
parser.add_argument('-c', '--create', help='ICON : Create application icon / shortcut')
# to be deprecated by version 2.1
parser.add_argument('--tkinter', help='Run v1.x tkinter GUI')
parser.add_argument('--html', help='Run v2.x html GUI')

base.args = parser.parse_args()

base.debugmsg(6, "base.args: ", base.args)
Expand Down Expand Up @@ -3656,7 +3660,16 @@ def __init__(self, master=None):
self.t_export["xlsx"].start()

if base.displaygui:
base.gui = ReporterGUI()
if base.args.tkinter:
base.gui = ReporterGUItk()

if base.args.html:
base.gui = ReporterGUIhtml()

if not base.args.tkinter and not base.args.html:
# run default
base.gui = ReporterGUItk()
# base.gui = ReporterGUIhtml()
else:
# t_export
for thd in self.t_export.keys():
Expand Down Expand Up @@ -7096,7 +7109,7 @@ def xlsx_sections_errors_fill_cell(self, cellcol, rownum, val, style, span):
cell.style = style


class ReporterGUI(tk.Frame):
class ReporterGUItk(tk.Frame):

style_reportbg_colour = "white"
style_feild_colour = "white"
Expand Down

0 comments on commit d2ce867

Please sign in to comment.