mirror of
https://github.com/hanwckf/immortalwrt-mt798x.git
synced 2025-01-10 11:09:57 +08:00
Merge Lean's source
This commit is contained in:
parent
362b02d489
commit
a9bcc030f9
@ -15,7 +15,7 @@ define Package/$(PKG_NAME)
|
||||
SUBMENU:=3. Applications
|
||||
TITLE:=Docker Manager interface for LuCI
|
||||
PKGARCH:=all
|
||||
DEPENDS:=+luci-lib-docker +luci-app-docker
|
||||
DEPENDS:=+luci-lib-docker +docker-ce +e2fsprogs +fdisk
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/description
|
||||
@ -39,7 +39,7 @@ define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/
|
||||
cp -pR ./root/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n
|
||||
po2lmo ./po/zh_Hans/dockerman.po $(1)/usr/lib/lua/luci/i18n/dockerman.zh-cn.lmo
|
||||
po2lmo ./po/zh-cn/dockerman.po $(1)/usr/lib/lua/luci/i18n/dockerman.zh-cn.lmo
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
@ -10,22 +10,22 @@ module("luci.controller.dockerman",package.seeall)
|
||||
|
||||
function index()
|
||||
|
||||
entry({"admin", "docker"}, firstchild(), "Docker", 40).dependent = false
|
||||
entry({"admin","docker","overview"},cbi("docker/overview"),_("Overview"),0).leaf=true
|
||||
entry({"admin", "services","docker"}, firstchild(), "Docker", 40).dependent = false
|
||||
entry({"admin","services","docker","overview"},cbi("docker/overview"),_("Overview"),0).leaf=true
|
||||
|
||||
local socket = luci.model.uci.cursor():get("docker", "local", "socket_path")
|
||||
if not nixio.fs.access(socket) then return end
|
||||
if (require "luci.model.docker").new():_ping().code ~= 200 then return end
|
||||
entry({"admin","docker","containers"},form("docker/containers"),_("Containers"),1).leaf=true
|
||||
entry({"admin","docker","images"},form("docker/images"),_("Images"),2).leaf=true
|
||||
entry({"admin","docker","networks"},form("docker/networks"),_("Networks"),3).leaf=true
|
||||
entry({"admin","docker","volumes"},form("docker/volumes"),_("Volumes"),4).leaf=true
|
||||
entry({"admin","docker","events"},call("action_events"),_("Events"),5)
|
||||
entry({"admin","docker","newcontainer"},form("docker/newcontainer")).leaf=true
|
||||
entry({"admin","docker","newnetwork"},form("docker/newnetwork")).leaf=true
|
||||
entry({"admin","docker","container"},form("docker/container")).leaf=true
|
||||
entry({"admin","docker","container_stats"},call("action_get_container_stats")).leaf=true
|
||||
entry({"admin","docker","confirm"},call("action_confirm")).leaf=true
|
||||
entry({"admin","services","docker","containers"},form("docker/containers"),_("Containers"),1).leaf=true
|
||||
entry({"admin","services","docker","images"},form("docker/images"),_("Images"),2).leaf=true
|
||||
entry({"admin","services","docker","networks"},form("docker/networks"),_("Networks"),3).leaf=true
|
||||
entry({"admin","services","docker","volumes"},form("docker/volumes"),_("Volumes"),4).leaf=true
|
||||
entry({"admin","services","docker","events"},call("action_events"),_("Events"),5)
|
||||
entry({"admin","services","docker","newcontainer"},form("docker/newcontainer")).leaf=true
|
||||
entry({"admin","services","docker","newnetwork"},form("docker/newnetwork")).leaf=true
|
||||
entry({"admin","services","docker","container"},form("docker/container")).leaf=true
|
||||
entry({"admin","services","docker","container_stats"},call("action_get_container_stats")).leaf=true
|
||||
entry({"admin","services","docker","confirm"},call("action_confirm")).leaf=true
|
||||
|
||||
end
|
||||
|
||||
|
@ -116,20 +116,20 @@ local start_stop_remove = function(m, cmd)
|
||||
end
|
||||
if res and res.code >= 300 then
|
||||
docker:append_status("fail code:" .. res.code.." ".. (res.body.message and res.body.message or res.message))
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/docker/container/"..container_id))
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/services/docker/container/"..container_id))
|
||||
else
|
||||
docker:clear_status()
|
||||
if cmd ~= "remove" and cmd ~= "upgrade" then
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/docker/container/"..container_id))
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/services/docker/container/"..container_id))
|
||||
else
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/docker/containers"))
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/services/docker/containers"))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
m=SimpleForm("docker", container_info.Name:sub(2), translate("Docker Container") )
|
||||
m.template = "docker/cbi/xsimpleform"
|
||||
m.redirect = luci.dispatcher.build_url("admin/docker/containers")
|
||||
m.redirect = luci.dispatcher.build_url("admin/services/docker/containers")
|
||||
-- m:append(Template("docker/container"))
|
||||
docker_status = m:section(SimpleSection)
|
||||
docker_status.template="docker/apply_widget"
|
||||
@ -190,7 +190,7 @@ btnstop.write = function(self, section)
|
||||
start_stop_remove(m,"stop")
|
||||
end
|
||||
btnduplicate.write = function(self, section)
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/docker/newcontainer/duplicate/"..container_id))
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/services/docker/newcontainer/duplicate/"..container_id))
|
||||
end
|
||||
|
||||
tab_section = m:section(SimpleSection)
|
||||
@ -365,7 +365,7 @@ if action == "info" then
|
||||
else
|
||||
docker:clear_status()
|
||||
end
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/docker/container/"..container_id.."/info"))
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/services/docker/container/"..container_id.."/info"))
|
||||
end
|
||||
|
||||
-- info end
|
||||
@ -426,7 +426,7 @@ elseif action == "edit" then
|
||||
else
|
||||
docker:clear_status()
|
||||
end
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/docker/container/"..container_id.."/edit"))
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/services/docker/container/"..container_id.."/edit"))
|
||||
end
|
||||
end
|
||||
elseif action == "logs" then
|
||||
@ -479,4 +479,4 @@ m.reset = false
|
||||
end
|
||||
|
||||
|
||||
return m
|
||||
return m
|
||||
|
@ -93,7 +93,7 @@ container_name = c_table:option(DummyValue, "_name", translate("Container Name")
|
||||
container_name.width="20%"
|
||||
container_name.template="docker/cbi/dummyvalue"
|
||||
container_name.href = function (self, section)
|
||||
return luci.dispatcher.build_url("admin/docker/container/" .. urlencode(container_id:cfgvalue(section)))
|
||||
return luci.dispatcher.build_url("admin/services/docker/container/" .. urlencode(container_id:cfgvalue(section)))
|
||||
end
|
||||
container_status = c_table:option(DummyValue, "_status", translate("Status"))
|
||||
container_status.width="15%"
|
||||
@ -106,7 +106,7 @@ container_image = c_table:option(DummyValue, "_image", translate("Image"))
|
||||
container_image.template="docker/cbi/dummyvalue"
|
||||
container_image.width="10%"
|
||||
-- container_image.href = function (self, section)
|
||||
-- return luci.dispatcher.build_url("admin/docker/image/" .. urlencode(c_lists[section]._image_id))
|
||||
-- return luci.dispatcher.build_url("admin/services/docker/image/" .. urlencode(c_lists[section]._image_id))
|
||||
-- end
|
||||
container_command = c_table:option(DummyValue, "_command", translate("Command"))
|
||||
container_command.width="20%"
|
||||
@ -145,7 +145,7 @@ local start_stop_remove = function(m,cmd)
|
||||
end
|
||||
end
|
||||
if success then docker:clear_status() end
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/docker/containers"))
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/services/docker/containers"))
|
||||
end
|
||||
end
|
||||
|
||||
@ -180,7 +180,7 @@ btnremove.inputtitle=translate("Remove")
|
||||
btnremove.inputstyle = "remove"
|
||||
btnremove.forcewrite = true
|
||||
btnnew.write = function(self, section)
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/docker/newcontainer"))
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/services/docker/newcontainer"))
|
||||
end
|
||||
btnstart.write = function(self, section)
|
||||
start_stop_remove(m,"start")
|
||||
@ -195,4 +195,4 @@ btnstop.write = function(self, section)
|
||||
start_stop_remove(m,"stop")
|
||||
end
|
||||
|
||||
return m
|
||||
return m
|
||||
|
@ -32,7 +32,7 @@ function get_images()
|
||||
for ci,cv in ipairs(containers) do
|
||||
if v.Id == cv.ImageID then
|
||||
data[index]["_containers"] = (data[index]["_containers"] and (data[index]["_containers"] .. " | ") or "")..
|
||||
"<a href=/cgi-bin/luci/admin/docker/container/"..cv.Id.." >".. cv.Names[1]:sub(2).."</a>"
|
||||
"<a href=/cgi-bin/luci/admin/services/docker/container/"..cv.Id.." >".. cv.Names[1]:sub(2).."</a>"
|
||||
end
|
||||
end
|
||||
data[index]["_size"] = string.format("%.2f", tostring(v.Size/1024/1024)).."MB"
|
||||
@ -54,7 +54,7 @@ local pull_section = m:section(Table,pull_value, translate("Pull Image"))
|
||||
pull_section.template="cbi/nullsection"
|
||||
local tag_name = pull_section:option(Value, "_image_tag_name")
|
||||
tag_name.template="docker/cbi/inlinevalue"
|
||||
tag_name.placeholder="lisaac/luci:latest"
|
||||
tag_name.placeholder="hello-world:latest"
|
||||
local registry = pull_section:option(Value, "_registry")
|
||||
registry.template="docker/cbi/inlinevalue"
|
||||
registry:value("index.docker.io", "DockerHub")
|
||||
@ -91,7 +91,7 @@ action_pull.write = function(self, section)
|
||||
else
|
||||
docker:append_status("done<br>")
|
||||
end
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/docker/images"))
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/services/docker/images"))
|
||||
end
|
||||
end
|
||||
|
||||
@ -139,7 +139,7 @@ local remove_action = function(force)
|
||||
end
|
||||
end
|
||||
if success then docker:clear_status() end
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/docker/images"))
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/services/docker/images"))
|
||||
end
|
||||
end
|
||||
|
||||
@ -170,4 +170,4 @@ btnforceremove.forcewrite = true
|
||||
btnforceremove.write = function(self, section)
|
||||
remove_action(true)
|
||||
end
|
||||
return m
|
||||
return m
|
||||
|
@ -83,7 +83,7 @@ btnnew.notitle=true
|
||||
btnnew.inputstyle = "add"
|
||||
btnnew.forcewrite = true
|
||||
btnnew.write = function(self, section)
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/docker/newnetwork"))
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/services/docker/newnetwork"))
|
||||
end
|
||||
btnremove = action:option(Button, "_remove")
|
||||
btnremove.inputtitle= translate("Remove")
|
||||
@ -116,8 +116,8 @@ btnremove.write = function(self, section)
|
||||
if success then
|
||||
docker:clear_status()
|
||||
end
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/docker/networks"))
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/services/docker/networks"))
|
||||
end
|
||||
end
|
||||
|
||||
return m
|
||||
return m
|
||||
|
@ -205,7 +205,7 @@ end
|
||||
|
||||
local m = SimpleForm("docker", translate("Docker"))
|
||||
m.template = "docker/cbi/xsimpleform"
|
||||
m.redirect = luci.dispatcher.build_url("admin", "docker", "containers")
|
||||
m.redirect = luci.dispatcher.build_url("admin", "services","docker", "containers")
|
||||
-- m.reset = false
|
||||
-- m.submit = false
|
||||
-- new Container
|
||||
@ -546,7 +546,7 @@ m.handle = function(self, state, data)
|
||||
docker:append_status("done<br>")
|
||||
else
|
||||
docker:append_status("fail code:" .. res.code.." ".. (res.body.message and res.body.message or res.message).. "<br>")
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/docker/newcontainer"))
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/services/docker/newcontainer"))
|
||||
end
|
||||
end
|
||||
docker:clear_status()
|
||||
@ -569,11 +569,11 @@ m.handle = function(self, state, data)
|
||||
local res = dk.containers:create(name, nil, create_body)
|
||||
if res and res.code == 201 then
|
||||
docker:clear_status()
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/docker/containers"))
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/services/docker/containers"))
|
||||
else
|
||||
docker:append_status("fail code:" .. res.code.." ".. (res.body.message and res.body.message or res.message))
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/docker/newcontainer"))
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/services/docker/newcontainer"))
|
||||
end
|
||||
end
|
||||
|
||||
return m
|
||||
return m
|
||||
|
@ -10,7 +10,7 @@ local dk = docker.new()
|
||||
|
||||
m = SimpleForm("docker", translate("Docker"))
|
||||
m.template = "docker/cbi/xsimpleform"
|
||||
m.redirect = luci.dispatcher.build_url("admin", "docker", "networks")
|
||||
m.redirect = luci.dispatcher.build_url("admin", "services","docker", "networks")
|
||||
|
||||
docker_status = m:section(SimpleSection)
|
||||
docker_status.template="docker/apply_widget"
|
||||
@ -194,12 +194,12 @@ m.handle = function(self, state, data)
|
||||
local res = dk.networks:create(nil, nil, create_body)
|
||||
if res and res.code == 201 then
|
||||
docker:clear_status()
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/docker/networks"))
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/services/docker/networks"))
|
||||
else
|
||||
docker:append_status("fail code:" .. res.code.." ".. (res.body.message and res.body.message or res.message).. "<br>")
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/docker/newnetwork"))
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/services/docker/newnetwork"))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return m
|
||||
return m
|
||||
|
@ -28,7 +28,7 @@ function get_volumes()
|
||||
for vi, vv in ipairs(cv.Mounts) do
|
||||
if v.Name == vv.Name then
|
||||
data[index]["_containers"] = (data[index]["_containers"] and (data[index]["_containers"] .. " | ") or "")..
|
||||
"<a href=/cgi-bin/luci/admin/docker/container/"..cv.Id.." >".. cv.Names[1]:sub(2).."</a>"
|
||||
"<a href=/cgi-bin/luci/admin/services/docker/container/"..cv.Id.." >".. cv.Names[1]:sub(2).."</a>"
|
||||
end
|
||||
end
|
||||
end
|
||||
@ -110,7 +110,7 @@ btnremove.write = function(self, section)
|
||||
end
|
||||
end
|
||||
if success then docker:clear_status() end
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/docker/volumes"))
|
||||
luci.http.redirect(luci.dispatcher.build_url("admin/services/docker/volumes"))
|
||||
end
|
||||
end
|
||||
return m
|
||||
return m
|
||||
|
@ -226,4 +226,4 @@ _docker.clear_status=function(self)
|
||||
nixio.fs.remove(self.options.status_path)
|
||||
end
|
||||
|
||||
return _docker
|
||||
return _docker
|
||||
|
@ -94,7 +94,7 @@ function uci_confirm_docker() {
|
||||
// var delay = isNaN(duration) ? 0 : Math.max(1000 - duration, 0);
|
||||
var delay =1000
|
||||
window.setTimeout(function() {
|
||||
xhr.get('<%=url("admin/docker/confirm")%>', null, call, uci_apply_timeout * 1000);
|
||||
xhr.get('<%=url("admin/services/docker/confirm")%>', null, call, uci_apply_timeout * 1000);
|
||||
}, delay);
|
||||
};
|
||||
|
||||
@ -136,4 +136,4 @@ var buttons = document.querySelectorAll('input[type="submit"]');
|
||||
});
|
||||
}
|
||||
|
||||
//]]></script>
|
||||
//]]></script>
|
||||
|
@ -10,4 +10,4 @@
|
||||
%>
|
||||
<%- if self.href then %></a><%end%>
|
||||
<input type="hidden" id="<%=cbid%>" value="<%=pcdata(self:cfgvalue(section) or self.default or "")%>" />
|
||||
<%+cbi/valuefooter%>
|
||||
<%+cbi/valuefooter%>
|
||||
|
@ -7,18 +7,18 @@
|
||||
</ul>
|
||||
|
||||
<script type="text/javascript">
|
||||
let re = /\/admin\/docker\/container\//
|
||||
let re = /\/admin\/services\/docker\/container\//
|
||||
let p = window.location.href
|
||||
let path = p.split(re)
|
||||
let container_id = path[1].split('/')[0] || path[1]
|
||||
let action = path[1].split('/')[1] || "info"
|
||||
let actions=["info","edit","stats","logs"]
|
||||
actions.forEach(function(item) {
|
||||
document.getElementById("a-cbi-tab-container_" + item).href= path[0]+"/admin/docker/container/"+container_id+'/'+item
|
||||
document.getElementById("a-cbi-tab-container_" + item).href= path[0]+"/admin/services/docker/container/"+container_id+'/'+item
|
||||
if (action === item) {
|
||||
document.getElementById("cbi-tab-container_" + item).className="cbi-tab"
|
||||
} else {
|
||||
document.getElementById("cbi-tab-container_" + item).className="cbi-tab-disable"
|
||||
}
|
||||
})
|
||||
</script>
|
||||
</script>
|
||||
|
@ -7,4 +7,4 @@
|
||||
</div>
|
||||
<% if self.title == translate("Docker Events") then %>
|
||||
<%+footer%>
|
||||
<% end %>
|
||||
<% end %>
|
||||
|
@ -137,7 +137,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
|
||||
<div class="pure-u-3-5">
|
||||
<h4 style="text-align: right; font-size: 1rem"><%:Containers%></h4>
|
||||
<h4 style="text-align: right;">
|
||||
<%- if self.containers_total ~= "-" then -%><a href="/cgi-bin/luci/admin/docker/containers"><%- end -%>
|
||||
<%- if self.containers_total ~= "-" then -%><a href="/cgi-bin/luci/admin/services/docker/containers"><%- end -%>
|
||||
<span style="font-size: 2rem; color: #2dce89;"><%=self.containers_running%></span>
|
||||
<span style="font-size: 1rem; color: #8898aa !important;">/<%=self.containers_total%></span>
|
||||
<%- if self.containers_total ~= "-" then -%></a><%- end -%>
|
||||
@ -161,7 +161,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
|
||||
<div class="pure-u-3-5">
|
||||
<h4 style="text-align: right; font-size: 1rem"><%:Images%></h4>
|
||||
<h4 style="text-align: right;">
|
||||
<%- if self.images_total ~= "-" then -%><a href="/cgi-bin/luci/admin/docker/images"><%- end -%>
|
||||
<%- if self.images_total ~= "-" then -%><a href="/cgi-bin/luci/admin/services/docker/images"><%- end -%>
|
||||
<span style="font-size: 2rem; color: #2dce89;"><%=self.images_total%></span>
|
||||
<!-- <span style="font-size: 1rem; color: #8898aa !important;">/<%=self.images_total%></span> -->
|
||||
<%- if self.images_total ~= "-" then -%></a><%- end -%>
|
||||
@ -193,7 +193,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
|
||||
<div class="pure-u-3-5">
|
||||
<h4 style="text-align: right; font-size: 1rem"><%:Networks%></h4>
|
||||
<h4 style="text-align: right;">
|
||||
<%- if self.networks_total ~= "-" then -%><a href="/cgi-bin/luci/admin/docker/networks"><%- end -%>
|
||||
<%- if self.networks_total ~= "-" then -%><a href="/cgi-bin/luci/admin/services/docker/networks"><%- end -%>
|
||||
<span style="font-size: 2rem; color: #2dce89;"><%=self.networks_total%></span>
|
||||
<!-- <span style="font-size: 1rem; color: #8898aa !important;">/20</span> -->
|
||||
<%- if self.networks_total ~= "-" then -%></a><%- end -%>
|
||||
@ -270,7 +270,7 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
|
||||
<div class="pure-u-3-5">
|
||||
<h4 style="text-align: right; font-size: 1rem"><%:Volumes%></h4>
|
||||
<h4 style="text-align: right;">
|
||||
<%- if self.volumes_total ~= "-" then -%><a href="/cgi-bin/luci/admin/docker/volumes"><%- end -%>
|
||||
<%- if self.volumes_total ~= "-" then -%><a href="/cgi-bin/luci/admin/services/docker/volumes"><%- end -%>
|
||||
<span style="font-size: 2rem; color: #2dce89;"><%=self.volumes_total%></span>
|
||||
<!-- <span style="font-size: 1rem; color: #8898aa !important;">/20</span> -->
|
||||
<%- if self.volumes_total ~= "-" then -%></a><%- end -%>
|
||||
@ -278,4 +278,4 @@ https://github.com/pure-css/pure/blob/master/LICENSE.md
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -72,7 +72,7 @@
|
||||
let reg_rem =/`#.+`/g// the command has `# `
|
||||
cmd_line = cmd_line.replace(reg_rem, " ").replace(reg_muti_line, " ").replace(reg_space, " ")
|
||||
console.log(cmd_line)
|
||||
window.location.href = "/cgi-bin/luci/admin/docker/newcontainer/" + encodeURI(cmd_line)
|
||||
window.location.href = "/cgi-bin/luci/admin/services/docker/newcontainer/" + encodeURI(cmd_line)
|
||||
}
|
||||
|
||||
function clear_text(){
|
||||
@ -91,4 +91,4 @@
|
||||
<%+cbi/valueheader%>
|
||||
<input type="button" class="cbi-button cbi-button-apply" value="<%:Command line%>" onclick="show_reslov_dialog()" />
|
||||
|
||||
<%+cbi/valuefooter%>
|
||||
<%+cbi/valuefooter%>
|
||||
|
@ -22,7 +22,7 @@
|
||||
return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
|
||||
}
|
||||
|
||||
XHR.poll(5, '/cgi-bin/luci/admin/docker/container_stats/<%=self.container_id%>', { status: 1 },
|
||||
XHR.poll(5, '/cgi-bin/luci/admin/services/docker/container_stats/<%=self.container_id%>', { status: 1 },
|
||||
function (x, info) {
|
||||
var e;
|
||||
|
||||
@ -57,4 +57,4 @@
|
||||
}
|
||||
|
||||
});
|
||||
//]]></script>
|
||||
//]]></script>
|
||||
|
@ -2,4 +2,4 @@ config section 'local'
|
||||
option socket_path '/var/run/docker.sock'
|
||||
option status_path '/tmp/.docker_action_status'
|
||||
option debug_path '/tmp/.docker_debug'
|
||||
option debug 'false'
|
||||
option debug 'false'
|
||||
|
25
package/ctcgfw/luci-app-dockerman/root/etc/docker-init
Executable file
25
package/ctcgfw/luci-app-dockerman/root/etc/docker-init
Executable file
@ -0,0 +1,25 @@
|
||||
#!/bin/sh
|
||||
dtype=`fdisk -l /dev/sda | grep 'Disklabel type' | awk '{print $3}'`
|
||||
partid="0"
|
||||
|
||||
if [ "$dtype" = "gpt" ]
|
||||
then
|
||||
partid=`echo "n
|
||||
|
||||
|
||||
|
||||
w
|
||||
" | fdisk /dev/sda | grep 'Created a new partition' | awk '{print $5}'`
|
||||
|
||||
elif [ "$dtype" = "dos" ]
|
||||
then
|
||||
partid=`echo "n
|
||||
p
|
||||
|
||||
|
||||
|
||||
w
|
||||
" | fdisk /dev/sda | grep 'Created a new partition' | awk '{print $5}'`
|
||||
fi
|
||||
|
||||
echo "y" | mkfs.ext4 /dev/sda$partid
|
@ -10,7 +10,6 @@ include $(TOPDIR)/rules.mk
|
||||
PKG_NAME:=v2ray-plugin
|
||||
PKG_VERSION:=1.3.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_MAINTAINER:=ShareMax
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/v2ray-plugin-$(PKG_VERSION)
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
@ -22,7 +21,7 @@ PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_MAINTAINER:=madeye <max.c.lv@gmail.com>
|
||||
|
||||
GO_PKG:=github.com/shadowsocks/v2ray-plugin
|
||||
|
||||
GO_PKG_LDFLAGS:=-s -w
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(TOPDIR)/feeds/packages/lang/golang/golang-package.mk
|
||||
|
44
package/kernel/antfs/Makefile
Normal file
44
package/kernel/antfs/Makefile
Normal file
@ -0,0 +1,44 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=antfs
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_URL:=https://github.com/klukonin/antfs.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_DATE:=2020-02-10
|
||||
PKG_SOURCE_VERSION:=b41ba529f6b64b429527e09a06ce0326d5456c05
|
||||
PKG_MIRROR_HASH:=dae039c0fe5bf1a2c8c1cca4211d607a4d6f56fc41b38444e2234b40d710d9db
|
||||
|
||||
PKG_LICENSE:=GPL-2.0-only
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/fs-antfs
|
||||
SUBMENU:=Filesystems
|
||||
TITLE:=AVM NTFS Read/Write Driver
|
||||
FILES:=$(PKG_BUILD_DIR)/antfs.ko
|
||||
AUTOLOAD:=$(call AutoLoad,30,antfs,1)
|
||||
DEPENDS:=+kmod-nls-base
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-antfs/description
|
||||
Kernel module for NTFS Filesytem
|
||||
endef
|
||||
|
||||
MAKE_OPTS:= \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
CROSS_COMPILE="$(TARGET_CROSS)" \
|
||||
M="$(PKG_BUILD_DIR)"
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C "$(LINUX_DIR)" \
|
||||
$(MAKE_OPTS) \
|
||||
CONFIG_ANTFS_FS=m \
|
||||
CONFIG_ANTFS_SYMLINKS=y \
|
||||
ANTFS_VERSION=07.19-$(call version_abbrev,$(PKG_SOURCE_VERSION)) \
|
||||
modules
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-antfs))
|
Loading…
x
Reference in New Issue
Block a user