aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Lemon <lemon@matthewlemon.com>2020-10-20 11:08:41 +0100
committerMatthew Lemon <lemon@matthewlemon.com>2020-10-20 11:08:41 +0100
commite627ee10c73b0662f97619d4cda289a90a1aed38 (patch)
tree467596b077bc9cdadc3e16a1066d255737bfc1cf
parentd210853a13aa3468f78dbfc3212f3930771498bf (diff)
more home page tweaking
-rw-r--r--ctrack/caf/templates/caf/applicablesystem_list.html8
-rw-r--r--ctrack/core/views.py17
-rw-r--r--ctrack/templates/pages/home.html40
3 files changed, 47 insertions, 18 deletions
diff --git a/ctrack/caf/templates/caf/applicablesystem_list.html b/ctrack/caf/templates/caf/applicablesystem_list.html
index 416f771..651d389 100644
--- a/ctrack/caf/templates/caf/applicablesystem_list.html
+++ b/ctrack/caf/templates/caf/applicablesystem_list.html
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% load static %}
-{% block title %}Systems in Scope{% endblock %}
+{% block title %}Critical Systems{% endblock %}
{% block content %}
@@ -19,14 +19,14 @@
</script>
<div class="col-12 m-2">
- <h3>Systems in Scope</h3> <span><a href="#">[Create new...]</a></span>
+ <h3>Critical Systems</h3> <span><a href="#">[Create new...]</a></span>
<div class="row justify-content-center">
<div class="col-md-12 my-2">
<table id="datatable" class="table table-bordered" style="width:100%">
<thead>
<tr>
- <th>Organisation</th>
<th>System</th>
+ <th>Organisation</th>
<th>CAFs</th>
<th>Sub Mode</th>
<th class="tabaligncenter">Confidence Grade</th>
@@ -37,10 +37,10 @@
</thead>
{% for sys in object_list %}
<tr>
+ <td><a href="{% url "caf:ass_detail" sys.pk %}">{{ sys.name }}</a></td>
<td>
<a href="{% url "organisations:detail" slug=sys.get_organisation.slug %}">{{ sys.get_organisation.name }}</a>
</td>
- <td><a href="{% url "caf:ass_detail" sys.pk %}">{{ sys.name }}</a></td>
<td>
<ul>
{% for c in sys.caf_set.all %}
diff --git a/ctrack/core/views.py b/ctrack/core/views.py
index a40f945..6482662 100644
--- a/ctrack/core/views.py
+++ b/ctrack/core/views.py
@@ -1,7 +1,8 @@
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
-from ctrack.organisations.models import IncidentReport, Organisation
+from ctrack.caf.models import EssentialService, CAF, ApplicableSystem
+from ctrack.organisations.models import IncidentReport, Organisation, Person
from ctrack.register.models import EngagementEvent
@@ -25,4 +26,16 @@ def home_page(request):
},
)
else:
- return render(request, "pages/home.html")
+ no_orgs = Organisation.objects.count()
+ no_people = Person.objects.count()
+ no_cafs = CAF.objects.count()
+ no_essential_services = EssentialService.objects.count()
+ no_systems = ApplicableSystem.objects.count()
+ context = {
+ "no_orgs": no_orgs,
+ "no_people": no_people,
+ "no_cafs": no_cafs,
+ "no_essential_services": no_essential_services,
+ "no_systems": no_systems,
+ }
+ return render(request, "pages/home.html", context)
diff --git a/ctrack/templates/pages/home.html b/ctrack/templates/pages/home.html
index 3c563db..a8fa58e 100644
--- a/ctrack/templates/pages/home.html
+++ b/ctrack/templates/pages/home.html
@@ -6,20 +6,20 @@
<div class="jumbotron">
<div class="container">
<h1 class="display-3">ctrack</h1>
- <p><strong>DfT's Cyber Compliance Team's information management system</strong>, used to track all core
+ <p><strong>DfT's Cyber Compliance Team's proof of concept information management system</strong>, used to track
+ all core
components of the NIS regime.</p>
- <p>ctrack is a proof-of-concept web application developed in-house by the Cyber Compliance
+ <p>ctrack is developed in-house by the Cyber Compliance
Team at the UK Department for Transport that aims to demonstrate the improvements in workflow possible by
storing data associated with OES and its associated CAF data in a relational database. It focuses on the
absolute basics of managing any business data: Create, Read, Update, Delete (CRUD) functionality and
demonstrates how collection and analysis of ongoing assessment data - using the CAF as the foundation (the
framework, not the spreadsheet) - can be exponentially improved using the simplest of form-based web
application.</p>
- <hr>
<div class="col-12 p-2">
<div class="row row-cols-2">
<div class="col-md-6 m-1 border rounded p-2">
- <h3>
+ <h3 class="mb-3">
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-people-fill" fill="currentColor"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
@@ -27,21 +27,31 @@
</svg>
OES/Organisations
</h3>
- <p>There are currently <span class="lead font-weight-bold">53</span> <a
+ <p>There are currently <span class="lead font-weight-bold">{{ no_orgs }}</span> <a
href="{% url "organisations:list" %}">organisations</a> on ctrack, comprising <span
- class="lead font-weight-bold">124</span> <a href="{% url "organisations:people" %}">people</a>.</p>
+ class="lead font-weight-bold">{{ no_people }}</span> <a href="{% url "organisations:people" %}">people</a>.
+ OES are responsible for <span class="lead font-weight-bold">{{ no_essential_services }}</span> NIS <a
+ href="#">essential services</a>. There have been a total of <span
+ class="lead font-weight-bold">X</span> <a href="#">interactions</a> with OES by inspectors,
+ including <span class="lead font-weight-bold">X</span> emails, <span
+ class="lead font-weight-bold">X</span>
+ phone calls, <span class="lead font-weight-bold">X</span> video conferences, and <span
+ class="lead font-weight-bold">X</span>
+ meetings.</p>
<ul class="list-group">
- <li class="list-group-item list-group-item-warning"><a href="{% url "organisations:list" %}">List of all
+ <li class="list-group-item list-group-item-dark"><a href="{% url "organisations:list" %}">All
organisations</a></li>
- <li class="list-group-item list-group-item-warning"><a href="{% url "organisations:people" %}">List of all
+ <li class="list-group-item list-group-item-dark"><a href="{% url "organisations:people" %}">All
people</a></li>
+ <li class="list-group-item list-group-item-dark"><a href="#">All
+ essential services</a></li>
</ul>
<p>You can filter these lists to view things by <strong>lead inspector</strong>, <strong>sub-mode</strong>
and other things.</p>
</div>
<div class="col-md-5 m-1 border rounded p-2">
- <h3>
+ <h3 class="mb-3">
<svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-card-checklist" fill="currentColor"
xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
@@ -52,12 +62,18 @@
CAFs
</h3>
<p>There are <span class="lead font-weight-bold">93</span> <a href="{% url "caf:caf_list" %}">CAFs</a> on
- ctrack.</p>
+ ctrack, providing data on <span class="lead font-weight-bold">{{ no_systems }}</span> <a
+ href="{% url "caf:es_list" %}">critical systems</a>. Of these, <span
+ class="lead font-weight-bold">12</span> have been validated. <span
+ class="lead font-weight-bold">X</span>
+ are currently undergoing validation and <span
+ class="lead font-weight-bold">X</span> are currently being updated by OES.</p>
<ul class="list-group">
- <li class="list-group-item list-group-item-warning"><a href="{% url "caf:caf_list" %}">List of all
+ <li class="list-group-item list-group-item-dark"><a href="{% url "caf:caf_list" %}">All
CAFs</a></li>
+ <li class="list-group-item list-group-item-dark"><a href="{% url "caf:es_list" %}">All
+ critical systems</a></li>
</ul>
- <p>Of these - <span class="lead font-weight-bold">12</span> have been validated.</p>
</div>
</div>
<div class="row mt-2">