From 5a40e7f3022d42f508d74957790fd1f103a0c045 Mon Sep 17 00:00:00 2001 From: Bruce Conrad Date: Sat, 16 Mar 2024 08:58:52 -0600 Subject: [PATCH] more preparation --- krl/io.picolabs.plan.wovyn-sensors.krl | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/krl/io.picolabs.plan.wovyn-sensors.krl b/krl/io.picolabs.plan.wovyn-sensors.krl index 022bb0b..13ff2e0 100644 --- a/krl/io.picolabs.plan.wovyn-sensors.krl +++ b/krl/io.picolabs.plan.wovyn-sensors.krl @@ -34,7 +34,7 @@ ruleset io.picolabs.plan.wovyn-sensors { - + #{ ent:mapping @@ -259,6 +259,16 @@ daysInRecord() name re#(Wovyn_[A-F0-9]{6})# location re#(.+)# setting(name,location) + pre { + new_location = {}.put(name,location) +.klog("new_location") + new_mapping = ent:mapping + .keys() + .reduce(function(a,k){ + a.put(k,ent:mapping.get(k)) + },new_location) +.klog("new_mapping") + } send_directive("_redirect",{"url":settings_link()}) fired { ent:mapping{name} := location