Skip to content

Commit

Permalink
Merge pull request #1 from Randers-Kommune-Digitalisering/st-openData…
Browse files Browse the repository at this point in the history
…-connector-refactoring

St open data connector refactoring
  • Loading branch information
Jan Kjerbye authored Aug 11, 2023
2 parents efe51a2 + b2ecf6f commit c03ae04
Show file tree
Hide file tree
Showing 114 changed files with 788 additions and 1,370 deletions.
2 changes: 1 addition & 1 deletion node-red/flows_cred.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"$": "17c28e6fc52c09c6e2ab432f537151c4FVg="
"$": "bc4dcfec5162da1c415dfaaee74e14fbuPI="
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
const Node = {
"id": "97aabb51832248bb",
"id": "11f9535a1e6667dd",
"type": "change",
"z": "067b777cae534d43",
"g": "997f4664c676fae7",
"z": "848072497d00f862",
"name": "Create status object",
"rules": [
{
Expand All @@ -18,14 +17,14 @@ const Node = {
"from": "",
"to": "",
"reg": false,
"x": 1160,
"y": 80,
"x": 940,
"y": 1500,
"wires": [
[
"46723c2ac685825a"
"ceb19379fe913572"
]
],
"_order": 48
"_order": 41
}

module.exports = Node;
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const Node = {
"id": "fc0914a8d50bc537",
"id": "1b77659a1a8dfeaa",
"type": "change",
"z": "067b777cae534d43",
"z": "848072497d00f862",
"name": "data = null",
"rules": [
{
Expand All @@ -17,12 +17,10 @@ const Node = {
"from": "",
"to": "",
"reg": false,
"x": 1550,
"y": 340,
"x": 930,
"y": 580,
"wires": [
[
"30c9762921bab2e0"
]
[]
],
"_order": 52
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const Node = {
"id": "4319da9edecb854a",
"id": "2cde1f740c67c7a1",
"type": "change",
"z": "067b777cae534d43",
"g": "997f4664c676fae7",
"z": "848072497d00f862",
"g": "516826cdc611d4f0",
"name": "Hent resultat",
"rules": [
{
Expand All @@ -23,11 +23,11 @@ const Node = {
"from": "",
"to": "",
"reg": false,
"x": 1130,
"y": 120,
"x": 850,
"y": 280,
"wires": [
[
"4bf99afe274e672a"
"157fdbe08551e47f"
]
],
"_order": 46
Expand Down
37 changes: 0 additions & 37 deletions node-red/flows_js/change.3d995f447af30ece.flows.js

This file was deleted.

39 changes: 39 additions & 0 deletions node-red/flows_js/change.3e0ff018670eed4c.flows.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
const Node = {
"id": "3e0ff018670eed4c",
"type": "change",
"z": "848072497d00f862",
"g": "5058659da1be591c",
"name": "Tæl filer",
"rules": [
{
"t": "set",
"p": "payload_count",
"pt": "msg",
"to": "payload ~> $count()",
"tot": "jsonata"
},
{
"t": "set",
"p": "excluded_count",
"pt": "msg",
"to": "excludedFiles ~> $count()",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 920,
"y": 480,
"wires": [
[
"79a666a3900e24db",
"9878ab3aeb4562c3"
]
],
"_order": 50
}

module.exports = Node;
31 changes: 0 additions & 31 deletions node-red/flows_js/change.3ed8a68401315e7c.flows.js

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
const Node = {
"id": "02ce3ed32acfa5c7",
"id": "41548cc85d4a21f4",
"type": "change",
"z": "067b777cae534d43",
"g": "997f4664c676fae7",
"z": "848072497d00f862",
"g": "adaaced64d6ee0e2",
"name": "Opsætning af forespørgsel ↓ \\n Hent metadata for \\n msg.dataset",
"rules": [
{
Expand Down Expand Up @@ -46,15 +46,15 @@ const Node = {
"from": "",
"to": "",
"reg": false,
"x": 560,
"y": 100,
"x": 540,
"y": 120,
"wires": [
[
"dcfa0c1347b93ca3"
"3279cc4f911d02a4"
]
],
"info": "",
"_order": 44
"_order": 39
}

Node.info = `
Expand Down
8 changes: 4 additions & 4 deletions node-red/flows_js/change.651ff4df562cb8a8.flows.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ const Node = {
"id": "651ff4df562cb8a8",
"type": "change",
"z": "971a7ae6df987a48",
"name": "Opsætning af dataset \\n antal-krydsende-cyklister-over-randers-fjord",
"name": "Opsætning af OpenData dataset \\n antal-krydsende-cyklister-over-randers-fjord",
"rules": [
{
"t": "set",
Expand All @@ -24,14 +24,14 @@ const Node = {
"from": "",
"to": "",
"reg": false,
"x": 330,
"x": 250,
"y": 160,
"wires": [
[
"a00f7e1112c294b9"
"38fdf4a6a295ebdc"
]
],
"_order": 81
"_order": 66
}

module.exports = Node;
37 changes: 0 additions & 37 deletions node-red/flows_js/change.6c7c743d5b7e2aab.flows.js

This file was deleted.

39 changes: 39 additions & 0 deletions node-red/flows_js/change.7023b4fd6de8be22.flows.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
const Node = {
"id": "7023b4fd6de8be22",
"type": "change",
"z": "848072497d00f862",
"g": "2d4e33e8ad9e6a3a",
"name": "Datafilter ↓\\n Ekskludér filer oprettet tidligere \\n end max_file_age_days siden",
"rules": [
{
"t": "set",
"p": "excludedFiles",
"pt": "msg",
"to": "(\t/* Udregner millis for max_file_age_days tilbage i tiden */\t$maxAge := $millis() - (max_file_age_days * 24 * 60 * 60 * 1000) ~> $number;\t\t/* Find datasæt fra payload som er oprettet før $maxAge */\tpayload [ created ~> $toMillis() <= $maxAge ]\t)",
"tot": "jsonata"
},
{
"t": "set",
"p": "payload",
"pt": "msg",
"to": "payload ~> $filter( function($v)\t{\t excludedFiles ?\t $not( $v in excludedFiles ) /* Fjern fra payload hvis filen er ekskluderet */\t :\t true /* Inkluder alle filer hvis ingen excludedFiles findes */\t})",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 290,
"y": 500,
"wires": [
[
"dea48bd07aad0de1",
"eefc4d981f3a4c01"
]
],
"_order": 47
}

module.exports = Node;
Loading

0 comments on commit c03ae04

Please sign in to comment.