MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / get_all_cli

Function get_all_cli

web/pgadmin/preferences/__init__.py:188–206  ·  view source on GitHub ↗

Fetch all preferences for caching.

()

Source from the content-addressed store, hash-verified

186
187@blueprint.route("/get_all_cli", methods=["GET"], endpoint='get_all_cli')
188def get_all_cli():
189 """Fetch all preferences for caching."""
190 # Load Preferences
191 pref = Preferences.preferences()
192 res = {}
193
194 for m in pref:
195 if len(m['categories']):
196 for c in m['categories']:
197 for p in c['preferences']:
198 p['module'] = m['name']
199 res["{0}:{1}:{2}".format(m['label'], p['label'], c['label']
200 )] = "{0}:{1}:{2}".format(
201 p['module'],c['name'],p['name'])
202
203 return ajax_response(
204 response=res,
205 status=200
206 )
207
208
209def get_data():

Callers

nothing calls this directly

Calls 1

preferencesMethod · 0.80

Tested by

no test coverage detected