mirror of https://github.com/m-labs/artiq.git
dashboard: tidy dashboard naming logic
This commit is contained in:
parent
fbd4d8eb6f
commit
1426ecad64
|
@ -113,10 +113,10 @@ def main():
|
||||||
rpc_clients[target] = client
|
rpc_clients[target] = client
|
||||||
|
|
||||||
config = Client(args.server, args.port_control, "master_config")
|
config = Client(args.server, args.port_control, "master_config")
|
||||||
atexit.register(config.close_rpc)
|
try:
|
||||||
server_name = config.get_name()
|
server_name = config.get_name()
|
||||||
if server_name is None:
|
finally:
|
||||||
server_name = args.server
|
config.close_rpc()
|
||||||
|
|
||||||
disconnect_reported = False
|
disconnect_reported = False
|
||||||
def report_disconnect():
|
def report_disconnect():
|
||||||
|
@ -147,7 +147,7 @@ def main():
|
||||||
broadcast_clients[target] = client
|
broadcast_clients[target] = client
|
||||||
|
|
||||||
# initialize main window
|
# initialize main window
|
||||||
main_window = MainWindow(server_name)
|
main_window = MainWindow(args.server if server_name is None else server_name)
|
||||||
smgr.register(main_window)
|
smgr.register(main_window)
|
||||||
mdi_area = MdiArea()
|
mdi_area = MdiArea()
|
||||||
mdi_area.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
|
mdi_area.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAsNeeded)
|
||||||
|
@ -218,9 +218,11 @@ def main():
|
||||||
if d_log0 is not None:
|
if d_log0 is not None:
|
||||||
main_window.tabifyDockWidget(d_schedule, d_log0)
|
main_window.tabifyDockWidget(d_schedule, d_log0)
|
||||||
|
|
||||||
server_description = server_name
|
|
||||||
if server_name != args.server:
|
if server_name is not None:
|
||||||
server_description += " ({})".format(args.server)
|
server_description = server_name + " ({})".format(args.server)
|
||||||
|
else:
|
||||||
|
server_description = args.server
|
||||||
logging.info("ARTIQ dashboard %s connected to %s",
|
logging.info("ARTIQ dashboard %s connected to %s",
|
||||||
artiq_version, server_description)
|
artiq_version, server_description)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue