You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
1.1 KiB
HTML
32 lines
1.1 KiB
HTML
1 year ago
|
<%
|
||
|
local util = require "luci.util"
|
||
|
local container_status = util.trim(util.exec("/usr/libexec/apps/prowlarr/prowlarr.sh status"))
|
||
|
local container_install = (string.len(container_status) > 0)
|
||
|
local container_running = container_status == "running"
|
||
|
-%>
|
||
|
<div class="cbi-value">
|
||
|
<label class="cbi-value-title"><%:Status%></label>
|
||
|
<div class="cbi-value-field">
|
||
|
<% if container_running then %>
|
||
|
<button class="cbi-button cbi-button-success" disabled="true"><%:prowlarr is running%></button>
|
||
|
<% else %>
|
||
|
<button class="cbi-button cbi-button-negative" disabled="true"><%:prowlarr is not running%></button>
|
||
|
<% end %>
|
||
|
</div>
|
||
|
</div>
|
||
|
<%
|
||
|
if container_running then
|
||
|
local port=util.trim(util.exec("/usr/libexec/apps/prowlarr/prowlarr.sh port"))
|
||
|
if port == "" then
|
||
|
port="9696"
|
||
|
end
|
||
|
-%>
|
||
|
<div class="cbi-value cbi-value-last">
|
||
|
<label class="cbi-value-title"> </label>
|
||
|
<div class="cbi-value-field">
|
||
|
|
||
|
<input type="button" class="btn cbi-button cbi-button-apply" name="start" value="<%:Open prowlarr%>" onclick="window.open('http://'+location.hostname+':<%=port%>/', '_blank')">
|
||
|
</div>
|
||
|
</div>
|
||
|
<% end %>
|