firefighter-incident 0.0.14__py3-none-any.whl → 0.0.15__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- firefighter/_version.py +2 -2
- firefighter/api/serializers.py +9 -0
- firefighter/confluence/signals/incident_updated.py +2 -2
- firefighter/incidents/enums.py +22 -2
- firefighter/incidents/forms/closure_reason.py +45 -0
- firefighter/incidents/forms/unified_incident.py +406 -0
- firefighter/incidents/forms/update_status.py +87 -1
- firefighter/incidents/migrations/0027_add_closure_fields.py +40 -0
- firefighter/incidents/migrations/0028_add_closure_reason_constraint.py +33 -0
- firefighter/incidents/migrations/0029_add_custom_fields_to_incident.py +22 -0
- firefighter/incidents/models/incident.py +32 -5
- firefighter/incidents/static/css/main.min.css +1 -1
- firefighter/incidents/templates/layouts/partials/status_pill.html +1 -1
- firefighter/incidents/views/reports.py +3 -3
- firefighter/raid/apps.py +9 -26
- firefighter/raid/client.py +2 -2
- firefighter/raid/forms.py +75 -238
- firefighter/raid/signals/incident_created.py +38 -13
- firefighter/raid/signals/incident_updated.py +3 -2
- firefighter/slack/messages/slack_messages.py +19 -4
- firefighter/slack/rules.py +1 -1
- firefighter/slack/signals/create_incident_conversation.py +6 -0
- firefighter/slack/signals/incident_updated.py +7 -1
- firefighter/slack/views/modals/__init__.py +4 -0
- firefighter/slack/views/modals/base_modal/form_utils.py +63 -0
- firefighter/slack/views/modals/close.py +15 -2
- firefighter/slack/views/modals/closure_reason.py +193 -0
- firefighter/slack/views/modals/open.py +59 -12
- firefighter/slack/views/modals/opening/details/unified.py +203 -0
- firefighter/slack/views/modals/opening/set_details.py +3 -2
- firefighter/slack/views/modals/postmortem.py +10 -2
- firefighter/slack/views/modals/update_status.py +28 -2
- firefighter/slack/views/modals/utils.py +51 -0
- {firefighter_incident-0.0.14.dist-info → firefighter_incident-0.0.15.dist-info}/METADATA +1 -1
- {firefighter_incident-0.0.14.dist-info → firefighter_incident-0.0.15.dist-info}/RECORD +61 -37
- firefighter_tests/test_incidents/test_enums.py +100 -0
- firefighter_tests/test_incidents/test_forms/conftest.py +179 -0
- firefighter_tests/test_incidents/test_forms/test_closure_reason.py +91 -0
- firefighter_tests/test_incidents/test_forms/test_unified_incident_form.py +570 -0
- firefighter_tests/test_incidents/test_forms/test_unified_incident_form_integration.py +581 -0
- firefighter_tests/test_incidents/test_forms/test_unified_incident_form_p4_p5.py +410 -0
- firefighter_tests/test_incidents/test_forms/test_update_status_workflow.py +343 -0
- firefighter_tests/test_incidents/test_forms/test_workflow_transitions.py +167 -0
- firefighter_tests/test_incidents/test_models/test_incident_model.py +68 -0
- firefighter_tests/test_raid/conftest.py +154 -0
- firefighter_tests/test_raid/test_p1_p3_jira_fields.py +372 -0
- firefighter_tests/test_raid/test_raid_forms.py +10 -253
- firefighter_tests/test_raid/test_raid_signals.py +187 -0
- firefighter_tests/test_slack/messages/__init__.py +0 -0
- firefighter_tests/test_slack/messages/test_slack_messages.py +367 -0
- firefighter_tests/test_slack/views/modals/conftest.py +140 -0
- firefighter_tests/test_slack/views/modals/test_close.py +65 -3
- firefighter_tests/test_slack/views/modals/test_closure_reason_modal.py +138 -0
- firefighter_tests/test_slack/views/modals/test_form_utils_multiple_choice.py +249 -0
- firefighter_tests/test_slack/views/modals/test_open.py +146 -2
- firefighter_tests/test_slack/views/modals/test_opening_unified.py +421 -0
- firefighter_tests/test_slack/views/modals/test_update_status.py +327 -3
- firefighter_tests/test_slack/views/modals/test_utils.py +135 -0
- firefighter/raid/views/open_normal.py +0 -139
- firefighter/slack/views/modals/opening/details/critical.py +0 -88
- {firefighter_incident-0.0.14.dist-info → firefighter_incident-0.0.15.dist-info}/WHEEL +0 -0
- {firefighter_incident-0.0.14.dist-info → firefighter_incident-0.0.15.dist-info}/entry_points.txt +0 -0
- {firefighter_incident-0.0.14.dist-info → firefighter_incident-0.0.15.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
|
-
import logging
|
|
4
|
-
from typing import TYPE_CHECKING, Any
|
|
5
|
-
|
|
6
|
-
from django import forms
|
|
7
|
-
from django.conf import settings
|
|
8
|
-
from slack_sdk.models.blocks.blocks import SectionBlock
|
|
9
|
-
|
|
10
|
-
from firefighter.incidents.forms.create_incident import CreateIncidentForm
|
|
11
|
-
from firefighter.slack.slack_app import SlackApp
|
|
12
|
-
from firefighter.slack.views.modals.opening.set_details import SetIncidentDetails
|
|
13
|
-
|
|
14
|
-
if TYPE_CHECKING:
|
|
15
|
-
from firefighter.slack.views.modals.base_modal.form_utils import (
|
|
16
|
-
SlackFormAttributesDict,
|
|
17
|
-
)
|
|
18
|
-
app = SlackApp()
|
|
19
|
-
logger = logging.getLogger(__name__)
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
class CreateIncidentFormSlack(CreateIncidentForm):
|
|
23
|
-
slack_fields: SlackFormAttributesDict = {
|
|
24
|
-
"title": {
|
|
25
|
-
"input": {
|
|
26
|
-
"multiline": False,
|
|
27
|
-
"placeholder": "Short, punchy description of what's happening.",
|
|
28
|
-
},
|
|
29
|
-
"block": {"hint": None},
|
|
30
|
-
},
|
|
31
|
-
"description": {
|
|
32
|
-
"input": {
|
|
33
|
-
"multiline": True,
|
|
34
|
-
"placeholder": "Help people responding to the incident. This will be posted to #tech-incidents and on our internal status page.\nThis description can be edited later.",
|
|
35
|
-
},
|
|
36
|
-
"block": {"hint": None},
|
|
37
|
-
},
|
|
38
|
-
"environment": {
|
|
39
|
-
"input": {
|
|
40
|
-
"placeholder": "Select an environment",
|
|
41
|
-
},
|
|
42
|
-
"widget": {
|
|
43
|
-
"label_from_instance": lambda obj: f"{obj.value} - {obj.description}",
|
|
44
|
-
},
|
|
45
|
-
},
|
|
46
|
-
"priority": {
|
|
47
|
-
"input": {
|
|
48
|
-
"placeholder": "Select a priority",
|
|
49
|
-
},
|
|
50
|
-
"widget": {
|
|
51
|
-
"post_block": (
|
|
52
|
-
SectionBlock(
|
|
53
|
-
text=f"_<{settings.SLACK_SEVERITY_HELP_GUIDE_URL}|How to choose the priority?>_"
|
|
54
|
-
)
|
|
55
|
-
if settings.SLACK_SEVERITY_HELP_GUIDE_URL
|
|
56
|
-
else None
|
|
57
|
-
),
|
|
58
|
-
"label_from_instance": lambda obj: f"{obj.emoji} {obj.name} - {obj.description}",
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
"incident_category": {
|
|
62
|
-
"input": {
|
|
63
|
-
"placeholder": "Select affected issue category",
|
|
64
|
-
},
|
|
65
|
-
},
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
# Change `priority` field from parent to be a hidden field
|
|
69
|
-
def __init__(
|
|
70
|
-
self,
|
|
71
|
-
*args: Any,
|
|
72
|
-
**kwargs: Any,
|
|
73
|
-
) -> None:
|
|
74
|
-
super().__init__(*args, **kwargs)
|
|
75
|
-
self.fields["priority"].widget = forms.HiddenInput()
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
class OpeningCriticalModal(SetIncidentDetails[CreateIncidentFormSlack]):
|
|
79
|
-
open_action: str = "open_incident_critical"
|
|
80
|
-
push_action: str = "push_incident_critical"
|
|
81
|
-
open_shortcut = "open_incident_critical"
|
|
82
|
-
callback_id: str = "open_incident_critical"
|
|
83
|
-
|
|
84
|
-
title = "Incident Details"
|
|
85
|
-
form_class = CreateIncidentFormSlack
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
modal_opening_critical = OpeningCriticalModal()
|
|
File without changes
|
{firefighter_incident-0.0.14.dist-info → firefighter_incident-0.0.15.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{firefighter_incident-0.0.14.dist-info → firefighter_incident-0.0.15.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|