Skip to content

Commit

Permalink
more preparation
Browse files Browse the repository at this point in the history
  • Loading branch information
b1conrad committed Mar 16, 2024
1 parent 960485c commit 5a40e7f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion krl/io.picolabs.plan.wovyn-sensors.krl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ruleset io.picolabs.plan.wovyn-sensors {
<td></td>
<td><input name="name"></td>
<td><input name="location"</td>
<td><button type="submit">Add</button></td>
<td><button type="submit">Insert</button></td>
</tr>
#{
ent:mapping
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 5a40e7f

Please sign in to comment.