Merge on-push-strategy branch into develop (on push strategy in result-preview component, i.e. search result cards) #39
|
@ -581,7 +581,7 @@ export class ParsingFunctions {
|
||||||
|
|
||||||
return eoscSubjectsFound;
|
return eoscSubjectsFound;
|
||||||
}
|
}
|
||||||
|
|
||||||
// publication & dataset landing : for subjects and otherSubjects and classifiedSubjects
|
// publication & dataset landing : for subjects and otherSubjects and classifiedSubjects
|
||||||
parseAllSubjects(_subjects: any, vocabulary: any): [string[], Map<string, string[]>, Map<string, string[]>, string[], string[],] {
|
parseAllSubjects(_subjects: any, vocabulary: any): [string[], Map<string, string[]>, Map<string, string[]>, string[], string[],] {
|
||||||
// let eoscSubjectsFound = [];
|
// let eoscSubjectsFound = [];
|
||||||
|
@ -590,12 +590,12 @@ export class ParsingFunctions {
|
||||||
let classifiedSubjects: Map<string, string[]>;
|
let classifiedSubjects: Map<string, string[]>;
|
||||||
let fos: string[];
|
let fos: string[];
|
||||||
let sdg: string[];
|
let sdg: string[];
|
||||||
|
|
||||||
let setOfEoscSubjects: Set<string> = new Set();
|
let setOfEoscSubjects: Set<string> = new Set();
|
||||||
|
|
||||||
let subject;
|
let subject;
|
||||||
let length = Array.isArray(_subjects) ? _subjects.length : 1;
|
let length = Array.isArray(_subjects) ? _subjects.length : 1;
|
||||||
|
|
||||||
for (let i = 0; i < length; i++) {
|
for (let i = 0; i < length; i++) {
|
||||||
subject = Array.isArray(_subjects) ? _subjects[i] : _subjects;
|
subject = Array.isArray(_subjects) ? _subjects[i] : _subjects;
|
||||||
if (subject.classid != "") {
|
if (subject.classid != "") {
|
||||||
|
@ -628,7 +628,7 @@ export class ParsingFunctions {
|
||||||
if (classifiedSubjects == undefined) {
|
if (classifiedSubjects == undefined) {
|
||||||
classifiedSubjects = new Map<string, string[]>();
|
classifiedSubjects = new Map<string, string[]>();
|
||||||
}
|
}
|
||||||
|
|
||||||
let content: string = subject.content + "";
|
let content: string = subject.content + "";
|
||||||
// let checkAndAddEoscSubjectResp = this.checkAndAddEoscSubject(setOfEoscSubjects, eoscSubjectsFound, subject, content);
|
// let checkAndAddEoscSubjectResp = this.checkAndAddEoscSubject(setOfEoscSubjects, eoscSubjectsFound, subject, content);
|
||||||
// let found: boolean = checkAndAddEoscSubjectResp["found"];
|
// let found: boolean = checkAndAddEoscSubjectResp["found"];
|
||||||
|
@ -639,7 +639,11 @@ export class ParsingFunctions {
|
||||||
if (!classifiedSubjects.has(subject.classname)) {
|
if (!classifiedSubjects.has(subject.classname)) {
|
||||||
classifiedSubjects.set(subject.classname, new Array<string>());
|
classifiedSubjects.set(subject.classname, new Array<string>());
|
||||||
}
|
}
|
||||||
classifiedSubjects.get(subject.classname).push(content);
|
if(properties.environment == "production") {
|
||||||
|
classifiedSubjects.get(subject.classname).push(content);
|
||||||
|
} else {
|
||||||
|
classifiedSubjects.get(subject.classname).push(subject.classid + ": " + content);
|
||||||
|
}
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -659,6 +663,14 @@ export class ParsingFunctions {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(properties.environment != "production") {
|
||||||
|
for (let classified of classifiedSubjects.keys()) {
|
||||||
|
subjects = subjects.concat(classifiedSubjects.get(classified));
|
||||||
|
}
|
||||||
|
classifiedSubjects = null;
|
||||||
|
}
|
||||||
|
|
||||||
return [subjects, otherSubjects, classifiedSubjects, fos, sdg];
|
return [subjects, otherSubjects, classifiedSubjects, fos, sdg];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@
|
||||||
<li><a
|
<li><a
|
||||||
[href]="'https://'+(properties.environment =='beta' || properties.environment =='development'?'beta.':'')+'monitor.openaire.eu'"
|
[href]="'https://'+(properties.environment =='beta' || properties.environment =='development'?'beta.':'')+'monitor.openaire.eu'"
|
||||||
target="_blank">Monitor</a></li>
|
target="_blank">Monitor</a></li>
|
||||||
<li><a href="https://graph.openaire.eu/develop/" target="_blank">Develop</a></li>
|
<li><a href="'https://'+(properties.environment =='beta' || properties.environment =='development'?'beta.':'')+'develop.openaire.eu" target="_blank">Develop</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue