updated views
This commit is contained in:
parent
98b59cd0d5
commit
5523ab8657
|
@ -11,6 +11,7 @@ import org.springframework.security.core.Authentication;
|
|||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
|
@ -30,6 +31,9 @@ public class HomeController extends AbstractDnetController {
|
|||
@Autowired
|
||||
private SystemConfigurationRepository systemConfigurationRepository;
|
||||
|
||||
@Value("${openaire.explore.organization.baseurl}")
|
||||
private String openaireBaseUrl;
|
||||
|
||||
@Value("${openorgs.support.pages}")
|
||||
private String supportPagesJson;
|
||||
|
||||
|
@ -40,6 +44,11 @@ public class HomeController extends AbstractDnetController {
|
|||
return env.acceptsProfiles(Profiles.of("dev")) ? "redirect:main" : "home";
|
||||
}
|
||||
|
||||
@GetMapping("/redirect/oa/{orgId}")
|
||||
public String openaireUrl(@PathVariable final String orgId) {
|
||||
return "redirect:" + String.format(openaireBaseUrl, orgId);
|
||||
}
|
||||
|
||||
@GetMapping("/main")
|
||||
public String main() {
|
||||
return "main";
|
||||
|
|
|
@ -9,9 +9,6 @@ public abstract class OpenaireGraphNode {
|
|||
@Column(name = "openaire_id")
|
||||
private String openaireId;
|
||||
|
||||
@Column(name = "openaire_url")
|
||||
private String openaireUrl;
|
||||
|
||||
@Column(name = "openaire_persistent")
|
||||
private Boolean persistent = false;
|
||||
|
||||
|
@ -23,14 +20,6 @@ public abstract class OpenaireGraphNode {
|
|||
this.openaireId = openaireId;
|
||||
}
|
||||
|
||||
public String getOpenaireUrl() {
|
||||
return openaireUrl;
|
||||
}
|
||||
|
||||
public void setOpenaireUrl(final String openaireUrl) {
|
||||
this.openaireUrl = openaireUrl;
|
||||
}
|
||||
|
||||
public Boolean getPersistent() {
|
||||
return persistent;
|
||||
}
|
||||
|
|
|
@ -50,3 +50,5 @@ openaire.api.https.proxy = 10.19.65.35
|
|||
openorgs.support.pages = { "Ask a question": "https://www.openaire.eu/support/helpdesk?view=ticket&layout=open", "FAQ": "https://www.openaire.eu/faqs" }
|
||||
|
||||
openaire.override.logout.url =
|
||||
|
||||
openaire.explore.organization.baseurl = https://explore.openaire.eu/search/organization?organizationId=%s
|
||||
|
|
|
@ -473,7 +473,6 @@ CREATE VIEW oa_duplicates_view AS
|
|||
o.ec_smevalidated,
|
||||
o.ec_nutscode,
|
||||
substr(d.oa_original_id, 1, 14)||md5(substr(d.oa_original_id, 15)) as openaire_id,
|
||||
'https://explore.openaire.eu/search/organization?organizationId='||substr(d.oa_original_id, 1, 14)||md5(substr(d.oa_original_id, 15)) as openaire_url,
|
||||
false as openaire_persistent
|
||||
FROM
|
||||
oa_duplicates d
|
||||
|
@ -575,7 +574,6 @@ CREATE VIEW organizations_info_view AS SELECT
|
|||
org.modified_by,
|
||||
org.modification_date,
|
||||
substr(org.id, 1, 14)||md5(substr(org.id, 15)) as openaire_id,
|
||||
'https://explore.openaire.eu/search/organization?organizationId='||substr(org.id, 1, 14)||md5(substr(org.id, 15)) as openaire_url,
|
||||
count(po.id) > 0 as openaire_persistent,
|
||||
count(DISTINCT d.oa_original_id) as n_duplicates,
|
||||
count(DISTINCT c.id2) as n_conflicts,
|
||||
|
@ -691,7 +689,6 @@ ORDER BY o.name;
|
|||
CREATE VIEW persistent_orgs_view AS SELECT
|
||||
po.id,
|
||||
substr(po.id, 1, 14)||md5(substr(po.id,15)) as openaire_id,
|
||||
'https://explore.openaire.eu/search/organization?organizationId='||substr(po.id, 1, 14)||md5(substr(po.id, 15)) as openaire_url,
|
||||
true as openaire_persistent,
|
||||
o.name,
|
||||
o.city,
|
||||
|
|
|
@ -6,7 +6,9 @@
|
|||
<b>ID: </b>{{info.id}}<br />
|
||||
<b>Created at</b> {{info.creationDate | date:'MMMM d, y HH:mm:ss'}} <b>by</b> {{info.createdBy}}<br />
|
||||
<b>Modified at</b> {{info.modificationDate | date:'MMMM d, y HH:mm:ss'}} <b>by</b> {{info.modifiedBy}}<br />
|
||||
<b>OA Graph Node ID: </b> {{info.openaireId}} <a href="{{info.openaireUrl}}" target="_blank">[try on OA Explore]</a><br/>
|
||||
<b>OA Graph Node ID: </b> {{info.openaireId}} <a href="/redirect/oa/{{info.openaireId}}" target="_blank">[try on OA Explore]</a>
|
||||
<span class="badge badge-info" title="It is probably related to an Institutional Dashboard" ng-show="info.persistent">persistent</span>
|
||||
<br/>
|
||||
</p>
|
||||
|
||||
<div class="card">
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
<td class="col-2 text-center small"><img ng-src="resources/images/flags/{{sr.oaCountry}}.gif" /> {{sr.oaCountry}}</td>
|
||||
<td class="col-3 small">
|
||||
<b>Original Id:</b> <span class="text-monospace">{{sr.oaOriginalId}}</span><br />
|
||||
<b>OA Graph Node ID: </b> <span class="text-monospace">{{sr.openaireId}}</span> <a href="{{sr.openaireUrl}}" target="_blank">[try]</a>
|
||||
<b>OA Graph Node ID: </b> <span class="text-monospace">{{sr.openaireId}}</span> <a href="/redirect/oa/{{sr.openaireId}}" target="_blank">[try]</a>
|
||||
<span ng-if="sr.oaCollectedFrom"><br /><b>Provenance:</b> {{sr.oaCollectedFrom}}</span>
|
||||
<span ng-if="sr.createdBy && sr.createdBy != 'dedupWf'"><br /><b>Added by:</b> {{sr.createdBy}}</span>
|
||||
</td>
|
||||
|
|
Loading…
Reference in New Issue