Add repo size graph canvas to template

This commit is contained in:
George Lacey 2022-04-07 10:32:34 +01:00
parent ab92a70685
commit dd1bba9748
2 changed files with 2 additions and 0 deletions

View File

@ -5,6 +5,7 @@ function inflateRepo(repo_json, label, template_id, container_id) {
$(template_copy).find(".repo-latest-backup").html(repo_json.latest_backup); $(template_copy).find(".repo-latest-backup").html(repo_json.latest_backup);
$(template_copy).find(".repo-size").html(repo_json.size); $(template_copy).find(".repo-size").html(repo_json.size);
$(template_copy).find(".repo-recent-errors").html(repo_json.recent_errors); $(template_copy).find(".repo-recent-errors").html(repo_json.recent_errors);
$(template_copy).find(".repo-size-graph").prop("id", `repo-${label}-size-graph`);
let bg_class = "bg-primary"; let bg_class = "bg-primary";
if (repo_json.error) { if (repo_json.error) {

View File

@ -17,6 +17,7 @@
<dt class="col-4">Recent errors:</dt> <dt class="col-4">Recent errors:</dt>
<dd class="repo-recent-errors col-8"></dd> <dd class="repo-recent-errors col-8"></dd>
</dl> </dl>
<canvas class="repo-size-graph" width="400" height="200"></canvas>
</dl> </dl>
</div> </div>
</script> </script>