mirror of
https://github.com/openwrt/luci.git
synced 2025-12-21 19:14:34 +04:00
luci-app-openlist: rename from luci-app-alist
See https://github.com/openwrt/packages/pull/26855 for more information. Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
committed by
Paul Donald
parent
75a612ae63
commit
682a2b9525
@@ -1,28 +0,0 @@
|
||||
{
|
||||
"admin/services/alist": {
|
||||
"title": "AList",
|
||||
"action": {
|
||||
"type": "firstchild"
|
||||
},
|
||||
"depends": {
|
||||
"acl": [ "luci-app-alist" ],
|
||||
"uci": { "alist": true }
|
||||
}
|
||||
},
|
||||
"admin/services/alist/config": {
|
||||
"title": "Settings",
|
||||
"order": 10,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "alist/config"
|
||||
}
|
||||
},
|
||||
"admin/services/alist/log": {
|
||||
"title": "Log",
|
||||
"order": 20,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "alist/log"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
{
|
||||
"luci-app-alist": {
|
||||
"description": "Grant UCI access for luci-app-alist",
|
||||
"read": {
|
||||
"file": {
|
||||
"/var/run/alist/log/alist.log": [ "read" ]
|
||||
},
|
||||
"ubus": {
|
||||
"service": [ "list" ]
|
||||
},
|
||||
"uci": [ "alist" ]
|
||||
},
|
||||
"write": {
|
||||
"uci": [ "alist" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,10 +6,11 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
|
||||
LUCI_TITLE:=LuCI app for AList
|
||||
LUCI_DEPENDS:=+alist
|
||||
LUCI_TITLE:=LuCI app for OpenList
|
||||
LUCI_DEPENDS:=+openlist
|
||||
|
||||
PKG_MAINTAINER:=Tianling Shen <cnsztl@immortalwrt.org>
|
||||
PKG_PROVIDES:=luci-app-alist
|
||||
|
||||
include ../../luci.mk
|
||||
|
||||
@@ -16,10 +16,10 @@ const callServiceList = rpc.declare({
|
||||
});
|
||||
|
||||
function getServiceStatus() {
|
||||
return L.resolveDefault(callServiceList('alist'), {}).then(function (res) {
|
||||
return L.resolveDefault(callServiceList('openlist'), {}).then(function (res) {
|
||||
var isRunning = false;
|
||||
try {
|
||||
isRunning = res['alist']['instances']['instance1']['running'];
|
||||
isRunning = res['openlist']['instances']['instance1']['running'];
|
||||
} catch (e) { }
|
||||
return isRunning;
|
||||
});
|
||||
@@ -31,9 +31,9 @@ function renderStatus(isRunning, port) {
|
||||
if (isRunning) {
|
||||
var button = String.format(' <a class="btn cbi-button" href="http://%s:%s" target="_blank" rel="noreferrer noopener">%s</a>',
|
||||
window.location.hostname, port, _('Open Web Interface'));
|
||||
renderHTML = spanTemp.format('green', _('AList'), _('RUNNING')) + button;
|
||||
renderHTML = spanTemp.format('green', _('OpenList'), _('RUNNING')) + button;
|
||||
} else {
|
||||
renderHTML = spanTemp.format('red', _('AList'), _('NOT RUNNING'));
|
||||
renderHTML = spanTemp.format('red', _('OpenList'), _('NOT RUNNING'));
|
||||
}
|
||||
|
||||
return renderHTML;
|
||||
@@ -55,7 +55,7 @@ var stubValidator = {
|
||||
return view.extend({
|
||||
load: function() {
|
||||
return Promise.all([
|
||||
uci.load('alist')
|
||||
uci.load('openlist')
|
||||
]);
|
||||
},
|
||||
|
||||
@@ -63,7 +63,7 @@ return view.extend({
|
||||
let m, s, o;
|
||||
var webport = uci.get(data[0], 'config', 'listen_http_port') || '5244';
|
||||
|
||||
m = new form.Map('alist', _('AList'),
|
||||
m = new form.Map('openlist', _('OpenList'),
|
||||
_('A file list/WebDAV program that supports multiple storages, powered by Gin and Solidjs.') + '<br />' +
|
||||
_('Default webUI/WebDAV login username is %s and password is %s.').format('<code>admin</code>', '<code>password</code>'));
|
||||
|
||||
@@ -82,7 +82,7 @@ return view.extend({
|
||||
]);
|
||||
}
|
||||
|
||||
s = m.section(form.NamedSection, 'config', 'alist');
|
||||
s = m.section(form.NamedSection, 'config', 'openlist');
|
||||
|
||||
o = s.option(form.Flag, 'enabled', _('Enable'));
|
||||
o.default = o.disabled;
|
||||
@@ -33,7 +33,7 @@ return view.extend({
|
||||
);
|
||||
|
||||
poll.add(L.bind(function() {
|
||||
return fs.read_direct('/var/run/alist/log/alist.log', 'text')
|
||||
return fs.read_direct('/var/run/openlist/log/openlist.log', 'text')
|
||||
.then(function(res) {
|
||||
var log = E('pre', { 'wrap': 'pre' }, [
|
||||
res.trim() || _('Log is empty.')
|
||||
@@ -0,0 +1,28 @@
|
||||
{
|
||||
"admin/services/openlist": {
|
||||
"title": "OpenList",
|
||||
"action": {
|
||||
"type": "firstchild"
|
||||
},
|
||||
"depends": {
|
||||
"acl": [ "luci-app-openlist" ],
|
||||
"uci": { "openlist": true }
|
||||
}
|
||||
},
|
||||
"admin/services/openlist/config": {
|
||||
"title": "Settings",
|
||||
"order": 10,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "openlist/config"
|
||||
}
|
||||
},
|
||||
"admin/services/openlist/log": {
|
||||
"title": "Log",
|
||||
"order": 20,
|
||||
"action": {
|
||||
"type": "view",
|
||||
"path": "openlist/log"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"luci-app-openlist": {
|
||||
"description": "Grant UCI access for luci-app-openlist",
|
||||
"read": {
|
||||
"file": {
|
||||
"/var/run/openlist/log/openlist.log": [ "read" ]
|
||||
},
|
||||
"ubus": {
|
||||
"service": [ "list" ]
|
||||
},
|
||||
"uci": [ "openlist" ]
|
||||
},
|
||||
"write": {
|
||||
"uci": [ "openlist" ]
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user