This commit is contained in:
Michele Artini 2022-12-02 11:10:15 +01:00
parent 066e0ca73c
commit 3aa5acd740
3 changed files with 9 additions and 4 deletions

View File

@ -3,6 +3,7 @@ package eu.dnetlib.is;
import java.util.Optional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
@ -30,6 +31,9 @@ public class MainController {
@Autowired
private ResourceTypeRepository resourceTypeRepository;
@Value("${logging.file.name:not specified}")
private String logFile;
@GetMapping("/main")
public void mainPage() {}
@ -78,7 +82,7 @@ public class MainController {
}
@GetMapping("/info")
public void wfHistory(final ModelMap map) throws Exception {}
public void wfHistory() throws Exception {}
@ModelAttribute("resTypes")
public Iterable<ResourceType> resourceTypes() {

View File

@ -30,9 +30,11 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import eu.dnetlib.common.controller.AbstractDnetController;
@RestController
@RequestMapping("/api/info")
public class InfoRestController {
public class InfoRestController extends AbstractDnetController {
@Autowired
private ConfigurableEnvironment configurableEnvironment;

View File

@ -57,7 +57,6 @@
app.controller('infoController', function($scope, $http) {
$scope.info = [];
$scope.modules = {};
$http.get('./api/info/?' + $.now()).then(function successCallback(res) {
angular.forEach(res.data, function(section) {
@ -71,7 +70,7 @@
});
$scope.info = res.data;
}, function errorCallback(res) {
alert('ERROR: ' + res.data.message);
alert('ERROR: ' + res.data.message);
});
});
</script>