update ubuntu

This commit is contained in:
YGAS 2022-02-15 16:12:36 +08:00
parent 992fc91360
commit 1ffd8e5270
2 changed files with 11 additions and 9 deletions

View File

@ -7,21 +7,23 @@
if (st.docker_start){ if (st.docker_start){
if (st.container_install) { if (st.container_install) {
if (st.container_running) { if (st.container_running) {
tb.innerHTML += '<br/><em><%:The ubuntu service is running.%></em>'; var htmlStr = '<br/><em><%:The ubuntu service is running.%></em>';
var configs = [ var configs = [
{id: "userName", label: "<%:UserName%>:", value: st.user_name}, {id: "userName", label: "<%:UserName%>:", value: st.user_name},
{id: "password", label: "<%:Password%>:", value: st.password}, {id: "password", label: "<%:Password%>:", value: st.password},
{id: "localAddress", label: "<%:Local Address%>:", value: st.local_address}, {id: "localAddress", label: "<%:LanAddress%>:", value: st.local_address},
{id: "publicAddress", label: "<%:Public Address%>:", value: st.public_address}, {id: "publicAddress", label: "<%:WanAddress%>:", value: st.public_address},
]; ];
configs.forEach(function(c){ configs.forEach(function(c){
tb.innerHTML += ("<div class=\"cbi-value\"><label class=\"cbi-value-title\" for=\"" + c.id + "\">" + c.label + "</label>" htmlStr += ("<div class=\"cbi-value\"><label class=\"cbi-value-title\" for=\"" + c.id + "\">" + c.label + "</label>"
+ "<div><label class=\"cbi-value-title\" id=\"" + c.id + "\"/>" + c.value + "</label></div></div>"); + "<div><label class=\"cbi-value-title\" id=\"" + c.id + "\"/>" + c.value + "</label></div></div>");
}); });
tb.innerHTML += "<br/><br/><input class=\"btn cbi-button cbi-button-apply\" type=\"button\" value=\" <%:open ubuntu%> \" onclick=\"open_container('" + st.container_port + "')\" />"; htmlStr += "<br/><br/><input class=\"btn cbi-button cbi-button-apply\" type=\"button\" value=\" <%:open ubuntu%> \" onclick=\"open_container('" + st.container_port + "')\" />";
tb.innerHTML += "<input class=\"btn cbi-button cbi-button-apply\" type=\"button\" value=\" <%:stop ubuntu%> \" onclick=\"stop_container('" + st.container_id + "')\" /><br/><br/>"; htmlStr+= "<input class=\"btn cbi-button cbi-button-apply\" type=\"button\" value=\" <%:stop ubuntu%> \" onclick=\"stop_container('" + st.container_id + "')\" /><br/><br/>";
tb.innerHTML = htmlStr;
} }
else { else {
tb.innerHTML = '<br/><em><%:The ubuntu service is not running.%></em>' tb.innerHTML = '<br/><em><%:The ubuntu service is not running.%></em>'

View File

@ -55,8 +55,8 @@ msgstr "用户名"
msgid "Password" msgid "Password"
msgstr "密码" msgstr "密码"
msgid "LocalAddress" msgid "LanAddress"
msgstr "内网地址" msgstr "内网地址"
msgid "PublicAddress" msgid "WanAddress"
msgstr "外网地址" msgstr "外网地址"