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