|
8 | 8 | Inc #{{ incident.pk }} – {{ block.super }} |
9 | 9 | {% endblock %} |
10 | 10 |
|
11 | | -{% block head %} |
| 11 | +{% block head_extra %} |
12 | 12 | <link rel="stylesheet" href="{% static 'incident_doc.css' %}"> |
13 | 13 | {% endblock %} |
14 | 14 |
|
@@ -39,70 +39,79 @@ <h1 id="title"> |
39 | 39 | <div class="bg-white p-4"> |
40 | 40 |
|
41 | 41 | {% comment %} ----- Summary ----- {% endcomment %} |
42 | | - <h2>Summary</h2> |
43 | | - <p> |
44 | | - {% if incident.summary %} |
45 | | - {{ incident.summary|unslackify|markdown_filter|safe }} |
46 | | - {% endif %} |
47 | | - </p> |
| 42 | + {% block incident_summary %} |
| 43 | + <h2>Summary</h2> |
| 44 | + <p> |
| 45 | + {% if incident.summary %} |
| 46 | + {{ incident.summary|unslackify|markdown_filter|safe }} |
| 47 | + {% endif %} |
| 48 | + </p> |
| 49 | + {% endblock %} |
| 50 | + |
| 51 | + {% block incident_data %} |
| 52 | + <ul class="summary-data"> |
| 53 | + {% if incident.impact %} |
| 54 | + <li> |
| 55 | + <span>Impact:</span>{{ incident.impact|unslackify|markdown_filter|safe }} |
| 56 | + </li> |
| 57 | + {% endif %} |
| 58 | + |
| 59 | + <li><span>Reporter:</span>{{ incident.reporter.display_name }}</li> |
| 60 | + |
| 61 | + {% if incident.lead %} |
| 62 | + <li><span>Lead:</span>{{ incident.lead.display_name }}</li> |
| 63 | + {% endif %} |
48 | 64 |
|
49 | | - <ul class="summary-data"> |
50 | | - {% if incident.impact %} |
51 | 65 | <li> |
52 | | - <span>Impact:</span>{{ incident.impact|unslackify|markdown_filter|safe }} |
| 66 | + <span>Start Time:</span> |
| 67 | + {% if incident.start_time %}{{ incident.start_time }}{% endif %} |
53 | 68 | </li> |
54 | | - {% endif %} |
55 | | - |
56 | | - <li><span>Reporter:</span>{{ incident.reporter.display_name }}</li> |
57 | | - |
58 | | - {% if incident.lead %} |
59 | | - <li><span>Lead:</span>{{ incident.lead.display_name }}</li> |
60 | | - {% endif %} |
61 | | - |
62 | | - <li> |
63 | | - <span>Start Time:</span> |
64 | | - {% if incident.start_time %}{{ incident.start_time }}{% endif %} |
65 | | - </li> |
66 | | - <li> |
67 | | - <span>Report Time:</span> |
68 | | - {% if incident.report_time %}{{ incident.report_time }}{% endif %} |
69 | | - </li> |
70 | | - |
71 | | - {% if incident.is_closed %} |
72 | | - <li><span>End Time:</span>{{ incident.end_time }}</li> |
73 | | - <li><span>Duration:</span>{{ incident.duration}}</li> |
74 | | - {% endif %} |
75 | | - |
76 | | - {% if user_stats %} |
77 | 69 | <li> |
78 | | - <span>Participants:</span> |
79 | | - <ul id="participant"> |
80 | | - {% for stats in user_stats %} |
81 | | - <li> |
82 | | - {{ stats.user.display_name }} ({{stats.message_count}} messages) |
83 | | - </li> |
84 | | - {% endfor %} |
85 | | - </ul> |
| 70 | + <span>Report Time:</span> |
| 71 | + {% if incident.report_time %}{{ incident.report_time }}{% endif %} |
86 | 72 | </li> |
87 | | - {% endif %} |
88 | | - </ul> |
| 73 | + |
| 74 | + {% if incident.is_closed %} |
| 75 | + <li><span>End Time:</span>{{ incident.end_time }}</li> |
| 76 | + <li><span>Duration:</span>{{ incident.duration}}</li> |
| 77 | + {% endif %} |
| 78 | + |
| 79 | + {% if user_stats %} |
| 80 | + <li> |
| 81 | + <span>Participants:</span> |
| 82 | + <ul id="participant"> |
| 83 | + {% for stats in user_stats %} |
| 84 | + <li> |
| 85 | + {{ stats.user.display_name }} ({{stats.message_count}} messages) |
| 86 | + </li> |
| 87 | + {% endfor %} |
| 88 | + </ul> |
| 89 | + </li> |
| 90 | + {% endif %} |
| 91 | + |
| 92 | + {% block incident_data_extra %} |
| 93 | + {% endblock %} |
| 94 | + </ul> |
| 95 | + {% endblock %} |
89 | 96 |
|
90 | 97 | {% comment %} ----- Timeline ----- {% endcomment %} |
91 | | - <h2>Timeline</h2> |
92 | | - {% if events %} |
93 | | - <div class="timeline"> |
94 | | - {% for event in events.all %} |
95 | | - <div class="container"> |
96 | | - <div class="content"> |
97 | | - <strong> |
98 | | - {{ event.icon|safe }}{{ event.timestamp|date:"H:i:s" }} |
99 | | - </strong> |
100 | | - {{ event|stringformat:'s'|unslackify|markdown_filter|safe }} |
| 98 | + {% block incident_timeline %} |
| 99 | + <h2>Timeline</h2> |
| 100 | + {% if events %} |
| 101 | + <div class="timeline"> |
| 102 | + {% for event in events.all %} |
| 103 | + <div class="container"> |
| 104 | + <div class="content"> |
| 105 | + <strong> |
| 106 | + {{ event.icon|safe }}{{ event.timestamp|date:"H:i:s" }} |
| 107 | + </strong> |
| 108 | + {{ event|stringformat:'s'|unslackify|markdown_filter|safe }} |
| 109 | + </div> |
101 | 110 | </div> |
102 | | - </div> |
103 | | - {% endfor %} |
104 | | - </div> |
105 | | - {% endif %} |
| 111 | + {% endfor %} |
| 112 | + </div> |
| 113 | + {% endif %} |
| 114 | + {% endblock %} |
106 | 115 |
|
107 | 116 | </div> |
108 | 117 | </div> |
|
0 commit comments