From 5ffbc18dc681dede868831632621aa0cce0c4269 Mon Sep 17 00:00:00 2001
From: Ildar Iskhakov
Date: Fri, 7 Jun 2024 21:54:45 +0800
Subject: [PATCH] Remove Simulate Incident button (#4479)
# What this PR does
Removes "Simulate Incident" button which is replaced by "Send Demo
Alert" button
Co-authored-by: Joey Orlando
---
.../mixins/browsable_instruction_mixin.py | 6 ----
.../templates/integration_link.html | 35 -------------------
2 files changed, 41 deletions(-)
diff --git a/engine/apps/integrations/mixins/browsable_instruction_mixin.py b/engine/apps/integrations/mixins/browsable_instruction_mixin.py
index aee8fdd7..ae900348 100644
--- a/engine/apps/integrations/mixins/browsable_instruction_mixin.py
+++ b/engine/apps/integrations/mixins/browsable_instruction_mixin.py
@@ -13,10 +13,6 @@ class BrowsableInstructionMixin:
# TODO Create associative array for integrations
base_integration_docs_url = create_engine_url("/#/integrations/", override_base=settings.DOCS_URL)
docs_url = f'{base_integration_docs_url}{request.get_full_path().split("/")[3]}'
- show_button = True
- if request.get_full_path().split("/")[3] == "amazon_sns":
- show_button = False
- source = " ".join(map(lambda x: x.capitalize(), request.get_full_path().split("/")[3].split("_")))
if request.alert_receive_channel.config.example_payload:
payload = request.alert_receive_channel.config.example_payload
payload = json.dumps(payload)
@@ -29,8 +25,6 @@ class BrowsableInstructionMixin:
"url": request.get_full_path,
"docs_url": docs_url,
"payload": payload,
- "source": source,
- "show_button": show_button,
}
)
)
diff --git a/engine/apps/integrations/templates/integration_link.html b/engine/apps/integrations/templates/integration_link.html
index 52872c0e..ba2789cd 100644
--- a/engine/apps/integrations/templates/integration_link.html
+++ b/engine/apps/integrations/templates/integration_link.html
@@ -30,13 +30,6 @@
Copy to clipboard
- {% if show_button %}
-
-
-
- {% endif %}
Go to the Guide
@@ -51,33 +44,5 @@
})
});
-