small-package/luci-app-ubuntu/luasrc/view/ubuntu/main.htm

36 lines
1.0 KiB
HTML

<%+header%>
<%+tasks/embed%>
<script>
(function(){
})();
</script>
<div id="app">
</div>
<script>
window.IstoreosFormConfig = {
getApi:"/cgi-bin/luci/admin/services/ubuntu/form/",
logApi:"/cgi-bin/luci/admin/services/ubuntu/log",
submitApi:"/cgi-bin/luci/admin/services/ubuntu/submit",
getHook:function(resp){
var c1 = resp.result.schema.containers[0];
if (resp.result.data.container_install) {
c1.labels[1].value = '<a href="https://'+location.host+':'+resp.result.data.port+'" target="_blank">Ubuntu 桌面链接</a>';
} else {
c1.labels[1].value = "安装并运行之后,才能用网页访问";
}
// console.log("resp=", data);
return resp;
},
submitHook:function(params){
return params;
}
}
</script>
<script type="module" crossorigin src="/luci-static/iform/1.1/index.js?v=<%=math.random(1,100000)%>"></script>
<link rel="stylesheet" href="/luci-static/iform/1.1/style.css?v=<%=math.random(1,100000)%>">
<%+footer%>