Revision 57674
Added by Michele Artini over 4 years ago
modules/dnet-orgs-database-application/trunk/src/main/java/eu/dnetlib/organizations/repository/readonly/OrganizationInfoViewRepository.java | ||
---|---|---|
1 |
package eu.dnetlib.organizations.repository.readonly; |
|
2 |
|
|
3 |
import org.springframework.stereotype.Repository; |
|
4 |
|
|
5 |
import eu.dnetlib.organizations.model.view.OrganizationInfoView; |
|
6 |
|
|
7 |
@Repository |
|
8 |
public interface OrganizationInfoViewRepository extends ReadOnlyRepository<OrganizationInfoView, String> { |
|
9 |
|
|
10 |
} |
modules/dnet-orgs-database-application/trunk/src/main/java/eu/dnetlib/organizations/model/view/OrganizationView.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.organizations.model.view; |
2 | 2 |
|
3 | 3 |
import java.io.Serializable; |
4 |
import java.time.OffsetDateTime; |
|
5 | 4 |
import java.util.Set; |
6 | 5 |
|
7 | 6 |
import javax.persistence.Column; |
... | ... | |
51 | 50 |
@Column(name = "country") |
52 | 51 |
private String country; |
53 | 52 |
|
54 |
@Column(name = "created_by") |
|
55 |
private String createdBy; |
|
56 |
|
|
57 |
@Column(name = "creation_date") |
|
58 |
private OffsetDateTime creationDate; |
|
59 |
|
|
60 |
@Column(name = "modified_by") |
|
61 |
private String modifiedBy; |
|
62 |
|
|
63 |
@Column(name = "modification_date") |
|
64 |
private OffsetDateTime modificationDate; |
|
65 |
|
|
66 | 53 |
@Type(type = "jsonb") |
67 | 54 |
@Column(name = "other_ids", columnDefinition = "jsonb") |
68 | 55 |
private Set<OtherIdentifier> otherIdentifiers; |
... | ... | |
135 | 122 |
this.country = country; |
136 | 123 |
} |
137 | 124 |
|
138 |
public String getCreatedBy() { |
|
139 |
return createdBy; |
|
140 |
} |
|
141 |
|
|
142 |
public void setCreatedBy(final String createdBy) { |
|
143 |
this.createdBy = createdBy; |
|
144 |
} |
|
145 |
|
|
146 |
public OffsetDateTime getCreationDate() { |
|
147 |
return creationDate; |
|
148 |
} |
|
149 |
|
|
150 |
public void setCreationDate(final OffsetDateTime creationDate) { |
|
151 |
this.creationDate = creationDate; |
|
152 |
} |
|
153 |
|
|
154 |
public String getModifiedBy() { |
|
155 |
return modifiedBy; |
|
156 |
} |
|
157 |
|
|
158 |
public void setModifiedBy(final String modifiedBy) { |
|
159 |
this.modifiedBy = modifiedBy; |
|
160 |
} |
|
161 |
|
|
162 |
public OffsetDateTime getModificationDate() { |
|
163 |
return modificationDate; |
|
164 |
} |
|
165 |
|
|
166 |
public void setModificationDate(final OffsetDateTime modificationDate) { |
|
167 |
this.modificationDate = modificationDate; |
|
168 |
} |
|
169 |
|
|
170 | 125 |
public Set<OtherIdentifier> getOtherIdentifiers() { |
171 | 126 |
return otherIdentifiers; |
172 | 127 |
} |
modules/dnet-orgs-database-application/trunk/src/main/java/eu/dnetlib/organizations/model/view/OrganizationInfoView.java | ||
---|---|---|
1 |
package eu.dnetlib.organizations.model.view; |
|
2 |
|
|
3 |
import java.io.Serializable; |
|
4 |
import java.time.OffsetDateTime; |
|
5 |
|
|
6 |
import javax.persistence.Column; |
|
7 |
import javax.persistence.Entity; |
|
8 |
import javax.persistence.Id; |
|
9 |
import javax.persistence.Table; |
|
10 |
|
|
11 |
@Entity |
|
12 |
@Table(name = "organizations_info_view") |
|
13 |
public class OrganizationInfoView implements Serializable { |
|
14 |
|
|
15 |
/** |
|
16 |
* |
|
17 |
*/ |
|
18 |
private static final long serialVersionUID = -6077637367923773598L; |
|
19 |
|
|
20 |
@Id |
|
21 |
@Column(name = "id") |
|
22 |
private String id; |
|
23 |
|
|
24 |
@Column(name = "created_by") |
|
25 |
private String createdBy; |
|
26 |
|
|
27 |
@Column(name = "creation_date") |
|
28 |
private OffsetDateTime creationDate; |
|
29 |
|
|
30 |
@Column(name = "modified_by") |
|
31 |
private String modifiedBy; |
|
32 |
|
|
33 |
@Column(name = "modification_date") |
|
34 |
private OffsetDateTime modificationDate; |
|
35 |
|
|
36 |
@Column(name = "n_rels") |
|
37 |
private long nRels; |
|
38 |
|
|
39 |
@Column(name = "n_enrichments") |
|
40 |
private long nEnrichments; |
|
41 |
|
|
42 |
@Column(name = "n_conflicts") |
|
43 |
private long nConflicts; |
|
44 |
|
|
45 |
public String getId() { |
|
46 |
return id; |
|
47 |
} |
|
48 |
|
|
49 |
public void setId(final String id) { |
|
50 |
this.id = id; |
|
51 |
} |
|
52 |
|
|
53 |
public String getCreatedBy() { |
|
54 |
return createdBy; |
|
55 |
} |
|
56 |
|
|
57 |
public void setCreatedBy(final String createdBy) { |
|
58 |
this.createdBy = createdBy; |
|
59 |
} |
|
60 |
|
|
61 |
public OffsetDateTime getCreationDate() { |
|
62 |
return creationDate; |
|
63 |
} |
|
64 |
|
|
65 |
public void setCreationDate(final OffsetDateTime creationDate) { |
|
66 |
this.creationDate = creationDate; |
|
67 |
} |
|
68 |
|
|
69 |
public String getModifiedBy() { |
|
70 |
return modifiedBy; |
|
71 |
} |
|
72 |
|
|
73 |
public void setModifiedBy(final String modifiedBy) { |
|
74 |
this.modifiedBy = modifiedBy; |
|
75 |
} |
|
76 |
|
|
77 |
public OffsetDateTime getModificationDate() { |
|
78 |
return modificationDate; |
|
79 |
} |
|
80 |
|
|
81 |
public void setModificationDate(final OffsetDateTime modificationDate) { |
|
82 |
this.modificationDate = modificationDate; |
|
83 |
} |
|
84 |
|
|
85 |
public long getnRels() { |
|
86 |
return nRels; |
|
87 |
} |
|
88 |
|
|
89 |
public void setnRels(final long nRels) { |
|
90 |
this.nRels = nRels; |
|
91 |
} |
|
92 |
|
|
93 |
public long getnEnrichments() { |
|
94 |
return nEnrichments; |
|
95 |
} |
|
96 |
|
|
97 |
public void setnEnrichments(final long nEnrichments) { |
|
98 |
this.nEnrichments = nEnrichments; |
|
99 |
} |
|
100 |
|
|
101 |
public long getnConflicts() { |
|
102 |
return nConflicts; |
|
103 |
} |
|
104 |
|
|
105 |
public void setnConflicts(final long nConflicts) { |
|
106 |
this.nConflicts = nConflicts; |
|
107 |
} |
|
108 |
|
|
109 |
} |
modules/dnet-orgs-database-application/trunk/src/main/java/eu/dnetlib/organizations/controller/OrganizationController.java | ||
---|---|---|
26 | 26 |
import eu.dnetlib.organizations.model.utils.BrowseEntry; |
27 | 27 |
import eu.dnetlib.organizations.model.utils.RelationByOrg; |
28 | 28 |
import eu.dnetlib.organizations.model.view.ConflictView; |
29 |
import eu.dnetlib.organizations.model.view.OrganizationInfoView; |
|
29 | 30 |
import eu.dnetlib.organizations.model.view.OrganizationSimpleView; |
30 | 31 |
import eu.dnetlib.organizations.model.view.OrganizationView; |
31 | 32 |
import eu.dnetlib.organizations.repository.OpenaireSimRelRepository; |
32 | 33 |
import eu.dnetlib.organizations.repository.OrganizationRepository; |
33 | 34 |
import eu.dnetlib.organizations.repository.readonly.ConflictViewRepository; |
35 |
import eu.dnetlib.organizations.repository.readonly.OrganizationInfoViewRepository; |
|
34 | 36 |
import eu.dnetlib.organizations.repository.readonly.OrganizationSimpleViewRepository; |
35 | 37 |
import eu.dnetlib.organizations.repository.readonly.OrganizationViewRepository; |
36 | 38 |
import eu.dnetlib.organizations.utils.DatabaseUtils; |
... | ... | |
46 | 48 |
@Autowired |
47 | 49 |
private OrganizationViewRepository organizationViewRepository; |
48 | 50 |
@Autowired |
51 |
private OrganizationInfoViewRepository organizationInfoViewRepository; |
|
52 |
@Autowired |
|
49 | 53 |
private OrganizationSimpleViewRepository organizationSimpleViewRepository; |
50 | 54 |
@Autowired |
51 | 55 |
private OpenaireSimRelRepository openaireSimRelRepository; |
... | ... | |
70 | 74 |
} |
71 | 75 |
} |
72 | 76 |
|
77 |
@RequestMapping(value = "/info", method = RequestMethod.GET) |
|
78 |
public OrganizationInfoView infoById(@RequestParam final String id, final Authentication authentication) { |
|
79 |
return organizationInfoViewRepository.findById(id).get(); |
|
80 |
} |
|
81 |
|
|
73 | 82 |
@RequestMapping(value = "/get", method = RequestMethod.GET) |
74 | 83 |
public OrganizationView findById(@RequestParam final String id, final Authentication authentication) { |
75 | 84 |
final OrganizationView org = organizationViewRepository.findById(id).get(); |
modules/dnet-orgs-database-application/trunk/src/main/resources/sql/schema.sql | ||
---|---|---|
1 | 1 |
DROP VIEW organizations_view; |
2 |
DROP VIEW organizations_info_view; |
|
2 | 3 |
DROP VIEW organizations_simple_view; |
3 | 4 |
DROP VIEW users_view; |
4 | 5 |
DROP VIEW conflicts_view; |
... | ... | |
140 | 141 |
org.lng, |
141 | 142 |
org.city, |
142 | 143 |
org.country, |
143 |
org.created_by, |
|
144 |
org.creation_date, |
|
145 |
org.modified_by, |
|
146 |
org.modification_date, |
|
147 | 144 |
COALESCE(jsonb_agg(DISTINCT jsonb_build_object('id', oid.otherid, 'type', oid.type)) FILTER (WHERE oid.otherid IS NOT NULL), '[]') AS other_ids, |
148 | 145 |
COALESCE(jsonb_agg(DISTINCT jsonb_build_object('name', n.name, 'lang', n.lang)) FILTER (WHERE n.name IS NOT NULL), '[]') AS other_names, |
149 | 146 |
COALESCE(jsonb_agg(DISTINCT a.acronym) FILTER (WHERE a.acronym IS NOT NULL), '[]') AS acronyms, |
... | ... | |
161 | 158 |
org.lat, |
162 | 159 |
org.lng, |
163 | 160 |
org.city, |
164 |
org.country, |
|
161 |
org.country; |
|
162 |
|
|
163 |
CREATE VIEW organizations_info_view AS SELECT |
|
164 |
org.id, |
|
165 | 165 |
org.created_by, |
166 | 166 |
org.creation_date, |
167 | 167 |
org.modified_by, |
168 |
org.modification_date; |
|
168 |
org.modification_date, |
|
169 |
count(r.id1) as n_rels, |
|
170 |
count(e.local_id) as n_enrichments, |
|
171 |
count(c.local_id) as n_conflicts |
|
172 |
FROM organizations org |
|
173 |
LEFT OUTER JOIN relationships r ON (org.id = r.id1) |
|
174 |
LEFT OUTER JOIN openaire_simrels e ON (org.id = e.local_id AND e.oa_original_id NOT LIKE 'openorgs____::%') |
|
175 |
LEFT OUTER JOIN openaire_simrels c ON (org.id = c.local_id AND c.oa_original_id LIKE 'openorgs____::%') |
|
176 |
GROUP BY org.id; |
|
169 | 177 |
|
170 | 178 |
CREATE VIEW organizations_simple_view AS SELECT |
171 | 179 |
org.id, |
modules/dnet-orgs-database-application/trunk/src/main/resources/static/resources/html/enrichments.html | ||
---|---|---|
1 |
<div class="row" style="height: 5em"> |
|
2 |
<div class="col-xl-8 col-lg-10"> |
|
3 |
<p class="muted"><b>ID: </b>{{orgId}}</p> |
|
4 |
</div> |
|
5 |
</div> |
|
1 |
<organization-info info="info"></organization-info> |
|
6 | 2 |
|
7 | 3 |
<div class="row"> |
8 | 4 |
<div class="col-xl-10"> |
9 | 5 |
<div class="card"> |
10 | 6 |
<div class="card-header"> |
11 |
<ul class="nav nav-tabs card-header-tabs"> |
|
12 |
<li class="nav-item"> |
|
13 |
<a href="#!/metadata/0/{{orgId}}" class="nav-link">Metadata</a> |
|
14 |
</li> |
|
15 |
<li class="nav-item"> |
|
16 |
<a href="#!/relations/{{orgId}}" class="nav-link">Relations</a> |
|
17 |
</li> |
|
18 |
<li class="nav-item"> |
|
19 |
<a href="javascript:void(0)" class="nav-link active">Enrichments</a> |
|
20 |
</li> |
|
21 |
<li class="nav-item"> |
|
22 |
<a href="#!/conflicts/{{orgId}}" class="nav-link">Conflicts</a> |
|
23 |
</li> |
|
24 |
</ul> |
|
7 |
<org-tabs-menu selected='3' org-id="{{orgId}}" info="info"></org-tabs-menu> |
|
25 | 8 |
</div> |
26 | 9 |
|
27 | 10 |
<div class="card-body text-muted" ng-if="enrichments.length == 0"> |
modules/dnet-orgs-database-application/trunk/src/main/resources/static/resources/html/relations.html | ||
---|---|---|
1 |
<div class="row" style="height: 5em"> |
|
2 |
<div class="col-xl-8 col-lg-10"> |
|
3 |
<p class="muted"><b>ID: </b>{{orgId}}</p> |
|
4 |
</div> |
|
5 |
</div> |
|
1 |
<organization-info info="info"></organization-info> |
|
6 | 2 |
|
7 | 3 |
<div class="row"> |
8 | 4 |
<div class="col-xl-8 col-lg-10"> |
9 | 5 |
<div class="card"> |
10 | 6 |
<div class="card-header"> |
11 |
<ul class="nav nav-tabs card-header-tabs"> |
|
12 |
<li class="nav-item"> |
|
13 |
<a href="#!/metadata/0/{{orgId}}" class="nav-link">Metadata</a> |
|
14 |
</li> |
|
15 |
<li class="nav-item"> |
|
16 |
<a href="javascript:void(0)" class="nav-link active">Relations</a> |
|
17 |
</li> |
|
18 |
<li class="nav-item"> |
|
19 |
<a href="#!/enrichments/{{orgId}}" class="nav-link">Enrichments</a> |
|
20 |
</li> |
|
21 |
<li class="nav-item"> |
|
22 |
<a href="#!/conflicts/{{orgId}}" class="nav-link">Conflicts</a> |
|
23 |
</li> |
|
24 |
</ul> |
|
7 |
<org-tabs-menu selected='2' org-id="{{orgId}}" info="info"></org-tabs-menu> |
|
25 | 8 |
</div> |
26 | 9 |
|
27 | 10 |
<table class="table table-sm mt-2"> |
modules/dnet-orgs-database-application/trunk/src/main/resources/static/resources/html/part/org_info.html | ||
---|---|---|
1 |
<p class="text-muted"> |
|
2 |
<b>ID: </b>{{info.id}}<br /> |
|
3 |
<b>Created at</b> {{info.creationDate | date:'MMMM d, y HH:mm:ss'}} <b>by</b> {{info.createdBy}}<br /> |
|
4 |
<b>Modified at</b> {{info.modificationDate | date:'MMMM d, y HH:mm:ss'}} <b>by</b> {{info.modifiedBy}} |
|
5 |
</p> |
modules/dnet-orgs-database-application/trunk/src/main/resources/static/resources/html/part/org_tabs_menu.html | ||
---|---|---|
1 |
<ul class="nav nav-tabs card-header-tabs"> |
|
2 |
<li class="nav-item"> |
|
3 |
<a href="#!/metadata/0/{{orgId}}" class="nav-link" ng-class="{'active': selected == 1}">Metadata</a> |
|
4 |
</li> |
|
5 |
<li class="nav-item"> |
|
6 |
<a href="#!/relations/{{orgId}}" class="nav-link" ng-class="{'active': selected == 2}">Relations <span class="badge badge-secondary">{{info.nRels}}</span></a> |
|
7 |
</li> |
|
8 |
<li class="nav-item"> |
|
9 |
<a href="#!/enrichments/{{orgId}}" class="nav-link" ng-class="{'active': selected == 3}">Enrichments <span class="badge badge-secondary">{{info.nEnrichments}}</span></a> |
|
10 |
</li> |
|
11 |
<li class="nav-item"> |
|
12 |
<a href="#!/conflicts/{{orgId}}" class="nav-link" ng-class="{'active': selected == 4}">Conflicts <span class="badge badge-secondary">{{info.nConflicts}}</span></a> |
|
13 |
</li> |
|
14 |
</ul> |
modules/dnet-orgs-database-application/trunk/src/main/resources/static/resources/html/conflicts.html | ||
---|---|---|
1 |
<div class="row" style="height: 5em"> |
|
2 |
<div class="col-xl-8 col-lg-10"> |
|
3 |
<p class="muted"><b>ID: </b>{{orgId}}</p> |
|
4 |
</div> |
|
5 |
</div> |
|
1 |
<organization-info info="info"></organization-info> |
|
6 | 2 |
|
7 | 3 |
<div class="row"> |
8 | 4 |
<div class="col-xl-10"> |
9 | 5 |
<div class="card"> |
10 | 6 |
<div class="card-header"> |
11 |
<ul class="nav nav-tabs card-header-tabs"> |
|
12 |
<li class="nav-item"> |
|
13 |
<a href="#!/metadata/0/{{orgId}}" class="nav-link">Metadata</a> |
|
14 |
</li> |
|
15 |
<li class="nav-item"> |
|
16 |
<a href="#!/relations/{{orgId}}" class="nav-link">Relations</a> |
|
17 |
</li> |
|
18 |
<li class="nav-item"> |
|
19 |
<a href="#!/enrichments/{{orgId}}" class="nav-link">Enrichments</a> |
|
20 |
</li> |
|
21 |
<li class="nav-item"> |
|
22 |
<a href="javascript:void(0)" class="nav-link active">Conflicts</a> |
|
23 |
</li> |
|
24 |
</ul> |
|
7 |
<org-tabs-menu selected='4' org-id="{{orgId}}" info="info"></org-tabs-menu> |
|
25 | 8 |
</div> |
26 | 9 |
|
27 | 10 |
<div class="card-body text-muted" ng-if="conflicts.length == 0"> |
modules/dnet-orgs-database-application/trunk/src/main/resources/static/resources/html/edit.html | ||
---|---|---|
1 | 1 |
<div class="row" style="height: 5em"> |
2 | 2 |
<div class="col-xl-8 col-lg-10"> |
3 | 3 |
<div class="alert alert-success" ng-if="message">{{message}}</div> |
4 |
<p class="text-muted" ng-if="orgId && !message"> |
|
5 |
<b>ID: </b>{{orgId}}<br /> |
|
6 |
<b>Created at</b> {{org.creationDate | date:'MMMM d, y HH:mm:ss'}} <b>by</b> {{org.createdBy}}<br /> |
|
7 |
<b>Modified at</b> {{org.modificationDate | date:'MMMM d, y HH:mm:ss'}} <b>by</b> {{org.modifiedBy}} |
|
8 |
</p> |
|
4 |
<organization-info ng-if="orgId && !message" info="info"></organization-info> |
|
9 | 5 |
</div> |
10 | 6 |
</div> |
11 | 7 |
|
... | ... | |
13 | 9 |
<div class="col-xl-8 col-lg-10"> |
14 | 10 |
<div class="card"> |
15 | 11 |
<div class="card-header"> |
16 |
<ul class="nav nav-tabs card-header-tabs"> |
|
17 |
<li class="nav-item"> |
|
18 |
<a href="javascript:void(0)" class="nav-link active">Metadata</a> |
|
19 |
</li> |
|
20 |
<li class="nav-item" ng-if="orgId"> |
|
21 |
<a href="#!/relations/{{orgId}}" class="nav-link">Relations</a> |
|
22 |
</li> |
|
23 |
<li class="nav-item" ng-if="orgId"> |
|
24 |
<a href="#!/enrichments/{{orgId}}" class="nav-link">Enrichments</a> |
|
25 |
</li> |
|
26 |
<li class="nav-item" ng-if="orgId"> |
|
27 |
<a href="#!/conflicts/{{orgId}}" class="nav-link">Conflicts</a> |
|
28 |
</li> |
|
29 |
</ul> |
|
12 |
<org-tabs-menu selected='1' org-id="{{orgId}}" info="info"></org-tabs-menu> |
|
30 | 13 |
</div> |
31 | 14 |
<div class="card-body"> |
32 | 15 |
<form name="organizationForm"> |
modules/dnet-orgs-database-application/trunk/src/main/resources/static/resources/js/organizations.js | ||
---|---|---|
1 | 1 |
var orgsModule = angular.module('orgs', ['ngRoute', 'checklist-model']); |
2 | 2 |
|
3 |
|
|
4 |
orgsModule.service('orgInfoService', function($http) { |
|
5 |
this.info = {}; |
|
6 |
this.count = 0; |
|
7 |
this.getInfo = function(id, f) { |
|
8 |
|
|
9 |
if (id) { |
|
10 |
if (this.info.id == id) { |
|
11 |
f(this.info); |
|
12 |
} else { |
|
13 |
$http.get('api/organizations/info?id=' + id).then(function successCallback(res) { |
|
14 |
this.info = res.data; |
|
15 |
f(angular.copy(this.info)); |
|
16 |
}, function errorCallback(res) { |
|
17 |
alert('ERROR: ' + res.data.error + ' (' + res.data.message + ')'); |
|
18 |
}); |
|
19 |
} |
|
20 |
} else { |
|
21 |
f({}); |
|
22 |
} |
|
23 |
}; |
|
24 |
}); |
|
25 |
|
|
26 |
orgsModule.directive('organizationInfo', function() { |
|
27 |
return { |
|
28 |
restrict: 'E', |
|
29 |
scope: { |
|
30 |
info : '=' |
|
31 |
}, |
|
32 |
templateUrl: 'resources/html/part/org_info.html' |
|
33 |
} |
|
34 |
}); |
|
35 |
|
|
36 |
|
|
37 |
orgsModule.directive('orgTabsMenu', function($http, orgInfoService) { |
|
38 |
return { |
|
39 |
restrict: 'E', |
|
40 |
scope: { |
|
41 |
'info' : '=', |
|
42 |
'selected': '@', |
|
43 |
'orgId' : '@' |
|
44 |
|
|
45 |
}, |
|
46 |
templateUrl: 'resources/html/part/org_tabs_menu.html' |
|
47 |
} |
|
48 |
}); |
|
49 |
|
|
50 |
|
|
3 | 51 |
orgsModule.config(function($routeProvider) { |
4 | 52 |
$routeProvider |
5 | 53 |
.when('/new', { templateUrl: 'resources/html/edit.html', controller: 'newOrgCtrl' }) |
... | ... | |
47 | 95 |
"urls": [] |
48 | 96 |
}; |
49 | 97 |
$scope.vocabularies = {}; |
50 |
|
|
98 |
|
|
51 | 99 |
$http.get('api/vocabularies').then(function successCallback(res) { |
52 | 100 |
$scope.vocabularies = res.data; |
53 | 101 |
}, function errorCallback(res) { |
... | ... | |
139 | 187 |
}); |
140 | 188 |
|
141 | 189 |
|
142 |
orgsModule.controller('showMetadataCtrl', function ($scope, $http, $routeParams, $route, $location, $timeout) { |
|
190 |
orgsModule.controller('showMetadataCtrl', function ($scope, $http, $routeParams, $route, $location, $timeout, orgInfoService) {
|
|
143 | 191 |
$scope.orgId = $routeParams.id; |
144 | 192 |
$scope.org = {}; |
145 | 193 |
$scope.vocabularies = {}; |
194 |
$scope.info = {}; |
|
146 | 195 |
|
196 |
orgInfoService.getInfo($scope.orgId, function(info) { $scope.info = info; }); |
|
197 |
|
|
147 | 198 |
if ($routeParams.msg == 1) { |
148 | 199 |
$scope.message = 'New organization registered !!!'; |
149 | 200 |
} else if ($routeParams.msg == 2) { |
150 | 201 |
$scope.message = 'Organization updated !!!'; |
151 | 202 |
} else { |
152 | 203 |
$scope.message = ''; |
153 |
}
|
|
204 |
} |
|
154 | 205 |
|
155 | 206 |
$timeout(function() { $scope.message = ''; }, 3000) |
156 | 207 |
|
... | ... | |
179 | 230 |
}); |
180 | 231 |
|
181 | 232 |
|
182 |
orgsModule.controller('showRelationsCtrl', function ($scope, $http, $routeParams) { |
|
233 |
orgsModule.controller('showRelationsCtrl', function ($scope, $http, $routeParams, orgInfoService) {
|
|
183 | 234 |
$scope.orgId = $routeParams.id; |
184 | 235 |
$scope.rels = []; |
185 | 236 |
$scope.vocabularies = {}; |
... | ... | |
188 | 239 |
$scope.searchOrgs = []; |
189 | 240 |
$scope.newRelType=''; |
190 | 241 |
$scope.newRelation = {}; |
242 |
$scope.info = {}; |
|
191 | 243 |
|
244 |
orgInfoService.getInfo($scope.orgId, function(info) { $scope.info = info; }); |
|
245 |
|
|
192 | 246 |
$http.get('api/vocabularies').then(function successCallback(res) { |
193 | 247 |
$scope.vocabularies = res.data; |
194 | 248 |
|
... | ... | |
241 | 295 |
|
242 | 296 |
}); |
243 | 297 |
|
244 |
orgsModule.controller('showEnrichmentsCtrl', function ($scope, $http, $routeParams) { |
|
298 |
orgsModule.controller('showEnrichmentsCtrl', function ($scope, $http, $routeParams, orgInfoService) {
|
|
245 | 299 |
$scope.orgId = $routeParams.id; |
246 | 300 |
$scope.enrichments = []; |
247 | 301 |
$scope.vocabularies = {}; |
302 |
$scope.info = {}; |
|
248 | 303 |
|
304 |
orgInfoService.getInfo($scope.orgId, function(info) { $scope.info = info; }); |
|
305 |
|
|
249 | 306 |
$http.get('api/vocabularies').then(function successCallback(res) { |
250 | 307 |
$scope.vocabularies = res.data; |
251 | 308 |
|
... | ... | |
270 | 327 |
} |
271 | 328 |
}); |
272 | 329 |
|
273 |
orgsModule.controller('showConflictsCtrl', function ($scope, $http, $routeParams) { |
|
330 |
orgsModule.controller('showConflictsCtrl', function ($scope, $http, $routeParams, orgInfoService) {
|
|
274 | 331 |
$scope.orgId = $routeParams.id; |
275 | 332 |
$scope.conflicts = []; |
276 | 333 |
$scope.vocabularies = {}; |
334 |
$scope.info = {}; |
|
277 | 335 |
|
336 |
orgInfoService.getInfo($scope.orgId, function(info) { $scope.info = info; }); |
|
337 |
|
|
278 | 338 |
$http.get('api/vocabularies').then(function successCallback(res) { |
279 | 339 |
$scope.vocabularies = res.data; |
280 | 340 |
|
Also available in: Unified diff
org info in all tabs