Dashboard more verbose message for no targets

This commit is contained in:
Yogesh Ojha
2020-06-29 20:22:56 +05:30
parent f23c87b2e3
commit 34b4b7d23a
+55 -41
View File
@@ -14,7 +14,14 @@ Dashboard
<div class="col-lg-12 layout-px-spacing">
<div class="row layout-top-spacing">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 layout-spacing">
{% if not domain_count %}
<p class="text-warning">Currently there are no targets, Please
<strong><a href="{% url 'add_target_form' %}" class="text-info">add targets</a></strong>
</p>
{% endif %}
<div class="row widget-statistic">
<div class="col-xl-3 col-lg-6 col-md-4 col-sm-6 col-12">
<div class="widget widget-one_hybrid">
<div class="widget-heading">
@@ -26,11 +33,11 @@ Dashboard
<h6 class="">Total Targets</h6>
</div>
<div class="widget-content">
<!-- some contents -->
&nbsp;
</div>
</div>
</div>
<div class="col-xl-3 col-lg-6 col-md-4 col-sm-6 col-12">
<div class="widget widget-one_hybrid">
<div class="widget-heading">
@@ -46,6 +53,7 @@ Dashboard
</div>
</div>
</div>
<div class="col-xl-3 col-lg-6 col-md-4 col-sm-6 col-12">
<div class="widget widget-one_hybrid">
<div class="widget-heading">
@@ -61,6 +69,7 @@ Dashboard
</div>
</div>
</div>
<div class="col-xl-3 col-lg-6 col-md-4 col-sm-6 col-12">
<div class="widget widget-one_hybrid">
<div class="widget-heading">
@@ -76,59 +85,64 @@ Dashboard
</div>
</div>
</div>
</div>
</div>
</div>
<div class="row layout-top-spacing">
<div class="col-xl-12 col-lg-12 col-md-12 col-sm-12 col-12 layout-spacing">
<div class="row widget-statistic">
<div class="col-xl-12 col-lg-12 col-md-6 col-sm-12 col-12 layout-spacing">
<div class="widget widget-table-one">
<div class="widget-heading">
<h5 class="">Recent Scans</h5>
</div>
<div class="widget-content">
{% for item in recent_scans %}
<div class="transactions-list">
<a href="{% url 'detail_scan' item.id %}">
<div class="t-item">
<div class="t-company-name">
<div class="t-icon">
<div class="icon">
{% if item.scan_status == 1 %}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-zap"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg>
{% elif item.scan_status == 2 %}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check-circle"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>
{% else %}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-alert-circle"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>
{% endif %}
</div>
</div>
<div class="t-name">
<h4>{{item.domain_name}}</h4>
<p class="meta-date">{{item.last_scan_date|naturaltime}}</p>
</div>
<div class="col-xl-12 col-lg-12 col-md-6 col-sm-12 col-12 layout-spacing">
<div class="widget widget-table-one">
<div class="widget-heading">
<h5 class="">Recent Scans</h5>
</div>
</div>
<div class="t-rate">
{% if item.scan_status == 0 %}
<span class="shadow-none badge badge-danger">Failed</span>
{% elif item.scan_status == 1 %}
<span class="shadow-none badge badge-primary">Scanning</span>
<div class="widget-content">
{% if recent_scans.count == 0 %}
<p class="text-warning">
Oops! Looks like no scans have been recently initiated! You can initiate the scan
<a href="{% url 'list_target' %}" class='text-info'>from here.</a>
</p>
{% endif %}
{% for item in recent_scans %}
<div class="transactions-list">
<a href="{% url 'detail_scan' item.id %}">
<div class="t-item">
<div class="t-company-name">
<div class="t-icon">
<div class="icon">
{% if item.scan_status == 1 %}
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-zap"><polygon points="13 2 3 14 12 14 11 22 21 10 12 10 13 2"></polygon></svg>
{% elif item.scan_status == 2 %}
<span class="shadow-none badge badge-success">Succesful</span>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check-circle"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>
{% else %}
<span class="shadow-none badge badge-danger">Unknown</span>
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-alert-circle"><circle cx="12" cy="12" r="10"></circle><line x1="12" y1="8" x2="12" y2="12"></line><line x1="12" y1="16" x2="12.01" y2="16"></line></svg>
{% endif %}
</div>
</div>
</a>
</div>
{% endfor %}
<div class="t-name">
<h4>{{item.domain_name}}</h4>
<p class="meta-date">{{item.last_scan_date|naturaltime}}</p>
</div>
</div>
</div>
<div class="t-rate">
{% if item.scan_status == 0 %}
<span class="shadow-none badge badge-danger">Failed</span>
{% elif item.scan_status == 1 %}
<span class="shadow-none badge badge-primary">Scanning</span>
{% elif item.scan_status == 2 %}
<span class="shadow-none badge badge-success">Succesful</span>
{% else %}
<span class="shadow-none badge badge-danger">Unknown</span>
{% endif %}
</div>
</div>
</a>
</div>
{% endfor %}
</div>
</div>
</div>