Skip to content
This repository was archived by the owner on Sep 16, 2022. It is now read-only.
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
6 changes: 0 additions & 6 deletions backend/device_registry/templates/admin_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,6 @@
<li class="sidebar-item {% if url_name|is_menu_highlight_id:'claim-device' %}active{% endif %}">
<a class="sidebar-link" id="sidebar-claim-device" href="{% url 'claim-device' %}">Claim Device</a>
</li>
<li class="sidebar-item {% if url_name|is_menu_highlight_id:'pairing-keys' %}active{% endif %}">
<a class="sidebar-link" id="sidebar-pairing-keys" href="{% url 'pairing-keys' %}">Pairing Keys</a>
</li>
<li class="sidebar-item {% if url_name|is_menu_highlight_id:'credentials' %}active{% endif %}">
<a class="sidebar-link" id="sidebar-credentials" href="{% url 'credentials' %}">Credentials</a>
</li>
<li class="sidebar-item {% if url_name|is_menu_highlight_id:'actions' %}active{% endif %}">
<a class="sidebar-link" id="sidebar-actions" href="{% url 'actions' %}">Recommended Actions</a>
</li>
Expand Down
80 changes: 0 additions & 80 deletions backend/device_registry/templates/root.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,86 +34,6 @@ <h1 style="margin-bottom: 0">Dashboard</h1>
Detected Mirai (botnet) on {{ device.device_id }}. We've proactively blocked the connection to Mirai's Command and Control nodes.</p>
</div>
{% endfor %}
<div class="row">
<div class="col-12 col-sm-12 col-md-6 col-lg-6 d-none d-xl-flex col-xl d-flex">
<div class="card flex-fill w-100">
<div class="card-header">
<h5 class="card-title mb-0">Active Devices:</h5>
</div>
<div class="card-body d-flex">
<div class="align-self-center w-100">
<div class="py-3">
<div class="chart chart-xs">
<canvas id="chartjs-dashboard-pie"></canvas>
</div>
</div>
</div>
</div>
</div>

<script>
document.addEventListener("DOMContentLoaded", function () {
// Pie chart
new Chart(document.getElementById("chartjs-dashboard-pie"), {
type: 'pie',
data: {
labels: ["Active", "Inactive"],
datasets: [{
data: [{{ active_inactive|first }}, {{ active_inactive|last }}],
backgroundColor: ["#65d2fb", "#fc5358"],
borderColor: "transparent"
}]
},
options: {
responsive: !window.MSInputMethodContext,
maintainAspectRatio: false,
legend: {
display: true,
position: 'bottom'
}
}
});
});
</script>
</div>

<div class="col-12 col-sm-12 col-md-6 col-lg-6 d-none d-xl-flex col-xl d-flex">
<div class="card flex-fill">
<div class="card-header">
<h5 class="card-title mb-0">Average Trust Score:</h5>
</div>
<style>
h1.trust-score {
margin: auto;
font-size: 1em;
}
div.trust-score {
font-size: 70px;
}
div.trust-score-bar {
height: 2rem;
max-width: 20rem;
}
</style>
<div class="trust-score card-body d-flex flex-column align-items-center py-4">
<h1 class="trust-score">
{% if avg_trust_score is None %}
N/A
{% else %}
{{ avg_trust_score_percent }}%
{% endif %}
</h1>
{% if avg_trust_score is not None %}
<div class="trust-score-bar progress w-100">
<div class="progress-bar bg-{{ avg_trust_score_color }}" role="progressbar"
style="width: {{ avg_trust_score_percent }}%"></div>
</div>
{% endif %}
</div>
</div>
</div>
</div>

{# Table #}
<div class="row">
<div class="col-12">
Expand Down