Added a filtering step on __addBindings.jq__
This commit is contained in:
@@ -1,12 +1,18 @@
|
|||||||
|
# Filter first
|
||||||
.
|
.
|
||||||
|
| debug("Filtering...")
|
||||||
|
| .tags[]
|
||||||
|
|= select(.typeId == "Cooling/TH/TH_Model2_v3")
|
||||||
# Sort first
|
# Sort first
|
||||||
|
| debug("Sorting...")
|
||||||
| walk(
|
| walk(
|
||||||
if type == "object" and has("tags") then
|
if type == "object" and has("tags") then
|
||||||
.tags |= sort_by(.name)
|
.tags |= sort_by(.name)
|
||||||
end
|
end
|
||||||
)
|
)
|
||||||
# so object positions are predictable
|
# so object positions are predictable
|
||||||
| .tags[3].tags[1].tags as $baseData
|
| .tags[0].tags[1].tags as $baseData
|
||||||
|
| debug("Modifing parameters...")
|
||||||
| walk(
|
| walk(
|
||||||
# Removes .Tags.Controller Tags from the plcName parameter
|
# Removes .Tags.Controller Tags from the plcName parameter
|
||||||
if type == "object" and has("plcName") then
|
if type == "object" and has("plcName") then
|
||||||
@@ -16,6 +22,7 @@
|
|||||||
end
|
end
|
||||||
)
|
)
|
||||||
# and can be used as the base line to setup the other objects
|
# and can be used as the base line to setup the other objects
|
||||||
|
| debug("Copying Data folder...")
|
||||||
| walk(
|
| walk(
|
||||||
if type == "object" and .name? == "Data" then
|
if type == "object" and .name? == "Data" then
|
||||||
.tags = $baseData
|
.tags = $baseData
|
||||||
|
|||||||
Reference in New Issue
Block a user