|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+{% extends "base.html" %}
|
|
|
2
|
+{% load backend_tags %}
|
|
|
3
|
+{% load humanize %}
|
|
|
4
|
+{% block content %}
|
|
|
5
|
+{% with output=res.json %}
|
|
|
6
|
+<h1>{{ section }}</h1>
|
|
|
7
|
+
|
|
|
8
|
+{% if section == 'index' %}
|
|
|
9
|
+<ul>
|
|
|
10
|
+ {% for r in output.result.resources %}
|
|
|
11
|
+ <li><a href="{% url "backend:service_status" %}?cmd={{ r.URI }}§ion={{ r.name }}">{{ r.display_name }}</li>
|
|
|
12
|
+ {% endfor %}
|
|
|
13
|
+</ul>
|
|
|
14
|
+{% endif %}
|
|
|
15
|
+{% if section == 'test_status' %}
|
|
|
16
|
+ {% for r in output.result %}
|
|
|
17
|
+ {% if forloop.first %}
|
|
|
18
|
+ <h2>{{ r.sla_name }} / {{ r.service_name }}</h2>
|
|
|
19
|
+ {% endif %}
|
|
|
20
|
+ {% if forloop.first %}
|
|
|
21
|
+ <table class='table table-striped table-bordered'>
|
|
|
22
|
+
|
|
|
23
|
+ <thead>
|
|
|
24
|
+ <tr>
|
|
|
25
|
+ <th>Timestamp</th>
|
|
|
26
|
+ {% for r0 in r.results_scores %}
|
|
|
27
|
+ <th class='text-end'>{{ r0.name }} / Score</th>
|
|
|
28
|
+ {% endfor %}
|
|
|
29
|
+ </tr>
|
|
|
30
|
+ </thead>
|
|
|
31
|
+ {% endif %}
|
|
|
32
|
+ <tr>
|
|
|
33
|
+ <td>{{ r.time_stamp_display }}</td>
|
|
|
34
|
+ {% for r0 in r.results_scores %}
|
|
|
35
|
+ <td class='text-end'>{{ r0.raw_value|intcomma }} / {{ r0.score }}</td>
|
|
|
36
|
+ {% endfor %}
|
|
|
37
|
+ </tr>
|
|
|
38
|
+ {% if forloop.last %}
|
|
|
39
|
+ </table>
|
|
|
40
|
+ {% endif %}
|
|
|
41
|
+ {% endfor %}
|
|
|
42
|
+{% endif %}
|
|
|
43
|
+{% if section == 'ConfigCur' %}
|
|
|
44
|
+<ul>
|
|
|
45
|
+ {% for r in output.result %}
|
|
|
46
|
+ <li><a class='text-decoration-none' href="{% url "backend:service_status" %}?cmd={{ r.ids.test_instance_uri }}§ion=test_instance">{{ r.ids.test_display_name }} / {{ r.ids.test_type_name }}</a> <a href="{% url "backend:service_status" %}?cmd=/API/REST/Status/v1/TestStatus/{{ r.ids.test_instance_id }}§ion=test_status" class='ms-3 text-decoration-none badge bg-primary'>Status</a></li>
|
|
|
47
|
+ {% endfor %}
|
|
|
48
|
+</ul>
|
|
|
49
|
+{% endif %}
|
|
|
50
|
+{% if section == 'test_type' %}
|
|
|
51
|
+ {% with ids=output.result.ids %}
|
|
|
52
|
+ {{ ids.test_display_name }}
|
|
|
53
|
+ {{ ids.test_type_name }}
|
|
|
54
|
+ <a href="{% url "backend:service_status" %}?cmd={{ ids.mdf_uri }}§ion=mdf" class='text-decoration-none badge bg-primary'>MDF URI</a>
|
|
|
55
|
+ <a href="{% url "backend:service_status" %}?cmd={{ ids.test_type_uri }}§ion=test_type" class='text-decoration-none badge bg-primary'>Test Type</a>
|
|
|
56
|
+ {% endwith %}
|
|
|
57
|
+{% endif %}
|
|
|
58
|
+{% if section == 'test_define' %}
|
|
|
59
|
+{% endif %}
|
|
|
60
|
+{% if section == "detail" %}
|
|
|
61
|
+<h1>{{ output.result.ids.service_name }}</h1>
|
|
|
62
|
+<a href="{% url "backend:service_status" %}?cmd={{ output.result.ids.overall_service_status_uri }}§ion=overall">Overall</a>
|
|
|
63
|
+<table class='table table-bordered table-striped'>
|
|
|
64
|
+ <thead>
|
|
|
65
|
+ <tr><th>Status</th><th>Result</th></tr>
|
|
|
66
|
+ </thead>
|
|
|
67
|
+ <tbody>
|
|
|
68
|
+ {% for k,v in output.result.service_status.items %}
|
|
|
69
|
+ <tr>
|
|
|
70
|
+ <td>{{ k }}</td><td>{{ v }}</td>
|
|
|
71
|
+ </tr>
|
|
|
72
|
+ {% endfor %}
|
|
|
73
|
+ </tbody>
|
|
|
74
|
+</table>
|
|
|
75
|
+
|
|
|
76
|
+<h3>Test Templates</h3>
|
|
|
77
|
+<ul>
|
|
|
78
|
+ {% for si in output.result.test_templates %}
|
|
|
79
|
+ <li>{{ si.test_name }}
|
|
|
80
|
+ <a href="{% url "backend:service_status" %}?cmd={{ si.test_defn_uri }}§ion=test_define" class='text-decoration-none badge bg-primary'>Test Define</a>
|
|
|
81
|
+ <a href="{% url "backend:service_status" %}?cmd={{ si.test_type_uri }}§ion=test_type" class='text-decoration-none badge bg-primary'>Test Type</a>
|
|
|
82
|
+ </li>
|
|
|
83
|
+ {% endfor %}
|
|
|
84
|
+</ul>
|
|
|
85
|
+{% endif %}
|
|
|
86
|
+{% if section == "overall" %}
|
|
|
87
|
+<h1>Overall</h1>
|
|
|
88
|
+<div class='table-responsive'>
|
|
|
89
|
+<table class='table table-striped table-bordered'>
|
|
|
90
|
+ <thead>
|
|
|
91
|
+ <tr>
|
|
|
92
|
+ {% for k in output.result.0.keys %}
|
|
|
93
|
+ <th>{{ k }}</th>
|
|
|
94
|
+ {% endfor %}
|
|
|
95
|
+ </tr>
|
|
|
96
|
+ </thead>
|
|
|
97
|
+ <tbody>
|
|
|
98
|
+ {% for o in output.result %}
|
|
|
99
|
+ <tr>
|
|
|
100
|
+ {% for k1,v1 in o.items %}
|
|
|
101
|
+ <td>{{ v1 }}</td>
|
|
|
102
|
+ {% endfor %}
|
|
|
103
|
+ </tr>
|
|
|
104
|
+ {% endfor %}
|
|
|
105
|
+ </tbody>
|
|
|
106
|
+</table>
|
|
|
107
|
+</div>
|
|
|
108
|
+{% endif %}
|
|
|
109
|
+{% endwith %}
|
|
|
110
|
+ <p>
|
|
|
111
|
+ <a class="btn btn-primary" data-bs-toggle="collapse" href="#collapseExample" role="button" aria-expanded="false" aria-controls="collapseExample">
|
|
|
112
|
+ Raw JSON
|
|
|
113
|
+ </a>
|
|
|
114
|
+ </p>
|
|
|
115
|
+ <div class="collapse" id="collapseExample">
|
|
|
116
|
+ <div class="card card-body">
|
|
|
117
|
+ <pre>
|
|
|
118
|
+ {{ res.json | pprint }}
|
|
|
119
|
+ </pre>
|
|
|
120
|
+ </div>
|
|
|
121
|
+ </div>
|
|
|
122
|
+
|
|
|
123
|
+
|
|
|
124
|
+{% endblock %}
|