diff --git a/luci-app-store/Makefile b/luci-app-store/Makefile index ed7cdd96..927da064 100644 --- a/luci-app-store/Makefile +++ b/luci-app-store/Makefile @@ -8,10 +8,10 @@ include $(TOPDIR)/rules.mk LUCI_TITLE:=LuCI based ipk store LUCI_DESCRIPTION:=luci-app-store is a ipk store developed by LinkEase team LUCI_DEPENDS:=+curl +opkg +luci-base +tar +coreutils +coreutils-stat +libuci-lua +mount-utils +luci-lib-taskd -LUCI_EXTRA_DEPENDS:=luci-lib-taskd (>=1.0.16) +LUCI_EXTRA_DEPENDS:=luci-lib-taskd (>=1.0.17) LUCI_PKGARCH:=all -PKG_VERSION:=0.1.12-4 +PKG_VERSION:=0.1.12-5 # PKG_RELEASE MUST be empty for luci.mk PKG_RELEASE:= diff --git a/luci-app-store/luasrc/view/store/main.htm b/luci-app-store/luasrc/view/store/main.htm index e32c63a2..dedbc8d8 100644 --- a/luci-app-store/luasrc/view/store/main.htm +++ b/luci-app-store/luasrc/view/store/main.htm @@ -49,7 +49,7 @@ <% local taskd = require "luci.model.tasks" local status = taskd.status("istore") -if status.running then +if status.running or status.exit_code ~= 404 then -%> window.istore_log(true); <% diff --git a/luci-lib-taskd/Makefile b/luci-lib-taskd/Makefile index 6e295e0a..3b01a6b0 100644 --- a/luci-lib-taskd/Makefile +++ b/luci-lib-taskd/Makefile @@ -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.16 +PKG_VERSION:=1.0.17 PKG_RELEASE:= PKG_MAINTAINER:=jjm2473 diff --git a/luci-lib-taskd/htdocs/luci-static/resources/tasks/tasks.js b/luci-lib-taskd/htdocs/luci-static/resources/tasks/tasks.js index b8793319..648652fe 100644 --- a/luci-lib-taskd/htdocs/luci-static/resources/tasks/tasks.js +++ b/luci-lib-taskd/htdocs/luci-static/resources/tasks/tasks.js @@ -22,11 +22,8 @@ } oReq.onload = function (oEvent) { if (oReq.status == 403) { - if (confirm($gettext("Lost login status, retry?"))) { - setTimeout(retry, 0); - } else { - reject(oEvent); - } + alert($gettext("Lost login status")); + location.href = location.href; } else if (oReq.status == 404) { reject(oEvent); } else { @@ -112,9 +109,9 @@ title_view.title = title; title_view.innerText = title; if (!data.running) { - container.classList.add('tasks_stopped') + container.classList.add('tasks_stopped'); if (data.exit_code) { - container.classList.add('tasks_failed') + container.classList.add('tasks_failed'); } } // last pull @@ -161,9 +158,9 @@ title_view.innerText = task_id + ' (' + $gettext("Fetch log failed, retrying...") + ')'; setTimeout(()=>pulllog(true), 1000); } else if (err.target.status == 403 || err.target.status == 404) { - title_view.innerText += ' (' + $gettext(err.target.status == 403?"Lost login status":"Task does not exist or has been deleted") + ')'; + title_view.innerText = task_id + ' (' + $gettext(err.target.status == 403?"Lost login status":"Task does not exist or has been deleted") + ')'; container.querySelector(".dialog-icon-close").hidden = true; - container.classList.add('tasks_unknown'); + container.classList.add('tasks_unknown'); } else { console.error(err); } diff --git a/luci-lib-taskd/luasrc/model/tasks.lua b/luci-lib-taskd/luasrc/model/tasks.lua index 54b4e17e..07aff98f 100644 --- a/luci-lib-taskd/luasrc/model/tasks.lua +++ b/luci-lib-taskd/luasrc/model/tasks.lua @@ -35,7 +35,7 @@ taskd.status = function (task_id) if task_id == "" then data = {} else - data = {running=false, exit_code=255} + data = {running=false, exit_code=404} end end if task_id ~= "" then diff --git a/luci-lib-taskd/luasrc/view/tasks/embed.htm b/luci-lib-taskd/luasrc/view/tasks/embed.htm index dc3d9c68..2f3dca0e 100644 --- a/luci-lib-taskd/luasrc/view/tasks/embed.htm +++ b/luci-lib-taskd/luasrc/view/tasks/embed.htm @@ -10,7 +10,6 @@ tr("Stopped at:") tr("Finished at:") tr("Failed at:") - tr("Lost login status, retry?") tr("Lost login status") tr("Fetch log failed, retrying...") tr("Task does not exist or has been deleted") diff --git a/luci-lib-taskd/src/po/zh-cn/lib-tasks.po b/luci-lib-taskd/src/po/zh-cn/lib-tasks.po index c103b313..b1aafa74 100644 --- a/luci-lib-taskd/src/po/zh-cn/lib-tasks.po +++ b/luci-lib-taskd/src/po/zh-cn/lib-tasks.po @@ -10,9 +10,6 @@ msgstr "完成于:" msgid "Failed at:" msgstr "失败于:" -msgid "Lost login status, retry?" -msgstr "丢失登陆状态,是否重试?" - msgid "Lost login status" msgstr "丢失登陆状态"