Helper Functions
charts_allow_anon_building_charts()
Check if anonymous users are allowed to build charts.
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if anonymous users are allowed to build charts, False otherwise.
TYPE:
|
Source code in ckanext/charts/helpers.py
80 81 82 83 84 85 86 | |
charts_get_resource_columns(resource_id)
Get the columns of the given resource.
| PARAMETER | DESCRIPTION |
|---|---|
resource_id
|
Resource ID
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
str
|
JSON string of columns options
TYPE:
|
Source code in ckanext/charts/helpers.py
58 59 60 61 62 63 64 65 66 67 68 | |
charts_include_htmx_asset()
Checks if the HTMX asset should be included.
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the HTMX asset should be included, False otherwise.
TYPE:
|
Source code in ckanext/charts/helpers.py
40 41 42 43 44 45 46 | |
charts_reinit_ckan_js_modules()
Checks if CKAN JS modules should be reinitialized.
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if CKAN JS modules should be reinitialized, False otherwise.
TYPE:
|
Source code in ckanext/charts/helpers.py
49 50 51 52 53 54 55 | |
charts_user_is_authenticated()
Check if the user is authenticated.
| RETURNS | DESCRIPTION |
|---|---|
bool
|
True if the user is authenticated, False otherwise.
TYPE:
|
Source code in ckanext/charts/helpers.py
71 72 73 74 75 76 77 | |
get_available_chart_engines_options()
Get the available chart engines.
| RETURNS | DESCRIPTION |
|---|---|
list[dict[str, str]]
|
List of chart engines options |
Source code in ckanext/charts/helpers.py
31 32 33 34 35 36 37 | |
get_file_cache_size()
Get the size of the file cache in a human-readable format.
| RETURNS | DESCRIPTION |
|---|---|
str
|
Human-readable file cache size
TYPE:
|
Source code in ckanext/charts/helpers.py
22 23 24 25 26 27 28 | |
get_redis_cache_size()
Get the size of the Redis cache in a human-readable format.
| RETURNS | DESCRIPTION |
|---|---|
str
|
Human-readable Redis cache size
TYPE:
|
Source code in ckanext/charts/helpers.py
13 14 15 16 17 18 19 | |