RapidBreachResponse-TotalTasksCount-Widget

Rapid Breach Response dynamic section, will show the updated number of tasks to complete.

python · Rapid Breach Response

Details

IDRapidBreachResponse-TotalTasksCount-Widget
Languagepython
From Version6.0.0
Docker Imagedemisto/python3:3.12.13.10116658
Tagsdynamic-section

README

Rapid Breach Response dynamic section, will show the updated number of tasks to complete.

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

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("totaltaskcount", 0)

    if not query:
        html = f"<div style={GREY_HTML_STYLE}0</div>"
    else:
        html = f"<div style={GREY_HTML_STYLE}{query!s}</div>"

    demisto.results({"ContentsFormat": formats["html"], "Type": entryTypes["note"], "Contents": html})


if __name__ in ["__main__", "builtin", "builtins"]:
    main()