RapidBreachResponse-EradicationTasksCount-Widget
Rapid Breach Response dynamic section, will show the updated number of eradication tasks.
python · Rapid Breach Response
Details
| ID | RapidBreachResponse-EradicationTasksCount-Widget |
|---|---|
| Language | python |
| From Version | 6.0.0 |
| Docker Image | demisto/python3:3.12.13.10116658 |
| Tags | dynamic-section |
README
Rapid Breach Response dynamic section, will show the updated number of eradication tasks.
Script Data
| Name | Description |
|---|---|
| Script Type | python3 |
| Tags | dynamic-section |
| Cortex XSOAR Version | 6.0.0 |
Inputs
There are no inputs for this script.
Outputs
There are no outputs for this script.
import demistomock as demisto # noqa: F401 from CommonServerPython import * # noqa: F401 ORANGE_HTML_STYLE = "'color:#EF9700;font-size:48px;padding: 60px; text-align:center;padding-left: 70px'>" GREEN_HTML_STYLE = "'color:#1DB846;font-size:48px;padding: 60px; text-align:center;padding-left: 70px'>" GREY_HTML_STYLE = "'color:#404142;font-size:48px;padding: 60px; text-align:center;padding-left: 70px'>" def main(): incident = demisto.incidents() query = incident[0].get("CustomFields", {}).get("eradicationtaskcount", 0) if not query: html = f"<div style={GREY_HTML_STYLE}{0}</div>" elif int(query) == 0: html = f"<div style={ORANGE_HTML_STYLE}{query!s}</div>" else: html = f"<div style={GREEN_HTML_STYLE}{query!s}</div>" demisto.results({"ContentsFormat": formats["html"], "Type": entryTypes["note"], "Contents": html}) if __name__ in ["__main__", "builtin", "builtins"]: main()