#------------------------------------------------------------------------------- @ModuleInfo.export(grt.INT) def initialize(): # this is called when WB finishes initializing itself # register ourselves for when SQL Editor tabs are opened nc = NotificationCenter() nc.add_observer(attachToSQLEditor, name="GRNSQLEditorOpened") nc.add_observer(handleReconnect, name="GRNSQLEditorReconnected") return 1 # scan for WBA modules at module load time wba_page_modules = wb_admin_main.scan_admin_modules() #------------------------------------------------------------------------------- @ModuleInfo.export(grt.classes.db_mgmt_ServerInstance, grt.classes.db_mgmt_Connection) def autoDetectLocalInstance(connection): """Create a Instance profile for the local server from the connection.""" instance = grt.classes.db_mgmt_ServerInstance() instance.connection = connection instance.name = connection.name instance.serverInfo["setupPending"] = True version = connection.parameterValues.get("serverVersion", None) if version: version = ".".join(version.split(".")[:2])
context.handle_reconnect() #------------------------------------------------------------------------------- @ModuleInfo.export(grt.INT) def initialize(): # this is called when WB finishes initializing itself # register ourselves for when SQL Editor tabs are opened nc = NotificationCenter() nc.add_observer(attachToSQLEditor, name = "GRNSQLEditorOpened") nc.add_observer(handleReconnect, name = "GRNSQLEditorReconnected") return 1 # scan for WBA modules at module load time wba_page_modules = wb_admin_main.scan_admin_modules() #------------------------------------------------------------------------------- @ModuleInfo.export(grt.classes.db_mgmt_ServerInstance, grt.classes.db_mgmt_Connection) def autoDetectLocalInstance(connection): """Create a Instance profile for the local server from the connection.""" instance = grt.classes.db_mgmt_ServerInstance() instance.connection = connection instance.name = connection.name instance.serverInfo["setupPending"] = True version = connection.parameterValues.get("serverVersion", None) if version: version = ".".join(version.split(".")[:2])