From 46f58256e9722bd2171700b9eed4328e029ebc83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Kr=C3=BCger?= Date: Thu, 16 Dec 2021 04:09:36 +0100 Subject: [PATCH] manman-sync node_id -> location_id --- .../luasrc/lib/gluon/config-mode/reboot/0100-manman-sync.lua | 2 +- .../luasrc/lib/gluon/config-mode/wizard/0100-manman-sync.lua | 4 ++-- package/gluon-manman-sync/src/respondd.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package/gluon-config-mode-manman-sync/luasrc/lib/gluon/config-mode/reboot/0100-manman-sync.lua b/package/gluon-config-mode-manman-sync/luasrc/lib/gluon/config-mode/reboot/0100-manman-sync.lua index 27c0b3a1..cabb23b3 100644 --- a/package/gluon-config-mode-manman-sync/luasrc/lib/gluon/config-mode/reboot/0100-manman-sync.lua +++ b/package/gluon-config-mode-manman-sync/luasrc/lib/gluon/config-mode/reboot/0100-manman-sync.lua @@ -13,5 +13,5 @@ end if not msg then return end renderer.render_string(msg, { - location_id = uci:get('gluon-manman-sync', 'sync', 'node_id') + location_id = uci:get('gluon-manman-sync', 'sync', 'location_id') }) diff --git a/package/gluon-config-mode-manman-sync/luasrc/lib/gluon/config-mode/wizard/0100-manman-sync.lua b/package/gluon-config-mode-manman-sync/luasrc/lib/gluon/config-mode/wizard/0100-manman-sync.lua index 7638d4c4..f0feb83f 100644 --- a/package/gluon-config-mode-manman-sync/luasrc/lib/gluon/config-mode/wizard/0100-manman-sync.lua +++ b/package/gluon-config-mode-manman-sync/luasrc/lib/gluon/config-mode/wizard/0100-manman-sync.lua @@ -20,10 +20,10 @@ return function(form, uci) local id = s:option(Value, 'manman_id', pkg_i18n.translate('ManMan location ID')) id:depends(manman, true) - id.default = uci:get('gluon-manman-sync', 'sync', 'node_id') + id.default = uci:get('gluon-manman-sync', 'sync', 'location_id') id.datatype = 'uinteger' function id:write(data) - uci:set('gluon-manman-sync', 'sync', 'node_id', data) + uci:set('gluon-manman-sync', 'sync', 'location_id', data) end function s:write() diff --git a/package/gluon-manman-sync/src/respondd.c b/package/gluon-manman-sync/src/respondd.c index 52199b87..13c69539 100644 --- a/package/gluon-manman-sync/src/respondd.c +++ b/package/gluon-manman-sync/src/respondd.c @@ -50,7 +50,7 @@ static struct json_object * get_autoupdater(void) { struct json_object *ret = json_object_new_object(); - json_object_object_add(ret, "node_id", gluonutil_wrap_string(uci_lookup_option_string(ctx, s, "node_id"))); + json_object_object_add(ret, "location_id", gluonutil_wrap_string(uci_lookup_option_string(ctx, s, "location_id"))); const char *enabled = uci_lookup_option_string(ctx, s, "enabled"); json_object_object_add(ret, "enabled", json_object_new_boolean(enabled && !strcmp(enabled, "1")));