Packages/istore/luci/luci-lib-taskd/luasrc/view/tasks/embed.htm
2025-02-16 22:24:52 +08:00

41 lines
1.5 KiB
HTML

<%+xterm/embed%>
<link rel="stylesheet" href="<%=resource%>/tasks/tasks.css<%# ?v=PKG_VERSION %>">
<script src="<%=resource%>/tasks/tasks.js<%# ?v=PKG_VERSION %>"></script>
<%
local i18n = {}
local function tr(str)
i18n[str]=translate(str)
end
tr("Stop running task?")
tr("Stopped at:")
tr("Finished at:")
tr("Failed at:")
tr("Lost login status")
tr("Fetch log failed, retrying...")
tr("Task does not exist or has been deleted")
-%>
<script>
window.taskd.csrfToken="<%=token%>";
window.taskd.i18n=<% luci.http.write_json(i18n) %>;
window.taskd.dialog_template=`
<div id="tasks_dialog">
<div class="dialog-title-bar">
<span class="dialog-title" id="tasks_id"></span>
<span class="dialog-icons">
<span class="dialog-icon dialog-icon-close" title="<%:Stop and Remove%>"></span>
<span class="dialog-icon dialog-icon-min" title="<%:Hide%>"></span>
</span>
</div>
<div class="dialog-content">
<div id="tasks_xterm_log"></div>
<div id="tasks_result_mask">
<span class="tasks_result_success"><%:Task execution successful !%></span>
<span class="tasks_result_failed"><%:Task execution failed !%></span>
<br/>
<span><%:Click the button in the upper right corner of the dialog box to close it, or click here to view the log%></span>
</div>
</div>
</div>
`;
</script>