Fetch all preferences for caching.
()
| 186 | |
| 187 | @blueprint.route("/get_all_cli", methods=["GET"], endpoint='get_all_cli') |
| 188 | def 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 | |
| 209 | def get_data(): |
nothing calls this directly
no test coverage detected