Authored by zhengyouwei

add refresh

... ... @@ -178,4 +178,15 @@ public class PhpBuildCtrl {
}
}
@RequestMapping(value = "refreshGit", method = RequestMethod.POST)
@ResponseBody
public String refreshGit() {
try {
return httpRestClient.get(URL + "refreshGit", String.class, null);
} catch (Exception ex) {
return "failed";
}
}
}
... ...
... ... @@ -54,7 +54,7 @@
</div>
</div>
<div id="autotest-div">
<input type="button" class="btn btn-primary" id="autotest-button" onclick="autotest()" value="执行自动测试用例" </input>
<input type="button" class="btn btn-primary" id="autotest-button" onclick="refresh()" value="刷新列表"> </input>
</div>
</div>
... ...
... ... @@ -226,6 +226,22 @@ function branchdefault() {
}
}
function refresh(){
$.ajax({
url: 'refreshGit',
type: 'POST',
dataType: 'json',
success: function (data) {
alert("刷新成功");
},
error: function (e) {
alert("刷新失败");
}
});
}
... ...