Skip to content

Instantly share code, notes, and snippets.

@nielsdejong
Created November 18, 2024 13:52
Show Gist options
  • Select an option

  • Save nielsdejong/ec7f9012c67b76cab1d29cc5c7be356d to your computer and use it in GitHub Desktop.

Select an option

Save nielsdejong/ec7f9012c67b76cab1d29cc5c7be356d to your computer and use it in GitHub Desktop.
risk-registry.json
{
"title": "Graph Risk Register",
"version": "2.4",
"settings": {
"pagenumber": 0,
"editable": true,
"fullscreenEnabled": false,
"parameters": {
"neodash_businessunit_name": "Security",
"neodash_businessunit_name_display": "Security",
"neodash_vulnerability_name": "authorization is inadequate",
"neodash_vulnerability_name_display": "authorization is inadequate",
"neodash_risk_id_display": "2",
"neodash_plan_id_display": "",
"neodash_asset_name": "Coffee Machine",
"neodash_asset_name_display": "Coffee Machine",
"neodash_person_name": "",
"neodash_person_name_display": "",
"neodash_risk_description": "",
"neodash_new_asset_name": "",
"neodash_new_person": "",
"neodash_new_department": "",
"neodash_review_impact_rating_display": 2,
"neodash_review_probability_rating_display": 2,
"neodash_progress_closed": "",
"neodash_progress_closed_display": "",
"neodash_desc1": "There is a risk that an external attacker,\nleveraging knowledge and tooling, identifies a weakness in the Neo4js cloud support environments deployed and maintained by the sales and field teams.\nThe impact is a loss of integrity of that environment, confidentiality of the information stored in it, and regulatory breaches leading to significant reputational, financial or operational harm.",
"neodash_description2": 3,
"neodash_risk_id_10": [
"2",
"4",
"5"
],
"neodash_risk_id_10_display": [
{
"type": "span",
"key": "k02",
"ref": null,
"props": {
"children": [
"2",
{
"type": "span",
"key": null,
"ref": null,
"props": {
"children": ", "
},
"_owner": null
}
]
},
"_owner": null
},
{
"type": "span",
"key": "k14",
"ref": null,
"props": {
"children": [
"4",
{
"type": "span",
"key": null,
"ref": null,
"props": {
"children": ", "
},
"_owner": null
}
]
},
"_owner": null
},
{
"type": "span",
"key": "k25",
"ref": null,
"props": {
"children": [
"5",
{
"key": null,
"ref": null,
"props": {},
"_owner": null
}
]
},
"_owner": null
}
],
"neodash_review_impact_rating": "",
"neodash_review": "",
"neodash_review_probability_rating": "",
"neodash_description_update": "The process to install MDM has began.",
"neodash_comment": "",
"neodash_plan_id": 0,
"neodash_progress_notes": "",
"neodash_plan_closed": "",
"neodash_risk_id": "2",
"neodash_review_date": "2023-11-07T00:00:00[Europe/London]",
"neodash_review_date_display": "2023-11-07T00:00:00[Europe/London]",
"neodash_view_number": "0"
},
"theme": "light"
},
"pages": [
{
"title": "Summary",
"reports": [
{
"id": "89315585-1646-4b7d-b0ea-faad49d94852",
"title": "Open High Risks",
"query": "CALL {\n MATCH (bu:BusinessUnit)<-[rel:AFFECTS]-(r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() } AND rel.impact_rating * rel.probability_rating >= 20\n RETURN r\n}\n\nRETURN count(r)\n\n",
"width": 4,
"height": 3,
"x": 4,
"y": 0,
"type": "value",
"selection": {},
"settings": {
"textAlign": "center"
},
"schema": []
},
{
"id": "037b4e46-1734-4021-86a9-81aa85472c52",
"title": "Risks Opened Year",
"query": "CALL {\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() } AND a.date.year = 2024\n RETURN r\n}\n\nRETURN count(r)\n\n",
"width": 4,
"height": 3,
"x": 8,
"y": 0,
"type": "value",
"selection": {},
"settings": {
"textAlign": "center"
},
"schema": []
},
{
"id": "d9e5db78-ce5a-4df8-8b91-9434f8a07238",
"title": "Risks Closed",
"query": "MATCH (r:Risk)-[:RISK_HAS_PLAN]->(:Plan)-[:NEXT_PROGRESS*]->(end {closed:true})\nWHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\nRETURN count(r) AS RisksClosed\n",
"width": 4,
"height": 3,
"x": 12,
"y": 0,
"type": "value",
"selection": {},
"settings": {
"textAlign": "center"
},
"schema": []
},
{
"id": "523a81aa-d7bb-4c40-9060-18fbaf2018f0",
"title": "Risks Closed Year",
"query": "MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r:Risk)-[:RISK_HAS_PLAN]->(:Plan)-[:NEXT_PROGRESS*]->(end {closed:true})\nWHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() } AND end.date.year = 2024\nRETURN count(r)\n",
"width": 4,
"height": 3,
"x": 16,
"y": 0,
"type": "value",
"selection": {},
"settings": {
"textAlign": "center"
},
"schema": []
},
{
"id": "ff7d8981-4ab9-4a91-8f0f-83e3aedc2b93",
"title": "Average Risk",
"query": "MATCH (r:Risk)\n\nCALL {\n WITH r\n\n CALL {\n WITH r\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r)-[rel:AFFECTS]->(:BusinessUnit)\n RETURN a.date AS date, rel.impact_rating * rel.probability_rating AS severity\n \n UNION\n \n WITH r\n MATCH (r)-[:NEXT_REVIEW*]->(rev:Review)\n RETURN rev.date AS date, rev.impact_rating * rev.probability_rating AS severity\n }\n\n RETURN date, severity\n ORDER BY date DESC\n LIMIT 1\n}\n\nRETURN avg((toFloat(severity) / 25) * 100) AS severity",
"width": 4,
"height": 3,
"x": 20,
"y": 0,
"type": "gauge",
"selection": {},
"settings": {
"arcsLength": "0.4, 0.4, 0.2",
"styleRules": [
{
"field": "severity",
"condition": ">=",
"value": "20",
"customization": "text color",
"customizationValue": "#F40101"
},
{
"field": "severity",
"condition": ">=",
"value": "10",
"customization": "text color",
"customizationValue": "#F5A300"
},
{
"field": "severity",
"condition": "<",
"value": "10",
"customization": "text color",
"customizationValue": "#00FF11"
}
],
"textAlign": "center"
},
"schema": []
},
{
"id": "7208b7fd-9e3b-42bd-9fe9-03553684ba30",
"title": "Risk Matrix",
"query": "WITH range(1, 5) AS impact_rating, range(1, 5) AS probability_rating\nUNWIND impact_rating AS impact_rating2\nUNWIND probability_rating AS probability_rating2\n\nCALL {\n WITH impact_rating2, probability_rating2\n CALL {\n WITH impact_rating2, probability_rating2\n\n // Open risks\n MATCH (:BusinessUnit)<-[a:AFFECTS]-(r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n \n WITH [a.probability_rating, a.impact_rating] AS values, impact_rating2, probability_rating2\n WITH count(values) AS count, values[1] AS inner_impact_rating, values[0] AS inner_probability_rating, impact_rating2, probability_rating2\n ORDER BY inner_impact_rating, inner_probability_rating\n WITH [count, inner_probability_rating, inner_impact_rating] AS col1, inner_probability_rating, impact_rating2, probability_rating2\n ORDER BY inner_probability_rating\n WHERE col1[1] = impact_rating2 AND col1[2] = probability_rating2\n RETURN count(col1) AS res\n \n UNION\n \n WITH impact_rating2, probability_rating2\n\n // Open risks\n MATCH (:BusinessUnit)<-[a:AFFECTS]-(r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n\n WITH [a.probability_rating, a.impact_rating] AS values, impact_rating2, probability_rating2\n WITH count(values) AS count, values[1] AS inner_impact_rating, values[0] AS inner_probability_rating, impact_rating2, probability_rating2\n ORDER BY inner_impact_rating, inner_probability_rating\n WITH [count, inner_probability_rating, inner_impact_rating] AS col1, inner_probability_rating, impact_rating2, probability_rating2\n ORDER BY inner_probability_rating\n WHERE col1[1] = impact_rating2 AND col1[2] = probability_rating2\n RETURN col1[0] AS res\n }\n\n RETURN res\n ORDER BY res DESC\n LIMIT 1\n}\n\nWITH\nCASE\n WHEN impact_rating2 * probability_rating2 >= 20 THEN toString(res) + '.'\n WHEN impact_rating2 * probability_rating2 >= 10 THEN toString(res) + ','\n ELSE toString(res)\nEND AS col1, impact_rating2 AS impact_rating\nORDER BY impact_rating DESC\nWITH collect(col1) AS col1, impact_rating\nRETURN col1[0] AS one, col1[1] AS two, col1[2] AS three, col1[3] AS four, col1[4] AS five",
"width": 6,
"height": 5,
"x": 0,
"y": 3,
"type": "table",
"selection": {},
"settings": {
"styleRules": [
{
"field": "five",
"condition": "contains",
"value": ".",
"customization": "cell color",
"customizationValue": "#F7020270"
},
{
"field": "four",
"condition": "contains",
"value": ".",
"customization": "cell color",
"customizationValue": "#F7020270"
},
{
"field": "three",
"condition": "contains",
"value": ".",
"customization": "cell color",
"customizationValue": "#F7020270"
},
{
"field": "two",
"condition": "contains",
"value": ".",
"customization": "cell color",
"customizationValue": "#F7020270"
},
{
"field": "one",
"condition": "contains",
"value": ".",
"customization": "cell color",
"customizationValue": "#F7020270"
},
{
"field": "five",
"condition": "contains",
"value": ",",
"customization": "cell color",
"customizationValue": "#F7AA026E"
},
{
"field": "four",
"condition": "contains",
"value": ",",
"customization": "cell color",
"customizationValue": "#F7AA026E"
},
{
"field": "three",
"condition": "contains",
"value": ",",
"customization": "cell color",
"customizationValue": "#F7AA026E"
},
{
"field": "two",
"condition": "contains",
"value": ",",
"customization": "cell color",
"customizationValue": "#F7AA026E"
},
{
"field": "one",
"condition": "contains",
"value": ",",
"customization": "cell color",
"customizationValue": "#F7AA026E"
},
{
"field": "five",
"condition": "!=",
"value": "sheep",
"customization": "cell color",
"customizationValue": "#02F71B6E"
},
{
"field": "four",
"condition": "!=",
"value": "sheep",
"customization": "cell color",
"customizationValue": "#02F71B6E"
},
{
"field": "three",
"condition": "!=",
"value": "sheep",
"customization": "cell color",
"customizationValue": "#02F71B6E"
},
{
"field": "two",
"condition": "!=",
"value": "sheep",
"customization": "cell color",
"customizationValue": "#02F71B6E"
},
{
"field": "one",
"condition": "!=",
"value": "sheep",
"customization": "cell color",
"customizationValue": "#02F71B6E"
}
]
},
"schema": []
},
{
"id": "f39d0990-1f3c-4586-b7be-b2e7d3d74a70",
"title": "Open Risks",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nRETURN count(open_risks)\n",
"width": 4,
"height": 3,
"x": 0,
"y": 0,
"type": "value",
"selection": {},
"settings": {
"textAlign": "center"
},
"schema": []
},
{
"id": "c817b0a5-f677-464e-859e-9d8399191143",
"title": "Risk Categories",
"query": "CALL {\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks, a\n\n UNION\n\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks, a\n}\n\nRETURN DISTINCT a.category AS category, count(a.category) AS value",
"width": 7,
"height": 5,
"x": 6,
"y": 3,
"type": "pie",
"selection": {
"index": "category",
"value": "value",
"key": "(none)"
},
"settings": {},
"schema": []
},
{
"id": "2583e69f-ec82-4cf6-9bdd-222c14b2703b",
"title": "Risks per Department",
"query": "CALL {\n MATCH (bu:BusinessUnit)<-[:AFFECTS]-(r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks, bu\n\n UNION\n\n MATCH (bu:BusinessUnit)<-[:AFFECTS]-(r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks, bu\n}\n\nRETURN bu.name AS category, count(open_risks) AS value",
"width": 11,
"height": 5,
"x": 13,
"y": 3,
"type": "pie",
"selection": {
"index": "category",
"value": "value",
"key": "(none)"
},
"settings": {
"legend": false,
"activeOuterRadiusOffset": 8,
"arcLinkLabelsOffset": 15,
"arcLinkLabelsSkipAngle": 10,
"colors": "category10"
},
"schema": []
},
{
"id": "05b75711-4ea6-4b36-949f-bbf7f84a54fa",
"title": "Risks Opened and Closed",
"query": "WITH range(1, 12) AS m1, date.realtime().year AS y\nUNWIND m1 AS m\n\nCALL {\n WITH m, y\n\n CALL {\n WITH m, y\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() } AND a.date.month = m AND a.date.year = y\n WITH toString(a.date.month) + '-' + toString(a.date.year) AS date\n RETURN date AS month, count(date) AS count\n\n UNION\n\n WITH m, y\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() } AND a.date.month = m AND a.date.year = y\n WITH toString(a.date.month) + '-' + toString(a.date.year) AS date\n RETURN date AS month, count(date) AS count\n\n UNION\n\n WITH m, y\n RETURN toString(m) + '-' + toString(y) AS month, 0 AS count\n }\n RETURN month, count\n ORDER BY count DESC\n LIMIT 1\n}\n\nRETURN month, count, \"Opened\" AS group\n\nUNION\n\nWITH range(1, 12) AS m1, date.realtime().year AS y\nUNWIND m1 AS m\n\nCALL {\n WITH m, y\n\n CALL {\n WITH m, y\n MATCH (bu:BusinessUnit)<-[:AFFECTS]-(r:Risk)-[:RISK_HAS_PLAN]->(:Plan)-[:NEXT_PROGRESS*]->(end {closed:true})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n WITH r AS closed_risks, m, y, end\n MATCH (closed_risks)-[:AFFECTS]->(bu:BusinessUnit)\n WITH end.date as date, m, y\n WHERE date.month = m AND date.year = y\n WITH toString(date.month) + '-' + toString(date.year) AS date\n RETURN date AS month, count(date) AS count\n\n UNION\n\n WITH m, y\n RETURN toString(m) + '-' + toString(y) AS month, 0 AS count\n }\n RETURN month, count\n ORDER BY count DESC\n LIMIT 1\n}\n\nRETURN month, count, \"Closed\" AS group\n",
"width": 24,
"height": 6,
"x": 0,
"y": 8,
"type": "bar",
"selection": {
"index": "month",
"value": "count",
"key": "group"
},
"settings": {
"labelRotation": 0,
"showOptionalSelections": true,
"groupMode": "grouped"
},
"schema": []
},
{
"id": "32c591d7-b04b-4d5d-ae9f-2c3c5085773d",
"title": "3D Risk Register",
"query": "MATCH path=(r:Risk)-[*0..2]->()\nRETURN path\nLIMIT 1000\n",
"width": 24,
"height": 7,
"x": 0,
"y": 15,
"type": "graph3d",
"selection": {
"Risk": "id",
"Asset": "name",
"BusinessUnit": "name",
"Review": "(label)",
"Plan": "id",
"Person": "name",
"Progress": "(label)",
"Analysis": "(label)"
},
"settings": {
"fullscreenEnabled": true
},
"schema": [
[
"Risk",
"description",
"embedding",
"id"
],
[
"Asset",
"name"
],
[
"BusinessUnit",
"name"
],
[
"Review",
"date",
"probability_rating",
"notes",
"impact_rating"
],
[
"Plan",
"risk_approach",
"accepted",
"id",
"type",
"risk_treatment_plan"
],
[
"Person",
"name"
],
[
"Progress",
"date",
"notes",
"closed"
],
[
"Analysis",
"date",
"author",
"description",
"category"
]
]
}
]
},
{
"title": "Executive Report",
"reports": [
{
"id": "f5c6cd03-1658-437b-9919-334c452aaccb",
"title": "Top Strategic Risks",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nMATCH (bu:BusinessUnit)<-[rel:AFFECTS]-(open_risks)-[:RISK_HAS_PLAN]->(p:Plan)\nWHERE p.type = \"Strategic\"\nWITH open_risks AS r1, rel, bu, p\n\nCALL {\n WITH r1\n MATCH (r:Risk)\n WHERE r.id = r1.id\n \n CALL {\n WITH r\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r)-[rel:AFFECTS]->(:BusinessUnit)\n RETURN a.date AS date2, rel.impact_rating * rel.probability_rating AS severity, rel.probability_rating AS probability\n \n UNION\n \n WITH r\n MATCH (r)-[:NEXT_REVIEW*]-(rev:Review)\n RETURN rev.date AS date2, rev.probability_rating * rev.probability_rating AS severity, rev.probability_rating AS probability\n }\n \n RETURN date2, severity, probability\n ORDER BY date2 DESC\n LIMIT 1\n}\n\nWITH \nCASE\n WHEN rel.high_fix IS null THEN 'N/A'\n ELSE rel.high_fix\nEND AS EstimatedFix, r1 AS r, severity, rel.high_loss AS EstimatedLoss, probability\n\nMATCH (a:Asset)<-[:IMPACTS|SECONDARY_IMPACT]-(r)\nWITH r, a, severity, EstimatedLoss, probability, EstimatedFix\n\nMATCH (bu:BusinessUnit)<-[aff:AFFECTS]-(r1:Risk)-[:IMPACTS]->(a)<-[:IMPACTS|SECONDARY_IMPACT]-(r)\nWITH r.id AS RiskID, sum(aff.high_loss) + EstimatedLoss AS loss, severity, EstimatedLoss, probability, EstimatedFix\nRETURN RiskID, severity AS Severity, probability AS Probability, EstimatedFix, EstimatedLoss, loss AS EstimatedTotalLoss\nORDER BY severity DESC",
"width": 24,
"height": 3,
"x": 0,
"y": 0,
"type": "table",
"selection": {},
"settings": {
"actionsRules": [
{
"condition": "Click",
"field": "RiskID",
"value": "RiskID",
"customization": "set variable",
"customizationValue": "description2"
},
{
"condition": "Click",
"field": "RiskID",
"value": "RiskID",
"customization": "set variable",
"customizationValue": "risk_id"
}
]
}
},
{
"id": "957e8368-e3c1-465c-a860-f2b36c97c130",
"title": "Description",
"query": "MATCH (r:Risk)\nWHERE r.id = $neodash_description2\nRETURN r.description\n\n",
"width": 24,
"height": 2,
"x": 0,
"y": 3,
"type": "value",
"selection": {},
"settings": {
"fontSize": 15
},
"schema": []
},
{
"id": "32a912dc-4678-4fef-b831-4aa9a925d6a7",
"title": "Value at Risk (Individual)",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n\n UNION\n\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nMATCH (open_risks)-[:RISK_HAS_PLAN]->(p:Plan)\nWHERE p.type = \"Strategic\"\nWITH open_risks AS r1\nMATCH (r1)-[a:AFFECTS]->(bu:BusinessUnit)\nRETURN sum(a.high_loss)\n",
"width": 6,
"height": 2,
"x": 0,
"y": 5,
"type": "value",
"selection": {},
"settings": {},
"schema": []
},
{
"id": "264bd233-3d20-44a2-8026-c287e6c9636e",
"title": "Value at Risk (Community)",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n\n UNION\n\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nMATCH (bu:BusinessUnit)<-[rel:AFFECTS]-(open_risks)-[:RISK_HAS_PLAN]->(p:Plan)\nWHERE p.type = \"Strategic\"\nWITH bu, rel, p, open_risks AS r1\n\nCALL {\n WITH r1\n MATCH (r:Risk)\n WHERE r.id = r1.id\n \n CALL {\n WITH r\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r)-[rel:AFFECTS]->(:BusinessUnit)\n RETURN a.date AS date2, rel.impact_rating * rel.probability_rating AS severity\n \n UNION\n \n WITH r\n MATCH (r)-[:NEXT_REVIEW*]-(rev:Review)\n RETURN rev.date AS date2, rev.impact_rating * rev.probability_rating AS severity\n }\n \n RETURN date2, severity\n ORDER BY date2 DESC\n LIMIT 1\n}\n\nWITH r1 AS r, severity, rel.high_loss AS EstimatedLoss\nORDER BY severity DESC\nLIMIT 3\n\nMATCH (a:Asset)<-[:IMPACTS | :SECONDARY_IMPACT]-(r)\nWITH r, a\n\nMATCH p=(bu:BusinessUnit)<-[aff:AFFECTS]-(r1:Risk)-[:IMPACTS]->(a)<-[:IMPACTS | :SECONDARY_IMPACT]-(r)\nWITH r.id AS RiskID, sum(aff.high_loss) AS loss\nRETURN sum(loss)",
"width": 6,
"height": 2,
"x": 6,
"y": 5,
"type": "value",
"selection": {},
"settings": {},
"schema": []
},
{
"id": "e947225f-801d-43e6-b57c-f86aaef12ab1",
"title": "Investment to Fix (Individual)",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n\n UNION\n\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nMATCH (open_risks)-[:RISK_HAS_PLAN]->(p:Plan)\nWHERE p.type = \"Strategic\"\nWITH open_risks AS r1\nMATCH (r1)-[a:AFFECTS]->(bu:BusinessUnit)\nWITH \nCASE\n WHEN a.high_fix IS null THEN -1\n ELSE a.high_fix\nEND AS high_fix\nRETURN\nCASE\n WHEN sum(high_fix) = -1 THEN 'N/A'\n ELSE sum(high_fix)\nEND AS high_fix",
"width": 6,
"height": 2,
"x": 12,
"y": 5,
"type": "value",
"selection": {},
"settings": {},
"schema": []
},
{
"id": "6adc13c0-4914-46be-aef9-47724c1a2e88",
"title": "Investment to Fix (Community)",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n\n UNION\n\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nMATCH (bu:BusinessUnit)<-[rel:AFFECTS]-(open_risks)-[:RISK_HAS_PLAN]->(p:Plan)\nWHERE p.type = \"Strategic\"\nWITH open_risks AS r1, bu, rel, p\n\nCALL {\n WITH r1\n MATCH (r:Risk)\n WHERE r.id = r1.id\n \n CALL {\n WITH r\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r)-[rel:AFFECTS]->(:BusinessUnit)\n RETURN a.date AS date2, rel.impact_rating * rel.probability_rating AS severity\n \n UNION\n \n WITH r\n MATCH (r)-[:NEXT_REVIEW*]-(rev:Review)\n RETURN rev.date AS date2, rev.impact_rating * rev.probability_rating AS severity\n }\n \n RETURN date2, severity\n ORDER BY date2 DESC\n LIMIT 1\n}\n\nWITH r1 AS r, severity, rel.high_loss AS EstimatedLoss\nORDER BY severity DESC\n\nMATCH (a:Asset)<-[:IMPACTS|SECONDARY_IMPACT]-(r)\nWITH r, a\n\nMATCH p=(bu:BusinessUnit)<-[aff:AFFECTS]-(r1:Risk)-[:IMPACTS]->(a)<-[:IMPACTS|SECONDARY_IMPACT]-(r)\nWITH\nCASE\n WHEN aff.high_fix IS null THEN -1\n ELSE aff.high_fix\nEND AS fix, r.id AS RiskID\nRETURN\nCASE\n WHEN sum(fix) = -1 THEN 'N/A'\n ELSE sum(fix)\nEND AS high_fix",
"width": 6,
"height": 2,
"x": 18,
"y": 5,
"type": "value",
"selection": {},
"settings": {},
"schema": []
},
{
"id": "8b1216f9-4139-416c-b4c8-0cc068d19f30",
"title": "Blast Radius of Top Risks",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n\n UNION\n\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nMATCH (bu:BusinessUnit)<-[rel:AFFECTS]-(open_risks)-[:RISK_HAS_PLAN]->(p:Plan)\nWHERE p.type = \"Strategic\"\nWITH open_risks AS r1, rel, bu, p\n\nCALL {\n WITH r1\n MATCH (r:Risk)\n WHERE r.id = r1.id\n \n CALL {\n WITH r\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r)-[rel:AFFECTS]->(:BusinessUnit)\n RETURN a.date AS date2, rel.impact_rating * rel.probability_rating AS severity\n \n UNION\n \n WITH r\n MATCH (r)-[:NEXT_REVIEW*]-(rev:Review)\n RETURN rev.date AS date2, rev.impact_rating * rev.probability_rating AS severity\n }\n \n RETURN date2, severity\n ORDER BY date2 DESC\n LIMIT 1\n}\n\nWITH r1 AS r, severity, rel.high_loss AS EstimatedLoss\nORDER BY severity DESC\nLIMIT 3\n\nMATCH path=(:BusinessUnit)-[:USES]->(a:Asset)<-[:IMPACTS | :SECONDARY_IMPACT]-(r)\nRETURN path\n",
"width": 9,
"height": 4,
"x": 0,
"y": 7,
"type": "graph",
"selection": {
"BusinessUnit": "name",
"Asset": "name",
"Risk": "id"
},
"settings": {
"frozen": false,
"nodePositions": {},
"fullscreenEnabled": true
},
"schema": [
[
"BusinessUnit",
"name"
],
[
"Asset",
"name"
],
[
"Risk",
"description",
"embedding",
"id"
]
]
}
]
},
{
"title": "CISO Report",
"reports": [
{
"id": "e84237d5-73e9-4bed-acbf-9a7cdcec158b",
"title": "Risks without Plans",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n\n UNION\n\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nWITH open_risks\nCALL {\n WITH open_risks\n MATCH (open_risks)-[:RISK_HAS_PLAN]-(p:Plan)\n WHERE p.risk_treatment_plan = 'tbc' OR p.risk_treatment_plan IS NULL\n RETURN open_risks AS no_plan_risks\n \n UNION\n\n WITH open_risks\n MATCH (open_risks)\n WHERE NOT EXISTS { (open_risks)-[:RISK_HAS_PLAN]->(p) }\n RETURN open_risks AS no_plan_risks\n}\n\nWITH no_plan_risks\nOPTIONAL MATCH (no_plan_risks)-[:RISK_HAS_PLAN]->(p:Plan)\nOPTIONAL MATCH (p)-[:PLAN_HAS_OWNER]->(o:Person)\n\nCALL {\n WITH no_plan_risks\n \n CALL {\n WITH no_plan_risks\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(no_plan_risks)-[rel:AFFECTS]->(:BusinessUnit)\n RETURN a.date AS internal_date, rel.impact_rating * rel.probability_rating AS severity\n \n UNION\n \n WITH no_plan_risks\n MATCH (no_plan_risks)-[:NEXT_REVIEW*]-(rev:Review)\n RETURN rev.date AS internal_date, rev.impact_rating * rev.probability_rating AS severity\n }\n \n RETURN severity\n ORDER BY internal_date DESC\n LIMIT 1\n}\n\nWITH no_plan_risks.id AS RiskID, o.name AS owner, CASE WHEN severity IS NULL THEN 0 ELSE severity END AS severity\nORDER BY severity DESC\n\nRETURN RiskID, owner AS Owner, CASE WHEN severity = 0 THEN null ELSE severity END AS Severity",
"width": 7,
"height": 4,
"x": 5,
"y": 0,
"type": "table",
"selection": {},
"settings": {
"styleRules": [
{
"field": "Severity",
"condition": ">=",
"value": "20",
"customization": "row color",
"customizationValue": "#F7020270"
},
{
"field": "Severity",
"condition": ">=",
"value": "10",
"customization": "row color",
"customizationValue": "#F7AA026E"
},
{
"field": "Severity",
"condition": "<",
"value": "10",
"customization": "row color",
"customizationValue": "#02F71B6E"
}
],
"actionsRules": [
{
"condition": "Click",
"field": "RiskID",
"value": "RiskID",
"customization": "set variable",
"customizationValue": "risk_id"
}
]
}
},
{
"id": "3b326f14-d296-4809-bdf3-b955bbabcbeb",
"title": "Risks without Plans",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n\n UNION\n\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nWITH open_risks\n\nCALL {\n WITH open_risks\n MATCH (open_risks)-[:RISK_HAS_PLAN]-(p:Plan)\n WHERE p.risk_treatment_plan = 'tbc' OR p.risk_treatment_plan IS NULL\n RETURN open_risks AS no_plan_risks\n \n UNION\n\n WITH open_risks\n MATCH (open_risks)\n WHERE NOT EXISTS { (r)-[:RISK_HAS_PLAN]->(p) }\n RETURN open_risks AS no_plan_risks\n}\n\nRETURN count(no_plan_risks) AS num\n",
"width": 5,
"height": 2,
"x": 0,
"y": 0,
"type": "value",
"selection": {},
"settings": {
"textAlign": "center"
},
"schema": []
},
{
"id": "b276127a-8ed6-42fa-a924-880065666fad",
"title": "Risks without Owners",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n\n UNION\n\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nWITH open_risks\nWHERE NOT EXISTS { (open_risks)-[:RISK_HAS_PLAN]->(:Plan)-[:PLAN_HAS_OWNER]->(:Person) }\nWITH open_risks as no_owner_risks\n\nCALL {\n WITH no_owner_risks\n \n CALL {\n WITH no_owner_risks\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(no_owner_risks)-[rel:AFFECTS]->(:BusinessUnit)\n RETURN a.date AS internal_date, rel.impact_rating * rel.probability_rating AS severity\n \n UNION\n \n WITH no_owner_risks\n MATCH (no_owner_risks)-[:NEXT_REVIEW*]-(rev:Review)\n RETURN rev.date AS internal_date, rev.impact_rating * rev.probability_rating AS severity\n }\n \n RETURN severity\n ORDER BY internal_date DESC\n LIMIT 1\n}\n\nWITH no_owner_risks.id AS RiskID, CASE WHEN severity IS NULL THEN 0 ELSE severity END AS severity\nORDER BY severity DESC\n\nRETURN RiskID, CASE WHEN severity = 0 THEN NULL ELSE severity END AS Severity\n",
"width": 6,
"height": 4,
"x": 12,
"y": 0,
"type": "table",
"selection": {},
"settings": {
"styleRules": [
{
"field": "Severity",
"condition": ">=",
"value": "20",
"customization": "row color",
"customizationValue": "#F7020270"
},
{
"field": "Severity",
"condition": ">=",
"value": "10",
"customization": "row color",
"customizationValue": "#F7AA026E"
},
{
"field": "Severity",
"condition": "<",
"value": "10",
"customization": "row color",
"customizationValue": "#02F71B6E"
}
],
"actionsRules": [
{
"condition": "Click",
"field": "RiskID",
"value": "RiskID",
"customization": "set variable",
"customizationValue": "risk_id"
}
]
}
},
{
"id": "f3718063-d58b-4067-a7e8-3b069832d73a",
"title": "Risks without Owners",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n\n UNION\n\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nWITH open_risks\nWHERE NOT EXISTS { (open_risks)-[:RISK_HAS_PLAN]->(:Plan)-[:PLAN_HAS_OWNER]->(:Person) }\nRETURN count(open_risks) AS num\n",
"width": 5,
"height": 2,
"x": 0,
"y": 2,
"type": "value",
"selection": {},
"settings": {
"textAlign": "center"
},
"schema": []
},
{
"id": "0b9405e9-2326-4202-816d-fc5f66fa5c60",
"title": "Assets and Departments",
"query": "MATCH p=(a:Asset)<-[rel:USES]-(bu:BusinessUnit)\nRETURN p\n",
"width": 6,
"height": 4,
"x": 18,
"y": 0,
"type": "graph",
"selection": {
"Asset": "name",
"BusinessUnit": "name"
},
"settings": {
"fullscreenEnabled": true,
"nodeColorScheme": "category10",
"relWidthProp": "width",
"relationshipParticles": false,
"defaultNodeSize": 2,
"graphDepthSep": 30
},
"schema": [
[
"Asset",
"name"
],
[
"BusinessUnit",
"name"
]
]
},
{
"id": "9b6a1edb-7df4-466a-9484-594eccbb0cdc",
"title": "Value at Risk",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n\n UNION\n\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nWITH open_risks\nMATCH (open_risks)-[i:AFFECTS]-(:BusinessUnit)\nWITH sum(i.low_loss) AS lower_bound, sum(i.high_loss) AS higher_bound\nRETURN '$' + toString(round(toFloat(lower_bound) / 1000000, 2)) + 'M ' + '- $' + toString(round(toFloat(higher_bound) / 1000000, 2)) + 'M '\n\n",
"width": 5,
"height": 2,
"x": 0,
"y": 4,
"type": "value",
"selection": {},
"settings": {
"fontSize": 30
},
"schema": []
},
{
"id": "705ea9e8-877f-4e09-bfec-f7ca2704a3ff",
"title": "MTTF",
"query": "MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(:Risk)-[:RISK_HAS_PLAN]->(plan:Plan)-[:NEXT_PROGRESS*]-(p:Progress)\nWHERE NOT EXISTS {(p)-[:NEXT_PROGRESS]->()} AND p.closed = True AND p.deleted IS NULL\nRETURN toString(round(avg(toInteger(split(toString(duration.inDays(p.date, a.date)), ['-', 'D'])[1])), 2)) + ' days'",
"width": 5,
"height": 2,
"x": 0,
"y": 6,
"type": "value",
"selection": {},
"settings": {
"fontSize": 32
},
"schema": []
},
{
"id": "6c7dd5d8-6321-4fff-8f26-bf5ed77d32a0",
"title": "Assets affected by Vulnerability",
"query": "MATCH (v:Vulnerability)\nWITH DISTINCT v.name AS vulName\nMATCH p=(v:Vulnerability)-[:IN]->(a:Asset)\nWHERE v.name = vulName AND vulName = $neodash_vulnerability_name\nRETURN p\n",
"width": 7,
"height": 4,
"x": 5,
"y": 4,
"type": "graph",
"selection": {
"Vulnerability": "name",
"Asset": "name"
},
"settings": {
"fullscreenEnabled": true
},
"schema": [
[
"Vulnerability",
"name"
],
[
"Asset",
"name"
]
]
},
{
"id": "cbba6c8c-abb4-4df7-9648-2f3e0818814c",
"title": "Vulnerability",
"query": "MATCH (n:`Vulnerability`) \nWHERE toLower(toString(n.`name`)) CONTAINS toLower($input) \nRETURN DISTINCT n.`name` as value, n.`name` as display ORDER BY size(toString(value)) ASC LIMIT 5",
"width": 5,
"height": 2,
"x": 12,
"y": 6,
"type": "select",
"selection": {},
"settings": {
"type": "Node Property",
"entityType": "Vulnerability",
"propertyType": "name",
"propertyTypeDisplay": "name",
"parameterName": "neodash_vulnerability_name"
},
"schema": []
},
{
"id": "5ae677eb-2d2a-42c1-b1db-6cf951f0952e",
"title": "Asset",
"query": "MATCH (n:`Asset`) \nWHERE toLower(toString(n.`name`)) CONTAINS toLower($input) \nRETURN DISTINCT n.`name` as value, n.`name` as display ORDER BY size(toString(value)) ASC LIMIT 5",
"width": 5,
"height": 2,
"x": 12,
"y": 4,
"type": "select",
"selection": {},
"settings": {
"type": "Node Property",
"entityType": "Asset",
"propertyType": "name",
"propertyTypeDisplay": "name",
"parameterName": "neodash_asset_name"
},
"schema": []
},
{
"id": "39c3087c-fe3d-404b-b91e-3e9e77bcf50d",
"title": "Asset View",
"query": "MATCH p=(v:Vulnerability)-[:IN]->(a:Asset)\nWHERE a.name = $neodash_asset_name\nRETURN p\n",
"width": 7,
"height": 4,
"x": 17,
"y": 4,
"type": "graph",
"selection": {
"Vulnerability": "name",
"Asset": "name"
},
"settings": {
"fullscreenEnabled": true
},
"schema": [
[
"Vulnerability",
"name"
],
[
"Asset",
"name"
]
]
}
]
},
{
"title": "All Departments",
"reports": [
{
"id": "c6f4a90e-2fc1-40ad-9ea3-aaffccd22e0e",
"title": "Top Risks",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n\n UNION\n\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nWITH open_risks\n\nMATCH (open_risks)-[rel:AFFECTS]->(bu:BusinessUnit)\nOPTIONAL MATCH (open_risks)-[:RISK_HAS_PLAN]->(p:Plan)-[:PLAN_HAS_OWNER]->(o:Person)\nOPTIONAL MATCH (open_risks)-[:RISK_HAS_ANALYSIS]-(a:Analysis)\n\nCALL {\n WITH open_risks\n MATCH (r:Risk)\n WHERE r.id = open_risks.id\n \n CALL {\n WITH r\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r)-[rel:AFFECTS]->(:BusinessUnit)\n RETURN a.date AS date2, rel.impact_rating * rel.probability_rating AS severity\n \n UNION\n \n WITH r\n MATCH (r)-[:NEXT_REVIEW*]-(rev:Review)\n RETURN rev.date AS date2, rev.impact_rating * rev.probability_rating AS severity\n }\n \n RETURN date2, severity\n ORDER BY date2 DESC\n LIMIT 1\n}\n\nWITH open_risks, bu, o, severity, a\nWHERE severity IS NOT NULL\nRETURN open_risks.id AS RiskID, bu.name AS Department, o.name AS Owner, severity AS Severity, toInteger(split(toString(duration.inDays(a.date, datetime.realtime())), ['P', 'M', 'D'])[1]) AS DaysOpen\nORDER BY severity DESC\n",
"width": 11,
"height": 4,
"x": 0,
"y": 0,
"type": "table",
"selection": {},
"settings": {
"actionsRules": [
{
"condition": "Click",
"field": "RiskID",
"value": "RiskID",
"customization": "set variable",
"customizationValue": "risk_id"
}
],
"styleRules": [
{
"field": "Severity",
"condition": ">=",
"value": "20",
"customization": "row color",
"customizationValue": "#F7020270"
},
{
"field": "Severity",
"condition": ">=",
"value": "10",
"customization": "row color",
"customizationValue": "#F7AA026E"
},
{
"field": "Severity",
"condition": "<",
"value": "10",
"customization": "row color",
"customizationValue": "#02F71B6E"
}
]
}
},
{
"id": "75fd004a-c5d3-4afa-9116-e2ffdbf860f7",
"title": "No Plan",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n\n UNION\n\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\n// Find open risks with no plan\nWITH open_risks\nMATCH (bu:BusinessUnit)<-[:AFFECTS]-(open_risks)-[:RISK_HAS_PLAN]->(p:Plan)\nWHERE p.risk_treatment_plan CONTAINS 'tbc' OR p.risk_treatment_plan IS NULL\nWITH open_risks as r1, bu\n\nCALL {\n WITH r1\n MATCH (r:Risk)\n WHERE r.id = r1.id\n \n CALL {\n WITH r\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r)-[rel:AFFECTS]->(:BusinessUnit)\n RETURN a.date AS date2, rel.impact_rating * rel.probability_rating AS severity\n \n UNION\n \n WITH r\n MATCH (r)-[:NEXT_REVIEW*]-(rev:Review)\n RETURN rev.date AS date2, rev.impact_rating * rev.probability_rating AS severity\n }\n \n RETURN date2, severity\n ORDER BY date2 DESC\n LIMIT 1\n}\n\nWITH r1.id AS RiskID, bu.name AS Department, CASE WHEN severity IS NULL THEN 0 ELSE severity END AS severity\nORDER BY severity DESC\nRETURN RiskID, Department, CASE WHEN severity = 0 THEN null ELSE severity END AS Severity\n",
"width": 12,
"height": 4,
"x": 11,
"y": 0,
"type": "table",
"selection": {},
"settings": {
"actionsRules": [
{
"condition": "Click",
"field": "RiskID",
"value": "RiskID",
"customization": "set variable",
"customizationValue": "risk_id"
}
],
"styleRules": [
{
"field": "Severity",
"condition": ">=",
"value": "20",
"customization": "row color",
"customizationValue": "#F7020270"
},
{
"field": "Severity",
"condition": ">=",
"value": "10",
"customization": "row color",
"customizationValue": "#F7AA026E"
},
{
"field": "Severity",
"condition": "<",
"value": "10",
"customization": "row color",
"customizationValue": "#02F71B6E"
}
]
}
},
{
"id": "3c324779-19f8-4288-a8ee-027a8ecae9d3",
"title": "Estimated Loss",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n\n UNION\n\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nWITH open_risks\n\nCALL {\n WITH open_risks\n MATCH (open_risks)-[i:AFFECTS]->(bu:BusinessUnit)\n WITH bu.name AS bu, sum(i.low_loss) AS estimated_loss\n RETURN bu AS category, estimated_loss AS value, \"Lower Bound\" AS group\n \n UNION\n \n WITH open_risks\n MATCH (open_risks)-[i:AFFECTS]->(bu:BusinessUnit)\n WITH bu.name AS bu, sum(i.high_loss) AS estimated_loss\n RETURN bu AS category, estimated_loss AS value, \"Upper Bound\" AS group\n}\nRETURN category, sum(value) AS value, group",
"width": 12,
"height": 4,
"x": 0,
"y": 6,
"type": "bar",
"selection": {
"index": "category",
"value": "value",
"key": "group"
},
"settings": {
"showOptionalSelections": true,
"groupMode": "grouped",
"labelRotation": 0,
"marginLeft": 100
},
"schema": []
},
{
"id": "275cf0c2-1b1c-460d-9e55-18c568dabd31",
"title": "MTTF (days)",
"query": "MATCH (bu1:BusinessUnit)\n\nCALL {\n WITH bu1\n\n CALL {\n WITH bu1\n MATCH (r:Risk)-[:AFFECTS]->(bu)\n WHERE bu.name = bu1.name\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r)-[:RISK_HAS_PLAN]->(plan:Plan)-[:NEXT_PROGRESS*]-(p:Progress)\n WHERE NOT EXISTS {(p)-[:NEXT_PROGRESS]->()} AND p.closed AND p.deleted IS NULL\n WITH p, a, bu\n WHERE p.closed\n RETURN avg(toInteger(split(toString(duration.inDays(p.date, a.date)), ['-', 'D'])[1])) AS value, bu.name AS category\n \n UNION\n \n WITH bu1\n MATCH (bu)\n WHERE bu1.name = bu.name\n RETURN 0 AS value, bu.name AS category\n }\n \n RETURN category, value\n ORDER BY value DESC\n LIMIT 1\n}\n\nRETURN category, value",
"width": 11,
"height": 4,
"x": 12,
"y": 6,
"type": "bar",
"selection": {
"index": "category",
"value": "value",
"key": "(none)"
},
"settings": {
"labelRotation": 0
},
"schema": []
},
{
"id": "2ef880a4-c925-4dab-a1da-83e02d2de0be",
"title": "Risks Opened and Closed per Department",
"query": "MATCH (bu1:BusinessUnit)\n\nCALL {\n WITH bu1\n MATCH (r:Risk)-[:AFFECTS]->(bu:BusinessUnit)\n WHERE bu.name = bu1.name\n MATCH (r)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress)\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS*]->() }\n WITH r as open_risks, bu\n RETURN bu.name AS category, count(open_risks) AS value, \"Open\" AS group\n ORDER BY category\n \n UNION\n\n WITH bu1\n MATCH (bu:BusinessUnit)<-[:AFFECTS]-(r:Risk)-[:RISK_HAS_PLAN]->(:Plan)-[:NEXT_PROGRESS*]->(end {closed:true})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() } AND bu.name = bu1.name\n RETURN bu.name AS category, count(r) AS value, \"Closed\" AS group\n}\n\nRETURN category, value, group",
"width": 10,
"height": 4,
"x": 0,
"y": 10,
"type": "bar",
"selection": {
"index": "category",
"value": "value",
"key": "group"
},
"settings": {
"showOptionalSelections": true,
"groupMode": "grouped",
"labelRotation": 0
},
"schema": []
},
{
"id": "4b9811fb-3558-4a56-ac42-6fa759253521",
"title": "Description",
"query": "MATCH (r:Risk)\nWHERE r.id = $neodash_risk_id\nRETURN r.description\n",
"width": 23,
"height": 2,
"x": 0,
"y": 4,
"type": "value",
"selection": {},
"settings": {
"fontSize": 12
},
"schema": []
},
{
"id": "a4e87aa2-c12c-48c2-b452-4ea8fb106831",
"title": "Risks with Plans",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n\n UNION\n\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nWITH open_risks AS r\n\n// No Plan\nCALL {\n WITH r\n\n CALL {\n WITH r\n MATCH (r)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE p.risk_treatment_plan CONTAINS 'tbc' OR p.risk_treatment_plan IS NULL\n RETURN 'No Plan' AS category\n\n UNION\n\n WITH r\n MATCH (r)\n WHERE NOT EXISTS { (r)-[:RISK_HAS_PLAN]->(p:Plan) }\n RETURN 'No Plan' AS category\n }\n RETURN category\n\n UNION\n\n WITH r\n MATCH (r)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT p.risk_treatment_plan CONTAINS 'tbc' OR p.risk_treatment_plan IS NOT NULL\n RETURN 'Plan' AS category\n}\n\nRETURN category, count(category) AS value\nORDER BY category DESC",
"width": 7,
"height": 4,
"x": 10,
"y": 10,
"type": "pie",
"selection": {
"index": "category",
"value": "value",
"key": "(none)"
},
"settings": {},
"schema": []
},
{
"id": "1a20a5d9-cadf-4fb8-b313-60585c25ba8d",
"title": "Value at Risk",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n\n UNION\n\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nWITH open_risks\nMATCH (open_risks)-[i:AFFECTS]-(:BusinessUnit)\nWITH sum(i.low_loss) AS lower_bound, sum(i.high_loss) AS higher_bound\nRETURN '$' + toString(round(toFloat(lower_bound) / 1000000, 2)) + 'M ' + '- $' + toString(round(toFloat(higher_bound) / 1000000, 2)) + 'M '\n",
"width": 6,
"height": 2,
"x": 0,
"y": 14,
"type": "value",
"selection": {},
"settings": {
"fontSize": 36
},
"schema": []
},
{
"id": "3a99383d-6baf-4c86-ba6d-0dfe2320c743",
"title": "Last Reported",
"query": "MATCH (bu:BusinessUnit)\n\nCALL {\n WITH bu\n MATCH (bu)<-[:AFFECTS]-(r:Risk)-[:RISK_HAS_ANALYSIS]->(a:Analysis)\n WITH date(a.date) AS date\n RETURN date\n ORDER BY date DESC\n LIMIT 1\n}\n\nRETURN bu.name AS Department, toString(date.day) + '/' + toString(date.month) + '/' + toString(date.year) AS LastReported\nORDER BY date\n",
"width": 6,
"height": 4,
"x": 17,
"y": 10,
"type": "table",
"selection": {},
"settings": {}
},
{
"id": "e4e8c94d-dc91-4f8d-95a1-173e3b79f0bc",
"title": "Risk Owners total Risk",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n\n UNION\n\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nWITH open_risks\nMATCH (open_risks)-[:RISK_HAS_PLAN]->(t:Plan)-[:PLAN_HAS_OWNER]->(p:Person)\nWITH distinct(p) AS o, open_risks\nMATCH (o)<-[:PLAN_HAS_OWNER]-(:Plan)<-[:RISK_HAS_PLAN]-(open_risks)-[i:AFFECTS]->(bu:BusinessUnit)\nRETURN o.name AS Owner, sum(i.high_loss) AS Total\nORDER BY Total DESC\n\n",
"width": 6,
"height": 2,
"x": 6,
"y": 14,
"type": "table",
"selection": {},
"settings": {}
}
]
},
{
"title": "Department",
"reports": [
{
"id": "75e3b438-3a58-4154-a5b1-e7095d8696fa",
"title": "Top Open Risks",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nMATCH (open_risks)-[rel:AFFECTS]->(bu:BusinessUnit)\nWHERE bu.name = $neodash_businessunit_name\nOPTIONAL MATCH (open_risks)-[:RISK_HAS_PLAN]->(p:Plan)-[:PLAN_HAS_OWNER]->(o:Person)\nOPTIONAL MATCH (open_risks)-[:RISK_HAS_ANALYSIS]->(a:Analysis)\n\nCALL {\n WITH open_risks\n MATCH (r:Risk)\n WHERE r.id = open_risks.id\n \n CALL {\n WITH r\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r)-[rel:AFFECTS]->(:BusinessUnit)\n RETURN a.date AS date2, rel.impact_rating * rel.probability_rating AS severity\n \n UNION\n \n WITH r\n MATCH (r)-[:NEXT_REVIEW*]->(rev:Review)\n RETURN rev.date AS date2, rev.impact_rating * rev.probability_rating AS severity\n }\n \n RETURN date2, severity\n ORDER BY date2 DESC\n LIMIT 1\n}\n\nWITH open_risks.id AS RiskID, bu.name AS Department, o.name AS Owner, toInteger(split(toString(duration.inDays(a.date, datetime.realtime())), ['P', 'M', 'D'])[1]) AS DaysOpen, CASE WHEN severity IS NULL THEN 0 ELSE severity END AS severity\nORDER BY severity DESC\n\nRETURN RiskID, Department, Owner, CASE WHEN severity = 0 THEN null ELSE severity END AS Severity, DaysOpen\n",
"width": 10,
"height": 3,
"x": 4,
"y": 0,
"type": "table",
"selection": {},
"settings": {
"styleRules": [
{
"field": "Severity",
"condition": ">=",
"value": "20",
"customization": "row color",
"customizationValue": "#F7020270"
},
{
"field": "Severity",
"condition": ">=",
"value": "10",
"customization": "row color",
"customizationValue": "#F7AA026E"
},
{
"field": "Severity",
"condition": "<",
"value": "10",
"customization": "row color",
"customizationValue": "#02F71B6E"
}
],
"actionsRules": [
{
"condition": "Click",
"field": "RiskID",
"value": "RiskID",
"customization": "set variable",
"customizationValue": "risk_id"
}
]
}
},
{
"id": "030bf6ed-6d77-4d51-bc26-ce5ecfea5cc1",
"title": "Risks with Plans",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r\n}\n\nMATCH (bu:BusinessUnit)<-[:AFFECTS]-(r)-[:RISK_HAS_PLAN]->(p:Plan)\nWHERE (p.risk_treatment_plan CONTAINS 'tbc' OR p.risk_treatment_plan IS NULL) AND bu.name = $neodash_businessunit_name\nWITH count(r) AS num_no_plan\n\nCALL {\n MATCH (bu:BusinessUnit)<-[:AFFECTS]-(r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() } AND bu.name = $neodash_businessunit_name\n RETURN r\n}\n\nWITH r, num_no_plan\nWITH count(r) - num_no_plan AS num_plan, num_no_plan\nWITH [['Plan', num_plan], ['No Plan', num_no_plan]] AS list\nUNWIND list as values\nRETURN values[0] AS Category, values[1] AS Value",
"width": 6,
"height": 4,
"x": 14,
"y": 0,
"type": "pie",
"selection": {
"index": "Category",
"value": "Value",
"key": "(none)"
},
"settings": {},
"schema": []
},
{
"id": "3899a345-9ff1-4c38-81a6-4676d734deec",
"title": "No Plan Risks",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nWITH open_risks AS r1\n\nMATCH (bu:BusinessUnit)<-[rel:AFFECTS]-(r1)-[:RISK_HAS_PLAN]->(p:Plan)\nWHERE (p.risk_treatment_plan CONTAINS 'tbc' OR p.risk_treatment_plan IS NULL) AND bu.name = $neodash_businessunit_name\n\nCALL {\n WITH r1\n MATCH (r:Risk)\n WHERE r.id = r1.id\n \n CALL {\n WITH r\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r)-[rel:AFFECTS]->(:BusinessUnit)\n RETURN a.date AS date2, rel.impact_rating * rel.probability_rating AS severity\n \n UNION\n \n WITH r\n MATCH (r)-[:NEXT_REVIEW*]-(rev:Review)\n RETURN rev.date AS date2, rev.impact_rating * rev.probability_rating AS severity\n }\n \n RETURN date2, severity\n ORDER BY date2 DESC\n LIMIT 1\n}\n\n\nWITH r1.id AS RiskID, CASE WHEN severity IS NULL THEN 0 ELSE severity END AS severity\nORDER BY severity DESC\n\nRETURN RiskID, CASE WHEN severity = 0 THEN null ELSE severity END AS Severity\n\n\n\n",
"width": 4,
"height": 4,
"x": 20,
"y": 0,
"type": "table",
"selection": {},
"settings": {
"styleRules": [
{
"field": "Severity",
"condition": ">=",
"value": "20",
"customization": "row color",
"customizationValue": "#F7020270"
},
{
"field": "Severity",
"condition": ">=",
"value": "10",
"customization": "row color",
"customizationValue": "#F7AA026E"
},
{
"field": "Severity",
"condition": "<",
"value": "10",
"customization": "row color",
"customizationValue": "#02F71B6E"
}
],
"actionsRules": [
{
"condition": "Click",
"field": "RiskID",
"value": "RiskID",
"customization": "set variable",
"customizationValue": "risk_id"
}
]
}
},
{
"id": "5413e966-6bd9-4e22-8b5b-6a6b8b2b03c1",
"title": "Department",
"query": "MATCH (n:`BusinessUnit`) \nWHERE toLower(toString(n.`name`)) CONTAINS toLower($input) \nRETURN DISTINCT n.`name` as value, n.`name` as display ORDER BY size(toString(value)) ASC LIMIT 5",
"width": 4,
"height": 3,
"x": 0,
"y": 0,
"type": "select",
"selection": {},
"settings": {
"type": "Node Property",
"entityType": "BusinessUnit",
"propertyType": "name",
"propertyTypeDisplay": "name",
"parameterName": "neodash_businessunit_name"
},
"schema": []
},
{
"id": "7036f21d-2d73-4060-ab8c-758eaace378b",
"title": "Value at Risk",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n\n UNION\n\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nWITH open_risks\nMATCH (open_risks)-[i:AFFECTS]-(bu:BusinessUnit)\nWHERE bu.name = $neodash_businessunit_name\nWITH sum(i.low_loss) AS lower_bound, sum(i.high_loss) AS higher_bound\nRETURN '$' + toString(round(toFloat(lower_bound) / 1000000, 2)) + 'M ' + '- $' + toString(round(toFloat(higher_bound) / 1000000, 2)) + 'M'\n\n",
"width": 8,
"height": 2,
"x": 0,
"y": 3,
"type": "value",
"selection": {},
"settings": {
"fontSize": 50
},
"schema": []
},
{
"id": "e1bfcdab-455d-4c6e-bd0a-00467b54fc1c",
"title": "MTTF",
"query": "MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r:Risk)-[:RISK_HAS_PLAN]->(plan:Plan)-[:NEXT_PROGRESS*]-(p:Progress)\nWHERE NOT EXISTS {(p)-[:NEXT_PROGRESS]->()}\nWITH p, a, r\nMATCH (r)-[:AFFECTS]->(bu:BusinessUnit)\nWHERE p.closed AND bu.name = $neodash_businessunit_name\nRETURN toString(round(avg(toInteger(split(toString(duration.inDays(p.date, a.date)), ['-', 'D'])[1])), 2)) + ' days'\n\n\n",
"width": 6,
"height": 2,
"x": 8,
"y": 3,
"type": "value",
"selection": {},
"settings": {
"fontSize": 50
},
"schema": []
},
{
"id": "acac1202-b7d2-428f-a320-88cade9a08a5",
"title": "Open Risks",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n\n UNION\n\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nWITH open_risks\nMATCH (open_risks)-[:AFFECTS]->(bu:BusinessUnit)\nWHERE bu.name = $neodash_businessunit_name\nRETURN count(open_risks)\n",
"width": 4,
"height": 2,
"x": 0,
"y": 5,
"type": "value",
"selection": {},
"settings": {},
"schema": []
},
{
"id": "000641f0-ba1b-4bb7-8569-1314ec29d1ac",
"title": "Closed Risks",
"query": "MATCH (bu:BusinessUnit)<-[:AFFECTS]-(r:Risk)-[:RISK_HAS_PLAN]->(:Plan)-[:NEXT_PROGRESS*]->(end {closed:true})\nWHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() } AND bu.name = $neodash_businessunit_name\nRETURN count(r) AS RisksClosed\n",
"width": 4,
"height": 2,
"x": 4,
"y": 5,
"type": "value",
"selection": {},
"settings": {},
"schema": []
},
{
"id": "8103fcea-d842-43e1-994f-f344b1487b4a",
"title": "Last Reported Risk",
"query": "MATCH (bu:BusinessUnit)<-[:AFFECTS]-(r:Risk)-[:RISK_HAS_ANALYSIS]->(a:Analysis)\nWHERE bu.name = $neodash_businessunit_name\nWITH date(a.date) AS date\nRETURN toString(date.day) + '/' + toString(date.month) + '/' + toString(date.year) AS Reported\nORDER BY date DESC\nLIMIT 1",
"width": 6,
"height": 2,
"x": 8,
"y": 5,
"type": "value",
"selection": {},
"settings": {},
"schema": []
},
{
"id": "95a12cd1-f59b-4f4a-862d-30b5f444cfeb",
"title": "Risks Opened & Closed this Year",
"query": "WITH range(1, 12) AS m1, date.realtime().year AS y\nUNWIND m1 AS m\n\nCALL {\n WITH m, y\n\n CALL {\n WITH m, y\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n WITH r as open_risks, m, y\n MATCH (open_risks)-[:RISK_HAS_ANALYSIS]->(a:Analysis)\n MATCH (open_risks)-[:AFFECTS]->(bu:BusinessUnit)\n WITH a.date as date, m, y\n WHERE date.month = m AND date.year = y AND bu.name = $neodash_businessunit_name\n WITH toString(date.month) + '-' + toString(date.year) AS date\n RETURN date AS month, count(date) AS count\n\n UNION\n\n WITH m, y\n RETURN toString(m) + '-' + toString(y) AS month, 0 AS count\n }\n RETURN month, count\n ORDER BY count DESC\n LIMIT 1\n}\n\nRETURN month, count, \"Opened\" AS group\n\nUNION\n\nWITH range(1, 12) AS m1, date.realtime().year AS y\nUNWIND m1 AS m\n\nCALL {\n WITH m, y\n\n CALL {\n WITH m, y\n MATCH (bu:BusinessUnit)<-[:AFFECTS]-(r:Risk)-[:RISK_HAS_PLAN]->(:Plan)-[:NEXT_PROGRESS*]->(end {closed:true})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() } AND bu.name = $neodash_businessunit_name\n WITH r AS closed_risks, m, y, end\n MATCH (closed_risks)-[:AFFECTS]->(bu:BusinessUnit)\n WITH end.date as date, m, y\n WHERE date.month = m AND date.year = y AND bu.name = $neodash_businessunit_name\n WITH toString(date.month) + '-' + toString(date.year) AS date\n RETURN date AS month, count(date) AS count\n\n UNION\n\n WITH m, y\n RETURN toString(m) + '-' + toString(y) AS month, 0 AS count\n }\n RETURN month, count\n ORDER BY count DESC\n LIMIT 1\n}\n\nRETURN month, count, \"Closed\" AS group",
"width": 10,
"height": 3,
"x": 14,
"y": 4,
"type": "bar",
"selection": {
"index": "month",
"value": "count",
"key": "group"
},
"settings": {
"labelRotation": 0,
"showOptionalSelections": true,
"groupMode": "grouped"
},
"schema": []
},
{
"id": "5a686bdc-9898-43d4-984b-24d57d08088a",
"title": "Overdue Risk Reviews (1 month)",
"query": "CALL {\n // Risks that have a review\n MATCH (bu:BusinessUnit)<-[:AFFECTS]-(r:Risk)-[:NEXT_REVIEW*]->(rev:Review)\n WHERE NOT EXISTS { (rev)-[:NEXT_REVIEW]->() } AND bu.name = $neodash_businessunit_name\n RETURN r.id AS RiskID, rev.date AS date\n\n UNION\n \n // Risks that don't yet have a review\n MATCH (bu:BusinessUnit)<-[:AFFECTS]-(r:Risk)\n WHERE NOT EXISTS { (r)-[:NEXT_REVIEW]->(:Review) } AND bu.name = $neodash_businessunit_name\n MATCH (r)-[:RISK_HAS_ANALYSIS]->(a:Analysis)\n RETURN r.id AS RiskID, a.date AS date\n}\n\n// RETURN RiskID, date\nWITH RiskID, date AS date\n\n// Select only open risks\nCALL {\n WITH RiskID\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() } and r.id = RiskID\n RETURN r.id AS open_risks\n\n UNION\n\n WITH RiskID\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() } AND r.id = RiskID\n RETURN r.id AS open_risks\n}\n\nWITH open_risks AS RiskID, date\n\n\nCALL {\n WITH RiskID\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(:Plan)-[:PLAN_HAS_OWNER]->(o:Person)\n WHERE r.id = RiskID\n RETURN o.name AS o\n}\n\nWITH RiskID, date, o\n\nCALL {\n WITH RiskID\n MATCH (r:Risk)\n WHERE r.id = RiskID\n \n CALL {\n WITH r\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r)-[rel:AFFECTS]->(:BusinessUnit)\n RETURN a.date AS date2, rel.impact_rating * rel.probability_rating AS severity\n \n UNION\n \n WITH r\n MATCH (r)-[:NEXT_REVIEW*]-(rev:Review)\n RETURN rev.date AS date2, rev.impact_rating * rev.probability_rating AS severity\n }\n \n RETURN date2, severity\n ORDER BY date2 DESC\n LIMIT 1\n}\n\nWITH RiskID, date, severity, o\nWHERE split(toString(duration.inMonths(date, date.realtime())), ['P', 'M'])[1] CONTAINS 'Y' OR toInteger(split(toString(duration.inMonths(date, date.realtime())), ['P', 'M'])[1]) > 1\nRETURN RiskID, date AS Date, o AS Owner, severity AS Severity\nORDER BY Severity DESC",
"width": 9,
"height": 4,
"x": 0,
"y": 7,
"type": "table",
"selection": {},
"settings": {
"styleRules": [
{
"field": "Severity",
"condition": ">=",
"value": "20",
"customization": "row color",
"customizationValue": "#F7020270"
},
{
"field": "Severity",
"condition": ">=",
"value": "10",
"customization": "row color",
"customizationValue": "#F7AA026E"
},
{
"field": "Severity",
"condition": "<",
"value": "10",
"customization": "row color",
"customizationValue": "#02F71B6E"
}
],
"actionsRules": [
{
"condition": "Click",
"field": "RiskID",
"value": "RiskID",
"customization": "set variable",
"customizationValue": "risk_id"
}
]
}
}
]
},
{
"title": "All Risks",
"reports": [
{
"id": "f157491e-0a27-4647-b0f4-b360bb79314a",
"title": "Risks without Plans",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n\n UNION\n\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nWITH open_risks\nMATCH (open_risks)-[:RISK_HAS_PLAN]->(p:Plan)\nWHERE p.risk_treatment_plan = 'tbc' OR p.risk_treatment_plan IS NULL\nRETURN open_risks.id AS RiskID\n\n",
"width": 5,
"height": 4,
"x": 0,
"y": 0,
"type": "table",
"selection": {},
"settings": {
"actionsRules": [
{
"condition": "Click",
"field": "RiskID",
"value": "RiskID",
"customization": "set variable",
"customizationValue": "risk_id"
}
]
}
},
{
"id": "e7199109-39fe-4523-9901-ad987ca9213f",
"title": "Risks needing Review",
"query": "// Open risks\nCALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE NOT EXISTS { (p)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n\n UNION\n\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress {closed: False})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() }\n RETURN r AS open_risks\n}\n\nCALL {\n // Risks that have a review\n WITH open_risks\n MATCH (bu:BusinessUnit)<-[:AFFECTS]-(open_risks)-[:NEXT_REVIEW*]->(rev:Review)\n WHERE NOT EXISTS { (rev)-[:NEXT_REVIEW]->() }\n RETURN open_risks.id AS RiskID, rev.date AS date\n\n UNION\n \n // Risks that don't yet have a review\n WITH open_risks\n MATCH (bu:BusinessUnit)<-[:AFFECTS]-(open_risks)\n WHERE NOT EXISTS { (open_risks)-[:NEXT_REVIEW]->(:Review) }\n MATCH (open_risks)-[:RISK_HAS_ANALYSIS]->(a:Analysis)\n RETURN open_risks.id AS RiskID, a.date AS date\n}\n\nWITH RiskID, date AS date\n\nCALL {\n WITH RiskID\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(:Plan)-[:PLAN_HAS_OWNER]->(o:Person)\n WHERE r.id = RiskID\n RETURN o.name AS o\n}\n\nWITH RiskID, date, o\n\nCALL {\n WITH RiskID\n MATCH (r:Risk)\n WHERE r.id = RiskID\n \n CALL {\n WITH r\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r)-[rel:AFFECTS]->(:BusinessUnit)\n RETURN a.date AS date2, rel.impact_rating * rel.probability_rating AS severity\n \n UNION\n \n WITH r\n MATCH (r)-[:NEXT_REVIEW*]-(rev:Review)\n RETURN rev.date AS date2, rev.impact_rating * rev.probability_rating AS severity\n }\n \n RETURN date2, severity\n ORDER BY date2 DESC\n LIMIT 1\n}\n\nWITH RiskID, date, severity, o\nWHERE split(toString(duration.inMonths(date, date.realtime())), ['P', 'M'])[1] CONTAINS 'Y' OR toInteger(split(toString(duration.inMonths(date, date.realtime())), ['P', 'M'])[1]) > 6\nRETURN RiskID, date AS Date, o AS Owner, severity AS Severity\nORDER BY Severity DESC",
"width": 18,
"height": 4,
"x": 5,
"y": 0,
"type": "table",
"selection": {},
"settings": {
"styleRules": [
{
"field": "Severity",
"condition": ">=",
"value": "20",
"customization": "row color",
"customizationValue": "#F7020270"
},
{
"field": "Severity",
"condition": ">=",
"value": "10",
"customization": "row color",
"customizationValue": "#F7AA026E"
},
{
"field": "Severity",
"condition": "<",
"value": "10",
"customization": "row color",
"customizationValue": "#02F71B6E"
}
],
"actionsRules": [
{
"condition": "Click",
"field": "RiskID",
"value": "RiskID",
"customization": "set variable",
"customizationValue": "risk_id"
}
]
}
},
{
"id": "8a28914e-39a8-462c-86ad-fe93bc1a3265",
"title": "All Risks",
"query": "MATCH (r:Risk)\nOPTIONAL MATCH (r)-[:RISK_HAS_PLAN]->(p:Plan)\nOPTIONAL MATCH (p)-[:PLAN_HAS_OWNER]->(o:Person)\nOPTIONAL MATCH (p)-[:PLAN_SRC_REPRESENTATIVE]->(rep:Person)\nOPTIONAL MATCH (r)-[:AFFECTS]->(bu:BusinessUnit)\n\n// Severity\nCALL {\n WITH r\n \n CALL {\n WITH r\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r)-[rel:AFFECTS]->(:BusinessUnit)\n RETURN a.date AS internal_date, rel.impact_rating * rel.probability_rating AS severity\n \n UNION\n \n WITH r\n MATCH (r)-[:NEXT_REVIEW*]-(rev:Review)\n RETURN rev.date AS internal_date, rev.impact_rating * rev.probability_rating AS severity\n }\n \n RETURN severity\n ORDER BY internal_date DESC\n LIMIT 1\n}\n\nRETURN r.id AS RiskID, p.type AS Type, bu.name AS Department, o.name AS Owner, rep.name AS Representative, severity AS Severity\n",
"width": 23,
"height": 7,
"x": 0,
"y": 4,
"type": "table",
"selection": {},
"settings": {}
}
]
},
{
"title": "Risk",
"reports": [
{
"id": "6a8952f7-34d8-4794-8d0c-37d42e7573d3",
"title": "Risk",
"query": "MATCH (n:`Risk`) \nWHERE toLower(toString(n.`id`)) CONTAINS toLower($input) \nRETURN DISTINCT n.`id` as value, n.`id` as display ORDER BY size(toString(value)) ASC LIMIT 5",
"width": 4,
"height": 2,
"x": 0,
"y": 0,
"type": "select",
"selection": {},
"settings": {
"type": "Node Property",
"entityType": "Risk",
"propertyType": "id",
"propertyTypeDisplay": "id",
"parameterName": "neodash_risk_id"
},
"schema": []
},
{
"id": "32fd6ae6-7863-4925-b30c-c352b6486137",
"title": "Status",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(:Plan)-[:NEXT_PROGRESS*]->(end {closed:true})\n WHERE NOT EXISTS { (end)-[:NEXT_PROGRESS]->() } AND r.id = $neodash_risk_id\n RETURN 1 AS priority, \"Closed\" AS status\n \n UNION\n \n MATCH (r:Risk)\n WHERE r.id = $neodash_risk_id\n RETURN 2 AS priority, \"Open\" AS status\n}\n\nRETURN status\nORDER BY priority\nLIMIT 1",
"width": 4,
"height": 2,
"x": 0,
"y": 2,
"type": "value",
"selection": {},
"settings": {},
"schema": []
},
{
"id": "b3e3c9dd-495a-4a42-836b-ddde3ca3512c",
"title": "Risk Severity",
"query": "MATCH (r:Risk)\nWHERE r.id = $neodash_risk_id\n\nCALL {\n WITH r\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r)-[rel:AFFECTS]->(:BusinessUnit)\n RETURN a.date AS date, rel.impact_rating * rel.probability_rating AS severity\n\n UNION\n\n WITH r\n MATCH (r)-[:NEXT_REVIEW*]-(rev:Review)\n RETURN rev.date AS date, rev.impact_rating * rev.probability_rating AS severity\n}\n\nRETURN severity\nORDER BY date DESC\nLIMIT 1",
"width": 6,
"height": 4,
"x": 18,
"y": 0,
"type": "value",
"selection": {},
"settings": {
"arcsLength": "0.4, 0.4, 0.2",
"styleRules": [
{
"field": "severity",
"condition": ">=",
"value": "20",
"customization": "text color",
"customizationValue": "#FF0000"
},
{
"field": "severity",
"condition": ">=",
"value": "10",
"customization": "text color",
"customizationValue": "#FF9D00"
},
{
"field": "severity",
"condition": "<",
"value": "10",
"customization": "text color",
"customizationValue": "#26FF00"
}
],
"textAlign": "center",
"verticalAlign": "middle",
"fontSize": 128
},
"schema": []
},
{
"id": "07c6e3d5-f2e2-483f-9b86-cf0ae23800e3",
"title": "Impact Rating",
"query": "MATCH (r:Risk)\nWHERE r.id = $neodash_risk_id\n\nCALL {\n WITH r\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r)-[rel:AFFECTS]->(:BusinessUnit)\n RETURN a.date AS date, rel.impact_rating AS severity\n\n UNION\n\n WITH r\n MATCH (r)-[:NEXT_REVIEW*]-(rev:Review)\n RETURN rev.date AS date, rev.impact_rating AS severity\n}\n\nRETURN severity\nORDER BY date DESC\nLIMIT 1",
"width": 4,
"height": 2,
"x": 14,
"y": 0,
"type": "value",
"selection": {},
"settings": {},
"schema": []
},
{
"id": "2fd0b6ea-29de-4106-8fbb-4dfac45705eb",
"title": "Probability Rating",
"query": "MATCH (r:Risk)\nWHERE r.id = $neodash_risk_id\n\nCALL {\n WITH r\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r)-[rel:AFFECTS]->(:BusinessUnit)\n RETURN a.date AS date, rel.probability_rating AS severity\n\n UNION\n\n WITH r\n MATCH (r)-[:NEXT_REVIEW*]-(rev:Review)\n RETURN rev.date AS date, rev.probability_rating AS severity\n}\n\nRETURN severity\nORDER BY date DESC\nLIMIT 1",
"width": 4,
"height": 2,
"x": 14,
"y": 2,
"type": "value",
"selection": {},
"settings": {},
"schema": []
},
{
"id": "c44790c1-78aa-4a15-a28a-6eb7977bb9bb",
"title": "Risk Rating over Time",
"query": "MATCH (r:Risk)\nWHERE r.id = $neodash_risk_id\n\nCALL {\n WITH r\n MATCH (a:Analysis)<-[:RISK_HAS_ANALYSIS]-(r)-[rel:AFFECTS]->(:BusinessUnit)\n RETURN a.date AS date, rel.impact_rating * rel.probability_rating AS severity\n\n UNION\n\n WITH r\n MATCH (r)-[:NEXT_REVIEW*]-(rev:Review)\n RETURN rev.date AS date, rev.impact_rating * rev.probability_rating AS severity\n}\n\nRETURN date(date), severity\nORDER BY date",
"width": 10,
"height": 4,
"x": 4,
"y": 0,
"type": "line",
"selection": {
"x": "date(date)",
"value": [
"severity"
]
},
"settings": {
"refreshRate": 0
},
"schema": []
},
{
"id": "2fe4092a-3419-4bbb-bacb-41fcc92d1eb5",
"title": "Updates",
"query": "MATCH (r:Risk)\nWHERE r.id = $neodash_risk_id\n\nCALL {\n WITH r\n MATCH (r)-[:NEXT_REVIEW*]->(rev:Review)\n RETURN rev.date as date, rev.notes as notes, \"Review\" as type, CASE rev.impact_rating WHEN rev.impact_rating = NULL THEN NULL ELSE \"Impact: \" + toString(rev.impact_rating) + \", Probability: \" + toString(rev.probability_rating) END as status\n\n UNION\n\n WITH r\n MATCH (r)-[:NEXT_COMMENT*]->(c:Comment)\n RETURN c.date as date, c.notes as notes, \"Comment\" as type, NULL as status\n\n UNION\n\n WITH r\n MATCH (r)-[:RISK_HAS_PLAN]->(:Plan)-[:NEXT_PROGRESS*]->(p:Progress)\n RETURN p.date as date, p.notes as notes, \"Progress\" as type, CASE p.closed WHEN true THEN \"Closed\" ELSE \"Open\" END as status\n}\n\nRETURN date AS Date, notes AS Notes, status AS Status, type AS Type\nORDER BY Date ASC\n",
"width": 20,
"height": 5,
"x": 0,
"y": 6,
"type": "table",
"selection": {},
"settings": {
"actionsRules": [
{
"condition": "Click",
"field": "Type",
"value": "Notes",
"customization": "set variable",
"customizationValue": "description_update"
}
]
},
"schema": []
},
{
"id": "3099644d-6ab2-4d9a-82f8-0c781899897e",
"title": "Description",
"query": "MATCH (r:Risk)\nWHERE r.id = $neodash_risk_id\nRETURN r.description\n",
"width": 20,
"height": 2,
"x": 4,
"y": 4,
"type": "value",
"selection": {},
"settings": {
"fontSize": 12
},
"schema": []
},
{
"id": "ec7f11f7-fdb0-489e-9533-e83f456e78df",
"title": "Risk has Plan",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE r.id = $neodash_risk_id AND (p.risk_treatment_plan CONTAINS 'tbc' OR p.risk_treatment_plan IS NULL)\n RETURN \"False\" AS output\n \n UNION\n \n MATCH (r:Risk)\n WHERE r.id = $neodash_risk_id\n RETURN \"True\" AS output\n}\n\nRETURN output\nLIMIT 1\n",
"width": 4,
"height": 2,
"x": 0,
"y": 4,
"type": "value",
"selection": {},
"settings": {},
"schema": []
},
{
"id": "41bc23e4-2947-4d5f-9765-85ac4a27d291",
"title": "Last Review",
"query": "MATCH (r:Risk)-[:NEXT_REVIEW*]->(rev:Review)\nWHERE r.id = $neodash_risk_id AND NOT EXISTS { (rev)-[:NEXT_REVIEW]->() }\nWITH split(toString(duration.between(datetime.realtime(), rev.date)), \"-\")[1..] AS duration\nWITH duration[0] as d\n\nRETURN\nCASE\n WHEN d CONTAINS 'M' THEN (split(d, 'M')[0]) + ' months ago'\n WHEN d CONTAINS 'DT' THEN (split(d, 'DT')[0]) + ' days ago'\n WHEN d CONTAINS 'H' THEN (split(d, 'H')[0]) + ' hours ago'\n ELSE d\nEND AS d",
"width": 4,
"height": 2,
"x": 20,
"y": 6,
"type": "value",
"selection": {},
"settings": {
"fontSize": 24,
"styleRules": [
{
"field": "",
"condition": "=",
"value": "",
"customization": "text color",
"customizationValue": "black"
}
]
},
"schema": []
},
{
"id": "da5a7a6d-a648-4bb2-997d-e17d343094d0",
"title": "Add Comment",
"query": "MATCH (r:Risk)\nWHERE r.id = $neodash_risk_id\nWITH r\n\nCALL {\n WITH r\n MATCH (r)-[:NEXT_COMMENT*]->(c:Comment)\n WHERE NOT EXISTS { (c)-[:NEXT_COMMENT]->(:Comment) }\n RETURN c AS last\n\n UNION\n\n WITH r\n MATCH (r)\n WHERE NOT EXISTS { (r)-[:NEXT_COMMENT]-(:Comment) }\n RETURN r AS last\n}\n\nMERGE (last)-[:NEXT_COMMENT]->(:Comment:New {date: datetime.truncate('second', datetime({timezone: 'Europe/London'})), notes: $neodash_comment})\n",
"width": 6,
"height": 4,
"x": 0,
"y": 14,
"type": "forms",
"selection": {},
"settings": {
"formFields": [
{
"type": "Free Text",
"settings": {
"type": "Free Text",
"entityType": "Comment",
"parameterName": "neodash_comment"
},
"query": "RETURN true;"
}
],
"description": "Comments are used to write notes concerning a risk. They should not be used to update risk status, this is handled by Reviews (which update the impact and probability ratings) and Progress (which changes the risk from being closed to open)"
},
"schema": []
},
{
"id": "4052a4c0-5c02-4650-b56d-e5d697ece98a",
"title": "Add Review",
"query": "MATCH (r:Risk)\nWHERE r.id = $neodash_risk_id\nWITH r\n\nCALL {\n WITH r\n MATCH (r)-[:NEXT_REVIEW*]->(rev:Review)\n WHERE NOT EXISTS { (rev)-[:NEXT_REVIEW]->(:Review) }\n RETURN rev AS last\n\n UNION\n\n WITH r\n MATCH (r)\n WHERE NOT EXISTS { (r)-[:NEXT_REVIEW]-(:Review) }\n RETURN r AS last\n}\n\nMERGE (last)-[:NEXT_REVIEW]->(:Review:New {date: date: datetime.truncate('second', datetime({timezone: 'Europe/London'}), notes: $neodash_review, impact_rating: toInteger($neodash_review_impact_rating), probability_rating: toInteger($neodash_review_probability_rating)})\n",
"width": 6,
"height": 4,
"x": 6,
"y": 14,
"type": "forms",
"selection": {},
"settings": {
"formFields": [
{
"type": "Free Text",
"settings": {
"type": "Free Text",
"entityType": "Review",
"parameterName": "neodash_review"
},
"query": "RETURN true;"
},
{
"type": "Node Property",
"settings": {
"type": "Node Property",
"entityType": "Review",
"propertyType": "impact_rating",
"propertyTypeDisplay": "impact_rating",
"parameterName": "neodash_review_impact_rating"
},
"query": "MATCH (n:`Review`) \nWHERE toLower(toString(n.`impact_rating`)) CONTAINS toLower($input) \nRETURN DISTINCT n.`impact_rating` as value, n.`impact_rating` as display ORDER BY size(toString(value)) ASC LIMIT 5"
},
{
"type": "Node Property",
"settings": {
"type": "Node Property",
"entityType": "Review",
"propertyType": "probability_rating",
"propertyTypeDisplay": "probability_rating",
"parameterName": "neodash_review_probability_rating"
},
"query": "MATCH (n:`Review`) \nWHERE toLower(toString(n.`probability_rating`)) CONTAINS toLower($input) \nRETURN DISTINCT n.`probability_rating` as value, n.`probability_rating` as display ORDER BY size(toString(value)) ASC LIMIT 5"
}
]
},
"schema": []
},
{
"id": "cb0880cc-89de-4122-b53d-2e5c109e3515",
"title": "Add Progress",
"query": "CALL {\n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)-[:NEXT_PROGRESS*]->(end:Progress)\n WHERE r.id = $neodash_risk_id AND p.id = $neodash_plan_id AND NOT EXISTS { (end)-[:NEXT_PROGRESS]->(:Progress) }\n RETURN end\n \n UNION\n \n MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\n WHERE r.id = $neodash_risk_id AND p.id = $neodash_plan_id AND NOT EXISTS { (p)-[:NEXT_PROGRESS]->(:Progress) }\n RETURN p AS end\n}\n\nMERGE (end)-[:NEXT_PROGRESS]->(:Progress:New {date: datetime.truncate('second', datetime({timezone: 'Europe/London'})), notes: $neodash_progress_notes, closed: toBoolean($neodash_plan_closed)})\n",
"width": 6,
"height": 4,
"x": 12,
"y": 14,
"type": "forms",
"selection": {},
"settings": {
"formFields": [
{
"type": "Node Property",
"settings": {
"type": "Node Property",
"entityType": "Plan",
"propertyType": "id",
"propertyTypeDisplay": "id",
"parameterName": "neodash_plan_id"
},
"query": "MATCH (n:`Plan`) \nWHERE toLower(toString(n.`id`)) CONTAINS toLower($input) \nRETURN DISTINCT n.`id` as value, n.`id` as display ORDER BY size(toString(value)) ASC LIMIT 5"
},
{
"type": "Free Text",
"settings": {
"type": "Free Text",
"entityType": "Plan Closed",
"parameterName": "neodash_plan_closed"
},
"query": "RETURN true;"
},
{
"type": "Free Text",
"settings": {
"type": "Free Text",
"entityType": "Progress Notes",
"parameterName": "neodash_progress_notes",
"multiline": true
},
"query": "RETURN true;"
}
]
},
"schema": []
},
{
"id": "7fe4e1ea-beda-489b-bc0c-647061a9f011",
"title": "Mitigation Plans",
"query": "MATCH (r:Risk)-[:RISK_HAS_PLAN]->(p:Plan)\nWHERE r.id = $neodash_risk_id\nRETURN p.id AS PlanID, CASE p.accepted WHEN true THEN \"Yes\" ElSE \"No\" END AS Accepted\n",
"width": 6,
"height": 4,
"x": 18,
"y": 14,
"type": "table",
"selection": {},
"settings": {
"actionsRules": [
{
"condition": "Click",
"field": "PlanID",
"value": "PlanID",
"customization": "set variable",
"customizationValue": "plan_id"
}
]
}
},
{
"id": "0f43a7dd-1945-413b-a92f-5f261752c881",
"title": "Owner",
"query": "MATCH (r:Risk)-[:RISK_HAS_PLAN]->(:Plan)-[:PLAN_HAS_OWNER]->(o:Person)\nWHERE r.id = $neodash_risk_id\nRETURN o.name\n",
"width": 4,
"height": 3,
"x": 20,
"y": 8,
"type": "value",
"selection": {},
"settings": {
"fontSize": 24
},
"schema": []
},
{
"id": "2ddec26d-b92b-4ade-bce7-c30213f48090",
"title": "Similar Risks",
"query": "MATCH (r:Risk {id: $neodash_risk_id})\nCALL db.index.vector.queryNodes('RiskDescription', 10, r.embedding)\nYIELD node, score\nWHERE score > 0.97 AND node.id <> r.id\nRETURN node.id AS RiskID, node.description AS Description, round(score,2) AS Score\n",
"width": 12,
"height": 4,
"x": 0,
"y": 18,
"type": "table",
"selection": {},
"settings": {
"actionsRules": [
{
"condition": "Click",
"field": "RiskID",
"value": "RiskID",
"customization": "set variable",
"customizationValue": "risk_id"
}
]
}
},
{
"id": "d479b09f-cbd7-435c-a52a-63ea0f5694bb",
"title": "Affected Business Units",
"query": "MATCH p=(bu:BusinessUnit)-[:USES]->(a:Asset)<-[:IMPACTS|SECONDARY_IMPACT]-(r:Risk)\nWHERE r.id = $neodash_risk_id\nRETURN bu\n",
"width": 6,
"height": 4,
"x": 12,
"y": 18,
"type": "graph",
"selection": {
"BusinessUnit": "name"
},
"settings": {
"nodeColorScheme": "category10"
},
"schema": [
[
"BusinessUnit",
"name"
]
]
},
{
"id": "6f9be78b-c9cf-4e1d-8de9-1667fdae97bc",
"title": "Notes",
"query": "RETURN $neodash_description_update\n",
"width": 24,
"height": 3,
"x": 0,
"y": 11,
"type": "value",
"selection": {},
"settings": {
"fontSize": 16
},
"schema": []
}
]
}
],
"parameters": {},
"extensions": {
"active": true,
"activeReducers": [],
"advanced-charts": {
"active": true
},
"styling": {
"active": true
},
"forms": {
"active": true
},
"actions": {
"active": true
},
"access-control-management": {
"active": true
}
},
"uuid": "2130ad24-3887-4695-b3fb-b42e2834a60e"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment