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

Rdiscrowd 7532 grafana dash link #462

Merged
merged 5 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions templates/projects/non_stats.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{% extends "/base.html" %}
{% set active_page = "projects" %}
{% set active_project = "all" %}
{% set active_project = "all" %}
{% import "projects/_helpers.html" as helper %}

{% block content %}
Expand All @@ -9,8 +9,17 @@
{{helper.render_project_local_nav(project, 'stats', current_user, pro_features, upload_method)}}
</div>
<div class="col-md-9" style="margin-top:50px;">
<div class="row">
{{helper.render_project_title(project, upload_method, subtitle='Statistics') }}
<span class="alert alert-warning"><strong>Ooops</strong> Sorry, the project does not have tasks to process and show some statistics</span>
<span class="alert alert-warning"><strong>Ooops</strong> Sorry, the project does not have tasks to process and
show some statistics</span>
</div>
{% if config.get('STATS_DASHBOARD_URL') %}
{% set dashboard_url = config.get('STATS_DASHBOARD_URL') + "?var-project_id=" + project.id|string + "&var-task_source=GIGWORK_" + ("PRIV" if private_instance else "PUBLIC") %}
<div class="row" style="margin-top: 2em;" id="grafana-link">
<a class="btn btn-primary" target="_blank" href="{{dashboard_url}}">Metrics Dashboard</a>
</div>
{% endif %}
</div>
</div>
{{ helper.broken_image() }}
Expand Down
17 changes: 11 additions & 6 deletions templates/projects/stats.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@
{% else %}
<br/>
{% if private %}
<div class="row">
<div class="alert alert-info">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>{{_('Important')}}:</strong> {{_('Data have been')}} <strong>{{_('anonymized')}}!</strong>
<div class="row">
<div class="alert alert-info">
<button type="button" class="close" data-dismiss="alert">&times;</button>
<strong>{{_('Important')}}:</strong> {{_('Data have been')}} <strong>{{_('anonymized')}}!</strong>
</div>
</div>
{% endif %}
{% if config.get('STATS_DASHBOARD_URL') %}
{% set dashboard_url = config.get('STATS_DASHBOARD_URL') + "?var-project_id=" + project.id|string + "&var-task_source=GIGWORK_" + ("PRIV" if private_instance else "PUBLIC") %}
<div class="row" style="margin-top: 2em;" id="grafana-link">
<a class="btn btn-primary" target="_blank" href="{{dashboard_url}}">Metrics Dashboard</a>
</div>
</div>
{% endif %}

<!-- Hour Stats CARD -->
<div id="card" class="row">
<div class="col-md-12">
Expand Down
Loading