You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{% for member in gets("/members/*") %}
{% set data = member.Value | parseJSON %}
{{ data.conn_url | split:"/" | index:"2" | replace:"@,/" }}
{% endfor %}
got error
2023-07-11T15:30:29.414+0300 [INFO] set backend nodes: backend=zookeeper nodes=["192.168.50.1:2181"] prefix=remco[1642]
2023/07/11 15:30:29 Connected to 192.168.50.1:2181
2023/07/11 15:30:29 Authenticated: id=72058294651455021, timeout=4000
2023/07/11 15:30:29 Re-submitting `0` credentials after reconnect
2023-07-11T15:30:29.420+0300 [ERROR] failed to process: prefix=remco[1642] resource=haproxy error="createStageFileAndSync failed: create stage file failed: template execution failed: [Error (where: javascript-filter:replace) | Line 35 Col 44 near 'replace'] TypeError: Object has no member 'replace' at replace (<eval>:10:23(48))"
2023-07-11T15:30:29.420+0300 [ERROR] not all templates could be rendered, trying again after 22 seconds: prefix=remco[1642] resource=haproxy
That work
{{ data.conn_url | toJSON | replace:"@,/" }}
I think because "data.conn_url | toJSON" become String. But if use another pipe, the type of data is changing. If there was toSRING filter at least, it will work
Hello.
I.m try convert my confd config to remco.
try to use filter and function together from here
https://github.com/HeavyHorst/remco/tree/26a321844506ca53d2840f22e41ed6ea89043cba/docs/content/template
here the code
and here another try
Got the error with replace function
How can i use function and filter together?
The text was updated successfully, but these errors were encountered: