Commit 779bba27 authored by Jie Yuan's avatar Jie Yuan
Browse files

add eosc endpoints and logs

parent f6e5c8ca
......@@ -104,7 +104,7 @@ public class SiteEndpoint {
/**
* This returns a JSON with all the GOCDB sites
* This returns a JSON with all the EOSC sites
* @return
*/
@RequestMapping(value="/eosc/all", method=GET)
......@@ -232,7 +232,7 @@ public class SiteEndpoint {
**/
@GetMapping("/briefreport/dpmt/all")
public List<BriefSiteResponse> getAllDPMTSiteBriefReport(){
log.info("Detected endpoint /sites/briefreport/dpmt/all at {}",dateFormat.format(new Date()));
Iterable<Site> allSites = this.getAllDPMTSites();
List<BriefSiteResponse> res = new ArrayList<>();
for ( Site tmp: allSites ) {
......@@ -302,7 +302,7 @@ public class SiteEndpoint {
**/
@GetMapping("/briefreport/gocdb/all")
public List<BriefSiteResponse> getAllGOCDBSiteBriefReport(){
log.info("Detected endpoint /sites/briefreport/gocdb/all at {}",dateFormat.format(new Date()));
Iterable<Site> allSites = this.getAllGOCDBSites();
List<BriefSiteResponse> res = new ArrayList();
for ( Site tmp: allSites ) {
......@@ -316,6 +316,31 @@ public class SiteEndpoint {
return res;
}
/**
*
* get brief reports of all sites
*
* jie.yuan@kit.edu
*
**/
@GetMapping("/briefreport/eosc/all")
public List<BriefSiteResponse> getAllEOSCSiteBriefReport(){
log.info("Detected endpoint /sites/remoteSites/gocdb/detailled/all for fetchAllSitesDetailedFromGOCDB() at {}",dateFormat.format(new Date()));
Iterable<Site> allSites = this.getAllGOCDBSites();
List<BriefSiteResponse> res = new ArrayList();
for ( Site tmp: allSites ) {
if (tmp.getScopeList().isEmpty() == false && tmp.getScopeList().contains("cms")) {
BriefSiteResponse report = new BriefSiteResponse(tmp);
res.add(report);
}
}
if ( res.isEmpty() == true) {
return null;
}
return res;
}
@GetMapping("/briefreport/gocdb/{startNo}/{endNo}")
public List<BriefSiteResponse> getAllGOCDBSiteBriefReportWithNumber(@PathVariable("startNo") final int startNo, @PathVariable("endNo") final int endNo ){
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment