Skip to content

Commit

Permalink
feat(editor): finished csv output
Browse files Browse the repository at this point in the history
- output to csv file
- gave more meaningful name
  • Loading branch information
SwisscomHopperDevs committed Feb 10, 2025
1 parent d18f698 commit 783e462
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/main/frontend/model/samples/value-finder.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
{
"logLevel": "info",
"hops": [
{ "type": "declare", "declarations": { "output": "utils.file.txt(\"properties_containing_hardcoded_urls\")" } },
{
"type": "declare",
"declarations": {
"output": "file:csv(\"value_finder_results\")"
}
},
{
"type": "runScript",
"code": "output.line(\"path\", \"property\", \"value\");",
"extension": "jexl",
"putLocalsBackIntoScope": true
},
{
"type": "nodeQuery",
"query": "SELECT * FROM [nt:base] AS node WHERE ISDESCENDANTNODE([${args.path}])\n${(args.resourceTypeInclude != null && args.resourceTypeInclude.trim() != '') ? ` AND node.[sling:resourceType] LIKE \"${args.resourceTypeInclude}\"` : ''}\n${(args.resourceTypeExclude != null && args.resourceTypeExclude.trim() != '') ? ` AND node.[sling:resourceType] LIKE \"${args.resourceTypeExclude}\"` : ''}",
Expand All @@ -27,7 +38,7 @@
"hops": [
{
"type": "runScript",
"code": "output.append(node.path);\noutput.append(\"-\");\noutput.append(property.name);\noutput.append(\":\");\noutput.append(joinedPropertyValue);\noutput.append(\"\\n\");",
"code": "output.line(node.path, property.name, joinedPropertyValue);",
"extension": "jexl",
"putLocalsBackIntoScope": true
}
Expand Down Expand Up @@ -73,4 +84,4 @@
"evaluation": "STRING"
}
]
}
}

0 comments on commit 783e462

Please sign in to comment.