parent
ea8a50c055
commit
faaa600264
@ -1,6 +1,6 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_VERSION:=1.21.0
|
PKG_VERSION:=1.21.1
|
||||||
|
|
||||||
LUCI_TITLE:=LuCI Support for nikki
|
LUCI_TITLE:=LuCI Support for nikki
|
||||||
LUCI_DEPENDS:=+luci-base +nikki
|
LUCI_DEPENDS:=+luci-base +nikki
|
||||||
|
@ -105,8 +105,9 @@ return baseclass.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
api: async function (method, path, query, body) {
|
api: async function (method, path, query, body) {
|
||||||
const apiListen = uci.get('nikki', 'mixin', 'api_listen');
|
const profile = await callNikkiProfile();
|
||||||
const apiSecret = uci.get('nikki', 'mixin', 'api_secret') ?? '';
|
const apiListen = profile['external-controller'];
|
||||||
|
const apiSecret = profile['secret'] ?? '';
|
||||||
const apiPort = apiListen.substring(apiListen.lastIndexOf(':') + 1);
|
const apiPort = apiListen.substring(apiListen.lastIndexOf(':') + 1);
|
||||||
const url = `http://${window.location.hostname}:${apiPort}${path}`;
|
const url = `http://${window.location.hostname}:${apiPort}${path}`;
|
||||||
return request.request(url, {
|
return request.request(url, {
|
||||||
@ -118,9 +119,10 @@ return baseclass.extend({
|
|||||||
},
|
},
|
||||||
|
|
||||||
openDashboard: async function () {
|
openDashboard: async function () {
|
||||||
const uiName = uci.get('nikki', 'mixin', 'ui_name');
|
const profile = await callNikkiProfile();
|
||||||
const apiListen = uci.get('nikki', 'mixin', 'api_listen');
|
const uiName = profile['external-ui-name'];
|
||||||
const apiSecret = uci.get('nikki', 'mixin', 'api_secret') ?? '';
|
const apiListen = profile['external-controller'];
|
||||||
|
const apiSecret = profile['secret'] ?? '';
|
||||||
const apiPort = apiListen.substring(apiListen.lastIndexOf(':') + 1);
|
const apiPort = apiListen.substring(apiListen.lastIndexOf(':') + 1);
|
||||||
const params = {
|
const params = {
|
||||||
host: window.location.hostname,
|
host: window.location.hostname,
|
||||||
|
@ -125,7 +125,7 @@ return view.extend({
|
|||||||
|
|
||||||
o = s.taboption('external_control', form.Value, 'api_secret', _('API Secret'));
|
o = s.taboption('external_control', form.Value, 'api_secret', _('API Secret'));
|
||||||
o.password = true;
|
o.password = true;
|
||||||
o.rmempty = false;
|
o.placeholder = _('Unmodified');
|
||||||
|
|
||||||
o = s.taboption('external_control', form.ListValue, 'selection_cache', _('Save Proxy Selection'));
|
o = s.taboption('external_control', form.ListValue, 'selection_cache', _('Save Proxy Selection'));
|
||||||
o.optional = true;
|
o.optional = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user