修改dashboard和terminal页面支持code-server

This commit is contained in:
lwch
2022-07-27 16:45:36 +08:00
parent 58438e3872
commit f1a2dbcf13
2 changed files with 3 additions and 6 deletions
+1 -5
View File
@@ -36,13 +36,9 @@ var page = {
});
var op = '';
switch (rule.type) {
case 'reverse':
op = `
<a href="http://${location.hostname}:${rule.port}" target="_blank">http</a>
<a href="https://${location.hostname}:${rule.port}" target="_blank">https</a>`;
break;
case 'shell':
case 'vnc':
case 'code-server':
op = `<a href="http://${location.host}/terminal.html?name=${rule.name}" target="_blank">连接</a>`;
break;
}
+2 -1
View File
@@ -15,7 +15,8 @@ var page = {
$('#terms').empty();
$.each(ret, function(_, rule) {
if (rule.type != 'shell' &&
rule.type != 'vnc') {
rule.type != 'vnc' &&
rule.type != 'code-server') {
return;
}
$('#terms').append($(`<option value="${rule.port}">${rule.name}</option>`));