Skip to content

Commit

Permalink
changes
Browse files Browse the repository at this point in the history
  • Loading branch information
BitTheByte committed Apr 12, 2024
1 parent 7000f97 commit c394a33
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 15 deletions.
Binary file modified assets/dash_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 6 additions & 11 deletions monitorizer/inventory/callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,11 @@
"barPercentage": 1,
"base": 0,
"grouped": True,
"maxBarThickness": 4,
"maxBarThickness": 6,
"responsive": True,
"maintainAspectRatio": False,
"datasets": {
"bar": {
"borderRadius": 12,
"border": {"width": 0},
"borderSkipped": "middle",
},
"line": {"borderWidth": 2, "pointBorderWidth": 0, "pointStyle": False},
"bar": {"borderRadius": 12, "border": {"width": 0}, "borderSkipped": "middle"},
},
"plugins": {
"legend": {
Expand Down Expand Up @@ -86,22 +81,22 @@ def dashboard_callback(request, context):
{
"label": "Pending",
"data": [v["pending"] for v in scans_per_day.values()],
"backgroundColor": "#faf20a",
"backgroundColor": "#f6ad55",
},
{
"label": "Running",
"data": [v["running"] for v in scans_per_day.values()],
"backgroundColor": "#1f85e5",
"backgroundColor": "#63b3ed",
},
{
"label": "Success",
"data": [v["success"] for v in scans_per_day.values()],
"backgroundColor": "#0ad153",
"backgroundColor": "#48bb78",
},
{
"label": "Error",
"data": [v["error"] for v in scans_per_day.values()],
"backgroundColor": "#f54257",
"backgroundColor": "#f56565",
},
],
}
Expand Down
3 changes: 3 additions & 0 deletions monitorizer/templates/admin/components/chart/pie.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<div class="relative w-full{% if class %} {{ class }}{% endif %}">
<canvas class="chart" {% if options %}data-options="{{ options }}" {% endif %} data-type="pie" data-value="{{ data }}" {% if width %}width="{{ width }}"{% endif %} {% if height %}height="{{ height }}"{% endif %}></canvas>
</div>
3 changes: 0 additions & 3 deletions monitorizer/templates/admin/components/chart/polarArea.html

This file was deleted.

2 changes: 1 addition & 1 deletion monitorizer/templates/admin/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ <h1 id="site-name">
{% endcomponent %}
{% component "unfold/components/card.html" with class="lg:w-1/2" title="Top Discovered Domains" %}
{% component "unfold/components/flex.html" with col=1 class="gap-8" %}
{% component "admin/components/chart/polarArea.html" with data=discovered_breakdown options=DEFAULT_CHART_OPTIONS %}{% endcomponent %}
{% component "admin/components/chart/pie.html" with data=discovered_breakdown options=DEFAULT_CHART_OPTIONS %}{% endcomponent %}
{% endcomponent %}
{% endcomponent %}
{% endcomponent %}
Expand Down

0 comments on commit c394a33

Please sign in to comment.