Skip to content

Commit

Permalink
Deprecate Largest Inputs And Outputs In Incidents and Largest Inciden…
Browse files Browse the repository at this point in the history
…ts by Storage Size (#15176)

* deprecate largest_incidents

* update no incident found message

* add deprecate: true

* update rn

* remove toversion and replace with deprecate

* add that system diagonistics is available from version 6.2.0

* Apply suggestions from code review

Co-authored-by: Andrew Shamah <42912128+amshamah419@users.noreply.github.com>

Co-authored-by: Andrew Shamah <42912128+amshamah419@users.noreply.github.com>
  • Loading branch information
DeanArbel and amshamah419 authored Oct 10, 2021
1 parent 0345e2c commit 04f384d
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 5 deletions.
6 changes: 6 additions & 0 deletions Packs/CommonWidgets/ReleaseNotes/1_1_6.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

#### Scripts
##### GetLargestInputsAndOuputsInIncidents
- The script has been deprecated. For XSOAR versions up to 6.2.0, it is not advised to use the script as it can cause performance issues. For XSOAR 6.2.0 and later versions, please refer to the System Diagnostic page as an alternative.
##### GetLargestInvestigations
- The script has been deprecated. For XSOAR versions up to 6.2.0, it is not advised to use the script as it can cause performance issues. For XSOAR 6.2.0 and later versions, please refer to the System Diagnostic page as an alternative.
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,11 @@ def get_extra_data_from_investigations(investigations: list) -> list:

def main():
try:
if is_demisto_version_ge("6.2.0"):
raise DemistoException("This script has been deprecated. Please checkout the System Diagnostic page for an "
"alternative.")
args = demisto.args()
is_table_result = argToBoolean(args.get('table_result', False))

raw_output = demisto.executeCommand('GetLargestInvestigations',
args={
'from': args.get('from'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ args:
- 'false'
required: false
secret: false
comment: Returns inputs and outputs larger than 1 MB from all Cortex XSOAR investigations.
comment: Deprecated. Use System Diagonstics page instead (available from version 6.2.0). Returns inputs and outputs larger than 1 MB from all Cortex XSOAR investigations.
commonfields:
id: GetLargestInputsAndOuputsInIncidents
version: -1
Expand All @@ -38,3 +38,4 @@ timeout: '0'
type: python
dockerimage: demisto/python3:3.9.7.24076
fromversion: 6.0.0
deprecated: true
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ def get_month_database_names():

def main():
try:
if is_demisto_version_ge("6.2.0"):
raise DemistoException("This script has been deprecated. Please checkout the System Diagnostic page for an "
"alternative.")
investigations: Dict = {}
args: Dict = demisto.args()
from_date = args.get('from')
Expand All @@ -102,6 +105,8 @@ def main():
# change result to MD
result = tableToMarkdown('Largest Incidents by Storage Size', result.get("data"),
headers=["IncidentID", "Size(MB)", "AmountOfEntries", "Date"])
if not result:
result = "No incidents found. Note: only incidents larger than 1MB are scanned."
demisto.results(result)
except Exception:
demisto.error(traceback.format_exc()) # print the traceback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ args:
- 'false'
required: false
secret: false
comment: Returns all investigations larger than 1 MB from all Cortex XSOAR.
comment: Deprecated. Use System Diagonstics page instead (available from version 6.2.0). Returns all investigations larger than 1 MB from all Cortex XSOAR.
commonfields:
id: GetLargestInvestigations
version: -1
Expand All @@ -43,3 +43,4 @@ timeout: '0'
type: python
dockerimage: demisto/python3:3.9.7.24076
fromversion: 6.0.0
deprecated: true
4 changes: 2 additions & 2 deletions Packs/CommonWidgets/pack_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "Common Widgets",
"description": "Frequently used widgets pack.",
"support": "xsoar",
"currentVersion": "1.1.5",
"currentVersion": "1.1.6",
"author": "Cortex XSOAR",
"url": "https://www.paloaltonetworks.com/cortex",
"email": "",
Expand All @@ -14,4 +14,4 @@
"useCases": [],
"keywords": [],
"dependencies": {}
}
}

0 comments on commit 04f384d

Please # to comment.