Skip to content

Commit

Permalink
🧑‍💻 move check netbox url in journal subflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lav committed Nov 11, 2024
1 parent d4aeb06 commit 4e918f5
Show file tree
Hide file tree
Showing 4 changed files with 459 additions and 174 deletions.
125 changes: 39 additions & 86 deletions flows.json
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
"y": 220,
"wires": [
{
"id": "6a7a0467075486e3"
"id": "6edbcda2ae25e3e9"
}
]
}
Expand Down Expand Up @@ -124,7 +124,7 @@
"from": "",
"to": "",
"reg": false,
"x": 440,
"x": 700,
"y": 220,
"wires": [
[
Expand All @@ -136,7 +136,7 @@
"id": "3547e249e2f4244a",
"type": "http request",
"z": "0455d311f0e53c09",
"name": "",
"name": "Create entry",
"method": "use",
"ret": "obj",
"paytoqs": "ignore",
Expand All @@ -148,12 +148,35 @@
"authType": "",
"senderr": false,
"headers": [],
"x": 650,
"x": 910,
"y": 220,
"wires": [
[]
]
},
{
"id": "6edbcda2ae25e3e9",
"type": "switch",
"z": "0455d311f0e53c09",
"name": "has netbox url ?",
"property": "config.netbox_url",
"propertyType": "global",
"rules": [
{
"t": "nempty"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 420,
"y": 220,
"wires": [
[
"6a7a0467075486e3"
]
]
},
{
"id": "d7a287982b6bd303",
"type": "inject",
Expand Down Expand Up @@ -5406,7 +5429,7 @@
"wires": [
[
"e19033703f460489",
"3fb24016d76424c3"
"8a7f167c07eca98c"
]
]
},
Expand Down Expand Up @@ -6638,33 +6661,6 @@
[]
]
},
{
"id": "3fb24016d76424c3",
"type": "switch",
"z": "8e85e8c54d776ddc",
"name": "",
"property": "config.id",
"propertyType": "global",
"rules": [
{
"t": "nempty"
},
{
"t": "else"
}
],
"checkall": "true",
"repair": false,
"outputs": 2,
"x": 350,
"y": 100,
"wires": [
[
"8a7f167c07eca98c"
],
[]
]
},
{
"id": "5d89d141056587f0",
"type": "link out",
Expand Down Expand Up @@ -6924,7 +6920,7 @@
"wires": [
[
"06d9e416e24ea04b",
"4b6dba9f0b7031fc"
"b87eba8ac3329ce3"
],
[],
[]
Expand Down Expand Up @@ -7074,7 +7070,7 @@
"y": 60,
"wires": [
[
"c594da7accef66e1"
"b87eba8ac3329ce3"
],
[],
[]
Expand All @@ -7092,14 +7088,21 @@
"pt": "msg",
"to": "'\\\"http://localhost/containers/' & msg.payload.data.ContainerID & '\\\"'",
"tot": "jsonata"
},
{
"t": "set",
"p": "journal",
"pt": "msg",
"to": "{\t \"assigned_object_type\": \"netbox_docker_plugin.host\",\t \"assigned_object_id\": msg.config.id,\t \"kind\": \"info\",\t \"comments\": msg.input.data.name & \" removed - \" & $string(msg.payload)\t}",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 950,
"x": 960,
"y": 60,
"wires": [
[
Expand Down Expand Up @@ -7244,7 +7247,7 @@
"type": "subflow:0455d311f0e53c09",
"z": "177047e3d7a351be",
"name": "",
"x": 1690,
"x": 1430,
"y": 180,
"wires": []
},
Expand Down Expand Up @@ -7352,33 +7355,6 @@
]
]
},
{
"id": "c594da7accef66e1",
"type": "change",
"z": "177047e3d7a351be",
"name": "",
"rules": [
{
"t": "set",
"p": "journal",
"pt": "msg",
"to": "{\t \"assigned_object_type\": \"netbox_docker_plugin.host\",\t \"assigned_object_id\": msg.config.id,\t \"kind\": \"info\",\t \"comments\": msg.input.data.name & \" removed - \" & $string(msg.payload)\t}",
"tot": "jsonata"
}
],
"action": "",
"property": "",
"from": "",
"to": "",
"reg": false,
"x": 1360,
"y": 60,
"wires": [
[
"4b6dba9f0b7031fc"
]
]
},
{
"id": "b5f089d7532c24d8",
"type": "change",
Expand Down Expand Up @@ -7467,29 +7443,6 @@
]
]
},
{
"id": "4b6dba9f0b7031fc",
"type": "switch",
"z": "177047e3d7a351be",
"name": "",
"property": "config.netbox_url",
"propertyType": "global",
"rules": [
{
"t": "nempty"
}
],
"checkall": "true",
"repair": false,
"outputs": 1,
"x": 1490,
"y": 180,
"wires": [
[
"b87eba8ac3329ce3"
]
]
},
{
"id": "305f23764ca23090",
"type": "change",
Expand Down
2 changes: 1 addition & 1 deletion flows_cred.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"$": "5bff6c05405cf34464ecdda2b2ebbbe8K27m9BQCCBl5lkA+u80co5CsB639p4oSs4n/2/W3ysMolnkpV0h5mHKNCCdgjc+ZR29xCrN9cqen+bJlycN2HLZO9Eul/7wK5qku4tbQEyMyCqrIthuF1fNfY7Ck1I5UWILWjTV/wH8Af6ZTUWdogwkGmXvu7MjyTFqh6145z8vnUs+1TiaqoAtYN7uwNcw6wxnIiUlHc1ikHnU9WNbDyugTYBozxMG1nNp260wyN+TK"
"$": "1386d5ea55663b60bc53b9ce98b941edcjWTR56XDWeVObpVCcfNzK+aulb91Xpobe6YC2eADVLL0SJYsFfh8e5BlQOdoSWzXA2DF3o2+naQ5M2cQmnqwBhRExSP7vF1/O6hek5CM9oWx0bMl6mNMxfWtgzV+EIIGobLenTNAqI7pu1XmL2VqcC6Oz8JByUQbG8YQlRISJXWWspqfew9nlbaNL92IuZTm7SVcSLTn/S+JdS3IqxIypLhR+cDuErrrBd4SM4b7u+Nch0S/+tnLHnEMcK8gvV4erHVTWljLg=="
}
Loading

0 comments on commit 4e918f5

Please sign in to comment.