-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Agegando list_datasets #22
base: main
Are you sure you want to change the base?
Conversation
@@ -104,3 +104,21 @@ def create_dataset(chart_id): | |||
# redirect to the new CKAN dataset | |||
url = tk.h.url_for('dataset.read', id=pkg['name']) | |||
return tk.redirect_to(url) | |||
|
|||
|
|||
@superset_bp.route('/list_datasets', methods=['GET']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@superset_bp.route('/list_datasets', methods=['GET']) | |
@superset_bp.route('/datasets', methods=['GET']) |
@@ -84,6 +84,11 @@ <h2 class="module-heading"> | |||
Apache Superset es una herramienta de visualización de datos de código abierto que permite a los usuarios | |||
crear paneles de control y visualizaciones interactivas. | |||
</p> | |||
<p> | |||
<a href="{{ h.url_for('superset_blueprint.list_datasets') }}" target="_blank" class="btn btn-primary"> | |||
{{ _('Ver lista de dataset') }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{{ _('Ver lista de dataset') }} | |
{{ _('Dataset') }} |
@@ -84,6 +84,11 @@ <h2 class="module-heading"> | |||
Apache Superset es una herramienta de visualización de datos de código abierto que permite a los usuarios | |||
crear paneles de control y visualizaciones interactivas. | |||
</p> | |||
<p> | |||
<a href="{{ h.url_for('superset_blueprint.list_datasets') }}" target="_blank" class="btn btn-primary"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<a href="{{ h.url_for('superset_blueprint.list_datasets') }}" target="_blank" class="btn btn-primary"> | |
<a href="{{ h.url_for('superset_blueprint.list_datasets') }}" class="btn btn-primary"> |
@germankay rebasea main que ya se mezclaron varios PRs antes de seguir con esto |
f890d59
to
3754ea8
Compare
@avdata99 Ya quedo andando muestra lso datos, revisalo ave rque te parece |
Agregue unos cambios aca @germankay 0b2db1d Revisar que la lista de datasets siga funcionando bien en el HTML y corregir si fuera necesario |
|
||
# Procesar los datos de los datasets | ||
super_datasets = [] | ||
for d in datasets: | ||
if d is not None and isinstance(d, dict): | ||
super_datasets.append({ | ||
'table_name': d.get('table_name', 'Sin nombre'), | ||
'description': d.get('description') or '- - -', | ||
'database_name': d.get('database', {}).get('database_name', 'Sin organización'), | ||
'superset_chart_id': d.get('id'), | ||
'private': d.get('private', False), | ||
'resources': d.get('ckan_dataset', {}).get('name', '-'), | ||
}) | ||
else: | ||
log.warning(f"Elemento no procesado en superset_datasets: {d}") | ||
superset_url = tk.config.get('ckanext.superset.instance.url') | ||
extra_vars = { | ||
'datasets': super_datasets, | ||
'superset_url': superset_url, | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Procesar los datos de los datasets | |
super_datasets = [] | |
for d in datasets: | |
if d is not None and isinstance(d, dict): | |
super_datasets.append({ | |
'table_name': d.get('table_name', 'Sin nombre'), | |
'description': d.get('description') or '- - -', | |
'database_name': d.get('database', {}).get('database_name', 'Sin organización'), | |
'superset_chart_id': d.get('id'), | |
'private': d.get('private', False), | |
'resources': d.get('ckan_dataset', {}).get('name', '-'), | |
}) | |
else: | |
log.warning(f"Elemento no procesado en superset_datasets: {d}") | |
superset_url = tk.config.get('ckanext.superset.instance.url') | |
extra_vars = { | |
'datasets': super_datasets, | |
'superset_url': superset_url, | |
} | |
superset_url = tk.config.get('ckanext.superset.instance.url') | |
extra_vars = { | |
'datasets': datasets, | |
'superset_url': superset_url, | |
} |
¿Porque necesitamos todas esas correcciones?
De no ser estrictamente necesario usar el contenido tal como viene
Si es necesario algùn texto debe ser ingles
fixes #19