mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Fix an issue where servers are not listed in add new connection dialog.
This commit is contained in:
parent
b512404c85
commit
6e3ee1c607
@ -2172,7 +2172,8 @@ def _check_server_connection_status(sgid, sid=None):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
except Exception:
|
except Exception as e:
|
||||||
|
current_app.logger.exception(e)
|
||||||
return make_json_response(
|
return make_json_response(
|
||||||
data={
|
data={
|
||||||
'status': False,
|
'status': False,
|
||||||
@ -2212,12 +2213,12 @@ def get_new_connection_data(sgid=None, sid=None):
|
|||||||
conn = manager.connection()
|
conn = manager.connection()
|
||||||
connected = conn.connected()
|
connected = conn.connected()
|
||||||
server_group_data[server.servers.name].append({
|
server_group_data[server.servers.name].append({
|
||||||
'label': server.serialize['name'],
|
'label': server.name,
|
||||||
"value": server.serialize['id'],
|
"value": server.id,
|
||||||
'image': server_icon_and_background(connected, manager,
|
'image': server_icon_and_background(connected, manager,
|
||||||
server),
|
server),
|
||||||
'fgcolor': server.serialize['fgcolor'],
|
'fgcolor': server.fgcolor,
|
||||||
'bgcolor': server.serialize['bgcolor'],
|
'bgcolor': server.bgcolor,
|
||||||
'connected': connected})
|
'connected': connected})
|
||||||
|
|
||||||
msg = "Success"
|
msg = "Success"
|
||||||
@ -2231,7 +2232,8 @@ def get_new_connection_data(sgid=None, sid=None):
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
except Exception:
|
except Exception as e:
|
||||||
|
current_app.logger.exception(e)
|
||||||
return make_json_response(
|
return make_json_response(
|
||||||
data={
|
data={
|
||||||
'status': False,
|
'status': False,
|
||||||
@ -2311,7 +2313,8 @@ def get_new_connection_database(sgid, sid=None):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception as e:
|
||||||
|
current_app.logger.exception(e)
|
||||||
return make_json_response(
|
return make_json_response(
|
||||||
data={
|
data={
|
||||||
'status': False,
|
'status': False,
|
||||||
@ -2376,7 +2379,8 @@ def get_new_connection_user(sgid, sid=None):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception as e:
|
||||||
|
current_app.logger.exception(e)
|
||||||
return make_json_response(
|
return make_json_response(
|
||||||
data={
|
data={
|
||||||
'status': False,
|
'status': False,
|
||||||
@ -2439,7 +2443,8 @@ def get_new_connection_role(sgid, sid=None):
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
except Exception:
|
except Exception as e:
|
||||||
|
current_app.logger.exception(e)
|
||||||
return make_json_response(
|
return make_json_response(
|
||||||
data={
|
data={
|
||||||
'status': False,
|
'status': False,
|
||||||
|
Loading…
Reference in New Issue
Block a user