-
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
Algunas configuraciones #1
base: main
Are you sure you want to change the base?
Conversation
ckanext/dashboard/models.py
Outdated
|
||
class DatasetDashboard(toolkit.BaseModel, ActiveRecordMixin): | ||
"""Modelo de datos para almacenar la configuración de un dashboard por dataset""" | ||
__tablename__ = "ndx_dataset_dashboard" |
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.
__tablename__ = "ndx_dataset_dashboard" | |
__tablename__ = "dashboard_package" |
ndx?
{% block content_primary_nav %} | ||
{{ super() }} | ||
{{ h.build_nav_icon('dashboard_bp.dashboard_list', _('Dashboards'), icon='icon-list') }} | ||
{{ h.build_nav_icon('dashboard_bp.dashboard_new', _('New Dashboard'), icon='icon-plus') }} |
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.
The New dashboard link is better to be included at the top of the dashboard list page
{{ h.build_nav_icon('dashboard_bp.dashboard_new', _('New Dashboard'), icon='icon-plus') }} |
|
||
{% block content_primary_nav %} | ||
{{ super() }} | ||
{{ h.build_nav_icon('dashboard_bp.dashboard_list', _('Dashboards'), icon='icon-list') }} |
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.
{{ h.build_nav_icon('dashboard_bp.dashboard_list', _('Dashboards'), icon='icon-list') }} | |
{{ h.build_nav_icon('dashboard_bp.dashboard_list', _('External dashboards'), icon='icon-list') }} |
<script type="module" src="https://public.tableau.com/javascripts/api/tableau.embedding.3.latest.min.js"></script> | ||
|
||
<!-- Se inserta el componente web de Tableau --> | ||
<tableau-viz id="tableauViz" |
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.
Considering we are going to use this for tableau, power bi and others, it will be a good idea not to use tableau in the element name
Should this be an <iframe>
? What's <tableau-viz>
?
dashboards = p.toolkit.get_action('dataset_dashboard_list')(context, {}) | ||
except Exception as e: | ||
log.error("Failed to load dashboards: %s", e) | ||
flash("An error occurred while retrieving the dashboards.", "error") |
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.
CKAN have a own flash messages (toolkit.h.flash_success
+ toolkit.h.flash_error
)
Example: https://github.com/ckan/ckan/blob/master/ckan/views/user.py#L827
Do not use flask version
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.
Looking good @germankay ! I added some comments :)
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.
Getting there @germankay ! I couple of extra comments :D
if not dashboard_id: | ||
raise ValueError("The 'id' parameter is required to update the dashboard.") |
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.
The call to toolkit.get_or_bust('id')
will raise a ValidationError
if it does not exist so there is no need to double check it here.
if not dashboard_id: | |
raise ValueError("The 'id' parameter is required to update the dashboard.") |
dashboard_id = data_dict.get('id') | ||
if not dashboard_id: | ||
raise ValueError("The 'id' parameter is required to delete the dashboard.") |
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.
dashboard_id = data_dict.get('id') | |
if not dashboard_id: | |
raise ValueError("The 'id' parameter is required to delete the dashboard.") | |
dashboard_id = toolkit.get_or_bust('id') |
|
||
log = logging.getLogger(__name__) | ||
|
||
dashboard_bp = Blueprint('dashboard_bp', __name__, url_prefix='/dashboard-external') |
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.
dashboard_bp = Blueprint('dashboard_bp', __name__, url_prefix='/dashboard-external') | |
dashboard_bp = Blueprint('embeded_dashboard', __name__, url_prefix='/embeded-dashboard') |
Since dashboard
is already taken in CKAN core, as @avdata99 mentioned, I will suggest to use embeded_dashboard
and /embeded-dashboard
since it is more explicit than external
.
Embeded Dashboards is a common terminology in the BI and Analytics world.
related https://github.com/okfn/ckan-bcie/issues/60
missing to add to install-extensions.sh: