mirror of
https://gitee.com/huoyo/ko-time.git
synced 2025-12-07 01:08:26 +08:00
add clearData
This commit is contained in:
parent
ff060fd96e
commit
df8fca7750
@ -334,4 +334,13 @@ public class KoTimeController {
|
|||||||
PhysicalMemoryInfo physicalMemoryInfo = usageService.getPhysicalMemoryInfo();
|
PhysicalMemoryInfo physicalMemoryInfo = usageService.getPhysicalMemoryInfo();
|
||||||
return physicalMemoryInfo;
|
return physicalMemoryInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/clearData")
|
||||||
|
@ResponseBody
|
||||||
|
@Auth
|
||||||
|
public boolean clearData() {
|
||||||
|
GraphService graphService = GraphService.getInstance();
|
||||||
|
graphService.clearAll();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -386,6 +386,11 @@
|
|||||||
$.ajax({type:'POST',url:'contextPath/koTime/updateConfig?token='+globalToken,data:JSON.stringify({threshold:document.getElementById('timeThreshold').value}),dataType:'json', headers: {'Content-Type': 'application/json' }});
|
$.ajax({type:'POST',url:'contextPath/koTime/updateConfig?token='+globalToken,data:JSON.stringify({threshold:document.getElementById('timeThreshold').value}),dataType:'json', headers: {'Content-Type': 'application/json' }});
|
||||||
UIkit.notification("<font color='green'>OK</font>",{});
|
UIkit.notification("<font color='green'>OK</font>",{});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
document.getElementById("clearDataYes").onclick = function(){
|
||||||
|
$.ajax({type:'POST',url:'contextPath/koTime/clearData?token='+globalToken,dataType:'json', headers: {'Content-Type': 'application/json' }});
|
||||||
|
UIkit.notification("<font color='green'>OK</font>",{});
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadStatistic() {
|
function loadStatistic() {
|
||||||
@ -660,7 +665,10 @@
|
|||||||
<option value="english">English</option>
|
<option value="english">English</option>
|
||||||
</select>
|
</select>
|
||||||
<br>
|
<br>
|
||||||
<label >time threshold:</label> <input id='timeThreshold' type="input"><button id="timeThresholdYes">OK</button>
|
<label >time threshold:</label> <input id='timeThreshold' type="input"><button style="background-color: #177ce1;border: 1px solid #177ce1;cursor: pointer;color: white" id="timeThresholdYes">OK</button>
|
||||||
|
<br>
|
||||||
|
<label >clear data:</label><button style="background-color: #177ce1;border: 1px solid #177ce1;cursor: pointer;color: white" id="clearDataYes">OK</button>
|
||||||
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<div class="uk-alert-success" uk-alert>
|
<div class="uk-alert-success" uk-alert>
|
||||||
|
|||||||
@ -150,6 +150,10 @@
|
|||||||
$.ajax({type:'POST',url:'contextPath/koTime/updateConfig?token='+globalToken,data:JSON.stringify({threshold:document.getElementById('timeThreshold').value}),dataType:'json', headers: {'Content-Type': 'application/json' }});
|
$.ajax({type:'POST',url:'contextPath/koTime/updateConfig?token='+globalToken,data:JSON.stringify({threshold:document.getElementById('timeThreshold').value}),dataType:'json', headers: {'Content-Type': 'application/json' }});
|
||||||
UIkit.notification("<font color='green'>设置成功</font>",{});
|
UIkit.notification("<font color='green'>设置成功</font>",{});
|
||||||
};
|
};
|
||||||
|
document.getElementById("clearDataYes").onclick = function(){
|
||||||
|
$.ajax({type:'POST',url:'contextPath/koTime/clearData?token='+globalToken,dataType:'json', headers: {'Content-Type': 'application/json' }});
|
||||||
|
UIkit.notification("<font color='green'>清除成功</font>",{});
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
function loadConfig() {
|
function loadConfig() {
|
||||||
@ -653,7 +657,9 @@
|
|||||||
<option value="english">英文</option>
|
<option value="english">英文</option>
|
||||||
</select>
|
</select>
|
||||||
<br>
|
<br>
|
||||||
<label >方法运行时间阈值:</label> <input id='timeThreshold' type="input"><button id="timeThresholdYes">确认</button>
|
<label >方法运行时间阈值:</label> <input id='timeThreshold' type="input"><button style="background-color: #177ce1;border: 1px solid #177ce1;cursor: pointer;color: white" id="timeThresholdYes">确认</button>
|
||||||
|
<br>
|
||||||
|
<label >清空链路数据:</label><button style="background-color: #177ce1;border: 1px solid #177ce1;cursor: pointer;color: white" id="clearDataYes">确认</button>
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
<div class="uk-alert-success" uk-alert>
|
<div class="uk-alert-success" uk-alert>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user