Skip to content

Commit

Permalink
[misc] remove total usage number
Browse files Browse the repository at this point in the history
  • Loading branch information
leduythuccs committed Sep 14, 2024
1 parent fdbad24 commit 57ea4b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions templates/organization/usage.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
{% include "stats/media-js.html" %}
<script type="text/javascript">
$(document).ready(function() {
draw_line_chart({{ credit_chart|tojson }}, $('#org-credit'), {total_decimals: 2});
draw_line_chart({{ cost_chart|tojson }}, $('#org-cost'), {total_suffix: 'k vnd', total_decimals: 0});
draw_line_chart({{ credit_chart|tojson }}, $('#org-credit'), {total_decimals: 2, hide_total: true});
draw_line_chart({{ cost_chart|tojson }}, $('#org-cost'), {total_suffix: 'k vnd', total_decimals: 0, hide_total: true});
});
</script>
{% endblock %}
Expand Down
4 changes: 4 additions & 0 deletions templates/stats/media-js.html
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,10 @@
};
}, this);

if (opts.hide_total) {
return labels;
}

const total_suffix = opts.total_suffix || '';

labels.push({
Expand Down

0 comments on commit 57ea4b0

Please sign in to comment.