This commit is contained in:
dami
2025-08-01 19:17:14 +08:00
parent 2a6ef8853d
commit 91a9788706
2 changed files with 9 additions and 5 deletions
+5
View File
@@ -191,6 +191,9 @@ def initdUinstall():
def runLog():
return getServerDir() + "/data/log/grafana.log"
def grafanaUrl():
ip = mw.getLocalIp()
return 'https://'+ip+':'+"3000"
def installPreInspection():
return 'ok'
@@ -226,5 +229,7 @@ if __name__ == "__main__":
print(getConf())
elif func == 'run_log':
print(runLog())
elif func == 'grafana_url':
print(grafanaUrl())
else:
print('error')
+4 -5
View File
@@ -55,17 +55,16 @@ function gPostCallbak(method, version, args,callback){
function gCommonFunc(){
var con = '<hr/><p class="conf_p" style="text-align:center;">\
<button id="mtproxy_url" class="btn btn-default btn-sm">获取连接地址</button>\
<button id="grafana_url" class="btn btn-default btn-sm">获取连接地址</button>\
</p>';
$(".soft-man-con").html(con);
$('#mtproxy_url').click(function(){
mtPost('url', '', {}, function(rdata){
$('#grafana_url').click(function(){
gPost('grafana_url', '', {}, function(rdata){
var data = $.parseJSON(rdata.data);
layer.open({
title: "mtproxy代理信息",
title: "Grafana连接",
area: ['600px', '180px'],
type:1,
closeBtn: 1,