mirror of
https://github.com/kenzok8/openwrt-packages
synced 2025-01-07 07:06:45 +08:00
update 2023-08-17 02:01:23
This commit is contained in:
parent
8475e5bc15
commit
802100bf2e
@ -11,7 +11,7 @@ LUCI_DEPENDS:=+luci-lib-xterm +taskd
|
||||
LUCI_EXTRA_DEPENDS:=taskd (>=1.0.3-1)
|
||||
LUCI_PKGARCH:=all
|
||||
|
||||
PKG_VERSION:=1.0.17
|
||||
PKG_VERSION:=1.0.18
|
||||
PKG_RELEASE:=
|
||||
PKG_MAINTAINER:=jjm2473 <jjm2473@gmail.com>
|
||||
|
||||
|
@ -3,6 +3,7 @@ module("luci.controller.tasks-lib", package.seeall)
|
||||
|
||||
|
||||
function index()
|
||||
entry({"admin", "system", "tasks"}, call("tasks_ping")).dependent=false -- just for compatible
|
||||
entry({"admin", "system", "tasks", "status"}, call("tasks_status")).dependent=false
|
||||
entry({"admin", "system", "tasks", "log"}, call("tasks_log")).dependent=false
|
||||
entry({"admin", "system", "tasks", "stop"}, post("tasks_stop")).dependent=false
|
||||
@ -14,6 +15,11 @@ local ltn12 = require "luci.ltn12"
|
||||
|
||||
local taskd = require "luci.model.tasks"
|
||||
|
||||
function tasks_ping()
|
||||
luci.http.prepare_content("application/json")
|
||||
luci.http.write_json({})
|
||||
end
|
||||
|
||||
function tasks_status()
|
||||
local data = taskd.status(luci.http.formvalue("task_id"))
|
||||
luci.http.prepare_content("application/json")
|
||||
|
Loading…
Reference in New Issue
Block a user