Skip to content
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

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Agegando list_datasets #22

wants to merge 11 commits into from

Conversation

germankay
Copy link
Collaborator

fixes #19

@germankay germankay requested a review from avdata99 December 3, 2024 20:14
@germankay germankay self-assigned this Dec 3, 2024
@avdata99 avdata99 marked this pull request as draft December 4, 2024 02:34
@@ -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'])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@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') }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{{ _('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">
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<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">

@avdata99
Copy link
Contributor

avdata99 commented Dec 4, 2024

@germankay rebasea main que ya se mezclaron varios PRs antes de seguir con esto
Mira las propuestas de cambios
Agrega changelog

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@germankay germankay force-pushed the 19-lista-de-datasets branch from f890d59 to 3754ea8 Compare December 4, 2024 11:39
@germankay germankay requested a review from avdata99 December 9, 2024 17:05
@germankay germankay changed the title Agegando list_datasets In progress Agegando list_datasets Dec 9, 2024
@germankay
Copy link
Collaborator Author

@avdata99 Ya quedo andando muestra lso datos, revisalo ave rque te parece

@germankay germankay marked this pull request as ready for review December 10, 2024 13:32
@avdata99
Copy link
Contributor

Agregue unos cambios aca @germankay 0b2db1d
La idea es mantenelo parecido a lo anterior, me base en el blueprint y funciones de databases

Revisar que la lista de datasets siga funcionando bien en el HTML y corregir si fuera necesario

@germankay germankay requested a review from avdata99 January 15, 2025 19:57
Comment on lines 181 to 200

# 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,
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 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

@germankay germankay requested a review from avdata99 January 16, 2025 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Agregar lista de datasets
2 participants