Clicking on the logo now forces a schedule update on the backend. This is temporary until I can get adding recordings to be done through the UI

This commit is contained in:
Jeff Lamb 2017-03-06 18:16:31 -05:00
parent b7483ec6b3
commit 3c23769504
3 changed files with 23 additions and 1 deletions

View File

@ -455,6 +455,14 @@ public class RcrdIt extends ResourceConfig implements AutoCloseable {
return new GetScheduleResponse(scheduleRequest,channelList);
}
@POST
@Path("refreshAutoRecs")
//List<Channel>
public void refreshAutoRecs() {
timer.schedule(new AutoRecTask(), 0);
}
/* @GET
@Path("getSchedule")
@Produces(MediaType.APPLICATION_JSON)

View File

@ -27,7 +27,7 @@
</head>
<body>
<div id='rcrditHeader'>
<img src="images/rcrditx128.png" alt='logo'/>
<a href="javascript:forceScheduleUpdate();"><img src="images/rcrditx128.png" alt='logo'/></a>
</div>
<div id="guideGoesHere" style='width: 90%'>

View File

@ -18,6 +18,20 @@ function padToTwoDigits(ss){
return ss;
}
function forceScheduleUpdate(){
$.ajax({
url: 'rest/refreshAutoRecs',
type: 'post',
success: function (data) {
alert("Refresh Scheduled");
},
error: function ( jqXHR, textStatus, errorThrown ){
alert(errorThrown);
}
});
}
function getSchedule2(requestObject){
if(isNull(requestObject)){