<% local util = require "luci.util" local function command(action) return util.trim(util.exec("/usr/libexec/istorec/dsh.sh " .. action .. " 2>/dev/null")) end local state = command("status") local running = state == "running" local health = command("health") local ready = running and health == "healthy" local profile = command("profile") local image = command("image") local port = command("port") local key_status = command("key-status") -%>
"> <%=ready and translate("DSH is ready") or (running and translate("DSH is starting") or translate("DSH is stopped"))%> "><%=ready and translate("Healthy") or (health ~= "" and util.pcdata(health) or translate("Not running"))%> <% if profile == "advanced" then %><%:Experimental%><% end %>
', '_blank', 'noopener')" <%=running and "" or "disabled"%>>

<%=profile == "advanced" and translate("Open the browser-enhanced workbench in a new window. Its Chromium desktop and Browser Use tools share the same protected DSH session.") or translate("Open the workbench in a new window. DSH uses its own administrator-key login and keeps models, sessions and tools inside the workbench.")%>

<%:Web access%> <%=port ~= "" and util.pcdata(translate("Port") .. " " .. port) or translate("Unavailable")%>
<%:Authentication%> "><%=key_status == "configured" and translate("Administrator key configured") or translate("Not configured")%>
<%:Capabilities%> <%=profile == "advanced" and translate("Chromium desktop ยท Browser Use") or translate("DSH Web workbench")%>
<% if profile ~= "" or image ~= "" then %>
<%:Runtime details%>
<% if profile ~= "" then %><%:Profile%><%=util.pcdata(profile)%><% end %> <% if image ~= "" then %><%:Container image%><%=util.pcdata(image)%><% end %>
<% end %>