Compare commits
No commits in common. "4070872316b567c20a659a16e71b1c4a266d3d27" and "80a7741ca4a1ddf3f387ad807319d4d977221bca" have entirely different histories.
4070872316
...
80a7741ca4
|
@ -150,7 +150,7 @@ export class BulkClaimComponent {
|
||||||
}
|
}
|
||||||
this.loading.open();
|
this.loading.open();
|
||||||
|
|
||||||
this.makeFileRequest(this.properties.utilsService + '/upload', [], this.filesToUpload).then(async (result) => {
|
this.makeFileRequest(this.properties.utilsService + '/upload', [], this.filesToUpload).then((result) => {
|
||||||
const rows = (result as any).split('\n'); // I have used space, you can use any thing.
|
const rows = (result as any).split('\n'); // I have used space, you can use any thing.
|
||||||
this.exceedsLimit = false;
|
this.exceedsLimit = false;
|
||||||
let invalid_rows = 0;
|
let invalid_rows = 0;
|
||||||
|
@ -179,7 +179,6 @@ export class BulkClaimComponent {
|
||||||
this.allIds.push(id);
|
this.allIds.push(id);
|
||||||
if (currentLength < this.basketLimit){
|
if (currentLength < this.basketLimit){
|
||||||
currentLength++;
|
currentLength++;
|
||||||
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
||||||
this.fetchResult(id, accessMode, Dates.getDateToString(embargoDate), i + 1);
|
this.fetchResult(id, accessMode, Dates.getDateToString(embargoDate), i + 1);
|
||||||
}else{
|
}else{
|
||||||
this.exceedsLimit = true;
|
this.exceedsLimit = true;
|
||||||
|
|
|
@ -187,7 +187,7 @@ export class CustomizationOptions {
|
||||||
if (current.identity && current.identity.mainColor && current.identity.secondaryColor) {
|
if (current.identity && current.identity.mainColor && current.identity.secondaryColor) {
|
||||||
updated = new CustomizationOptions(current.identity.mainColor, current.identity.secondaryColor);
|
updated = new CustomizationOptions(current.identity.mainColor, current.identity.secondaryColor);
|
||||||
}
|
}
|
||||||
if(current.identity && !current.identity.customCss){
|
if(!current.identity.customCss){
|
||||||
current.identity.customCss = defaultCO.identity.customCss;
|
current.identity.customCss = defaultCO.identity.customCss;
|
||||||
}
|
}
|
||||||
if (!current.backgrounds) {
|
if (!current.backgrounds) {
|
||||||
|
|
|
@ -97,7 +97,7 @@ export class CuratorsComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
private getCurators() {
|
private getCurators() {
|
||||||
this.subs.push(this.curatorsService.getCurators(this.community.communityId).subscribe(curators => {
|
this.subs.push(this.curatorsService.getCurators(this.properties, this.community.communityId).subscribe(curators => {
|
||||||
this.curators = curators;
|
this.curators = curators;
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
}, error => {
|
}, error => {
|
||||||
|
|
|
@ -15,7 +15,7 @@ export class ConnectHelper {
|
||||||
// domain = "covid-19.openaire.eu"; //for testing
|
// domain = "covid-19.openaire.eu"; //for testing
|
||||||
}
|
}
|
||||||
domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix
|
domain = domain.indexOf("//") != -1? domain.split("//")[1]:domain; //remove https:// prefix
|
||||||
if (domain.indexOf('eosc-portal.eu') != -1 || domain.indexOf('eosc-beyond.eu') != -1) {
|
if (domain.indexOf('eosc-portal.eu') != -1) {
|
||||||
return "eosc";
|
return "eosc";
|
||||||
}
|
}
|
||||||
if (domain.indexOf('openaire.eu') === -1) {
|
if (domain.indexOf('openaire.eu') === -1) {
|
||||||
|
|
|
@ -4,7 +4,6 @@ import {Observable} from 'rxjs';
|
||||||
import {Curator} from '../../utils/entities/CuratorInfo';
|
import {Curator} from '../../utils/entities/CuratorInfo';
|
||||||
import {EnvProperties} from '../../utils/properties/env-properties';
|
import {EnvProperties} from '../../utils/properties/env-properties';
|
||||||
import {CustomOptions} from "../../services/servicesUtils/customOptions.class";
|
import {CustomOptions} from "../../services/servicesUtils/customOptions.class";
|
||||||
import {properties} from '../../../../environments/environment';
|
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class CuratorService {
|
export class CuratorService {
|
||||||
|
@ -12,17 +11,17 @@ export class CuratorService {
|
||||||
constructor(private http: HttpClient) {
|
constructor(private http: HttpClient) {
|
||||||
}
|
}
|
||||||
|
|
||||||
public getCurators(communityId: string): Observable<Curator[]> {
|
public getCurators(properties: EnvProperties, communityId: string): Observable<Curator[]> {
|
||||||
let url: string = properties.adminToolsAPIURL + communityId + '/curator';
|
let url: string = properties.adminToolsAPIURL + '/' + communityId + '/curator';
|
||||||
return this.http.get<Curator[]>((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
|
return this.http.get<Curator[]>((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url);
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateCurator(curator: Curator) {
|
public updateCurator(properties: EnvProperties, curator: Curator) {
|
||||||
let url: string = properties.adminToolsAPIURL + "curator";
|
let url: string = properties.adminToolsAPIURL + "curator";
|
||||||
return this.http.post<Curator>(url, curator, CustomOptions.registryOptions());
|
return this.http.post<Curator>(url, curator, CustomOptions.registryOptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
public getCurator(): Observable<Curator> {
|
public getCurator(properties: EnvProperties): Observable<Curator> {
|
||||||
let url: string = properties.adminToolsAPIURL + 'curator';
|
let url: string = properties.adminToolsAPIURL + 'curator';
|
||||||
return this.http.get<Curator>((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url, CustomOptions.registryOptions());
|
return this.http.get<Curator>((properties.useCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url, CustomOptions.registryOptions());
|
||||||
}
|
}
|
||||||
|
|
|
@ -80,7 +80,7 @@ export class DivIdsComponent implements OnInit {
|
||||||
|
|
||||||
getDivIds() {
|
getDivIds() {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this._helpContentService.getAllDivIdsFull().subscribe(
|
this.subscriptions.push(this._helpContentService.getAllDivIdsFull(this.properties.adminToolsAPIURL).subscribe(
|
||||||
divIds => {
|
divIds => {
|
||||||
this.divIds = divIds;
|
this.divIds = divIds;
|
||||||
this.checkboxes = [];
|
this.checkboxes = [];
|
||||||
|
@ -138,7 +138,7 @@ export class DivIdsComponent implements OnInit {
|
||||||
|
|
||||||
public confirmedDeleteDivIds(data: any) {
|
public confirmedDeleteDivIds(data: any) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this._helpContentService.deleteDivIds(this.selectedDivIds).subscribe(
|
this.subscriptions.push(this._helpContentService.deleteDivIds(this.selectedDivIds, this.properties.adminToolsAPIURL).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
this.deleteDivIdsFromArray(this.selectedDivIds);
|
this.deleteDivIdsFromArray(this.selectedDivIds);
|
||||||
NotificationHandler.rise('Classes have been <b>successfully deleted</b>');
|
NotificationHandler.rise('Classes have been <b>successfully deleted</b>');
|
||||||
|
@ -191,7 +191,7 @@ export class DivIdsComponent implements OnInit {
|
||||||
public divIdSaveConfirmed(data: any) {
|
public divIdSaveConfirmed(data: any) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
if (!this.classForm.getRawValue()._id) {
|
if (!this.classForm.getRawValue()._id) {
|
||||||
this.subscriptions.push(this._helpContentService.saveDivId(<DivId>this.classForm.getRawValue()).subscribe(
|
this.subscriptions.push(this._helpContentService.saveDivId(<DivId>this.classForm.getRawValue(), this.properties.adminToolsAPIURL).subscribe(
|
||||||
divId => {
|
divId => {
|
||||||
this.divIdSavedSuccessfully(divId);
|
this.divIdSavedSuccessfully(divId);
|
||||||
NotificationHandler.rise('Class <b>' + divId.name + '</b> has been <b>successfully created</b>');
|
NotificationHandler.rise('Class <b>' + divId.name + '</b> has been <b>successfully created</b>');
|
||||||
|
@ -200,7 +200,7 @@ export class DivIdsComponent implements OnInit {
|
||||||
error => this.handleUpdateError("System error creating class", error)
|
error => this.handleUpdateError("System error creating class", error)
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
this.subscriptions.push(this._helpContentService.updateDivId(<DivId>this.classForm.getRawValue()).subscribe(
|
this.subscriptions.push(this._helpContentService.updateDivId(<DivId>this.classForm.getRawValue(), this.properties.adminToolsAPIURL).subscribe(
|
||||||
divId => {
|
divId => {
|
||||||
this.divIdUpdatedSuccessfully(divId);
|
this.divIdUpdatedSuccessfully(divId);
|
||||||
NotificationHandler.rise('Class <b>' + divId.name + '</b> has been <b>successfully updated</b>');
|
NotificationHandler.rise('Class <b>' + divId.name + '</b> has been <b>successfully updated</b>');
|
||||||
|
@ -261,7 +261,7 @@ export class DivIdsComponent implements OnInit {
|
||||||
|
|
||||||
getPages() {
|
getPages() {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this._helpContentService.getAllPages().subscribe(
|
this.subscriptions.push(this._helpContentService.getAllPages(this.properties.adminToolsAPIURL).subscribe(
|
||||||
pages => {
|
pages => {
|
||||||
this.allPages = [];
|
this.allPages = [];
|
||||||
pages.forEach(page => {
|
pages.forEach(page => {
|
||||||
|
|
|
@ -59,8 +59,8 @@ export class ClassContentFormComponent implements OnInit {
|
||||||
|
|
||||||
getInfo(pageId: string) {
|
getInfo(pageId: string) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
let obs = zip(this._helpContentService.getPageByPortal(pageId, this.portal),
|
let obs = zip(this._helpContentService.getPageByPortal(pageId, this.properties.adminToolsAPIURL, this.portal),
|
||||||
this._helpContentService.getDivIdsFullByPortal(pageId, this.portal));
|
this._helpContentService.getDivIdsFullByPortal(pageId, this.properties.adminToolsAPIURL, this.portal));
|
||||||
this.subs.push(obs.subscribe(
|
this.subs.push(obs.subscribe(
|
||||||
results => {
|
results => {
|
||||||
this.page = results[0];
|
this.page = results[0];
|
||||||
|
@ -73,7 +73,7 @@ export class ClassContentFormComponent implements OnInit {
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
this.initCKEditor();
|
this.initCKEditor();
|
||||||
} else {
|
} else {
|
||||||
this.subs.push(this._helpContentService.getDivHelpContent(this.pageContentId, this.portal).subscribe(pageHelpContent => {
|
this.subs.push(this._helpContentService.getDivHelpContent(this.pageContentId, this.properties.adminToolsAPIURL, this.portal).subscribe(pageHelpContent => {
|
||||||
this.pageHelpContent = pageHelpContent;
|
this.pageHelpContent = pageHelpContent;
|
||||||
if (this.properties.adminToolsPortalType != this.page.portalType) {
|
if (this.properties.adminToolsPortalType != this.page.portalType) {
|
||||||
this._router.navigate(['../'], {relativeTo: this.route});
|
this._router.navigate(['../'], {relativeTo: this.route});
|
||||||
|
@ -161,7 +161,7 @@ export class ClassContentFormComponent implements OnInit {
|
||||||
if (this.myForm.valid) {
|
if (this.myForm.valid) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
let pageHelpContent: DivHelpContent = this.myForm.getRawValue();
|
let pageHelpContent: DivHelpContent = this.myForm.getRawValue();
|
||||||
this.subs.push(this._helpContentService.insertOrUpdateDivHelpContent(pageHelpContent, this.portal).subscribe(
|
this.subs.push(this._helpContentService.insertOrUpdateDivHelpContent(pageHelpContent, this.properties.adminToolsAPIURL, this.portal).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
this._router.navigate(['../'], {queryParams: {"pageId": this.pageId}, relativeTo: this.route});
|
this._router.navigate(['../'], {queryParams: {"pageId": this.pageId}, relativeTo: this.route});
|
||||||
NotificationHandler.rise('Page content has been <b>successfully updated</b>');
|
NotificationHandler.rise('Page content has been <b>successfully updated</b>');
|
||||||
|
|
|
@ -79,7 +79,7 @@ export class ClassHelpContentsComponent implements OnInit {
|
||||||
|
|
||||||
getPage(pageId: string) {
|
getPage(pageId: string) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this._helpService.getPageByPortal(pageId, this.portal).subscribe(
|
this.subscriptions.push(this._helpService.getPageByPortal(pageId, this.properties.adminToolsAPIURL, this.portal).subscribe(
|
||||||
page => {
|
page => {
|
||||||
if (this.properties.adminToolsPortalType != page.portalType) {
|
if (this.properties.adminToolsPortalType != page.portalType) {
|
||||||
this.router.navigate(['./pageContents'], {queryParams: {'communityId': this.portal}});
|
this.router.navigate(['./pageContents'], {queryParams: {'communityId': this.portal}});
|
||||||
|
@ -109,7 +109,7 @@ export class ClassHelpContentsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
getPageHelpContents(community_pid: string) {
|
getPageHelpContents(community_pid: string) {
|
||||||
this.subscriptions.push(this._helpService.getCommunityDivHelpContents(community_pid, this.selectedPageId).subscribe(
|
this.subscriptions.push(this._helpService.getCommunityDivHelpContents(community_pid, this.properties.adminToolsAPIURL, this.selectedPageId).subscribe(
|
||||||
pageHelpContents => {
|
pageHelpContents => {
|
||||||
this.divHelpContents = pageHelpContents as Array<DivHelpContent>;
|
this.divHelpContents = pageHelpContents as Array<DivHelpContent>;
|
||||||
this.counter.all = this.divHelpContents.length;
|
this.counter.all = this.divHelpContents.length;
|
||||||
|
@ -150,7 +150,7 @@ export class ClassHelpContentsComponent implements OnInit {
|
||||||
|
|
||||||
public confirmedDeletePageHelpContents(data: any) {
|
public confirmedDeletePageHelpContents(data: any) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this._helpService.deleteDivHelpContents(this.selectedPageContents, this.portal).subscribe(
|
this.subscriptions.push(this._helpService.deleteDivHelpContents(this.selectedPageContents, this.properties.adminToolsAPIURL, this.portal).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
this.deletePageHelpContentsFromArray(this.selectedPageContents);
|
this.deletePageHelpContentsFromArray(this.selectedPageContents);
|
||||||
NotificationHandler.rise('Page content(s) has been <b>successfully deleted</b>');
|
NotificationHandler.rise('Page content(s) has been <b>successfully deleted</b>');
|
||||||
|
@ -189,7 +189,7 @@ export class ClassHelpContentsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public togglePageHelpContents(status: boolean, ids: string[]) {
|
public togglePageHelpContents(status: boolean, ids: string[]) {
|
||||||
this.subscriptions.push(this._helpService.toggleDivHelpContents(ids, status, this.portal).subscribe(
|
this.subscriptions.push(this._helpService.toggleDivHelpContents(ids, status, this.properties.adminToolsAPIURL, this.portal).subscribe(
|
||||||
() => {
|
() => {
|
||||||
for (let id of ids) {
|
for (let id of ids) {
|
||||||
let i = this.checkboxes.findIndex(_ => _.divHelpContent._id == id);
|
let i = this.checkboxes.findIndex(_ => _.divHelpContent._id == id);
|
||||||
|
|
|
@ -125,7 +125,7 @@ export class EntitiesComponent implements OnInit {
|
||||||
getEntities(portal: string) {
|
getEntities(portal: string) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
if (portal) {
|
if (portal) {
|
||||||
this._helpContentService.getCommunityEntities(portal).subscribe(
|
this._helpContentService.getCommunityEntities(portal, this.properties.adminToolsAPIURL).subscribe(
|
||||||
entities => {
|
entities => {
|
||||||
this.entities = entities;
|
this.entities = entities;
|
||||||
this.checkboxes = [];
|
this.checkboxes = [];
|
||||||
|
@ -139,7 +139,7 @@ export class EntitiesComponent implements OnInit {
|
||||||
},
|
},
|
||||||
error => this.handleError('System error retrieving entities', error));
|
error => this.handleError('System error retrieving entities', error));
|
||||||
} else {
|
} else {
|
||||||
this._helpContentService.getEntities().subscribe(
|
this._helpContentService.getEntities(this.properties.adminToolsAPIURL).subscribe(
|
||||||
entities => {
|
entities => {
|
||||||
this.entities = entities;
|
this.entities = entities;
|
||||||
this.checkboxes = [];
|
this.checkboxes = [];
|
||||||
|
@ -197,7 +197,7 @@ export class EntitiesComponent implements OnInit {
|
||||||
|
|
||||||
public confirmedDeleteEntities(data: any) {
|
public confirmedDeleteEntities(data: any) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this._helpContentService.deleteEntities(this.selectedEntities).subscribe(
|
this._helpContentService.deleteEntities(this.selectedEntities, this.properties.adminToolsAPIURL).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
this.deleteEntitiesFromArray(this.selectedEntities);
|
this.deleteEntitiesFromArray(this.selectedEntities);
|
||||||
NotificationHandler.rise('Entities have been <b>successfully deleted</b>');
|
NotificationHandler.rise('Entities have been <b>successfully deleted</b>');
|
||||||
|
@ -240,7 +240,7 @@ export class EntitiesComponent implements OnInit {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
if (this.entityForm.getRawValue()._id) {
|
if (this.entityForm.getRawValue()._id) {
|
||||||
this._helpContentService.updateEntity(
|
this._helpContentService.updateEntity(
|
||||||
<Entity>this.entityForm.getRawValue()).subscribe(
|
<Entity>this.entityForm.getRawValue(), this.properties.adminToolsAPIURL).subscribe(
|
||||||
entity => {
|
entity => {
|
||||||
this.entityUpdatedSuccessfully(entity);
|
this.entityUpdatedSuccessfully(entity);
|
||||||
NotificationHandler.rise('Entity <b>' + entity.name + '</b> has been <b>successfully updated</b>');
|
NotificationHandler.rise('Entity <b>' + entity.name + '</b> has been <b>successfully updated</b>');
|
||||||
|
@ -250,7 +250,7 @@ export class EntitiesComponent implements OnInit {
|
||||||
error => this.handleUpdateError('System error updating entity', error)
|
error => this.handleUpdateError('System error updating entity', error)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this._helpContentService.saveEntity(<Entity>this.entityForm.getRawValue()).subscribe(
|
this._helpContentService.saveEntity(<Entity>this.entityForm.getRawValue(), this.properties.adminToolsAPIURL).subscribe(
|
||||||
entity => {
|
entity => {
|
||||||
this.entitySavedSuccessfully(entity);
|
this.entitySavedSuccessfully(entity);
|
||||||
NotificationHandler.rise('Entity <b>' + entity.name + '</b> has been <b>successfully created</b>');
|
NotificationHandler.rise('Entity <b>' + entity.name + '</b> has been <b>successfully created</b>');
|
||||||
|
@ -338,7 +338,7 @@ export class EntitiesComponent implements OnInit {
|
||||||
|
|
||||||
public continueToggling(event: any) {
|
public continueToggling(event: any) {
|
||||||
this._helpContentService.toggleEntities(
|
this._helpContentService.toggleEntities(
|
||||||
this.portal, this.toggleIds, this.toggleStatus).subscribe(
|
this.portal, this.toggleIds, this.toggleStatus, this.properties.adminToolsAPIURL).subscribe(
|
||||||
() => {
|
() => {
|
||||||
for (let id of this.toggleIds) {
|
for (let id of this.toggleIds) {
|
||||||
const i = this.checkboxes.findIndex(_ => _.entity._id === id);
|
const i = this.checkboxes.findIndex(_ => _.entity._id === id);
|
||||||
|
|
|
@ -34,7 +34,7 @@
|
||||||
</div>
|
</div>
|
||||||
<form *ngIf="!showLoading" [formGroup]="myForm">
|
<form *ngIf="!showLoading" [formGroup]="myForm">
|
||||||
<div class="uk-grid uk-child-width-1-2">
|
<div class="uk-grid uk-child-width-1-2">
|
||||||
<div *ngIf="placementsOptions.length > 1" input [formInput]="myForm.get('placement')"
|
<div *ngIf="placementsOptions.length > 1 && myForm.get('placement').value" input [formInput]="myForm.get('placement')"
|
||||||
placeholder="Select placement" [options]="placementsOptions" type="select"></div>
|
placeholder="Select placement" [options]="placementsOptions" type="select"></div>
|
||||||
<div *ngIf="orderOptions.length > 1 " input [formInput]="myForm.get('order')" placeholder="Select order" [options]="orderOptions" type="select"></div>
|
<div *ngIf="orderOptions.length > 1 " input [formInput]="myForm.get('order')" placeholder="Select order" [options]="orderOptions" type="select"></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -62,7 +62,7 @@ export class PageContentFormComponent implements OnInit {
|
||||||
|
|
||||||
getInfo(pageId: string) {
|
getInfo(pageId: string) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
let obs = zip(this._helpContentService.getPageByPortal(pageId, this.portal), this._helpContentService.getCommunityPageHelpContents(this.portal, pageId));
|
let obs = zip(this._helpContentService.getPageByPortal(pageId, this.properties.adminToolsAPIURL, this.portal), this._helpContentService.getCommunityPageHelpContents(this.portal, this.properties.adminToolsAPIURL, pageId));
|
||||||
this.subs.push(obs.subscribe(
|
this.subs.push(obs.subscribe(
|
||||||
results => {
|
results => {
|
||||||
this.page = results[0];
|
this.page = results[0];
|
||||||
|
@ -149,9 +149,6 @@ export class PageContentFormComponent implements OnInit {
|
||||||
if (page.left) {
|
if (page.left) {
|
||||||
this.placementsOptions.push({label: "left", value: "left"});
|
this.placementsOptions.push({label: "left", value: "left"});
|
||||||
}
|
}
|
||||||
if (page.right) {
|
|
||||||
this.placementsOptions.push({label: "right", value: "right"});
|
|
||||||
}
|
|
||||||
this.orderOptions = [];
|
this.orderOptions = [];
|
||||||
for (let i = 1; i < countContents + 1; i++) {
|
for (let i = 1; i < countContents + 1; i++) {
|
||||||
this.orderOptions.push({label: "" + i, value: i});
|
this.orderOptions.push({label: "" + i, value: i});
|
||||||
|
@ -197,7 +194,7 @@ export class PageContentFormComponent implements OnInit {
|
||||||
if (this.myForm.valid) {
|
if (this.myForm.valid) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
let pageHelpContent: PageHelpContent = this.myForm.getRawValue();
|
let pageHelpContent: PageHelpContent = this.myForm.getRawValue();
|
||||||
this.subs.push(this._helpContentService.savePageHelpContent(pageHelpContent, this.portal).subscribe(
|
this.subs.push(this._helpContentService.savePageHelpContent(pageHelpContent, this.properties.adminToolsAPIURL, this.portal).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
NotificationHandler.rise('Page content has been <b>successfully ' + (this.pageContentId ? 'updated' : 'created') + '</b>');
|
NotificationHandler.rise('Page content has been <b>successfully ' + (this.pageContentId ? 'updated' : 'created') + '</b>');
|
||||||
this._router.navigate(['../'], {queryParams: {"pageId": this.pageId}, relativeTo: this.route});
|
this._router.navigate(['../'], {queryParams: {"pageId": this.pageId}, relativeTo: this.route});
|
||||||
|
|
|
@ -82,7 +82,7 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
|
|
||||||
getPage(pageId: string) {
|
getPage(pageId: string) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this._helpService.getPageByPortal(pageId, this.portal).subscribe(
|
this.subscriptions.push(this._helpService.getPageByPortal(pageId, this.properties.adminToolsAPIURL, this.portal).subscribe(
|
||||||
page => {
|
page => {
|
||||||
if (this.properties.adminToolsPortalType != page.portalType) {
|
if (this.properties.adminToolsPortalType != page.portalType) {
|
||||||
this.router.navigate(['./pageContents']);
|
this.router.navigate(['./pageContents']);
|
||||||
|
@ -111,7 +111,7 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
getPageHelpContents(community_pid: string) {
|
getPageHelpContents(community_pid: string) {
|
||||||
this.subscriptions.push(this._helpService.getCommunityPageHelpContents(community_pid, this.selectedPageId).subscribe(
|
this.subscriptions.push(this._helpService.getCommunityPageHelpContents(community_pid, this.properties.adminToolsAPIURL, this.selectedPageId).subscribe(
|
||||||
pageHelpContents => {
|
pageHelpContents => {
|
||||||
this.pageHelpContents = pageHelpContents as Array<PageHelpContent>;
|
this.pageHelpContents = pageHelpContents as Array<PageHelpContent>;
|
||||||
this.counter.all = this.pageHelpContents.length;
|
this.counter.all = this.pageHelpContents.length;
|
||||||
|
@ -160,7 +160,7 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
|
|
||||||
public confirmedDeletePageHelpContents(data: any) {
|
public confirmedDeletePageHelpContents(data: any) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this._helpService.deletePageHelpContents(this.selectedPageContents, this.portal).subscribe(
|
this.subscriptions.push(this._helpService.deletePageHelpContents(this.selectedPageContents, this.properties.adminToolsAPIURL, this.portal).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
this.deletePageHelpContentsFromArray(this.selectedPageContents);
|
this.deletePageHelpContentsFromArray(this.selectedPageContents);
|
||||||
NotificationHandler.rise('Page content(s) has been <b>successfully deleted</b>');
|
NotificationHandler.rise('Page content(s) has been <b>successfully deleted</b>');
|
||||||
|
@ -201,7 +201,7 @@ export class PageHelpContentsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public togglePageHelpContents(status: boolean, ids: string[]) {
|
public togglePageHelpContents(status: boolean, ids: string[]) {
|
||||||
this.subscriptions.push(this._helpService.togglePageHelpContents(ids, status, this.portal).subscribe(
|
this.subscriptions.push(this._helpService.togglePageHelpContents(ids, status, this.properties.adminToolsAPIURL, this.portal).subscribe(
|
||||||
() => {
|
() => {
|
||||||
for (let id of ids) {
|
for (let id of ids) {
|
||||||
let i = this.checkboxes.findIndex(_ => _.pageHelpContent._id == id);
|
let i = this.checkboxes.findIndex(_ => _.pageHelpContent._id == id);
|
||||||
|
|
|
@ -181,7 +181,7 @@ export class MenuComponent implements OnInit {
|
||||||
|
|
||||||
getPages() {
|
getPages() {
|
||||||
this.subscriptions.push(
|
this.subscriptions.push(
|
||||||
this._helpContentService.getCommunityPagesByType(this.portal, '').subscribe(
|
this._helpContentService.getCommunityPagesByType(this.portal, '', this.properties.adminToolsAPIURL).subscribe(
|
||||||
data => {
|
data => {
|
||||||
let pages = data;
|
let pages = data;
|
||||||
this.pageStatus = new Map();
|
this.pageStatus = new Map();
|
||||||
|
|
|
@ -131,7 +131,7 @@ export class PagesComponent implements OnInit {
|
||||||
this.isPortalAdministrator = Session.isPortalAdministrator(user) && !this.portal;
|
this.isPortalAdministrator = Session.isPortalAdministrator(user) && !this.portal;
|
||||||
}));
|
}));
|
||||||
}));
|
}));
|
||||||
this.subscriptions.push(this._helpContentService.getEntities().subscribe(
|
this.subscriptions.push(this._helpContentService.getEntities(this.properties.adminToolsAPIURL).subscribe(
|
||||||
entities => {
|
entities => {
|
||||||
this.allEntities = [];
|
this.allEntities = [];
|
||||||
entities.forEach(entity => {
|
entities.forEach(entity => {
|
||||||
|
@ -166,7 +166,7 @@ export class PagesComponent implements OnInit {
|
||||||
parameters = '?page_type=' + this.pagesType;
|
parameters = '?page_type=' + this.pagesType;
|
||||||
}
|
}
|
||||||
if (portal) {
|
if (portal) {
|
||||||
this.subscriptions.push(this._helpContentService.getCommunityPagesByType(portal, parameters).subscribe(
|
this.subscriptions.push(this._helpContentService.getCommunityPagesByType(portal, parameters, this.properties.adminToolsAPIURL).subscribe(
|
||||||
pages => {
|
pages => {
|
||||||
this.pagesReturned(pages);
|
this.pagesReturned(pages);
|
||||||
//if(!this.pagesType || this.pagesType == "link") {
|
//if(!this.pagesType || this.pagesType == "link") {
|
||||||
|
@ -178,7 +178,7 @@ export class PagesComponent implements OnInit {
|
||||||
error => this.handleError('System error retrieving pages', error)
|
error => this.handleError('System error retrieving pages', error)
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
this.subscriptions.push(this._helpContentService.getAllPagesFull().subscribe(
|
this.subscriptions.push(this._helpContentService.getAllPagesFull(this.properties.adminToolsAPIURL).subscribe(
|
||||||
pages => {
|
pages => {
|
||||||
this.pagesReturned(pages);
|
this.pagesReturned(pages);
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
|
@ -189,7 +189,7 @@ export class PagesComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
getPagesWithDivIds(portal: string) {
|
getPagesWithDivIds(portal: string) {
|
||||||
this.subscriptions.push(this._helpContentService.getPageIdsFromDivIds(portal).subscribe(
|
this.subscriptions.push(this._helpContentService.getPageIdsFromDivIds(portal, this.properties.adminToolsAPIURL).subscribe(
|
||||||
pages => {
|
pages => {
|
||||||
this.pageWithDivIds = pages;
|
this.pageWithDivIds = pages;
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
|
@ -247,7 +247,7 @@ export class PagesComponent implements OnInit {
|
||||||
|
|
||||||
public confirmedDeletePages() {
|
public confirmedDeletePages() {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this._helpContentService.deletePages(this.selectedPages).subscribe(
|
this.subscriptions.push(this._helpContentService.deletePages(this.selectedPages, this.properties.adminToolsAPIURL).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
this.deletePagesFromArray(this.selectedPages);
|
this.deletePagesFromArray(this.selectedPages);
|
||||||
NotificationHandler.rise('Pages have been <b>successfully deleted</b>');
|
NotificationHandler.rise('Pages have been <b>successfully deleted</b>');
|
||||||
|
@ -316,7 +316,7 @@ export class PagesComponent implements OnInit {
|
||||||
public pageSaveConfirmed(data: any) {
|
public pageSaveConfirmed(data: any) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
if (!this.pageForm.getRawValue()._id) {
|
if (!this.pageForm.getRawValue()._id) {
|
||||||
this.subscriptions.push(this._helpContentService.savePage(<Page>this.pageForm.getRawValue()).subscribe(
|
this.subscriptions.push(this._helpContentService.savePage(<Page>this.pageForm.getRawValue(), this.properties.adminToolsAPIURL).subscribe(
|
||||||
page => {
|
page => {
|
||||||
this.pageSavedSuccessfully(page, true);
|
this.pageSavedSuccessfully(page, true);
|
||||||
NotificationHandler.rise('Page <b>' + page.name + '</b> has been <b>successfully created</b>');
|
NotificationHandler.rise('Page <b>' + page.name + '</b> has been <b>successfully created</b>');
|
||||||
|
@ -326,7 +326,7 @@ export class PagesComponent implements OnInit {
|
||||||
error => this.handleUpdateError('System error creating page', error)
|
error => this.handleUpdateError('System error creating page', error)
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
this.subscriptions.push(this._helpContentService.updatePage(<Page>this.pageForm.getRawValue()).subscribe(
|
this.subscriptions.push(this._helpContentService.updatePage(<Page>this.pageForm.getRawValue(), this.properties.adminToolsAPIURL).subscribe(
|
||||||
page => {
|
page => {
|
||||||
this.pageSavedSuccessfully(page, false);
|
this.pageSavedSuccessfully(page, false);
|
||||||
NotificationHandler.rise('Page <b>' + page.name + '</b> has been <b>successfully updated</b>');
|
NotificationHandler.rise('Page <b>' + page.name + '</b> has been <b>successfully updated</b>');
|
||||||
|
@ -408,7 +408,7 @@ export class PagesComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public togglePages(status: boolean, ids: string[]) {
|
public togglePages(status: boolean, ids: string[]) {
|
||||||
this.subscriptions.push(this._helpContentService.togglePages(this.portal, ids, status).subscribe(
|
this.subscriptions.push(this._helpContentService.togglePages(this.portal, ids, status, this.properties.adminToolsAPIURL).subscribe(
|
||||||
() => {
|
() => {
|
||||||
for (let id of ids) {
|
for (let id of ids) {
|
||||||
let i = this.checkboxes.findIndex(_ => _.page._id == id);
|
let i = this.checkboxes.findIndex(_ => _.page._id == id);
|
||||||
|
@ -429,17 +429,17 @@ export class PagesComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
getCountsPerPID(community_pid: string) {
|
getCountsPerPID(community_pid: string) {
|
||||||
this.subscriptions.push(this._helpContentService.countCommunityPageHelpContents(community_pid, false).subscribe(
|
this.subscriptions.push(this._helpContentService.countCommunityPageHelpContents(community_pid, this.properties.adminToolsAPIURL, false).subscribe(
|
||||||
pageHelpContentsCount => {
|
pageHelpContentsCount => {
|
||||||
this.pageHelpContentsCount = pageHelpContentsCount;
|
this.pageHelpContentsCount = pageHelpContentsCount;
|
||||||
},
|
},
|
||||||
error => this.handleError('System error retrieving page contents', error)));
|
error => this.handleError('System error retrieving page contents', error)));
|
||||||
this.subscriptions.push(this._helpContentService.countCommunityPageHelpContents(community_pid, true).subscribe(
|
this.subscriptions.push(this._helpContentService.countCommunityPageHelpContents(community_pid, this.properties.adminToolsAPIURL, true).subscribe(
|
||||||
pageClassContentsCount => {
|
pageClassContentsCount => {
|
||||||
this.pageClassContentsCount = pageClassContentsCount;
|
this.pageClassContentsCount = pageClassContentsCount;
|
||||||
},
|
},
|
||||||
error => this.handleError('System error retrieving page contents', error)));
|
error => this.handleError('System error retrieving page contents', error)));
|
||||||
this.subscriptions.push(this._pluginsService.countPluginTemplatePerPage(community_pid).subscribe(
|
this.subscriptions.push(this._pluginsService.countPluginTemplatePerPage( this.properties.adminToolsAPIURL, community_pid).subscribe(
|
||||||
countPlugins => {
|
countPlugins => {
|
||||||
this.pagePluginTemplatesCount = countPlugins;
|
this.pagePluginTemplatesCount = countPlugins;
|
||||||
},
|
},
|
||||||
|
@ -447,7 +447,7 @@ export class PagesComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
getPluginTemplatesContentsCounts() {
|
getPluginTemplatesContentsCounts() {
|
||||||
this.subscriptions.push(this._pluginsService.countPluginTemplatePerPageForAllPortals().subscribe(
|
this.subscriptions.push(this._pluginsService.countPluginTemplatePerPageForAllPortals( this.properties.adminToolsAPIURL).subscribe(
|
||||||
countPlugins => {
|
countPlugins => {
|
||||||
this.pagePluginTemplatesCount = countPlugins;
|
this.pagePluginTemplatesCount = countPlugins;
|
||||||
},
|
},
|
||||||
|
|
|
@ -44,7 +44,7 @@ export class PluginSearchBar extends PluginBaseInfo{
|
||||||
<entities-selection class="uk-width-1-3" [simpleView]="true" currentEntity="result" [selectedEntity]="selectedEntity"
|
<entities-selection class="uk-width-1-3" [simpleView]="true" currentEntity="result" [selectedEntity]="selectedEntity"
|
||||||
(selectionChange)="entityChanged($event);advanced.focusNext(input, $event)" (disableSelectEmitter)="disableSelectChange($event)"
|
(selectionChange)="entityChanged($event);advanced.focusNext(input, $event)" (disableSelectEmitter)="disableSelectChange($event)"
|
||||||
[onChangeNavigate]="false"></entities-selection>
|
[onChangeNavigate]="false"></entities-selection>
|
||||||
<div input #input class="uk-width-expand" placeholder="Scholarly works" [searchable]="true" [hint]="'Search in OpenAIRE'" [(value)]="keyword"></div>
|
<div input #input class="uk-width-expand" placeholder="Scholary works" [searchable]="true" [hint]="'Search in OpenAIRE'" [(value)]="keyword"></div>
|
||||||
</advanced-search-input>
|
</advanced-search-input>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -23,13 +23,13 @@
|
||||||
<div class="uk-grid uk-child-width-1-2@m uk-child-width-1-1" uk-grid uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-fade; repeat: true">
|
<div class="uk-grid uk-child-width-1-2@m uk-child-width-1-1" uk-grid uk-scrollspy="target: [uk-scrollspy-class]; cls: uk-animation-fade; repeat: true">
|
||||||
<div *ngFor="let item of contentProviders.slice((i)*2,(i+1)*2)" uk-scrollspy-class>
|
<div *ngFor="let item of contentProviders.slice((i)*2,(i+1)*2)" uk-scrollspy-class>
|
||||||
<div class="uk-card uk-card-default uk-card-body uk-card-hover">
|
<div class="uk-card uk-card-default uk-card-body uk-card-hover">
|
||||||
{{item.officialname?item.officialname:item.name}}
|
{{item.name}}
|
||||||
<hr>
|
<hr>
|
||||||
<div class="uk-text-small" [innerHTML]="item.message">
|
<div class="uk-text-small" [innerHTML]="item.message">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="uk-flex uk-flex-right uk-margin-small-top">
|
<div class="uk-flex uk-flex-right uk-margin-small-top">
|
||||||
<a [routerLink]="properties.searchLinkToDataProvider.split('?')[0]" [queryParams]="{datasourceId : item.openaireId}" class="uk-float-right uk-margin-small-left uk-display-inline-block uk-text-uppercase uk-button uk-button-text" >
|
<a [href]="properties.connectPortalUrl + properties.searchLinkToDataProvider + item.openaireId " class="uk-float-right uk-margin-small-left uk-display-inline-block uk-text-uppercase uk-button uk-button-text" target="_blank">
|
||||||
<span class="uk-flex uk-flex-middle">
|
<span class="uk-flex uk-flex-middle">
|
||||||
<icon [name]="'file_upload'" [type]="'outlined'" class="uk-margin-small-right"></icon>
|
<icon [name]="'file_upload'" [type]="'outlined'" class="uk-margin-small-right"></icon>
|
||||||
<span>Go to repository</span>
|
<span>Go to repository</span>
|
||||||
|
|
|
@ -94,7 +94,7 @@ export class PluginsFormComponent implements OnInit {
|
||||||
|
|
||||||
getPage(pageId: string) {
|
getPage(pageId: string) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this._helpContentService.getPageByPortal(pageId, this.portal).subscribe(
|
this.subscriptions.push(this._helpContentService.getPageByPortal(pageId, this.properties.adminToolsAPIURL, this.portal).subscribe(
|
||||||
page => {
|
page => {
|
||||||
if (this.properties.adminToolsPortalType != page.portalType) {
|
if (this.properties.adminToolsPortalType != page.portalType) {
|
||||||
this._router.navigate(['..'],{ relativeTo: this.route});
|
this._router.navigate(['..'],{ relativeTo: this.route});
|
||||||
|
@ -108,10 +108,10 @@ export class PluginsFormComponent implements OnInit {
|
||||||
|
|
||||||
getPluginAndTemplate(){
|
getPluginAndTemplate(){
|
||||||
if(this.selectedTemplateId){
|
if(this.selectedTemplateId){
|
||||||
this.subscriptions.push(this._pluginsService.getPluginTemplateById(this.selectedTemplateId).subscribe(template => {
|
this.subscriptions.push(this._pluginsService.getPluginTemplateById(this.properties.adminToolsAPIURL, this.selectedTemplateId).subscribe(template => {
|
||||||
this.selectedTemplate = template;
|
this.selectedTemplate = template;
|
||||||
if(this.selectedPluginId){
|
if(this.selectedPluginId){
|
||||||
this.subscriptions.push(this._pluginsService.getPluginById(this.selectedPluginId).subscribe(plugin => {
|
this.subscriptions.push(this._pluginsService.getPluginById(this.properties.adminToolsAPIURL, this.selectedPluginId).subscribe(plugin => {
|
||||||
this.selectedPlugin = plugin;
|
this.selectedPlugin = plugin;
|
||||||
this.edit(this.selectedPlugin, this.selectedTemplate);
|
this.edit(this.selectedPlugin, this.selectedTemplate);
|
||||||
}));
|
}));
|
||||||
|
@ -167,7 +167,7 @@ export class PluginsFormComponent implements OnInit {
|
||||||
this.savePlugin(plugin,update)
|
this.savePlugin(plugin,update)
|
||||||
}
|
}
|
||||||
public savePlugin(plugin, update){
|
public savePlugin(plugin, update){
|
||||||
this.subscriptions.push(this._pluginsService.savePlugin(plugin, this.selectedCommunityPid ).subscribe(
|
this.subscriptions.push(this._pluginsService.savePlugin(plugin, this.properties.adminToolsAPIURL,this.selectedCommunityPid ).subscribe(
|
||||||
saved => {
|
saved => {
|
||||||
this._clearCacheService.purgeBrowserCache(null, this.selectedCommunityPid)
|
this._clearCacheService.purgeBrowserCache(null, this.selectedCommunityPid)
|
||||||
this.edit(saved, this.selectedTemplate)
|
this.edit(saved, this.selectedTemplate)
|
||||||
|
|
|
@ -116,7 +116,7 @@ export class PluginsComponent implements OnInit {
|
||||||
|
|
||||||
getPage(pageId: string) {
|
getPage(pageId: string) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this._helpContentService.getPageByPortal(pageId, this.portal).subscribe(
|
this.subscriptions.push(this._helpContentService.getPageByPortal(pageId, this.properties.adminToolsAPIURL, this.portal).subscribe(
|
||||||
page => {
|
page => {
|
||||||
if (this.properties.adminToolsPortalType != page.portalType) {
|
if (this.properties.adminToolsPortalType != page.portalType) {
|
||||||
this._router.navigate(['./pageContents']);
|
this._router.navigate(['./pageContents']);
|
||||||
|
@ -130,11 +130,11 @@ export class PluginsComponent implements OnInit {
|
||||||
|
|
||||||
getPagePlugins() {
|
getPagePlugins() {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this._pluginsService.getPluginTemplatesByPage(this.selectedCommunityPid, this.selectedPageId).subscribe(
|
this.subscriptions.push(this._pluginsService.getPluginTemplatesByPage(this.properties.adminToolsAPIURL, this.selectedCommunityPid, this.selectedPageId).subscribe(
|
||||||
templates => {
|
templates => {
|
||||||
this.pluginTemplates = templates;
|
this.pluginTemplates = templates;
|
||||||
|
|
||||||
this.subscriptions.push(this._pluginsService.getPluginsByPage(this.selectedCommunityPid, this.selectedPageId).subscribe(
|
this.subscriptions.push(this._pluginsService.getPluginsByPage(this.properties.adminToolsAPIURL, this.selectedCommunityPid, this.selectedPageId).subscribe(
|
||||||
plugins => {
|
plugins => {
|
||||||
this.plugins = plugins;
|
this.plugins = plugins;
|
||||||
this.pluginsByPlacement = new Map();
|
this.pluginsByPlacement = new Map();
|
||||||
|
@ -200,7 +200,7 @@ export class PluginsComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public savePlugin(plugin, update, index) {
|
public savePlugin(plugin, update, index) {
|
||||||
this.subscriptions.push(this._pluginsService.savePlugin(plugin, this.selectedCommunityPid).subscribe(
|
this.subscriptions.push(this._pluginsService.savePlugin(plugin, this.properties.adminToolsAPIURL, this.selectedCommunityPid).subscribe(
|
||||||
saved => {
|
saved => {
|
||||||
this.savedSuccessfully(saved, update, index);
|
this.savedSuccessfully(saved, update, index);
|
||||||
this.selectedTemplate = null;
|
this.selectedTemplate = null;
|
||||||
|
@ -257,7 +257,7 @@ export class PluginsComponent implements OnInit {
|
||||||
|
|
||||||
getPages() {
|
getPages() {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this._helpContentService.getAllPages().subscribe(
|
this.subscriptions.push(this._helpContentService.getAllPages(this.properties.adminToolsAPIURL).subscribe(
|
||||||
pages => {
|
pages => {
|
||||||
this.allPages = [];
|
this.allPages = [];
|
||||||
pages.forEach(page => {
|
pages.forEach(page => {
|
||||||
|
@ -290,7 +290,7 @@ export class PluginsComponent implements OnInit {
|
||||||
this.index = i;
|
this.index = i;
|
||||||
this.selectedTemplate = this.pluginsByPlacement.get(placement)[i].template;
|
this.selectedTemplate = this.pluginsByPlacement.get(placement)[i].template;
|
||||||
if (id) {
|
if (id) {
|
||||||
this.subscriptions.push(this._pluginsService.togglePlugin(id, status, this.selectedCommunityPid).subscribe(
|
this.subscriptions.push(this._pluginsService.togglePlugin(id, status, this.properties.adminToolsAPIURL, this.selectedCommunityPid).subscribe(
|
||||||
() => {
|
() => {
|
||||||
|
|
||||||
this.pluginsByPlacement.get(placement)[i].plugin.active = status;
|
this.pluginsByPlacement.get(placement)[i].plugin.active = status;
|
||||||
|
@ -318,7 +318,7 @@ export class PluginsComponent implements OnInit {
|
||||||
|
|
||||||
public move(plugin: Plugin, up: boolean, index, placement) {
|
public move(plugin: Plugin, up: boolean, index, placement) {
|
||||||
if (plugin._id) {
|
if (plugin._id) {
|
||||||
this.subscriptions.push(this._pluginsService.updatePluginOrder(plugin, up ? -1 : 1, this.selectedCommunityPid).subscribe(
|
this.subscriptions.push(this._pluginsService.updatePluginOrder(plugin, this.properties.adminToolsAPIURL, up ? -1 : 1, this.selectedCommunityPid).subscribe(
|
||||||
saved => {
|
saved => {
|
||||||
this.pluginsByPlacement.get(placement)[index].plugin = saved;
|
this.pluginsByPlacement.get(placement)[index].plugin = saved;
|
||||||
this.clearCache();
|
this.clearCache();
|
||||||
|
@ -361,7 +361,7 @@ export class PluginsComponent implements OnInit {
|
||||||
confirmDelete() {
|
confirmDelete() {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
|
|
||||||
this.subscriptions.push(this._pluginsService.deletePlugin(this.selectedPlugin._id).subscribe(
|
this.subscriptions.push(this._pluginsService.deletePlugin(this.selectedPlugin._id, this.properties.adminToolsAPIURL).subscribe(
|
||||||
deleted => {
|
deleted => {
|
||||||
this.pluginsByPlacement.get(this.selectedPlacementView).splice(this.selectedPluginIndex, 1);
|
this.pluginsByPlacement.get(this.selectedPlacementView).splice(this.selectedPluginIndex, 1);
|
||||||
this.clearCache();
|
this.clearCache();
|
||||||
|
|
|
@ -90,7 +90,7 @@ export class PluginTemplatesComponent implements OnInit {
|
||||||
|
|
||||||
getPage(pageId: string) {
|
getPage(pageId: string) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this._helpContentService.getPageById(pageId).subscribe(
|
this.subscriptions.push(this._helpContentService.getPageById(pageId, this.properties.adminToolsAPIURL).subscribe(
|
||||||
page => {
|
page => {
|
||||||
this.page = page;
|
this.page = page;
|
||||||
this.allPages = [];
|
this.allPages = [];
|
||||||
|
@ -108,7 +108,7 @@ export class PluginTemplatesComponent implements OnInit {
|
||||||
|
|
||||||
getTemplates(pageId = null) {
|
getTemplates(pageId = null) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this._pluginsService.getPluginTemplates(pageId).subscribe(
|
this.subscriptions.push(this._pluginsService.getPluginTemplates(this.properties.adminToolsAPIURL, pageId).subscribe(
|
||||||
templates => {
|
templates => {
|
||||||
for(let pos of this.pluginUtils.placementsOptions){
|
for(let pos of this.pluginUtils.placementsOptions){
|
||||||
this.templatesByPlacement.set(pos.value,[]);
|
this.templatesByPlacement.set(pos.value,[]);
|
||||||
|
@ -145,7 +145,7 @@ export class PluginTemplatesComponent implements OnInit {
|
||||||
|
|
||||||
public confirmedDelete() {
|
public confirmedDelete() {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this._pluginsService.deletePluginTemplate(this.selectedTemplate._id).subscribe(
|
this.subscriptions.push(this._pluginsService.deletePluginTemplate(this.selectedTemplate._id, this.properties.adminToolsAPIURL).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
this.deleteFromArray(this.selectedTemplate);
|
this.deleteFromArray(this.selectedTemplate);
|
||||||
NotificationHandler.rise('Template have been <b>successfully deleted</b>');
|
NotificationHandler.rise('Template have been <b>successfully deleted</b>');
|
||||||
|
@ -230,7 +230,7 @@ export class PluginTemplatesComponent implements OnInit {
|
||||||
}
|
}
|
||||||
|
|
||||||
public move(template: PluginTemplate, up: boolean, index, placement) {
|
public move(template: PluginTemplate, up: boolean, index, placement) {
|
||||||
this.subscriptions.push(this._pluginsService.updatePluginTemplateOrder(template, up ? -1 : 1).subscribe(
|
this.subscriptions.push(this._pluginsService.updatePluginTemplateOrder(template, this.properties.adminToolsAPIURL, up ? -1 : 1).subscribe(
|
||||||
saved => {
|
saved => {
|
||||||
this.templatesByPlacement.get(placement)[index] = saved;
|
this.templatesByPlacement.get(placement)[index] = saved;
|
||||||
},
|
},
|
||||||
|
@ -253,7 +253,7 @@ export class PluginTemplatesComponent implements OnInit {
|
||||||
template.settings[attr.key] = {name: attr.name, type: attr.type, value: attr.value};
|
template.settings[attr.key] = {name: attr.name, type: attr.type, value: attr.value};
|
||||||
}
|
}
|
||||||
let update = template._id ? true : false;
|
let update = template._id ? true : false;
|
||||||
this.subscriptions.push(this._pluginsService.savePluginTemplate(template).subscribe(
|
this.subscriptions.push(this._pluginsService.savePluginTemplate(template, this.properties.adminToolsAPIURL).subscribe(
|
||||||
saved => {
|
saved => {
|
||||||
this.selectedTemplate = saved;
|
this.selectedTemplate = saved;
|
||||||
this.savedSuccessfully(saved, update);
|
this.savedSuccessfully(saved, update);
|
||||||
|
@ -300,7 +300,7 @@ export class PluginTemplatesComponent implements OnInit {
|
||||||
|
|
||||||
getPages() {
|
getPages() {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this._helpContentService.getAllPages().subscribe(
|
this.subscriptions.push(this._helpContentService.getAllPages(this.properties.adminToolsAPIURL).subscribe(
|
||||||
pages => {
|
pages => {
|
||||||
this.allPages = [];
|
this.allPages = [];
|
||||||
this.allPagesByPortal = new Map();
|
this.allPagesByPortal = new Map();
|
||||||
|
|
|
@ -77,7 +77,7 @@ export class PortalsComponent implements OnInit {
|
||||||
|
|
||||||
getPortals() {
|
getPortals() {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this._helpContentService.getPortalsFull().subscribe(
|
this.subscriptions.push(this._helpContentService.getPortalsFull(this.properties.adminToolsAPIURL).subscribe(
|
||||||
portals => {
|
portals => {
|
||||||
this.portals = portals;
|
this.portals = portals;
|
||||||
if (portals) {
|
if (portals) {
|
||||||
|
@ -131,7 +131,7 @@ export class PortalsComponent implements OnInit {
|
||||||
|
|
||||||
public confirmedDeletePortals(data: any) {
|
public confirmedDeletePortals(data: any) {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
this.subscriptions.push(this._helpContentService.deleteCommunities(this.selectedPortals, this.getPortalType()).subscribe(
|
this.subscriptions.push(this._helpContentService.deleteCommunities(this.selectedPortals, this.properties.adminToolsAPIURL).subscribe(
|
||||||
_ => {
|
_ => {
|
||||||
this.deletePortalsFromArray(this.selectedPortals);
|
this.deletePortalsFromArray(this.selectedPortals);
|
||||||
NotificationHandler.rise('Portals have been <b>successfully deleted</b>');
|
NotificationHandler.rise('Portals have been <b>successfully deleted</b>');
|
||||||
|
@ -141,11 +141,7 @@ export class PortalsComponent implements OnInit {
|
||||||
error => this.handleUpdateError('System error deleting the selected communities', error)
|
error => this.handleUpdateError('System error deleting the selected communities', error)
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
getPortalType():string {
|
|
||||||
let portalId = this.selectedPortals[0];
|
|
||||||
let index = this.portals.findIndex(value => value._id === portalId);
|
|
||||||
return this.portals[index].type;
|
|
||||||
}
|
|
||||||
public editPortal(i: number) {
|
public editPortal(i: number) {
|
||||||
const portal: Portal = this.checkboxes[i].portal;
|
const portal: Portal = this.checkboxes[i].portal;
|
||||||
this.index = this.portals.findIndex(value => value._id === portal._id);
|
this.index = this.portals.findIndex(value => value._id === portal._id);
|
||||||
|
@ -187,7 +183,7 @@ export class PortalsComponent implements OnInit {
|
||||||
this.showLoading = true;
|
this.showLoading = true;
|
||||||
if (this.portalForm.getRawValue()._id) {
|
if (this.portalForm.getRawValue()._id) {
|
||||||
this.subscriptions.push(this._helpContentService.updateCommunity(<Portal>this.portalForm.getRawValue(),
|
this.subscriptions.push(this._helpContentService.updateCommunity(<Portal>this.portalForm.getRawValue(),
|
||||||
).subscribe(
|
this.properties.adminToolsAPIURL).subscribe(
|
||||||
portal => {
|
portal => {
|
||||||
this.portalUpdatedSuccessfully(portal);
|
this.portalUpdatedSuccessfully(portal);
|
||||||
NotificationHandler.rise('Portal <b>' + portal.name + '</b> has been <b>successfully updated</b>');
|
NotificationHandler.rise('Portal <b>' + portal.name + '</b> has been <b>successfully updated</b>');
|
||||||
|
@ -197,7 +193,7 @@ export class PortalsComponent implements OnInit {
|
||||||
));
|
));
|
||||||
} else {
|
} else {
|
||||||
this.subscriptions.push(this._helpContentService.saveCommunity(<Portal>this.portalForm.getRawValue(),
|
this.subscriptions.push(this._helpContentService.saveCommunity(<Portal>this.portalForm.getRawValue(),
|
||||||
).subscribe(
|
this.properties.adminToolsAPIURL).subscribe(
|
||||||
portal => {
|
portal => {
|
||||||
this.portalSavedSuccessfully(portal);
|
this.portalSavedSuccessfully(portal);
|
||||||
NotificationHandler.rise('Portal <b>' + portal.name + '</b> has been <b>successfully created</b>');
|
NotificationHandler.rise('Portal <b>' + portal.name + '</b> has been <b>successfully created</b>');
|
||||||
|
|
|
@ -3,25 +3,3 @@
|
||||||
.custom-bottom-border {
|
.custom-bottom-border {
|
||||||
border-bottom: 5px solid fade(@explore-color, @global-opacity);
|
border-bottom: 5px solid fade(@explore-color, @global-opacity);
|
||||||
}
|
}
|
||||||
|
|
||||||
//.child {
|
|
||||||
// height: 0;
|
|
||||||
// //visibility: hidden;
|
|
||||||
// opacity: 0;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//.parent:hover .uk-transition-slide-top {
|
|
||||||
// transition-delay: 0.5s;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//.parent:hover .child {
|
|
||||||
// height: auto;
|
|
||||||
// visibility: visible;
|
|
||||||
// opacity: 1;
|
|
||||||
// //transition-delay: 0.5s;
|
|
||||||
// //transition: 0.6s ease-out;
|
|
||||||
//}
|
|
||||||
//
|
|
||||||
//.parent {
|
|
||||||
// //transition: all 0.6s ease-out;
|
|
||||||
//}
|
|
|
@ -988,11 +988,10 @@ export class DataProviderComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
public get eoscBackLink() {
|
public get eoscBackLink() {
|
||||||
if(this.prevPath && this.referrer && ((this.referrer == "https://eosc-search-service.grid.cyfronet.pl/") || (this.referrer == this.properties.eoscMarketplaceURL))) {
|
if(this.prevPath && this.referrer && ((this.referrer == "https://eosc-search-service.grid.cyfronet.pl/") || (this.referrer == "https://beta.search.marketplace.eosc-portal.eu/") || (this.referrer == "https://search.marketplace.eosc-portal.eu/"))) {
|
||||||
return this.referrer+this.prevPath;
|
return this.referrer+this.prevPath;
|
||||||
} else {
|
} else {
|
||||||
return this.properties.eoscMarketplaceURL;
|
return "https://"+(this.properties.environment == "beta" ? "beta." : "")+"search.marketplace.eosc-portal.eu/";
|
||||||
// return "https://"+(this.properties.environment == "beta" ? "beta." : "")+"search.marketplace.eosc-portal.eu/";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,11 +14,11 @@ import {StringUtils} from "../../utils/string-utils.class";
|
||||||
})
|
})
|
||||||
export class ParsingFunctions {
|
export class ParsingFunctions {
|
||||||
public eoscSubjects = [
|
public eoscSubjects = [
|
||||||
{label: 'EOSC::Jupyter Notebook', link: properties.eoscMarketplaceURL+'search/service?q=*&fq=eosc_if:%22Jupyter%20Notebook%22', value: 'Jupyter Notebook'},
|
{label: 'EOSC::Jupyter Notebook', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=eosc_if:%22Jupyter%20Notebook%22', value: 'Jupyter Notebook'},
|
||||||
{label: 'EOSC::RO-crate', link: properties.eoscMarketplaceURL+'search/service?q=*&fq=eosc_if:%22RO%5C-crate%22', value: 'RO-crate'},
|
{label: 'EOSC::RO-crate', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=eosc_if:%22RO%5C-crate%22', value: 'RO-crate'},
|
||||||
{label: 'EOSC::Galaxy Workflow', link: properties.eoscMarketplaceURL+'search/service?q=*&fq=eosc_if:%22Galaxy%20Workflow%22', value: 'Galaxy Workflow'},
|
{label: 'EOSC::Galaxy Workflow', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=eosc_if:%22Galaxy%20Workflow%22', value: 'Galaxy Workflow'},
|
||||||
{label: 'EOSC::Twitter Data', link: properties.eoscMarketplaceURL+'search/service?q=*&fq=eosc_if:%22Twitter%20Data%22', value: 'Twitter Data'},
|
{label: 'EOSC::Twitter Data', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=eosc_if:%22Twitter%20Data%22', value: 'Twitter Data'},
|
||||||
{label: 'EOSC::Data Cube', link: properties.eoscMarketplaceURL+'search/service?q=*&fq=eosc_if:%22Data%20Cube%22', value: 'Data Cube'}
|
{label: 'EOSC::Data Cube', link: 'https://' + (properties.environment != 'production'?'beta.':'') + 'search.marketplace.eosc-portal.eu/search/service?q=*&fq=eosc_if:%22Data%20Cube%22', value: 'Data Cube'}
|
||||||
]
|
]
|
||||||
public notebookInSubjects: boolean = false;
|
public notebookInSubjects: boolean = false;
|
||||||
private notebookKeyword: string = "eosc jupyter notebook";
|
private notebookKeyword: string = "eosc jupyter notebook";
|
||||||
|
|
|
@ -830,11 +830,10 @@ export class OrganizationComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
public get eoscBackLink() {
|
public get eoscBackLink() {
|
||||||
if(this.prevPath && this.referrer && ((this.referrer == "https://eosc-search-service.grid.cyfronet.pl/") || (this.referrer == this.properties.eoscMarketplaceURL))) {
|
if (this.prevPath && this.referrer && ((this.referrer == "https://eosc-search-service.grid.cyfronet.pl/") || (this.referrer == "https://beta.search.marketplace.eosc-portal.eu/") || (this.referrer == "https://search.marketplace.eosc-portal.eu/"))) {
|
||||||
return this.referrer + this.prevPath;
|
return this.referrer + this.prevPath;
|
||||||
} else {
|
} else {
|
||||||
return this.properties.eoscMarketplaceURL;
|
return "https://" + (this.properties.environment == "beta" ? "beta." : "") + "search.marketplace.eosc-portal.eu/";
|
||||||
// return "https://"+(this.properties.environment == "beta" ? "beta." : "")+"search.marketplace.eosc-portal.eu/";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1098,11 +1098,10 @@ export class ProjectComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
public get eoscBackLink() {
|
public get eoscBackLink() {
|
||||||
if(this.prevPath && this.referrer && ((this.referrer == "https://eosc-search-service.grid.cyfronet.pl/") || (this.referrer == this.properties.eoscMarketplaceURL))) {
|
if(this.prevPath && this.referrer && ((this.referrer == "https://eosc-search-service.grid.cyfronet.pl/") || (this.referrer == "https://beta.search.marketplace.eosc-portal.eu/") || (this.referrer == "https://search.marketplace.eosc-portal.eu/"))) {
|
||||||
return this.referrer+this.prevPath;
|
return this.referrer+this.prevPath;
|
||||||
} else {
|
} else {
|
||||||
return this.properties.eoscMarketplaceURL;
|
return "https://"+(this.properties.environment == "beta" ? "beta." : "")+"search.marketplace.eosc-portal.eu/";
|
||||||
// return "https://"+(this.properties.environment == "beta" ? "beta." : "")+"search.marketplace.eosc-portal.eu/";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -154,7 +154,7 @@
|
||||||
[tabNumber]="resultLandingInfo.relatedResults.length">
|
[tabNumber]="resultLandingInfo.relatedResults.length">
|
||||||
</my-tab>
|
</my-tab>
|
||||||
<my-tab *ngIf="resultLandingInfo.relatedServices?.length > 0"
|
<my-tab *ngIf="resultLandingInfo.relatedServices?.length > 0"
|
||||||
[tabTitle]="properties.adminToolsPortalType == 'eosc' ? openaireEntities.SERVICES : openaireEntities.DATASOURCES" [tabId]="'dataProviders'"
|
[tabTitle]="openaireEntities.DATASOURCES" [tabId]="'dataProviders'"
|
||||||
[tabNumber]="resultLandingInfo.relatedServices.length">
|
[tabNumber]="resultLandingInfo.relatedServices.length">
|
||||||
</my-tab>
|
</my-tab>
|
||||||
<my-tab *ngIf="resultLandingInfo.bioentities && bioentitiesNum> 0"
|
<my-tab *ngIf="resultLandingInfo.bioentities && bioentitiesNum> 0"
|
||||||
|
@ -188,7 +188,7 @@
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<div *ngIf="resultLandingInfo.relatedServices?.length > 0"
|
<div *ngIf="resultLandingInfo.relatedServices?.length > 0"
|
||||||
id="dataProviders" class="landing-section">
|
id="dataProviders" class="landing-section">
|
||||||
<ng-container *ngTemplateOutlet="relation_in_tab; context: { related: filteredRelatedServices, props: relatedServices, type: properties.adminToolsPortalType == 'eosc' ? 'service' : 'datasource', header: ''}"></ng-container>
|
<ng-container *ngTemplateOutlet="relation_in_tab; context: { related: filteredRelatedServices, props: relatedServices, type: 'datasource', header: ''}"></ng-container>
|
||||||
</div>
|
</div>
|
||||||
<ng-container *ngIf="resultLandingInfo.bioentities && bioentitiesNum> 0">
|
<ng-container *ngIf="resultLandingInfo.bioentities && bioentitiesNum> 0">
|
||||||
<div id="bioentities" class="landing-section">
|
<div id="bioentities" class="landing-section">
|
||||||
|
@ -467,8 +467,8 @@
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<ng-container *ngIf="resultLandingInfo.relatedServices?.length > 0">
|
<ng-container *ngIf="resultLandingInfo.relatedServices?.length > 0">
|
||||||
<div class="clickable uk-flex uk-flex-middle uk-flex-between"
|
<div class="clickable uk-flex uk-flex-middle uk-flex-between"
|
||||||
(click)="openFsModal(servicesFsModal, properties.adminToolsPortalType == 'eosc' ? openaireEntities.SERVICES : openaireEntities.DATASOURCES); onSelectActiveTab('dataProviders')">
|
(click)="openFsModal(servicesFsModal, openaireEntities.DATASOURCES); onSelectActiveTab('dataProviders')">
|
||||||
<span>{{properties.adminToolsPortalType == 'eosc' ? openaireEntities.SERVICES : openaireEntities.DATASOURCES}}</span>
|
<span>{{openaireEntities.DATASOURCES}}</span>
|
||||||
<icon name="chevron_right" [ratio]="1.5" [flex]="true"></icon>
|
<icon name="chevron_right" [ratio]="1.5" [flex]="true"></icon>
|
||||||
</div>
|
</div>
|
||||||
<hr>
|
<hr>
|
||||||
|
@ -662,7 +662,7 @@
|
||||||
<fs-modal *ngIf="isMobile" #servicesFsModal classTitle="uk-tile-default uk-border-bottom">
|
<fs-modal *ngIf="isMobile" #servicesFsModal classTitle="uk-tile-default uk-border-bottom">
|
||||||
<div *ngIf="activeTab == 'dataProviders' && resultLandingInfo.relatedServices?.length > 0"
|
<div *ngIf="activeTab == 'dataProviders' && resultLandingInfo.relatedServices?.length > 0"
|
||||||
class="landing-section">
|
class="landing-section">
|
||||||
<ng-container *ngTemplateOutlet="relation_in_tab; context: { related: filteredRelatedServices, props: relatedServices, type: properties.adminToolsPortalType == 'eosc' ? 'service' : 'datasource', header: ''}"></ng-container>
|
<ng-container *ngTemplateOutlet="relation_in_tab; context: { related: filteredRelatedServices, props: relatedServices, type: 'datasource', header: ''}"></ng-container>
|
||||||
</div>
|
</div>
|
||||||
</fs-modal>
|
</fs-modal>
|
||||||
|
|
||||||
|
@ -800,7 +800,7 @@
|
||||||
(valueChange)="relatedClassChanged(type)"></div>
|
(valueChange)="relatedClassChanged(type)"></div>
|
||||||
|
|
||||||
<results-and-pages
|
<results-and-pages
|
||||||
[type]="((type == 'datasource') ? openaireEntities.DATASOURCES : (type == 'service' ? openaireEntities.SERVICES : openaireEntities.RESULTS))"
|
[type]="((type == 'datasource') ? openaireEntities.DATASOURCES : openaireEntities.RESULTS)"
|
||||||
[page]="props.page" [pageSize]="pageSize"
|
[page]="props.page" [pageSize]="pageSize"
|
||||||
[totalResults]="related.length">
|
[totalResults]="related.length">
|
||||||
</results-and-pages>
|
</results-and-pages>
|
||||||
|
|
|
@ -1246,11 +1246,10 @@ export class ResultLandingComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
public get eoscBackLink() {
|
public get eoscBackLink() {
|
||||||
if(this.prevPath && this.referrer && ((this.referrer == "https://eosc-search-service.grid.cyfronet.pl/") || (this.referrer == this.properties.eoscMarketplaceURL))) {
|
if(this.prevPath && this.referrer && ((this.referrer == "https://eosc-search-service.grid.cyfronet.pl/") || (this.referrer == "https://beta.search.marketplace.eosc-portal.eu/") || (this.referrer == "https://search.marketplace.eosc-portal.eu/"))) {
|
||||||
return this.referrer+this.prevPath;
|
return this.referrer+this.prevPath;
|
||||||
} else {
|
} else {
|
||||||
return this.properties.eoscMarketplaceURL;
|
return "https://"+(this.properties.environment == "beta" ? "beta." : "")+"search.marketplace.eosc-portal.eu/";
|
||||||
// return "https://"+(this.properties.environment == "beta" ? "beta." : "")+"search.marketplace.eosc-portal.eu/";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -38,6 +38,7 @@ import {SafeHtmlPipeModule} from '../../utils/pipes/safeHTMLPipe.module';
|
||||||
import {EntityActionsModule} from "../../utils/entity-actions/entity-actions.module";
|
import {EntityActionsModule} from "../../utils/entity-actions/entity-actions.module";
|
||||||
import {ResultLandingRoutingModule} from "./resultLanding-routing.module";
|
import {ResultLandingRoutingModule} from "./resultLanding-routing.module";
|
||||||
import {OrcidCoreModule} from "../../orcid/orcid-core.module";
|
import {OrcidCoreModule} from "../../orcid/orcid-core.module";
|
||||||
|
import {SearchTabModule} from "../../utils/tabs/contents/search-tab.module";
|
||||||
import {DepositionComponent} from "../../deposit/deposit-file/deposit-file.component";
|
import {DepositionComponent} from "../../deposit/deposit-file/deposit-file.component";
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
|
|
@ -210,8 +210,7 @@ export class ResultLandingService {
|
||||||
this.resultLandingInfo.relatedResults = this.parsingFunctions.parseResults(this.resultLandingInfo.relatedResults, relation, provenanceAction, relationName);
|
this.resultLandingInfo.relatedResults = this.parsingFunctions.parseResults(this.resultLandingInfo.relatedResults, relation, provenanceAction, relationName);
|
||||||
} else if (relation['to'].class && relation['to'].class.toLowerCase() == "hasauthorinstitution") {
|
} else if (relation['to'].class && relation['to'].class.toLowerCase() == "hasauthorinstitution") {
|
||||||
this.resultLandingInfo.organizations = this.parseRelatedOrganizations(this.resultLandingInfo.organizations, relation);
|
this.resultLandingInfo.organizations = this.parseRelatedOrganizations(this.resultLandingInfo.organizations, relation);
|
||||||
} else if (relation['to'].scheme && relation['to'].scheme == "dnet:result_datasource_relations" &&
|
} else if (relation['to'].scheme && relation['to'].scheme == "dnet:result_datasource_relations") {
|
||||||
(relation['datasourcetype']?.classname!== "service" || properties.adminToolsPortalType == "eosc")) {
|
|
||||||
let relationName: string = relation.to.class;
|
let relationName: string = relation.to.class;
|
||||||
if (!this.resultLandingInfo.relatedServicesClassFilters.has(relationName)) {
|
if (!this.resultLandingInfo.relatedServicesClassFilters.has(relationName)) {
|
||||||
this.resultLandingInfo.relatedServicesClassFilters.add(relationName);
|
this.resultLandingInfo.relatedServicesClassFilters.add(relationName);
|
||||||
|
|
|
@ -1,14 +1,4 @@
|
||||||
import {
|
import {Component, EventEmitter, Input, OnChanges, OnInit, Output, SimpleChanges, ViewChild} from '@angular/core';
|
||||||
Component,
|
|
||||||
EventEmitter,
|
|
||||||
Inject,
|
|
||||||
Input,
|
|
||||||
OnChanges,
|
|
||||||
OnInit,
|
|
||||||
Output, PLATFORM_ID,
|
|
||||||
SimpleChanges,
|
|
||||||
ViewChild
|
|
||||||
} from '@angular/core';
|
|
||||||
import {ActivatedRoute, Router} from '@angular/router';
|
import {ActivatedRoute, Router} from '@angular/router';
|
||||||
import {Session, User} from './utils/helper.class';
|
import {Session, User} from './utils/helper.class';
|
||||||
import {RouterHelper} from '../utils/routerHelper.class';
|
import {RouterHelper} from '../utils/routerHelper.class';
|
||||||
|
@ -19,7 +9,6 @@ import {
|
||||||
NotificationConfiguration,
|
NotificationConfiguration,
|
||||||
NotificationsSidebarComponent
|
NotificationsSidebarComponent
|
||||||
} from "../notifications/notifications-sidebar/notifications-sidebar.component";
|
} from "../notifications/notifications-sidebar/notifications-sidebar.component";
|
||||||
import {isPlatformServer} from "@angular/common";
|
|
||||||
|
|
||||||
declare var UIkit;
|
declare var UIkit;
|
||||||
|
|
||||||
|
@ -38,7 +27,7 @@ declare var UIkit;
|
||||||
</text>
|
</text>
|
||||||
</svg>
|
</svg>
|
||||||
</a>
|
</a>
|
||||||
<div *ngIf="isClient" class="uk-navbar-dropdown uk-dropdown" uk-dropdown="pos: bottom-right">
|
<div class="uk-navbar-dropdown uk-dropdown" uk-dropdown="pos: bottom-right">
|
||||||
<ul class="uk-nav uk-navbar-dropdown-nav">
|
<ul class="uk-nav uk-navbar-dropdown-nav">
|
||||||
<ng-container *ngFor="let item of userMenuItems ">
|
<ng-container *ngFor="let item of userMenuItems ">
|
||||||
<li *ngIf="item.needsAuthorization && isAuthorized || !item.needsAuthorization"
|
<li *ngIf="item.needsAuthorization && isAuthorized || !item.needsAuthorization"
|
||||||
|
@ -128,7 +117,6 @@ declare var UIkit;
|
||||||
`
|
`
|
||||||
})
|
})
|
||||||
export class UserMiniComponent implements OnInit, OnChanges {
|
export class UserMiniComponent implements OnInit, OnChanges {
|
||||||
isClient: boolean = false;
|
|
||||||
@Input() user: User;
|
@Input() user: User;
|
||||||
public loggedIn: boolean = false;
|
public loggedIn: boolean = false;
|
||||||
public isAuthorized: boolean = false;
|
public isAuthorized: boolean = false;
|
||||||
|
@ -141,9 +129,7 @@ export class UserMiniComponent implements OnInit, OnChanges {
|
||||||
public showNotifications = false;
|
public showNotifications = false;
|
||||||
private subscriptions = [];
|
private subscriptions = [];
|
||||||
|
|
||||||
constructor(private router: Router, private route: ActivatedRoute, private userManagementService: UserManagementService,
|
constructor(private router: Router, private route: ActivatedRoute, private userManagementService: UserManagementService) {
|
||||||
@Inject(PLATFORM_ID) private platform: any) {
|
|
||||||
this.isClient = !isPlatformServer(this.platform);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
|
|
@ -382,7 +382,7 @@ export class EditStakeholderComponent extends StakeholderBaseComponent {
|
||||||
this.stakeholderFb.get('defaultId').setValue(null);
|
this.stakeholderFb.get('defaultId').setValue(null);
|
||||||
}
|
}
|
||||||
this.removePhoto();
|
this.removePhoto();
|
||||||
this.subscriptions.push(this.stakeholderService.buildStakeholder(
|
this.subscriptions.push(this.stakeholderService.buildStakeholder(this.properties.monitorServiceAPIURL,
|
||||||
this.stakeholderFb.getRawValue(), copyId,
|
this.stakeholderFb.getRawValue(), copyId,
|
||||||
this.stakeholderCategory.value !== 'dependent',
|
this.stakeholderCategory.value !== 'dependent',
|
||||||
this.stakeholderCategory.value === 'umbrella')
|
this.stakeholderCategory.value === 'umbrella')
|
||||||
|
@ -403,7 +403,7 @@ export class EditStakeholderComponent extends StakeholderBaseComponent {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
}));
|
}));
|
||||||
} else {
|
} else {
|
||||||
this.subscriptions.push(this.stakeholderService.saveElement(this.stakeholderFb.getRawValue(), [], this.isFull).subscribe(stakeholder => {
|
this.subscriptions.push(this.stakeholderService.saveElement(this.properties.monitorServiceAPIURL, this.stakeholderFb.getRawValue(), [], this.isFull).subscribe(stakeholder => {
|
||||||
this.notification.entity = stakeholder._id;
|
this.notification.entity = stakeholder._id;
|
||||||
this.notification.stakeholder = stakeholder.alias;
|
this.notification.stakeholder = stakeholder.alias;
|
||||||
this.notification.stakeholderType = stakeholder.type;
|
this.notification.stakeholderType = stakeholder.type;
|
||||||
|
|
|
@ -32,7 +32,7 @@ export class GeneralComponent extends BaseComponent implements OnInit {
|
||||||
if(this.stakeholder) {
|
if(this.stakeholder) {
|
||||||
this.title = this.stakeholder.name + " | General";
|
this.title = this.stakeholder.name + " | General";
|
||||||
this.setMetadata();
|
this.setMetadata();
|
||||||
this.subscriptions.push(this.stakeholderService.getAlias().subscribe(alias => {
|
this.subscriptions.push(this.stakeholderService.getAlias(this.properties.monitorServiceAPIURL).subscribe(alias => {
|
||||||
this.alias = alias;
|
this.alias = alias;
|
||||||
this.reset();
|
this.reset();
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
|
|
@ -101,8 +101,8 @@ export class ManageAllComponent extends StakeholderBaseComponent implements OnIn
|
||||||
this.active = this.stakeholderCategories[0].value;
|
this.active = this.stakeholderCategories[0].value;
|
||||||
}));
|
}));
|
||||||
let data = zip(
|
let data = zip(
|
||||||
this.stakeholderService.getMyStakeholders(),
|
this.stakeholderService.getMyStakeholders(this.properties.monitorServiceAPIURL),
|
||||||
this.stakeholderService.getAlias()
|
this.stakeholderService.getAlias(this.properties.monitorServiceAPIURL)
|
||||||
);
|
);
|
||||||
this.subscriptions.push(data.subscribe(res => {
|
this.subscriptions.push(data.subscribe(res => {
|
||||||
this.manageStakeholders = res[0];
|
this.manageStakeholders = res[0];
|
||||||
|
|
|
@ -127,7 +127,7 @@ export class ManageStakeholdersComponent extends FilteredStakeholdersBaseCompone
|
||||||
public deleteStakeholder() {
|
public deleteStakeholder() {
|
||||||
this.deleteLoading = true;
|
this.deleteLoading = true;
|
||||||
this.index = (this.stakeholder) ? this.stakeholders.findIndex(value => value._id === this.stakeholder._id) : -1;
|
this.index = (this.stakeholder) ? this.stakeholders.findIndex(value => value._id === this.stakeholder._id) : -1;
|
||||||
this.subscriptions.push(this.stakeholderService.deleteElement([this.stakeholder._id]).subscribe(() => {
|
this.subscriptions.push(this.stakeholderService.deleteElement(this.properties.monitorServiceAPIURL, [this.stakeholder._id]).subscribe(() => {
|
||||||
UIkit.notification(this.stakeholder.name+ ' has been <b>successfully deleted</b>', {
|
UIkit.notification(this.stakeholder.name+ ' has been <b>successfully deleted</b>', {
|
||||||
status: 'success',
|
status: 'success',
|
||||||
timeout: 6000,
|
timeout: 6000,
|
||||||
|
@ -153,7 +153,7 @@ export class ManageStakeholdersComponent extends FilteredStakeholdersBaseCompone
|
||||||
let path = [
|
let path = [
|
||||||
stakeholder._id
|
stakeholder._id
|
||||||
];
|
];
|
||||||
this.subscriptions.push(this.stakeholderService.changeVisibility(path, visibility).subscribe(returnedElement => {
|
this.subscriptions.push(this.stakeholderService.changeVisibility(this.properties.monitorServiceAPIURL, path, visibility).subscribe(returnedElement => {
|
||||||
stakeholder.visibility = returnedElement.visibility;
|
stakeholder.visibility = returnedElement.visibility;
|
||||||
UIkit.notification(stakeholder.name+ '\'s status has been <b>successfully changed</b> to ' + stakeholder.visibility.toLowerCase(), {
|
UIkit.notification(stakeholder.name+ '\'s status has been <b>successfully changed</b> to ' + stakeholder.visibility.toLowerCase(), {
|
||||||
status: 'success',
|
status: 'success',
|
||||||
|
|
|
@ -802,7 +802,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex]._id,
|
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex]._id,
|
||||||
this.section._id
|
this.section._id
|
||||||
];
|
];
|
||||||
this.subscriptions.push(this.stakeholderService.saveElement(this.indicator, path).subscribe(indicator => {
|
this.subscriptions.push(this.stakeholderService.saveElement(this.properties.monitorServiceAPIURL, this.indicator, path).subscribe(indicator => {
|
||||||
if (this.index !== -1) {
|
if (this.index !== -1) {
|
||||||
this.section.indicators[this.index] = indicator;
|
this.section.indicators[this.index] = indicator;
|
||||||
} else {
|
} else {
|
||||||
|
@ -824,7 +824,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
this.editNumberNotify.sendNotification(this.notification);
|
this.editNumberNotify.sendNotification(this.notification);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.stakeholderService.getStakeholders(null, this.stakeholder._id).subscribe(stakeholders => {
|
this.stakeholderService.getStakeholders(this.properties.monitorServiceAPIURL, null, this.stakeholder._id).subscribe(stakeholders => {
|
||||||
stakeholders.forEach(value => {
|
stakeholders.forEach(value => {
|
||||||
this.notification.groups.push(Role.manager(value.type, value.alias))
|
this.notification.groups.push(Role.manager(value.type, value.alias))
|
||||||
});
|
});
|
||||||
|
@ -874,7 +874,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex]._id,
|
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex]._id,
|
||||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.index]._id
|
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.index]._id
|
||||||
];
|
];
|
||||||
this.subscriptions.push(this.stakeholderService.saveBulkElements(sections, path).subscribe(stakeholder => {
|
this.subscriptions.push(this.stakeholderService.saveBulkElements(this.properties.monitorServiceAPIURL, sections, path).subscribe(stakeholder => {
|
||||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.index].charts = stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.index].charts;
|
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.index].charts = stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.index].charts;
|
||||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.index].numbers = stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.index].numbers;
|
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.index].numbers = stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.index].numbers;
|
||||||
this.setCharts();
|
this.setCharts();
|
||||||
|
@ -904,7 +904,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
this.stakeholderService.getStakeholders(null, this.stakeholder._id).subscribe(stakeholders => {
|
this.stakeholderService.getStakeholders(this.properties.monitorServiceAPIURL, null, this.stakeholder._id).subscribe(stakeholders => {
|
||||||
stakeholders.forEach(value => {
|
stakeholders.forEach(value => {
|
||||||
this.notification.groups.push(Role.manager(value.type, value.alias))
|
this.notification.groups.push(Role.manager(value.type, value.alias))
|
||||||
});
|
});
|
||||||
|
@ -941,7 +941,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex]._id,
|
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex]._id,
|
||||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex]._id
|
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex]._id
|
||||||
];
|
];
|
||||||
this.subscriptions.push(this.stakeholderService.moveIndicator(path, moveIndicator).subscribe(subCategory => {
|
this.subscriptions.push(this.stakeholderService.moveIndicator(this.properties.monitorServiceAPIURL, path, moveIndicator).subscribe(subCategory => {
|
||||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex] = subCategory;
|
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex] = subCategory;
|
||||||
this.setCharts();
|
this.setCharts();
|
||||||
this.setNumbers();
|
this.setNumbers();
|
||||||
|
@ -958,7 +958,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex]._id,
|
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex]._id,
|
||||||
sectionId
|
sectionId
|
||||||
];
|
];
|
||||||
this.subscriptions.push(this.stakeholderService.reorderIndicators(path, indicators).subscribe(indicators => {
|
this.subscriptions.push(this.stakeholderService.reorderIndicators(this.properties.monitorServiceAPIURL, path, indicators).subscribe(indicators => {
|
||||||
if (type === 'chart') {
|
if (type === 'chart') {
|
||||||
this.charts.find(section => section._id === sectionId).indicators = indicators;
|
this.charts.find(section => section._id === sectionId).indicators = indicators;
|
||||||
this.setCharts();
|
this.setCharts();
|
||||||
|
@ -1053,7 +1053,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
this.section._id,
|
this.section._id,
|
||||||
this.indicator._id
|
this.indicator._id
|
||||||
];
|
];
|
||||||
this.subscriptions.push(this.stakeholderService.deleteElement(path, this.indicatorChildrenActionOnDelete).subscribe(() => {
|
this.subscriptions.push(this.stakeholderService.deleteElement(this.properties.monitorServiceAPIURL, path, this.indicatorChildrenActionOnDelete).subscribe(() => {
|
||||||
if (this.indicator.type === 'chart') {
|
if (this.indicator.type === 'chart') {
|
||||||
this.charts.find(section => section._id === this.section._id).indicators.splice(this.index, 1);
|
this.charts.find(section => section._id === this.section._id).indicators.splice(this.index, 1);
|
||||||
this.setCharts();
|
this.setCharts();
|
||||||
|
@ -1074,7 +1074,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
this.notification.groups.push(Role.manager(this.stakeholder.type, this.stakeholder.alias));
|
this.notification.groups.push(Role.manager(this.stakeholder.type, this.stakeholder.alias));
|
||||||
this.deleteNotify.sendNotification(this.notification);
|
this.deleteNotify.sendNotification(this.notification);
|
||||||
} else {
|
} else {
|
||||||
this.stakeholderService.getStakeholders(null, this.stakeholder._id).subscribe(stakeholders => {
|
this.stakeholderService.getStakeholders(this.properties.monitorServiceAPIURL, null, this.stakeholder._id).subscribe(stakeholders => {
|
||||||
stakeholders.forEach(value => {
|
stakeholders.forEach(value => {
|
||||||
this.notification.groups.push(Role.manager(value.type, value.alias))
|
this.notification.groups.push(Role.manager(value.type, value.alias))
|
||||||
});
|
});
|
||||||
|
@ -1104,7 +1104,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
sectionId,
|
sectionId,
|
||||||
indicator._id
|
indicator._id
|
||||||
];
|
];
|
||||||
this.subscriptions.push(this.stakeholderService.changeVisibility(path, visibility).subscribe(returnedElement => {
|
this.subscriptions.push(this.stakeholderService.changeVisibility(this.properties.monitorServiceAPIURL, path, visibility).subscribe(returnedElement => {
|
||||||
indicator.visibility = returnedElement.visibility;
|
indicator.visibility = returnedElement.visibility;
|
||||||
UIkit.notification('Indicator has been <b>successfully changed</b> to ' + indicator.visibility.toLowerCase(), {
|
UIkit.notification('Indicator has been <b>successfully changed</b> to ' + indicator.visibility.toLowerCase(), {
|
||||||
status: 'success',
|
status: 'success',
|
||||||
|
@ -1131,7 +1131,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex]._id,
|
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex]._id,
|
||||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex]._id
|
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex]._id
|
||||||
];
|
];
|
||||||
this.subscriptions.push(this.stakeholderService.saveSection(sectionControl.value, path, index).subscribe(section => {
|
this.subscriptions.push(this.stakeholderService.saveSection(this.properties.monitorServiceAPIURL, sectionControl.value, path, index).subscribe(section => {
|
||||||
if (type === 'chart') {
|
if (type === 'chart') {
|
||||||
this.charts[index] = section;
|
this.charts[index] = section;
|
||||||
this.setCharts();
|
this.setCharts();
|
||||||
|
@ -1166,7 +1166,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex]._id,
|
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex]._id,
|
||||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex]._id
|
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex]._id
|
||||||
];
|
];
|
||||||
this.subscriptions.push(this.stakeholderService.saveSection(this.section, path, index).subscribe(section => {
|
this.subscriptions.push(this.stakeholderService.saveSection(this.properties.monitorServiceAPIURL, this.section, path, index).subscribe(section => {
|
||||||
if (type === 'chart') {
|
if (type === 'chart') {
|
||||||
if (index !== -1) {
|
if (index !== -1) {
|
||||||
this.charts.splice(index, 0, section);
|
this.charts.splice(index, 0, section);
|
||||||
|
@ -1228,7 +1228,7 @@ export class IndicatorsComponent extends IndicatorStakeholderBaseComponent imple
|
||||||
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex]._id,
|
this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories[this.subcategoryIndex]._id,
|
||||||
this.section._id
|
this.section._id
|
||||||
];
|
];
|
||||||
this.subscriptions.push(this.stakeholderService.deleteElement(path, this.sectionChildrenActionOnDelete).subscribe(() => {
|
this.subscriptions.push(this.stakeholderService.deleteElement(this.properties.monitorServiceAPIURL, path, this.sectionChildrenActionOnDelete).subscribe(() => {
|
||||||
if (this.sectionTypeToDelete === "chart") {
|
if (this.sectionTypeToDelete === "chart") {
|
||||||
this.charts.splice(this.index, 1);
|
this.charts.splice(this.index, 1);
|
||||||
this.setCharts();
|
this.setCharts();
|
||||||
|
|
|
@ -372,7 +372,7 @@ export class TopicComponent extends StakeholderBaseComponent implements OnInit,
|
||||||
let path = [this.stakeholder._id];
|
let path = [this.stakeholder._id];
|
||||||
let ids = this.stakeholder.topics.map(topic => topic._id);
|
let ids = this.stakeholder.topics.map(topic => topic._id);
|
||||||
HelperFunctions.swap(ids, index, newIndex);
|
HelperFunctions.swap(ids, index, newIndex);
|
||||||
this.stakeholderService.reorderElements(path, ids).subscribe(() => {
|
this.stakeholderService.reorderElements(properties.monitorServiceAPIURL, path, ids).subscribe(() => {
|
||||||
HelperFunctions.swap(this.stakeholder.topics, index, newIndex);
|
HelperFunctions.swap(this.stakeholder.topics, index, newIndex);
|
||||||
if(this.topicIndex === index) {
|
if(this.topicIndex === index) {
|
||||||
this.chooseTopic(newIndex);
|
this.chooseTopic(newIndex);
|
||||||
|
@ -515,7 +515,7 @@ export class TopicComponent extends StakeholderBaseComponent implements OnInit,
|
||||||
let path = [this.stakeholder._id, this.stakeholder.topics[this.topicIndex]._id];
|
let path = [this.stakeholder._id, this.stakeholder.topics[this.topicIndex]._id];
|
||||||
let ids = this.stakeholder.topics[this.topicIndex].categories.map(category => category._id);
|
let ids = this.stakeholder.topics[this.topicIndex].categories.map(category => category._id);
|
||||||
HelperFunctions.swap(ids, index, newIndex);
|
HelperFunctions.swap(ids, index, newIndex);
|
||||||
this.stakeholderService.reorderElements(path, ids).subscribe(() => {
|
this.stakeholderService.reorderElements(properties.monitorServiceAPIURL, path, ids).subscribe(() => {
|
||||||
HelperFunctions.swap(this.stakeholder.topics[this.topicIndex].categories, index, newIndex);
|
HelperFunctions.swap(this.stakeholder.topics[this.topicIndex].categories, index, newIndex);
|
||||||
if(this.categoryIndex === index) {
|
if(this.categoryIndex === index) {
|
||||||
this.chooseCategory(newIndex);
|
this.chooseCategory(newIndex);
|
||||||
|
@ -657,7 +657,7 @@ export class TopicComponent extends StakeholderBaseComponent implements OnInit,
|
||||||
let path = [this.stakeholder._id, this.stakeholder.topics[this.topicIndex]._id, this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex]._id];
|
let path = [this.stakeholder._id, this.stakeholder.topics[this.topicIndex]._id, this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex]._id];
|
||||||
let ids = this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories.map(subCategory => subCategory._id);
|
let ids = this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories.map(subCategory => subCategory._id);
|
||||||
HelperFunctions.swap(ids, index, newIndex);
|
HelperFunctions.swap(ids, index, newIndex);
|
||||||
this.stakeholderService.reorderElements(path, ids).subscribe(() => {
|
this.stakeholderService.reorderElements(properties.monitorServiceAPIURL, path, ids).subscribe(() => {
|
||||||
HelperFunctions.swap(this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories, index, newIndex);
|
HelperFunctions.swap(this.stakeholder.topics[this.topicIndex].categories[this.categoryIndex].subCategories, index, newIndex);
|
||||||
if(this.subCategoryIndex === index) {
|
if(this.subCategoryIndex === index) {
|
||||||
this.chooseSubcategory(newIndex);
|
this.chooseSubcategory(newIndex);
|
||||||
|
@ -707,7 +707,7 @@ export class TopicComponent extends StakeholderBaseComponent implements OnInit,
|
||||||
|
|
||||||
private save(message: string, path: string[], saveElement: any, callback: Function, redirect = false) {
|
private save(message: string, path: string[], saveElement: any, callback: Function, redirect = false) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.topicSubscriptions.push(this.stakeholderService.saveElement(saveElement, path).subscribe(saveElement => {
|
this.topicSubscriptions.push(this.stakeholderService.saveElement(this.properties.monitorServiceAPIURL, saveElement, path).subscribe(saveElement => {
|
||||||
callback(saveElement);
|
callback(saveElement);
|
||||||
this.stakeholderChanged();
|
this.stakeholderChanged();
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -727,7 +727,7 @@ export class TopicComponent extends StakeholderBaseComponent implements OnInit,
|
||||||
|
|
||||||
private delete(message: string, path: string[], callback: Function, redirect = false) {
|
private delete(message: string, path: string[], callback: Function, redirect = false) {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.topicSubscriptions.push(this.stakeholderService.deleteElement(path, this.elementChildrenActionOnDelete).subscribe(() => {
|
this.topicSubscriptions.push(this.stakeholderService.deleteElement(this.properties.monitorServiceAPIURL, path, this.elementChildrenActionOnDelete).subscribe(() => {
|
||||||
callback();
|
callback();
|
||||||
this.stakeholderChanged();
|
this.stakeholderChanged();
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
@ -744,7 +744,7 @@ export class TopicComponent extends StakeholderBaseComponent implements OnInit,
|
||||||
}
|
}
|
||||||
|
|
||||||
private changeStatus(element: Topic | Category | SubCategory, path: string[], visibility: Visibility, callback: Function = null, propagate: boolean = false) {
|
private changeStatus(element: Topic | Category | SubCategory, path: string[], visibility: Visibility, callback: Function = null, propagate: boolean = false) {
|
||||||
this.topicSubscriptions.push(this.stakeholderService.changeVisibility(path, visibility, propagate).subscribe(returnedElement => {
|
this.topicSubscriptions.push(this.stakeholderService.changeVisibility(this.properties.monitorServiceAPIURL, path, visibility, propagate).subscribe(returnedElement => {
|
||||||
if(propagate) {
|
if(propagate) {
|
||||||
callback(returnedElement);
|
callback(returnedElement);
|
||||||
NotificationHandler.rise(StringUtils.capitalize(this.type) + ' has been <b>successfully changed</b> to ' + returnedElement.visibility.toLowerCase());
|
NotificationHandler.rise(StringUtils.capitalize(this.type) + ' has been <b>successfully changed</b> to ' + returnedElement.visibility.toLowerCase());
|
||||||
|
|
|
@ -286,7 +286,7 @@ export class UmbrellaComponent extends StakeholderBaseComponent implements OnIni
|
||||||
|
|
||||||
setManageStakeholders() {
|
setManageStakeholders() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.subscriptions.push(this.stakeholderService.getMyStakeholders(this.activeType).pipe(map(manageStakeholders => {
|
this.subscriptions.push(this.stakeholderService.getMyStakeholders(this.properties.monitorServiceAPIURL, this.activeType).pipe(map(manageStakeholders => {
|
||||||
delete manageStakeholders.templates;
|
delete manageStakeholders.templates;
|
||||||
delete manageStakeholders.umbrella;
|
delete manageStakeholders.umbrella;
|
||||||
return manageStakeholders;
|
return manageStakeholders;
|
||||||
|
@ -319,7 +319,7 @@ export class UmbrellaComponent extends StakeholderBaseComponent implements OnIni
|
||||||
}
|
}
|
||||||
|
|
||||||
updateUmbrella(successFn: Function = null, errorFn: Function = null): void {
|
updateUmbrella(successFn: Function = null, errorFn: Function = null): void {
|
||||||
this.subscriptions.push(this.stakeholderService.updateUmbrella(this.stakeholder._id, this.updateFb.getRawValue())
|
this.subscriptions.push(this.stakeholderService.updateUmbrella(this.properties.monitorServiceAPIURL, this.stakeholder._id, this.updateFb.getRawValue())
|
||||||
.subscribe(umbrella => {
|
.subscribe(umbrella => {
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
if(!this.activeType) {
|
if(!this.activeType) {
|
||||||
|
|
|
@ -68,7 +68,7 @@ export class ResourcesService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public isPagesEnabled() {
|
public isPagesEnabled() {
|
||||||
let url = properties.adminToolsAPIURL + "monitor/monitor/pages";
|
let url = properties.adminToolsAPIURL + "/monitor/monitor/pages";
|
||||||
return this.http.get<Page[]>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
|
return this.http.get<Page[]>((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)) : url)
|
||||||
.pipe(map(pages => {
|
.pipe(map(pages => {
|
||||||
let result = this.routes.map(() => false);
|
let result = this.routes.map(() => false);
|
||||||
|
|
|
@ -57,7 +57,7 @@ export class StakeholderService {
|
||||||
getStakeholder(alias: string, shouldUpdate: boolean = false): Observable<Stakeholder> {
|
getStakeholder(alias: string, shouldUpdate: boolean = false): Observable<Stakeholder> {
|
||||||
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== alias || shouldUpdate) {
|
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== alias || shouldUpdate) {
|
||||||
this.promise = new Promise<void>((resolve, reject) => {
|
this.promise = new Promise<void>((resolve, reject) => {
|
||||||
this.sub = this.http.get<Stakeholder>(properties.monitorServiceAPIURL + 'stakeholder/' + encodeURIComponent(alias), CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
this.sub = this.http.get<Stakeholder>(properties.monitorServiceAPIURL + '/stakeholder/' + encodeURIComponent(alias), CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
||||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
||||||
})).subscribe(stakeholder => {
|
})).subscribe(stakeholder => {
|
||||||
this.stakeholderSubject.next(stakeholder);
|
this.stakeholderSubject.next(stakeholder);
|
||||||
|
@ -74,7 +74,7 @@ export class StakeholderService {
|
||||||
getChildStakeholder(parent: string, type: string, child: string, shouldUpdate: boolean = false): Observable<Stakeholder> {
|
getChildStakeholder(parent: string, type: string, child: string, shouldUpdate: boolean = false): Observable<Stakeholder> {
|
||||||
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== child || shouldUpdate) {
|
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== child || shouldUpdate) {
|
||||||
this.promise = new Promise<void>((resolve, reject) => {
|
this.promise = new Promise<void>((resolve, reject) => {
|
||||||
this.sub = this.http.get<Stakeholder>(properties.monitorServiceAPIURL + 'stakeholder/' + encodeURIComponent(parent) + '/' + type + '/' + encodeURIComponent(child), CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
this.sub = this.http.get<Stakeholder>(properties.monitorServiceAPIURL + '/stakeholder/' + encodeURIComponent(parent) + '/' + type + '/' + encodeURIComponent(child), CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
||||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
||||||
})).subscribe(stakeholder => {
|
})).subscribe(stakeholder => {
|
||||||
this.stakeholderSubject.next(stakeholder);
|
this.stakeholderSubject.next(stakeholder);
|
||||||
|
@ -91,7 +91,7 @@ export class StakeholderService {
|
||||||
getResearcherStakeholder(orcid, name, results, shouldUpdate: boolean = false): Observable<Stakeholder> {
|
getResearcherStakeholder(orcid, name, results, shouldUpdate: boolean = false): Observable<Stakeholder> {
|
||||||
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== orcid || shouldUpdate) {
|
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== orcid || shouldUpdate) {
|
||||||
this.promise = new Promise<void>((resolve, reject) => {
|
this.promise = new Promise<void>((resolve, reject) => {
|
||||||
this.sub = this.http.get<Stakeholder>(properties.monitorServiceAPIURL + 'stakeholder/' + encodeURIComponent("researcher"), CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
this.sub = this.http.get<Stakeholder>(properties.monitorServiceAPIURL + '/stakeholder/' + encodeURIComponent("researcher"), CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
||||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
||||||
})).subscribe(stakeholder => {
|
})).subscribe(stakeholder => {
|
||||||
stakeholder.index_id = orcid;
|
stakeholder.index_id = orcid;
|
||||||
|
@ -122,20 +122,20 @@ export class StakeholderService {
|
||||||
return this.stakeholderSubject.getValue();
|
return this.stakeholderSubject.getValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
getAlias(): Observable<string[]> {
|
getAlias(url: string): Observable<string[]> {
|
||||||
return this.http.get<Stakeholder[]>(properties.monitorServiceAPIURL + 'stakeholder/alias', CustomOptions.registryOptions()).pipe(map(stakeholders => {
|
return this.http.get<Stakeholder[]>(url + '/stakeholder/alias', CustomOptions.registryOptions()).pipe(map(stakeholders => {
|
||||||
return HelperFunctions.copy(stakeholders);
|
return HelperFunctions.copy(stakeholders);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
getStakeholders(type: string = null, defaultId: string = null): Observable<(Stakeholder & StakeholderInfo)[]> {
|
getStakeholders(url: string, type: string = null, defaultId: string = null): Observable<(Stakeholder & StakeholderInfo)[]> {
|
||||||
return this.http.get<Stakeholder[]>(properties.monitorServiceAPIURL + 'stakeholder' + ((type) ? ('?type=' + type) : (defaultId?'?defaultId=' + defaultId:'')) + ((type && defaultId) ? ('&defaultId=' + defaultId) : ''), CustomOptions.registryOptions()).pipe(map(stakeholders => {
|
return this.http.get<Stakeholder[]>(url + '/stakeholder' + ((type) ? ('?type=' + type) : (defaultId?'?defaultId=' + defaultId:'')) + ((type && defaultId) ? ('&defaultId=' + defaultId) : ''), CustomOptions.registryOptions()).pipe(map(stakeholders => {
|
||||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholders));
|
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholders));
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
getMyStakeholders(type: string = null): Observable<ManageStakeholders> {
|
getMyStakeholders(url: string, type: string = null): Observable<ManageStakeholders> {
|
||||||
return this.http.get<ManageStakeholders>(properties.monitorServiceAPIURL + 'my-stakeholder' + ((type) ? ('?type=' + type) : ''), CustomOptions.registryOptions()).pipe(map(manageStakeholder => {
|
return this.http.get<ManageStakeholders>(url + '/my-stakeholder' + ((type) ? ('?type=' + type) : ''), CustomOptions.registryOptions()).pipe(map(manageStakeholder => {
|
||||||
return HelperFunctions.copy({
|
return HelperFunctions.copy({
|
||||||
templates: Stakeholder.checkIsUpload(manageStakeholder.templates),
|
templates: Stakeholder.checkIsUpload(manageStakeholder.templates),
|
||||||
standalone: Stakeholder.checkIsUpload(manageStakeholder.standalone),
|
standalone: Stakeholder.checkIsUpload(manageStakeholder.standalone),
|
||||||
|
@ -145,7 +145,7 @@ export class StakeholderService {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
buildStakeholder(stakeholder: Stakeholder, copyId: string, standalone: boolean = true, umbrella: boolean = false): Observable<Stakeholder> {
|
buildStakeholder(url: string, stakeholder: Stakeholder, copyId: string, standalone: boolean = true, umbrella: boolean = false): Observable<Stakeholder> {
|
||||||
if (stakeholder.alias && stakeholder.alias.startsWith('/')) {
|
if (stakeholder.alias && stakeholder.alias.startsWith('/')) {
|
||||||
stakeholder.alias = stakeholder.alias.slice(1);
|
stakeholder.alias = stakeholder.alias.slice(1);
|
||||||
}
|
}
|
||||||
|
@ -155,26 +155,21 @@ export class StakeholderService {
|
||||||
umbrella: umbrella,
|
umbrella: umbrella,
|
||||||
standalone: standalone
|
standalone: standalone
|
||||||
}
|
}
|
||||||
return this.http.post<Stakeholder>(properties.monitorServiceAPIURL + 'build-stakeholder', buildStakeholder, CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
return this.http.post<Stakeholder>(url + '/build-stakeholder', buildStakeholder, CustomOptions.registryOptions()).pipe(map(stakeholder => {
|
||||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
return HelperFunctions.copy(Stakeholder.checkIsUpload(stakeholder));
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
changeVisibility(path: string[], visibility: Visibility, propagate: boolean = false): Observable<any> {
|
changeVisibility(url: string, path: string[], visibility: Visibility, propagate: boolean = false): Observable<any> {
|
||||||
path.push('change-visibility');
|
return this.http.post<Visibility>(url + '/' + path.join('/') + '/change-visibility' + '?visibility=' + visibility + (propagate ? '&propagate=true' : ''), null, CustomOptions.registryOptions());
|
||||||
return this.http.post<Visibility>(properties.monitorServiceAPIURL + path.join('/') + '?visibility=' + visibility + (propagate ? '&propagate=true' : ''), null, CustomOptions.registryOptions());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
saveElement(element: any, path: string[] = [], isFull: boolean = false): Observable<any> {
|
saveElement(url: string, element: any, path: string[] = [], isFull: boolean = false): Observable<any> {
|
||||||
if (element.alias && element.alias.startsWith('/')) {
|
if (element.alias && element.alias.startsWith('/')) {
|
||||||
element.alias = element.alias.slice(1);
|
element.alias = element.alias.slice(1);
|
||||||
}
|
}
|
||||||
path.push('save');
|
return this.http.post<any>(url + ((path.length > 0) ? '/' : '') + path.join('/') +
|
||||||
if(isFull) {
|
'/save' + (isFull ? '/full' : ''), element, CustomOptions.registryOptions()).pipe(map(element => {
|
||||||
path.push('full');
|
|
||||||
}
|
|
||||||
return this.http.post<any>(properties.monitorServiceAPIURL + path.join('/'),
|
|
||||||
element, CustomOptions.registryOptions()).pipe(map(element => {
|
|
||||||
if (path.length === 0) {
|
if (path.length === 0) {
|
||||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(element));
|
return HelperFunctions.copy(Stakeholder.checkIsUpload(element));
|
||||||
} else {
|
} else {
|
||||||
|
@ -183,10 +178,9 @@ export class StakeholderService {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
saveBulkElements(indicators, path: string[] = []): Observable<any> {
|
saveBulkElements(url: string, indicators, path: string[] = []): Observable<any> {
|
||||||
path.push('save-bulk');
|
return this.http.post<any>(url + ((path.length > 0) ? '/' : '') + path.join('/') +
|
||||||
return this.http.post<any>(properties.monitorServiceAPIURL + path.join('/'),
|
'/save-bulk', indicators, CustomOptions.registryOptions()).pipe(map(element => {
|
||||||
indicators, CustomOptions.registryOptions()).pipe(map(element => {
|
|
||||||
if (path.length === 0) {
|
if (path.length === 0) {
|
||||||
return HelperFunctions.copy(Stakeholder.checkIsUpload(element));
|
return HelperFunctions.copy(Stakeholder.checkIsUpload(element));
|
||||||
} else {
|
} else {
|
||||||
|
@ -195,44 +189,39 @@ export class StakeholderService {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
saveSection(element: any, path: string[] = [], index: number = -1): Observable<Section> {
|
saveSection(url: string, element: any, path: string[] = [], index: number = -1): Observable<Section> {
|
||||||
path.push('save/');
|
return this.http.post<Section>(url + ((path.length > 0) ? '/' : '') + path.join('/') +
|
||||||
return this.http.post<Section>(properties.monitorServiceAPIURL + path.join('/') + index,
|
'/save/' + index, element, CustomOptions.registryOptions()).pipe(map(element => {
|
||||||
element, CustomOptions.registryOptions()).pipe(map(element => {
|
|
||||||
return HelperFunctions.copy(element);
|
return HelperFunctions.copy(element);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteElement(path: string[], childrenAction: string = null): Observable<any> {
|
deleteElement(url: string, path: string[], childrenAction: string = null): Observable<any> {
|
||||||
let params: string = "";
|
let params: string = "";
|
||||||
if (childrenAction) {
|
if (childrenAction) {
|
||||||
params = "?children=" + childrenAction;
|
params = "?children=" + childrenAction;
|
||||||
}
|
}
|
||||||
path.push('delete');
|
return this.http.delete<any>(url + '/' + path.join('/') + '/delete' + params, CustomOptions.registryOptions());
|
||||||
return this.http.delete<any>(properties.monitorServiceAPIURL + path.join('/') + params, CustomOptions.registryOptions());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
reorderElements(path: string[], ids: string[]): Observable<any> {
|
reorderElements(url: string, path: string[], ids: string[]): Observable<any> {
|
||||||
path.push('reorder');
|
return this.http.post<any>(url + '/' + path.join('/') + '/reorder', ids, CustomOptions.registryOptions());
|
||||||
return this.http.post<any>(properties.monitorServiceAPIURL + path.join('/'), ids, CustomOptions.registryOptions());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
reorderIndicators(path: string[], indicators: string[]): Observable<Indicator[]> {
|
reorderIndicators(url: string, path: string[], indicators: string[]): Observable<Indicator[]> {
|
||||||
path.push('reorder');
|
return this.http.post<Indicator[]>(url + '/' + path.join('/') + '/reorder', indicators, CustomOptions.registryOptions()).pipe(map(indicators => {
|
||||||
return this.http.post<Indicator[]>(properties.monitorServiceAPIURL + path.join('/'), indicators, CustomOptions.registryOptions()).pipe(map(indicators => {
|
|
||||||
return HelperFunctions.copy(indicators);
|
return HelperFunctions.copy(indicators);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
moveIndicator(path: string[], moveIndicator: MoveIndicator): Observable<SubCategory> {
|
moveIndicator(url: string, path: string[], moveIndicator: MoveIndicator): Observable<SubCategory> {
|
||||||
path.push('moveIndicator');
|
return this.http.post<SubCategory>(url + '/' + path.join('/') + '/moveIndicator', moveIndicator, CustomOptions.registryOptions()).pipe(map(subCategory => {
|
||||||
return this.http.post<SubCategory>(properties.monitorServiceAPIURL + path.join('/'), moveIndicator, CustomOptions.registryOptions()).pipe(map(subCategory => {
|
|
||||||
return HelperFunctions.copy(subCategory);
|
return HelperFunctions.copy(subCategory);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
updateUmbrella(id: string, update: UpdateUmbrella): Observable<Umbrella> {
|
updateUmbrella(url: string, id: string, update: UpdateUmbrella): Observable<Umbrella> {
|
||||||
return this.http.post<Umbrella>(properties.monitorServiceAPIURL + id + '/umbrella', update, CustomOptions.registryOptions()).pipe(map(umbrella => {
|
return this.http.post<Umbrella>(url + '/' + id + '/umbrella', update, CustomOptions.registryOptions()).pipe(map(umbrella => {
|
||||||
return HelperFunctions.copy(umbrella);
|
return HelperFunctions.copy(umbrella);
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
|
@ -206,7 +206,7 @@ export class MyOrcidLinksComponent {
|
||||||
this.subscriptions.push(this._orcidService.getPersonalDetails().subscribe(
|
this.subscriptions.push(this._orcidService.getPersonalDetails().subscribe(
|
||||||
details => {
|
details => {
|
||||||
let author: string = "";
|
let author: string = "";
|
||||||
|
console.log(details)
|
||||||
if(details && details['name']) {
|
if(details && details['name']) {
|
||||||
let name: string = details['name'];
|
let name: string = details['name'];
|
||||||
if(name['given-names'] && name['given-names']['value']) {
|
if(name['given-names'] && name['given-names']['value']) {
|
||||||
|
@ -303,14 +303,10 @@ export class MyOrcidLinksComponent {
|
||||||
let works = this.works.slice(from, to);
|
let works = this.works.slice(from, to);
|
||||||
|
|
||||||
for(let work of works) {
|
for(let work of works) {
|
||||||
if(work['pids'] && work['pids'].length > 0) {
|
|
||||||
for(let pid of work['pids']) {
|
for(let pid of work['pids']) {
|
||||||
let identifier: Identifier = Identifier.getIdentifierFromString(pid, false);
|
let identifier: Identifier = Identifier.getIdentifierFromString(pid, false);
|
||||||
this.orcidQuery += (this.orcidQuery ? " or " : "") + ('(pid="'+StringUtils.URIEncode(identifier.id)+'")');
|
this.orcidQuery += (this.orcidQuery ? " or " : "") + ('(pid="'+StringUtils.URIEncode(identifier.id)+'")');
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
this.orcidQuery += (this.orcidQuery ? " or " : "") + ('(objIdentifier="' + StringUtils.URIEncode(work['openaireId']) + '")');
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
this.showLoading = false;
|
this.showLoading = false;
|
||||||
this._getResults(works);
|
this._getResults(works);
|
||||||
|
@ -348,8 +344,8 @@ export class MyOrcidLinksComponent {
|
||||||
let relatedResults = [];
|
let relatedResults = [];
|
||||||
this.currentResults.push({"work": work, "results" : relatedResults})
|
this.currentResults.push({"work": work, "results" : relatedResults})
|
||||||
results.forEach(result => {
|
results.forEach(result => {
|
||||||
let identifierValues: string[] = result.identifiers ? [].concat(...Array.from(result.identifiers.values())) : [];
|
let identifierValues: string[] = [].concat(...Array.from(result.identifiers.values()));
|
||||||
if((work['pids'] && work['pids'].some(pid => identifierValues.includes(pid))) || work['openaireId'] === result.relcanId) {
|
if(work['pids'].some(pid => identifierValues.includes(pid))) {
|
||||||
|
|
||||||
let index: number = resultsFound.get(identifierValues);
|
let index: number = resultsFound.get(identifierValues);
|
||||||
if(!index) {
|
if(!index) {
|
||||||
|
|
|
@ -24,9 +24,7 @@ declare var UIkit: any;
|
||||||
<span *ngIf="!putCodes || putCodes.length == 0"
|
<span *ngIf="!putCodes || putCodes.length == 0"
|
||||||
[ngClass]="isMobile && pageType == 'landing' ? ' uk-width-1-1' : ''"
|
[ngClass]="isMobile && pageType == 'landing' ? ' uk-width-1-1' : ''"
|
||||||
[attr.uk-tooltip]="isMobile? 'cls: uk-invisible' : 'pos: bottom; cls: uk-active uk-text-small uk-padding-small'"
|
[attr.uk-tooltip]="isMobile? 'cls: uk-invisible' : 'pos: bottom; cls: uk-active uk-text-small uk-padding-small'"
|
||||||
[title]="!isLoggedIn ? tooltipNoLoggedInUser : tooltipAdd">
|
[title]="(noPids || !isLoggedIn) ? ((noPids) ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd">
|
||||||
<!-- [title]="((noPids && properties.environment != 'development') || !isLoggedIn) ? ((noPids && properties.environment != 'development') ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd">-->
|
|
||||||
|
|
||||||
<span (click)="currentAction='add'; saveWorkPreparation();"
|
<span (click)="currentAction='add'; saveWorkPreparation();"
|
||||||
[class.uk-disabled]="isDisabled"
|
[class.uk-disabled]="isDisabled"
|
||||||
[class.clickable]="!isDisabled">
|
[class.clickable]="!isDisabled">
|
||||||
|
@ -34,24 +32,21 @@ declare var UIkit: any;
|
||||||
[ngClass]="isMobile && !(pageType == 'landing') ? 'uk-margin-left' : ''"
|
[ngClass]="isMobile && !(pageType == 'landing') ? 'uk-margin-left' : ''"
|
||||||
[class.uk-text-bolder]="!(isMobile && pageType == 'landing')"
|
[class.uk-text-bolder]="!(isMobile && pageType == 'landing')"
|
||||||
[class.uk-text-muted]="isDisabled">
|
[class.uk-text-muted]="isDisabled">
|
||||||
<!-- <icon *ngIf="!showLoading" [class.text-orcid]="properties.environment != 'beta' && !showLoading && isLoggedIn && (pids || identifiers?.size > 0 || properties.environment == 'development')"-->
|
<icon *ngIf="!showLoading" [class.text-orcid]="properties.environment != 'beta' && !showLoading && isLoggedIn && (pids || identifiers?.size > 0)"
|
||||||
<icon *ngIf="!showLoading" [class.text-orcid]="properties.environment != 'beta' && !showLoading && isLoggedIn"
|
|
||||||
[class.uk-text-muted]="isDisabled"
|
[class.uk-text-muted]="isDisabled"
|
||||||
name="orcid_add" [ratio]="(isMobile && pageType == 'search') ? 0.7 : 1" visuallyHidden="add"></icon>
|
name="orcid_add" [ratio]="(isMobile && pageType == 'search') ? 0.7 : 1" visuallyHidden="add"></icon>
|
||||||
<span *ngIf="showLoading" class="uk-icon"><loading
|
<span *ngIf="showLoading" class="uk-icon"><loading
|
||||||
[top_margin]="false" [size]="'small'"></loading></span>
|
[top_margin]="false" [size]="'small'"></loading></span>
|
||||||
<span *ngIf="!compactView" [ngClass]="(isMobile && pageType == 'landing') ? 'uk-margin-small-left' : 'uk-margin-xsmall-left'">Claim</span>
|
<span [ngClass]="(isMobile && pageType == 'landing') ? 'uk-margin-small-left' : 'uk-margin-xsmall-left'">Claim</span>
|
||||||
</a>
|
</a>
|
||||||
<div *ngIf="isMobile && pageType == 'landing'" class="uk-margin-xsmall-top uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall"
|
<div *ngIf="isMobile && pageType == 'landing'" class="uk-margin-xsmall-top uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall"
|
||||||
[innerHTML]="!isLoggedIn ? tooltipNoLoggedInUser : tooltipAdd"></div>
|
[innerHTML]="(noPids || !isLoggedIn) ? ((noPids) ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd"></div>
|
||||||
<!-- [innerHTML]="((noPids && properties.environment != 'development') || !isLoggedIn) ? ((noPids && properties.environment != 'development') ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipAdd"></div>-->
|
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
<span *ngIf="putCodes && putCodes.length > 0" [ngClass]="isMobile && pageType == 'landing' ? ' uk-width-1-1' : ''"
|
<span *ngIf="putCodes && putCodes.length > 0" [ngClass]="isMobile && pageType == 'landing' ? ' uk-width-1-1' : ''"
|
||||||
[attr.uk-tooltip]="isMobile? 'cls: uk-invisible' : 'pos: bottom; cls: uk-active uk-text-small uk-padding-small'"
|
[attr.uk-tooltip]="isMobile? 'cls: uk-invisible' : 'pos: bottom; cls: uk-active uk-text-small uk-padding-small'"
|
||||||
[title]="!isLoggedIn ? tooltipNoLoggedInUser : tooltipDelete">
|
[title]="(noPids || !isLoggedIn) ? ((noPids) ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipDelete">
|
||||||
<!-- [title]="((noPids && properties.environment != 'development') || !isLoggedIn) ? ((noPids && properties.environment != 'development') ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipDelete">-->
|
|
||||||
<span (click)="currentAction='delete'; deleteWorks();"
|
<span (click)="currentAction='delete'; deleteWorks();"
|
||||||
[class.uk-disabled]="isDisabled"
|
[class.uk-disabled]="isDisabled"
|
||||||
[class.clickable]="!isDisabled">
|
[class.clickable]="!isDisabled">
|
||||||
|
@ -59,17 +54,15 @@ declare var UIkit: any;
|
||||||
[ngClass]="isMobile && !(pageType == 'landing') ? 'uk-margin-left' : ''"
|
[ngClass]="isMobile && !(pageType == 'landing') ? 'uk-margin-left' : ''"
|
||||||
[class.uk-text-bolder]="!(isMobile && pageType == 'landing')"
|
[class.uk-text-bolder]="!(isMobile && pageType == 'landing')"
|
||||||
[class.uk-text-muted]="isDisabled">
|
[class.uk-text-muted]="isDisabled">
|
||||||
<!-- <icon *ngIf="!showLoading" [class.text-orcid]="!showLoading && isLoggedIn && (pids || identifiers?.size > 0 || properties.environment == 'development')"-->
|
<icon *ngIf="!showLoading" [class.text-orcid]="!showLoading && isLoggedIn && (pids || identifiers?.size > 0)"
|
||||||
<icon *ngIf="!showLoading" [class.text-orcid]="!showLoading && isLoggedIn"
|
|
||||||
[class.uk-text-muted]="isDisabled"
|
[class.uk-text-muted]="isDisabled"
|
||||||
name="orcid_bin" [ratio]="(isMobile && pageType == 'search') ? 0.7 : 1" visuallyHidden="delete"></icon>
|
name="orcid_bin" [ratio]="(isMobile && pageType == 'search') ? 0.7 : 1" visuallyHidden="delete"></icon>
|
||||||
<span *ngIf="showLoading" class="uk-icon"><loading
|
<span *ngIf="showLoading" class="uk-icon"><loading
|
||||||
[top_margin]="false" [size]="'small'"></loading></span>
|
[top_margin]="false" [size]="'small'"></loading></span>
|
||||||
<span *ngIf="!compactView" [ngClass]="(isMobile && pageType == 'landing') ? 'uk-margin-small-left' : 'uk-margin-xsmall-left'">Remove</span>
|
<span [ngClass]="(isMobile && pageType == 'landing') ? 'uk-margin-small-left' : 'uk-margin-xsmall-left'">Remove</span>
|
||||||
</a>
|
</a>
|
||||||
<div *ngIf="isMobile && pageType == 'landing'" class="uk-margin-xsmall-top uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall"
|
<div *ngIf="isMobile && pageType == 'landing'" class="uk-margin-xsmall-top uk-padding uk-padding-remove-vertical uk-text-meta uk-text-xsmall"
|
||||||
[innerHTML]="!isLoggedIn ? tooltipNoLoggedInUser : tooltipDelete"></div>
|
[innerHTML]="(noPids || !isLoggedIn) ? ((noPids) ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipDelete"></div>
|
||||||
<!-- [innerHTML]="((noPids && properties.environment != 'development') || !isLoggedIn) ? ((noPids && properties.environment != 'development') ? tooltipNoPid : tooltipNoLoggedInUser) : tooltipDelete"></div>-->
|
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
@ -199,16 +192,8 @@ declare var UIkit: any;
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="(work['external-ids'] && work['external-ids']['external-id']) || openaireId" class="uk-margin-small-bottom">
|
<div *ngIf="work['external-ids'] && work['external-ids']['external-id']" class="uk-margin-small-bottom">
|
||||||
<showIdentifiers [identifiers]="parseIdentifiers(work['external-ids']['external-id'])"></showIdentifiers>
|
<showIdentifiers [identifiers]="parseIdentifiers(work['external-ids']['external-id'])"></showIdentifiers>
|
||||||
<ng-container *ngIf="openaireId">
|
|
||||||
<span class="uk-text-meta uk-text-small uk-text-uppercase">Source-work-id: </span>
|
|
||||||
<span class="uk-margin-small-left">
|
|
||||||
<a [href]="openaireId.url" target="_blank" class="uk-display-inline-block custom-external">
|
|
||||||
{{openaireId.value}}
|
|
||||||
</a>
|
|
||||||
</span>
|
|
||||||
</ng-container>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div *ngIf="work['contributors'] && work['contributors']['contributor']">
|
<div *ngIf="work['contributors'] && work['contributors']['contributor']">
|
||||||
|
@ -315,8 +300,6 @@ export class OrcidWorkComponent {
|
||||||
//for myorcid links page
|
//for myorcid links page
|
||||||
@Input() showOnlyUpdateButton: boolean = false;
|
@Input() showOnlyUpdateButton: boolean = false;
|
||||||
@Input() showUpdateButton: boolean = true;
|
@Input() showUpdateButton: boolean = true;
|
||||||
@Input() compactView: boolean = false; // if true, do not show label for actions
|
|
||||||
|
|
||||||
public subscriptions: Subscription[] = [];
|
public subscriptions: Subscription[] = [];
|
||||||
@ViewChild('workModal') workModal;
|
@ViewChild('workModal') workModal;
|
||||||
// @ViewChild('saveWorkModal') saveWorkModal;
|
// @ViewChild('saveWorkModal') saveWorkModal;
|
||||||
|
@ -334,7 +317,6 @@ export class OrcidWorkComponent {
|
||||||
|
|
||||||
public works: any[] = [];
|
public works: any[] = [];
|
||||||
public orcidWorks: any[] = [];
|
public orcidWorks: any[] = [];
|
||||||
public openaireId: {value: string, url: string} = null;
|
|
||||||
public window: any;
|
public window: any;
|
||||||
|
|
||||||
public isLoggedIn: boolean = false;
|
public isLoggedIn: boolean = false;
|
||||||
|
@ -413,15 +395,11 @@ export class OrcidWorkComponent {
|
||||||
public parseIdentifiers(identifiers: ExternalIDV3_0[]): Map<string, string[]> {
|
public parseIdentifiers(identifiers: ExternalIDV3_0[]): Map<string, string[]> {
|
||||||
let identifiersMap: Map<string, string[]> = new Map<string, string[]>();
|
let identifiersMap: Map<string, string[]> = new Map<string, string[]>();
|
||||||
for (let identifier of identifiers) {
|
for (let identifier of identifiers) {
|
||||||
if(identifier['external-id-type'] == "source-work-id") {
|
|
||||||
this.openaireId = {value: identifier['external-id-value'], url: identifier['external-id-url'].value};
|
|
||||||
} else {
|
|
||||||
if (!identifiersMap.has(identifier['external-id-type'])) {
|
if (!identifiersMap.has(identifier['external-id-type'])) {
|
||||||
identifiersMap.set(identifier['external-id-type'], new Array<string>());
|
identifiersMap.set(identifier['external-id-type'], new Array<string>());
|
||||||
}
|
}
|
||||||
identifiersMap.get(identifier['external-id-type']).push(identifier['external-id-value']);
|
identifiersMap.get(identifier['external-id-type']).push(identifier['external-id-value']);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return identifiersMap;
|
return identifiersMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -464,7 +442,7 @@ export class OrcidWorkComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
private getPutCode() {
|
private getPutCode() {
|
||||||
this.subscriptions.push(this.orcidService.getPutCode(this.resultLandingInfo.relcanId, this.pids).subscribe(
|
this.subscriptions.push(this.orcidService.getPutCode(this.pids).subscribe(
|
||||||
putCodes => {
|
putCodes => {
|
||||||
this.putCodes = putCodes;
|
this.putCodes = putCodes;
|
||||||
this.cdr.markForCheck();
|
this.cdr.markForCheck();
|
||||||
|
@ -533,7 +511,7 @@ export class OrcidWorkComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
private saveWork() {
|
private saveWork() {
|
||||||
this.subscriptions.push(this.orcidService.saveWork(this.resultLandingInfo, this.resultLandingInfo.relcanId,this.pids).subscribe(
|
this.subscriptions.push(this.orcidService.saveWork(this.resultLandingInfo, this.pids).subscribe(
|
||||||
response => {
|
response => {
|
||||||
if(this.properties.logServiceUrl) {
|
if(this.properties.logServiceUrl) {
|
||||||
this.subscriptions.push(this._logService.logOrcidLink(this.properties, "added", this.resultLandingInfo.title, this.resultLandingInfo.identifiers.get('doi')[0]).subscribe(res => { }));
|
this.subscriptions.push(this._logService.logOrcidLink(this.properties, "added", this.resultLandingInfo.title, this.resultLandingInfo.identifiers.get('doi')[0]).subscribe(res => { }));
|
||||||
|
@ -586,7 +564,7 @@ export class OrcidWorkComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateWorkPreparation() {
|
private updateWorkPreparation() {
|
||||||
if (!this.isLoggedIn) {
|
if (!Session.isLoggedIn()) {
|
||||||
this._router.navigate(['/user-info'], {
|
this._router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
|
@ -612,7 +590,7 @@ export class OrcidWorkComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateWork() {
|
private updateWork() {
|
||||||
this.subscriptions.push(this.orcidService.updateWork(this.resultLandingInfo, this.resultLandingInfo.relcanId, this.pids, this.putCodes[0]).subscribe(
|
this.subscriptions.push(this.orcidService.updateWork(this.resultLandingInfo, this.pids, this.putCodes[0]).subscribe(
|
||||||
response => {
|
response => {
|
||||||
if (response) {
|
if (response) {
|
||||||
this.updateDates[0] = response['last-modified-date'].value;
|
this.updateDates[0] = response['last-modified-date'].value;
|
||||||
|
@ -648,8 +626,7 @@ export class OrcidWorkComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
public getOrcidWorks() {
|
public getOrcidWorks() {
|
||||||
this.openaireId = null;
|
if (!Session.isLoggedIn()) {
|
||||||
if (!this.isLoggedIn) {
|
|
||||||
this._router.navigate(['/user-info'], {
|
this._router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
|
@ -691,7 +668,7 @@ export class OrcidWorkComponent {
|
||||||
|
|
||||||
|
|
||||||
public deleteWorks(confirmed: boolean = false) {
|
public deleteWorks(confirmed: boolean = false) {
|
||||||
if (!this.isLoggedIn) {
|
if (!Session.isLoggedIn()) {
|
||||||
this._router.navigate(['/user-info'], {
|
this._router.navigate(['/user-info'], {
|
||||||
queryParams: {
|
queryParams: {
|
||||||
"errorCode": LoginErrorCodes.NOT_VALID,
|
"errorCode": LoginErrorCodes.NOT_VALID,
|
||||||
|
@ -856,7 +833,7 @@ export class OrcidWorkComponent {
|
||||||
this.message += "There was an <span class='uk-text-bold'>error getting</span> work \"<span class='uk-text-bold'>" + this.resultTitle + "</span>\" from your ORCID record. <br> Please try again later.";
|
this.message += "There was an <span class='uk-text-bold'>error getting</span> work \"<span class='uk-text-bold'>" + this.resultTitle + "</span>\" from your ORCID record. <br> Please try again later.";
|
||||||
} else if (this.currentAction == "add") {
|
} else if (this.currentAction == "add") {
|
||||||
// this.message += "There was an <span class='uk-text-bold'>error adding</span> work with pids: <span class='uk-text-bold'>"+this.pids+"</span> to your ORCID record. <br> Please try again later.";
|
// this.message += "There was an <span class='uk-text-bold'>error adding</span> work with pids: <span class='uk-text-bold'>"+this.pids+"</span> to your ORCID record. <br> Please try again later.";
|
||||||
this.message += "There was an <span class='uk-text-bold'>error adding</span> work with openaireId: \"<span class='uk-text-bold'>"+this.resultLandingInfo.relcanId+(this.pids?.length > 0 ? "</span>\" and pids: \"<span class='uk-text-bold'>" + this.pids : "") +"</span>\" to your ORCID record. <br> Please try again later.";
|
this.message += "There was an <span class='uk-text-bold'>error adding</span> work with pids: \"<span class='uk-text-bold'>" + this.pids + "</span>\" to your ORCID record. <br> Please try again later.";
|
||||||
} else if (this.currentAction == "update") {
|
} else if (this.currentAction == "update") {
|
||||||
// this.message += "There was an <span class='uk-text-bold'>error updating</span> work with pids: <span class='uk-text-bold'>"+this.pids+"</span> to your ORCID record. <br> Please try again later.";
|
// this.message += "There was an <span class='uk-text-bold'>error updating</span> work with pids: <span class='uk-text-bold'>"+this.pids+"</span> to your ORCID record. <br> Please try again later.";
|
||||||
this.message += "There was an <span class='uk-text-bold'>error updating</span> work \"<span class='uk-text-bold'>" + this.resultTitle + "</span>\" to your ORCID record. <br> Please try again later.";
|
this.message += "There was an <span class='uk-text-bold'>error updating</span> work \"<span class='uk-text-bold'>" + this.resultTitle + "</span>\" to your ORCID record. <br> Please try again later.";
|
||||||
|
@ -900,8 +877,7 @@ export class OrcidWorkComponent {
|
||||||
}
|
}
|
||||||
|
|
||||||
get isDisabled() {
|
get isDisabled() {
|
||||||
return (this.properties.environment == 'beta' || this.showLoading || !this.isLoggedIn);
|
return (this.properties.environment == 'beta' || this.showLoading || !this.isLoggedIn || (!this.pids && (!this.identifiers || this.identifiers.size == 0)));
|
||||||
// return (this.properties.environment == 'beta' || this.showLoading || !this.isLoggedIn || (!this.pids && (!this.identifiers || this.identifiers.size == 0) && properties.environment != 'development'));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get noPids() {
|
get noPids() {
|
||||||
|
|
|
@ -11,21 +11,19 @@ import {ConnectHelper} from "../connect/connectHelper";
|
||||||
export class OrcidService {
|
export class OrcidService {
|
||||||
constructor(private http: HttpClient) {}
|
constructor(private http: HttpClient) {}
|
||||||
|
|
||||||
getPutCode(openaireId: string, pids: string) {
|
getPutCode(pids: string) {
|
||||||
let url: string = properties.orcidAPIURL+"local/put-code?openaireId="+openaireId+(pids ? ("&pids="+pids) : "");
|
let url: string = properties.orcidAPIURL+"local/put-code?pids="+pids;
|
||||||
return this.http.get<string[]>(url, CustomOptions.registryOptions());
|
return this.http.get<string[]>(url, CustomOptions.registryOptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
getPutCodes(openaireIds: string[], pids: string[][]) {
|
getPutCodes(pids: string[][]) {
|
||||||
let url: string = properties.orcidAPIURL+"local/put-codes";
|
let url: string = properties.orcidAPIURL+"local/put-codes";
|
||||||
let map = {"pids": pids, "openaireIds": openaireIds};
|
return this.http.post<string[][]>(url, JSON.stringify(pids), CustomOptions.registryOptions());
|
||||||
return this.http.post<string[][]>(url, JSON.stringify(map), CustomOptions.registryOptions());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getLocalWorksByPids(openaireIds: string[], pids: string[][]) {
|
getLocalWorksByPids(pids: string[][]) {
|
||||||
let url: string = properties.orcidAPIURL+"local/works";
|
let url: string = properties.orcidAPIURL+"local/works";
|
||||||
let map = {"pids": pids, "openaireIds": openaireIds};
|
return this.http.post<string[][]>(url, JSON.stringify(pids), CustomOptions.registryOptions());
|
||||||
return this.http.post<string[][]>(url, JSON.stringify(map), CustomOptions.registryOptions());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
getToken(code: string) {
|
getToken(code: string) {
|
||||||
|
@ -49,15 +47,14 @@ export class OrcidService {
|
||||||
return this.http.get(url, CustomOptions.registryOptions());
|
return this.http.get(url, CustomOptions.registryOptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
saveWork(resultLandingInfo: ResultLandingInfo, openaireId: string, pids: string) {
|
saveWork(resultLandingInfo: ResultLandingInfo, pids: string) {
|
||||||
let work = WorkV3_0.resultLandingInfoConvert(resultLandingInfo, null);
|
let work = WorkV3_0.resultLandingInfoConvert(resultLandingInfo, null);
|
||||||
let portalId: string = ConnectHelper.getCommunityFromDomain(properties.domain);
|
let portalId: string = ConnectHelper.getCommunityFromDomain(properties.domain);
|
||||||
// if dashboard format changes, check in API the metrics service ("calculateMetrics" method) for orcid KPIs
|
// if dashboard format changes, check in API the metrics service ("calculateMetrics" method) for orcid KPIs
|
||||||
let dashboard: string = properties.environment + "_" + properties.dashboard + (portalId? "_" + portalId : "");
|
let dashboard: string = properties.environment + "_" + properties.dashboard + (portalId? "_" + portalId : "");
|
||||||
let result = {
|
let result = {
|
||||||
"dashboard": dashboard,
|
"dashboard": dashboard,
|
||||||
"openaireId": openaireId,
|
"pids": pids.split(","),
|
||||||
"pids": pids? pids.split(",") : [],
|
|
||||||
"work": work
|
"work": work
|
||||||
};
|
};
|
||||||
let url: string = properties.orcidAPIURL+"orcid/work/save";
|
let url: string = properties.orcidAPIURL+"orcid/work/save";
|
||||||
|
@ -96,11 +93,10 @@ export class OrcidService {
|
||||||
// return this.http.post(url, JSON.stringify(work), CustomOptions.registryOptions())
|
// return this.http.post(url, JSON.stringify(work), CustomOptions.registryOptions())
|
||||||
// .pipe(map(res => work));
|
// .pipe(map(res => work));
|
||||||
// }
|
// }
|
||||||
updateWork(resultLandingInfo: ResultLandingInfo, openaireId: string, pids: string, putCode: string) {
|
updateWork(resultLandingInfo: ResultLandingInfo, pids: string, putCode: string) {
|
||||||
let work = WorkV3_0.resultLandingInfoConvert(resultLandingInfo, putCode);
|
let work = WorkV3_0.resultLandingInfoConvert(resultLandingInfo, putCode);
|
||||||
let result = {
|
let result = {
|
||||||
"openaireId": openaireId,
|
"pids": pids.split(","),
|
||||||
"pids": pids ? pids.split(",") : [],
|
|
||||||
"work": work
|
"work": work
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -141,7 +141,7 @@ export class WorkV3_0 {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(resultLandingInfo.identifiers && resultLandingInfo.identifiers.size > 0) {
|
if(resultLandingInfo.identifiers) {
|
||||||
work['external-ids'] = { 'external-id': [] };
|
work['external-ids'] = { 'external-id': [] };
|
||||||
resultLandingInfo.identifiers.forEach(((values, key) => {
|
resultLandingInfo.identifiers.forEach(((values, key) => {
|
||||||
values.forEach(value => {
|
values.forEach(value => {
|
||||||
|
@ -154,15 +154,6 @@ export class WorkV3_0 {
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
}))
|
}))
|
||||||
} else {
|
|
||||||
work['external-ids'] = { 'external-id': [{
|
|
||||||
"external-id-type": "source-work-id",
|
|
||||||
"external-id-value": resultLandingInfo.relcanId,
|
|
||||||
"external-id-relationship": "self",
|
|
||||||
"external-id-url": {
|
|
||||||
"value": "https://explore.openaire.eu/search/"+resultLandingInfo.resultType+"?id="+resultLandingInfo.relcanId
|
|
||||||
},
|
|
||||||
}] };
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// url (UrlV3_0, optional),
|
// url (UrlV3_0, optional),
|
||||||
|
|
|
@ -409,8 +409,7 @@
|
||||||
[status]=searchUtils.status
|
[status]=searchUtils.status
|
||||||
[type]="entityType"
|
[type]="entityType"
|
||||||
[showLoading]="true" [properties]=properties
|
[showLoading]="true" [properties]=properties
|
||||||
[compactView]="compactView"
|
[compactView]="compactView">
|
||||||
[isLoggedIn]="isLoggedIn">
|
|
||||||
</search-result>
|
</search-result>
|
||||||
<deposit-result *ngIf="usedBy == 'deposit'"
|
<deposit-result *ngIf="usedBy == 'deposit'"
|
||||||
[results]="results"
|
[results]="results"
|
||||||
|
|
|
@ -37,7 +37,6 @@ import {IndexInfoService} from "../../utils/indexInfo.service";
|
||||||
import {Background} from "../../utils/background-utils";
|
import {Background} from "../../utils/background-utils";
|
||||||
import {LayoutService} from "../../dashboard/sharedComponents/sidebar/layout.service";
|
import {LayoutService} from "../../dashboard/sharedComponents/sidebar/layout.service";
|
||||||
import {Platform} from "@angular/cdk/platform";
|
import {Platform} from "@angular/cdk/platform";
|
||||||
import {UserManagementService} from "../../services/user-management.service";
|
|
||||||
|
|
||||||
export interface SearchForm extends Background {}
|
export interface SearchForm extends Background {}
|
||||||
|
|
||||||
|
@ -166,8 +165,6 @@ export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
searchTerm: string = null;
|
searchTerm: string = null;
|
||||||
advancedSearchTerms: number = 0;
|
advancedSearchTerms: number = 0;
|
||||||
|
|
||||||
public isLoggedIn: boolean = false;
|
|
||||||
|
|
||||||
@Input() hasCompactView: boolean = false; // if true, show buttons for compact view
|
@Input() hasCompactView: boolean = false; // if true, show buttons for compact view
|
||||||
public compactView: boolean = false; // if true, show less info (e.g. hide description) on each result
|
public compactView: boolean = false; // if true, show less info (e.g. hide description) on each result
|
||||||
|
|
||||||
|
@ -183,22 +180,11 @@ export class NewSearchPageComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
private helper: HelperService,
|
private helper: HelperService,
|
||||||
private layoutService: LayoutService,
|
private layoutService: LayoutService,
|
||||||
@Inject(PLATFORM_ID) private platform: any,
|
@Inject(PLATFORM_ID) private platform: any,
|
||||||
private cdr: ChangeDetectorRef, private indexInfoService: IndexInfoService,
|
private cdr: ChangeDetectorRef, private indexInfoService: IndexInfoService) {
|
||||||
private userManagementService: UserManagementService) {
|
|
||||||
this.isServer = isPlatformServer(this.platform);
|
this.isServer = isPlatformServer(this.platform);
|
||||||
}
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.subscriptions.push(this.userManagementService.getUserInfo().subscribe(user => {
|
|
||||||
if (user) {
|
|
||||||
this.isLoggedIn = true;
|
|
||||||
} else {
|
|
||||||
this.isLoggedIn = false;
|
|
||||||
}
|
|
||||||
}, error => {
|
|
||||||
this.isLoggedIn = false;
|
|
||||||
}));
|
|
||||||
|
|
||||||
if(properties.adminToolsPortalType !== "explore") {
|
if(properties.adminToolsPortalType !== "explore") {
|
||||||
//this.getDivContents();
|
//this.getDivContents();
|
||||||
this.getPageContents();
|
this.getPageContents();
|
||||||
|
|
|
@ -26,8 +26,6 @@ export class SearchResultComponent implements OnInit, OnChanges {
|
||||||
@Input() showEnermaps: boolean;
|
@Input() showEnermaps: boolean;
|
||||||
@Input() compactView: boolean = false; // if true, show less info (e.g. hide description) on each result
|
@Input() compactView: boolean = false; // if true, show less info (e.g. hide description) on each result
|
||||||
|
|
||||||
@Input() isLoggedIn: boolean = false;
|
|
||||||
|
|
||||||
public isMobile: boolean = false;
|
public isMobile: boolean = false;
|
||||||
private subscriptions: any[] = [];
|
private subscriptions: any[] = [];
|
||||||
|
|
||||||
|
@ -62,30 +60,25 @@ export class SearchResultComponent implements OnInit, OnChanges {
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((properties.adminToolsPortalType == "explore" || properties.adminToolsPortalType == "community" || properties.adminToolsPortalType == "aggregator" || properties.dashboard == "irish")
|
if ((properties.adminToolsPortalType == "explore" || properties.adminToolsPortalType == "community" || properties.adminToolsPortalType == "aggregator" || properties.dashboard == "irish")
|
||||||
&& this.isLoggedIn && this.results && this.results.length > 0
|
&& Session.isLoggedIn() && this.results && this.results.length > 0
|
||||||
&& (this.type == "result" || this.type == "publication" || this.type == "dataset" || this.type == "software" || this.type == "other")
|
&& (this.type == "result" || this.type == "publication" || this.type == "dataset" || this.type == "software" || this.type == "other")
|
||||||
) {
|
) {
|
||||||
this.subscriptions.push(this.orcidService.getPutCodes(
|
this.subscriptions.push(this.orcidService.getPutCodes(this.previewResults.map(
|
||||||
this.previewResults.map(previewResult => {return previewResult.relcanId}),
|
|
||||||
this.previewResults.map(
|
|
||||||
previewResult => {
|
previewResult => {
|
||||||
if (previewResult.identifiers) {
|
if (previewResult.identifiers) {
|
||||||
let pidsArray: string[] = null;
|
let pidsArray: string[] = [];
|
||||||
if(previewResult.identifiers?.size > 0) {
|
|
||||||
pidsArray = [];
|
|
||||||
for (let key of Array.from(previewResult.identifiers.keys())) {
|
for (let key of Array.from(previewResult.identifiers.keys())) {
|
||||||
pidsArray = pidsArray.concat(previewResult.identifiers.get(key));
|
pidsArray = pidsArray.concat(previewResult.identifiers.get(key));
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return pidsArray;//.join();
|
return pidsArray;//.join();
|
||||||
}
|
}
|
||||||
})).subscribe(
|
})).subscribe(
|
||||||
putCodes => {
|
putCodes => {
|
||||||
for (let i = 0; i < this.previewResults.length; i++) {
|
for (let i = 0; i < this.previewResults.length; i++) {
|
||||||
//if (this.previewResults[i].identifiers) {
|
if (this.previewResults[i].identifiers) {
|
||||||
this.previewResults[i].orcidPutCodes = putCodes[i];
|
this.previewResults[i].orcidPutCodes = putCodes[i];
|
||||||
// console.debug(i, this.previewResults[i].orcidPutCodes);
|
// console.debug(i, this.previewResults[i].orcidPutCodes);
|
||||||
//}
|
}
|
||||||
}
|
}
|
||||||
this.previewResults = JSON.parse(JSON.stringify(this.previewResults, this.replacer), this.reviver);
|
this.previewResults = JSON.parse(JSON.stringify(this.previewResults, this.replacer), this.reviver);
|
||||||
}, error => {
|
}, error => {
|
||||||
|
|
|
@ -26,19 +26,19 @@ export class CustomizationService {
|
||||||
|
|
||||||
saveLayout(properties: EnvProperties, pid: string, layout: Layout, portalType = null): Observable<Layout> {
|
saveLayout(properties: EnvProperties, pid: string, layout: Layout, portalType = null): Observable<Layout> {
|
||||||
CustomizationService.removeNulls(layout);
|
CustomizationService.removeNulls(layout);
|
||||||
return this.http.post<Layout>(properties.adminToolsAPIURL + (portalType?portalType: properties.adminToolsPortalType) + '/'
|
return this.http.post<Layout>(properties.adminToolsAPIURL + '/' + (portalType?portalType: properties.adminToolsPortalType) + '/'
|
||||||
+ pid + '/layout', layout, CustomOptions.getAuthOptionsWithBody());
|
+ pid + '/layout', layout, CustomOptions.getAuthOptionsWithBody());
|
||||||
}
|
}
|
||||||
deleteLayout(properties: EnvProperties, pid: string, portalType = null): Observable<Layout> {
|
deleteLayout(properties: EnvProperties, pid: string, portalType = null): Observable<Layout> {
|
||||||
return this.http.delete<Layout>(properties.adminToolsAPIURL + (portalType?portalType: properties.adminToolsPortalType) + '/'
|
return this.http.delete<Layout>(properties.adminToolsAPIURL + '/' + (portalType?portalType: properties.adminToolsPortalType) + '/'
|
||||||
+ pid + '/layout', CustomOptions.getAuthOptionsWithBody());
|
+ pid + '/layout', CustomOptions.getAuthOptionsWithBody());
|
||||||
}
|
}
|
||||||
getLayout(properties: EnvProperties, pid: string): Observable<Layout> {
|
getLayout(properties: EnvProperties, pid: string): Observable<Layout> {
|
||||||
return this.http.get<Layout>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/'
|
return this.http.get<Layout>(properties.adminToolsAPIURL+"/" + properties.adminToolsPortalType + '/'
|
||||||
+ pid + '/layout');
|
+ pid + '/layout');
|
||||||
}
|
}
|
||||||
getLayouts(properties: EnvProperties): Observable<Layout[]> {
|
getLayouts(properties: EnvProperties): Observable<Layout[]> {
|
||||||
return this.http.get<Layout[]>(properties.adminToolsAPIURL + 'community/layouts');
|
return this.http.get<Layout[]>(properties.adminToolsAPIURL+'/community/layouts');
|
||||||
}
|
}
|
||||||
mockLayout(): any {
|
mockLayout(): any {
|
||||||
return this.http.get('./assets/customizationOptions.json') ;
|
return this.http.get('./assets/customizationOptions.json') ;
|
||||||
|
|
|
@ -30,27 +30,27 @@ export class HelpContentService {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getEntities() {
|
getEntities(helpContentUrl:string) {
|
||||||
return this.http.get<Array<Entity>>(properties.adminToolsAPIURL + 'entity')
|
return this.http.get<Array<Entity>>(helpContentUrl + 'entity')
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
saveEntity(entity: Entity) {
|
saveEntity(entity: Entity, helpContentUrl:string) {
|
||||||
HelpContentService.removeNulls(entity);
|
HelpContentService.removeNulls(entity);
|
||||||
|
|
||||||
return this.http.post<Entity>(properties.adminToolsAPIURL + 'entity/save', JSON.stringify(entity), CustomOptions.getAuthOptionsWithBody())
|
return this.http.post<Entity>(helpContentUrl + 'entity/save', JSON.stringify(entity), CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
updateEntity(entity: Entity) {
|
updateEntity(entity: Entity, helpContentUrl:string) {
|
||||||
HelpContentService.removeNulls(entity);
|
HelpContentService.removeNulls(entity);
|
||||||
|
|
||||||
return this.http.post<Entity>(properties.adminToolsAPIURL + 'entity/update', JSON.stringify(entity), CustomOptions.getAuthOptionsWithBody())
|
return this.http.post<Entity>(helpContentUrl + 'entity/update', JSON.stringify(entity), CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteEntities(ids: string[]) {
|
deleteEntities(ids : string[], helpContentUrl:string) {
|
||||||
return this.http.post(properties.adminToolsAPIURL + 'entity/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
return this.http.post(helpContentUrl + 'entity/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,14 +62,14 @@ export class HelpContentService {
|
||||||
// .catch(this.handleError);
|
// .catch(this.handleError);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
getCommunityEntities(pid: string) {
|
getCommunityEntities(pid: string, helpContentUrl:string) {
|
||||||
return this.http.get<Array<Entity>>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/'+pid+'/entities')
|
return this.http.get<Array<Entity>>(helpContentUrl + properties.adminToolsPortalType + '/'+pid+'/entities')
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleEntities(pid: string, ids: string[], status: boolean) {
|
toggleEntities(pid: string, ids : string[],status : boolean, helpContentUrl:string) {
|
||||||
|
|
||||||
return this.http.post(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/'+pid+ '/entity/toggle?status='+ status.toString(),
|
return this.http.post(helpContentUrl + properties.adminToolsPortalType + '/'+pid+ '/entity/toggle?status='+ status.toString(),
|
||||||
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
@ -99,16 +99,16 @@ export class HelpContentService {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// Replacing getDivIdsFull
|
// Replacing getDivIdsFull
|
||||||
getAllDivIdsFull() {
|
getAllDivIdsFull(helpContentUrl:string) {
|
||||||
return this.http.get<Array<DivId>>(properties.adminToolsAPIURL + 'div/full')
|
return this.http.get<Array<DivId>>(helpContentUrl + 'div/full')
|
||||||
//.map(res => <Array<DivId>> res.json())
|
//.map(res => <Array<DivId>> res.json())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
getDivIdsFullByPortal(page_id: string, pid: string) {
|
getDivIdsFullByPortal(page_id: string, helpContentUrl:string, pid: string) {
|
||||||
let parameters: string = page_id ? "?&page="+page_id : "";
|
let parameters: string = page_id ? "?&page="+page_id : "";
|
||||||
|
|
||||||
return this.http.get<Array<DivId>>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/'+pid + '/div/full'+parameters)
|
return this.http.get<Array<DivId>>(helpContentUrl + properties.adminToolsPortalType + '/'+pid + '/div/full'+parameters)
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
// End of replacing getDivIdsFull
|
// End of replacing getDivIdsFull
|
||||||
|
@ -124,57 +124,57 @@ export class HelpContentService {
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
updateDivId(divId: DivId) {
|
updateDivId(divId: DivId, helpContentUrl:string) {
|
||||||
HelpContentService.removeNulls(divId);
|
HelpContentService.removeNulls(divId);
|
||||||
|
|
||||||
return this.http.post<DivId>(properties.adminToolsAPIURL + 'div/update', JSON.stringify(divId), CustomOptions.getAuthOptionsWithBody())
|
return this.http.post<DivId>(helpContentUrl + 'div/update', JSON.stringify(divId), CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
saveDivId(divId: DivId) {
|
saveDivId(divId: DivId, helpContentUrl:string) {
|
||||||
HelpContentService.removeNulls(divId);
|
HelpContentService.removeNulls(divId);
|
||||||
|
|
||||||
return this.http.post<DivId>(properties.adminToolsAPIURL + 'div/save', JSON.stringify(divId), CustomOptions.getAuthOptionsWithBody())
|
return this.http.post<DivId>(helpContentUrl + 'div/save', JSON.stringify(divId), CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteDivIds(ids : string[]) {
|
deleteDivIds(ids : string[], helpContentUrl:string) {
|
||||||
return this.http.post(properties.adminToolsAPIURL + 'div/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
return this.http.post(helpContentUrl + 'div/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
getPageIdsFromDivIds(pid: string) {
|
getPageIdsFromDivIds(pid: string, helpContentUrl:string) {
|
||||||
return this.http.get<Array<string>>(properties.adminToolsAPIURL + properties.adminToolsPortalType + "/" + pid + '/div/pages')
|
return this.http.get<Array<string>>(helpContentUrl + properties.adminToolsPortalType + "/" + pid + '/div/pages')
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
getCommunityDivHelpContents(pid: string, pageId:string = null) {
|
getCommunityDivHelpContents(pid: string, helpContentUrl:string, pageId:string = null) {
|
||||||
return this.http.get<Array<DivHelpContent>>(properties.adminToolsAPIURL + properties.adminToolsPortalType + "/" + pid + (pageId ? '/' + pageId : '') + '/divhelpcontent')
|
return this.http.get<Array<DivHelpContent>>(helpContentUrl + properties.adminToolsPortalType + "/" + pid + (pageId ? '/' + pageId : '') + '/divhelpcontent')
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
getDivHelpContent(id : string, pid: string) {
|
getDivHelpContent(id : string, helpContentUrl:string, pid: string) {
|
||||||
return this.http.get<DivHelpContent>(properties.adminToolsAPIURL + properties.adminToolsPortalType + "/" + pid + '/divhelpcontent/' + id)
|
return this.http.get<DivHelpContent>(helpContentUrl + properties.adminToolsPortalType + "/" + pid + '/divhelpcontent/' + id)
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
insertOrUpdateDivHelpContent(divHelpContent: DivHelpContent, pid: string) {
|
insertOrUpdateDivHelpContent(divHelpContent: DivHelpContent, helpContentUrl:string, pid: string) {
|
||||||
HelpContentService.removeNulls(divHelpContent);
|
HelpContentService.removeNulls(divHelpContent);
|
||||||
return this.http.post<DivHelpContent>(properties.adminToolsAPIURL + properties.adminToolsPortalType + "/" + pid + '/divhelpcontent/' + (divHelpContent._id ? 'update' : 'save'),
|
return this.http.post<DivHelpContent>(helpContentUrl + properties.adminToolsPortalType + "/" + pid + '/divhelpcontent/' + (divHelpContent._id ? 'update' : 'save'),
|
||||||
JSON.stringify(divHelpContent), CustomOptions.getAuthOptionsWithBody())
|
JSON.stringify(divHelpContent), CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
deleteDivHelpContents(ids : string[], pid: string) {
|
deleteDivHelpContents(ids : string[], helpContentUrl:string, pid: string) {
|
||||||
return this.http.post(properties.adminToolsAPIURL + properties.adminToolsPortalType + "/" + pid + '/divhelpcontent/delete',
|
return this.http.post(helpContentUrl + properties.adminToolsPortalType + "/" + pid + '/divhelpcontent/delete',
|
||||||
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleDivHelpContents(ids : string[], status : boolean, pid: string) {
|
toggleDivHelpContents(ids : string[],status : boolean, helpContentUrl:string, pid: string) {
|
||||||
|
|
||||||
return this.http.post(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + pid + '/divhelpcontent/toggle?status='+ status.toString(),
|
return this.http.post(helpContentUrl + properties.adminToolsPortalType + '/' + pid + '/divhelpcontent/toggle?status='+ status.toString(),
|
||||||
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
@ -186,12 +186,12 @@ export class HelpContentService {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
getCommunityPageHelpContents(pid: string, pageId:string = null) {
|
getCommunityPageHelpContents(pid: string, helpContentUrl:string, pageId:string = null) {
|
||||||
return this.http.get<Array<PageHelpContent>>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + pid + (pageId ? '/' + pageId : '') + '/pagehelpcontent')
|
return this.http.get<Array<PageHelpContent>>(helpContentUrl + properties.adminToolsPortalType + '/' + pid + (pageId ? '/' + pageId : '') + '/pagehelpcontent')
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
countCommunityPageHelpContents(pid: string, classContents:boolean = false) {
|
countCommunityPageHelpContents(pid: string, helpContentUrl:string ,classContents:boolean=false) {
|
||||||
return this.http.get<Array<PageHelpContent>>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + pid + (classContents?"/divhelpcontent":"/pagehelpcontent")+'/page/count')
|
return this.http.get<Array<PageHelpContent>>(helpContentUrl + properties.adminToolsPortalType + '/' + pid + (classContents?"/divhelpcontent":"/pagehelpcontent")+'/page/count')
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
getPageHelpContent(id : string, helpContentUrl:string, pid: string) {
|
getPageHelpContent(id : string, helpContentUrl:string, pid: string) {
|
||||||
|
@ -200,10 +200,10 @@ export class HelpContentService {
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
savePageHelpContent(pageHelpContent: PageHelpContent, pid: string) {
|
savePageHelpContent(pageHelpContent: PageHelpContent, helpContentUrl:string, pid: string) {
|
||||||
HelpContentService.removeNulls(pageHelpContent);
|
HelpContentService.removeNulls(pageHelpContent);
|
||||||
|
|
||||||
return this.http.post<PageHelpContent>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + pid + '/pagehelpcontent/' + (pageHelpContent._id ? 'update' : 'save'),
|
return this.http.post<PageHelpContent>(helpContentUrl + properties.adminToolsPortalType + '/' + pid + '/pagehelpcontent/' + (pageHelpContent._id ? 'update' : 'save'),
|
||||||
JSON.stringify(pageHelpContent), CustomOptions.getAuthOptionsWithBody())
|
JSON.stringify(pageHelpContent), CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
@ -216,14 +216,14 @@ export class HelpContentService {
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
deletePageHelpContents(ids : string[], pid: string) {
|
deletePageHelpContents(ids : string[], helpContentUrl:string, pid: string) {
|
||||||
return this.http.post(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + pid + '/pagehelpcontent/delete',
|
return this.http.post(helpContentUrl + properties.adminToolsPortalType + '/' + pid + '/pagehelpcontent/delete',
|
||||||
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
togglePageHelpContents(ids : string[],status : boolean, pid: string) {
|
togglePageHelpContents(ids : string[],status : boolean, helpContentUrl:string, pid: string) {
|
||||||
return this.http.post(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + pid + '/pagehelpcontent/toggle?status='+ status.toString(),
|
return this.http.post(helpContentUrl + properties.adminToolsPortalType + '/' + pid + '/pagehelpcontent/toggle?status='+ status.toString(),
|
||||||
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
@ -239,15 +239,9 @@ export class HelpContentService {
|
||||||
// .pipe(catchError(this.handleError));
|
// .pipe(catchError(this.handleError));
|
||||||
// }
|
// }
|
||||||
|
|
||||||
getCommunityPagesByRoute(pid: string, route: string) {
|
|
||||||
return this.http.get<Array<Page>>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/'+pid+'/pages'
|
|
||||||
+ (route ? '?page_route='+route : ''))
|
|
||||||
.pipe(map(pages => (pages.length>0?pages[0]:null)), catchError(this.handleError));
|
|
||||||
}
|
|
||||||
|
|
||||||
// Replacing getCommunityPages
|
// Replacing getCommunityPages
|
||||||
getCommunityPagesByType(pid: string, type: string) {
|
getCommunityPagesByType(pid: string, type: string, helpContentUrl:string) {
|
||||||
return this.http.get<Array<Page>>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/'+pid+'/pages'
|
return this.http.get<Array<Page>>(helpContentUrl + properties.adminToolsPortalType + '/'+pid+'/pages'
|
||||||
+ (type ? '?page_type='+type : ''))
|
+ (type ? '?page_type='+type : ''))
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
@ -260,7 +254,7 @@ export class HelpContentService {
|
||||||
}
|
}
|
||||||
// End of replacing part of getPages (now getAllPages)
|
// End of replacing part of getPages (now getAllPages)
|
||||||
//TODO double check with konstantina - there is no param that we are asking the community pages. without pid we get all portalTypes
|
//TODO double check with konstantina - there is no param that we are asking the community pages. without pid we get all portalTypes
|
||||||
getAllPages(pid:string = null) {//with_positions:boolean=null) {
|
getAllPages(helpContentUrl:string, pid:string = null) {//with_positions:boolean=null) {
|
||||||
// let parameters: string = "";
|
// let parameters: string = "";
|
||||||
// if(pid || with_positions == true || with_positions == false) {
|
// if(pid || with_positions == true || with_positions == false) {
|
||||||
// parameters = "?";
|
// parameters = "?";
|
||||||
|
@ -271,23 +265,23 @@ export class HelpContentService {
|
||||||
// parameters += "&with_positions="+with_positions;
|
// parameters += "&with_positions="+with_positions;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
return this.http.get<Array<Page>>(properties.adminToolsAPIURL + 'page?' + (pid?"pid="+pid:""))
|
return this.http.get<Array<Page>>(helpContentUrl + 'page?' + (pid?"pid="+pid:""))
|
||||||
//.map(res => <Array<Page>> res.json())
|
//.map(res => <Array<Page>> res.json())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
getAllPagesFull() {
|
getAllPagesFull(helpContentUrl:string) {
|
||||||
return this.http.get<Array<Page>>(properties.adminToolsAPIURL + 'page/full')//+(pid?("?pid="+pid):""))
|
return this.http.get<Array<Page>>(helpContentUrl + 'page/full')//+(pid?("?pid="+pid):""))
|
||||||
//.map(res => <Array<Page>> res.json())
|
//.map(res => <Array<Page>> res.json())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
getPageByPortal(pageId:string, pid: string) {
|
getPageByPortal(pageId:string, helpContentUrl:string, pid: string) {
|
||||||
return this.http.get<Page>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + pid + '/page/'+pageId)
|
return this.http.get<Page>(helpContentUrl + properties.adminToolsPortalType + '/' + pid + '/page/'+pageId)
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
getPageById(pageId:string) {
|
getPageById(pageId:string, helpContentUrl:string) {
|
||||||
return this.http.get<Page>(properties.adminToolsAPIURL + 'page/' + pageId)
|
return this.http.get<Page>(helpContentUrl + 'page/' + pageId)
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
getCommunityPageByRoute(route:string, helpContentUrl:string, pid: string) {
|
getCommunityPageByRoute(route:string, helpContentUrl:string, pid: string) {
|
||||||
|
@ -295,32 +289,32 @@ export class HelpContentService {
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
savePage(page: Page) {
|
savePage(page: Page, helpContentUrl:string) {
|
||||||
HelpContentService.removeNulls(page);
|
HelpContentService.removeNulls(page);
|
||||||
|
|
||||||
return this.http.post<Page>(properties.adminToolsAPIURL + 'page/save', JSON.stringify(page), CustomOptions.getAuthOptionsWithBody())
|
return this.http.post<Page>(helpContentUrl + 'page/save', JSON.stringify(page), CustomOptions.getAuthOptionsWithBody())
|
||||||
//.map(res => <Page> res.json())
|
//.map(res => <Page> res.json())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
updatePage(page: Page) {
|
updatePage(page: Page, helpContentUrl:string) {
|
||||||
|
|
||||||
HelpContentService.removeNulls(page);
|
HelpContentService.removeNulls(page);
|
||||||
|
|
||||||
return this.http.post<Page>(properties.adminToolsAPIURL + 'page/update', JSON.stringify(page), CustomOptions.getAuthOptionsWithBody())
|
return this.http.post<Page>(helpContentUrl + 'page/update', JSON.stringify(page), CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
togglePages(selectedPortalPid: string, ids : string[], status: boolean) {
|
togglePages(selectedPortalPid: string, ids : string[],status : boolean, helpContentUrl:string) {
|
||||||
|
|
||||||
return this.http.post(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + selectedPortalPid + '/page/toggle?status='+ status.toString(),
|
return this.http.post(helpContentUrl + properties.adminToolsPortalType + '/'+selectedPortalPid+'/page/toggle?status='+ status.toString(),
|
||||||
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
deletePages(ids : string[]) {
|
deletePages(ids : string[], helpContentUrl:string) {
|
||||||
|
|
||||||
return this.http.post(properties.adminToolsAPIURL + 'page/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
return this.http.post(helpContentUrl + 'page/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,8 +375,8 @@ export class HelpContentService {
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
getPortalsFull() {
|
getPortalsFull( helpContentUrl:string) {
|
||||||
return this.http.get<Array<Portal>>(properties.adminToolsAPIURL + 'portal/full')
|
return this.http.get<Array<Portal>>(helpContentUrl + 'portal/full')
|
||||||
//.map(res => <Array<Portal>> res.json())
|
//.map(res => <Array<Portal>> res.json())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
@ -391,31 +385,32 @@ export class HelpContentService {
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
saveCommunity(portal: Portal) {
|
saveCommunity(portal: Portal, helpContentUrl:string) {
|
||||||
// let headers = new Headers({'Content-Type': 'application/json'});
|
// let headers = new Headers({'Content-Type': 'application/json'});
|
||||||
// let options = new RequestOptions({headers: headers});
|
// let options = new RequestOptions({headers: headers});
|
||||||
|
|
||||||
HelpContentService.removeNulls(portal);
|
HelpContentService.removeNulls(portal);
|
||||||
|
|
||||||
return this.http.post<Portal>(properties.adminToolsAPIURL + portal.type + '/save', JSON.stringify(portal), CustomOptions.getAuthOptionsWithBody())
|
return this.http.post<Portal>(helpContentUrl + portal.type + '/save', JSON.stringify(portal), CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
updateCommunity(portal: Portal) {
|
updateCommunity(portal: Portal, helpContentUrl:string) {
|
||||||
// let headers = new Headers({'Content-Type': 'application/json'});
|
// let headers = new Headers({'Content-Type': 'application/json'});
|
||||||
// let options = new RequestOptions({headers: headers});
|
// let options = new RequestOptions({headers: headers});
|
||||||
|
|
||||||
HelpContentService.removeNulls(portal);
|
HelpContentService.removeNulls(portal);
|
||||||
|
|
||||||
return this.http.post<Portal>(properties.adminToolsAPIURL + portal.type + '/update', JSON.stringify(portal), CustomOptions.getAuthOptionsWithBody())
|
return this.http.post<Portal>(helpContentUrl + portal.type + '/update', JSON.stringify(portal), CustomOptions.getAuthOptionsWithBody())
|
||||||
//.map(res => <Portal> res.json())
|
//.map(res => <Portal> res.json())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
deleteCommunities(ids : string[], portalType:string) {
|
deleteCommunities(ids : string[], helpContentUrl:string) {
|
||||||
// let headers = new Headers({'Content-Type': 'application/json'});
|
// let headers = new Headers({'Content-Type': 'application/json'});
|
||||||
// let options = new RequestOptions({headers: headers});
|
// let options = new RequestOptions({headers: headers});
|
||||||
return this.http.post(properties.adminToolsAPIURL + portalType + '/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
|
||||||
|
return this.http.post(helpContentUrl + properties.adminToolsPortalType + '/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -438,21 +433,22 @@ export class HelpContentService {
|
||||||
.pipe(map(res => res['statistics']));
|
.pipe(map(res => res['statistics']));
|
||||||
}
|
}
|
||||||
|
|
||||||
getCommunityAdminStatisticsChoices(portalId: string): Observable<StatisticsDisplay> {
|
getCommunityAdminStatisticsChoices(apiUrl: string, portalId: string): Observable<StatisticsDisplay> {
|
||||||
const url = `${properties.adminToolsAPIURL}statistics/${portalId}`;
|
const url = `${apiUrl}statistics/${portalId}`;
|
||||||
//console.log(`getting admin choices for statistics from: ${url}`);
|
//console.log(`getting admin choices for statistics from: ${url}`);
|
||||||
return this.http.get<StatisticsDisplay>(url)
|
return this.http.get<StatisticsDisplay>(url)
|
||||||
//.map(stats => <StatisticsDisplay>stats.json())
|
//.map(stats => <StatisticsDisplay>stats.json())
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
postCommunityAdminStatisticsChoices(portalId: string,
|
postCommunityAdminStatisticsChoices(apiUrl: string,
|
||||||
|
portalId: string,
|
||||||
entity: string,
|
entity: string,
|
||||||
chartsOrNumbers: string,
|
chartsOrNumbers: string,
|
||||||
title: string,
|
title: string,
|
||||||
status: boolean,
|
status: boolean,
|
||||||
monitor: boolean): Observable<any> {
|
monitor: boolean): Observable<any> {
|
||||||
const url = `${properties.adminToolsAPIURL}statistics/${portalId}/${entity}/${chartsOrNumbers}?status=${status.toString()}&monitor=${monitor.toString()}`;
|
const url = `${apiUrl}statistics/${portalId}/${entity}/${chartsOrNumbers}?status=${status.toString()}&monitor=${monitor.toString()}`;
|
||||||
//console.log(`getting admin choices for statistics from: ${url}`);
|
//console.log(`getting admin choices for statistics from: ${url}`);
|
||||||
|
|
||||||
return this.http.post(url, title, CustomOptions.getAuthOptionsWithBody())
|
return this.http.post(url, title, CustomOptions.getAuthOptionsWithBody())
|
||||||
|
@ -460,8 +456,8 @@ export class HelpContentService {
|
||||||
.pipe(catchError(this.handleError));
|
.pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
|
|
||||||
statisticsIsActiveToggle(id: string): Observable<boolean> {
|
statisticsIsActiveToggle(apiURL: string, id: string): Observable<boolean> {
|
||||||
const url = properties.adminToolsAPIURL + 'statistics/' + encodeURIComponent(id) + '/toggle';
|
const url = apiURL + '/statistics/' + encodeURIComponent(id) + '/toggle';
|
||||||
return this.http.post<boolean>(url, {}, CustomOptions.getAuthOptionsWithBody()).pipe(catchError(this.handleError));
|
return this.http.post<boolean>(url, {}, CustomOptions.getAuthOptionsWithBody()).pipe(catchError(this.handleError));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,67 +10,67 @@ export class PluginsService {
|
||||||
|
|
||||||
constructor(private http: HttpClient) {
|
constructor(private http: HttpClient) {
|
||||||
}
|
}
|
||||||
getPluginTemplates(pageId) {
|
getPluginTemplates(api: string, pageId) {
|
||||||
return this.http.get<Array<PluginTemplate>>(properties.adminToolsAPIURL + 'pluginTemplates' + (pageId ? '/page/' + pageId : ''))
|
return this.http.get<Array<PluginTemplate>>(api + 'pluginTemplates' + (pageId ? '/page/' + pageId : ''))
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
savePluginTemplate(pluginTemplate: PluginTemplate) {
|
savePluginTemplate(pluginTemplate: PluginTemplate, api: string) {
|
||||||
return this.http.post<PluginTemplate>(properties.adminToolsAPIURL + 'pluginTemplate/save', pluginTemplate, CustomOptions.getAuthOptionsWithBody());
|
return this.http.post<PluginTemplate>(api + 'pluginTemplate/save', pluginTemplate, CustomOptions.getAuthOptionsWithBody());
|
||||||
}
|
}
|
||||||
|
|
||||||
updatePluginTemplateOrder(pluginTemplate: PluginTemplate, position) {
|
updatePluginTemplateOrder(pluginTemplate: PluginTemplate, api: string, position) {
|
||||||
return this.http.post<PluginTemplate>(properties.adminToolsAPIURL + 'pluginTemplate/save/order/' + position, pluginTemplate, CustomOptions.getAuthOptionsWithBody());
|
return this.http.post<PluginTemplate>(api + 'pluginTemplate/save/order/' + position, pluginTemplate, CustomOptions.getAuthOptionsWithBody());
|
||||||
}
|
}
|
||||||
|
|
||||||
updatePluginOrder(plugin: Plugin, position, community) {
|
updatePluginOrder(plugin: Plugin, api: string, position, community) {
|
||||||
return this.http.post<Plugin>(properties.adminToolsAPIURL + 'community/'+community+'/plugin/save/order/' + position, plugin, CustomOptions.getAuthOptionsWithBody());
|
return this.http.post<Plugin>(api + 'community/'+community+'/plugin/save/order/' + position, plugin, CustomOptions.getAuthOptionsWithBody());
|
||||||
}
|
}
|
||||||
|
|
||||||
savePlugin(plugin, community) {
|
savePlugin(plugin, api: string, community) {
|
||||||
return this.http.post<Plugin>(properties.adminToolsAPIURL + 'community/' + community + '/plugin/save', JSON.stringify(plugin), CustomOptions.getAuthOptionsWithBody());
|
return this.http.post<Plugin>(api + 'community/' + community + '/plugin/save', JSON.stringify(plugin), CustomOptions.getAuthOptionsWithBody());
|
||||||
}
|
}
|
||||||
|
|
||||||
deletePluginTemplate(id) {
|
deletePluginTemplate(id, api: string) {
|
||||||
return this.http.delete<PluginTemplate>(properties.adminToolsAPIURL + 'pluginTemplate/' + id, CustomOptions.getAuthOptionsWithBody());
|
return this.http.delete<PluginTemplate>(api + 'pluginTemplate/' + id, CustomOptions.getAuthOptionsWithBody());
|
||||||
}
|
}
|
||||||
deletePlugin(id) {
|
deletePlugin(id, api: string) {
|
||||||
return this.http.delete<PluginTemplate>(properties.adminToolsAPIURL + 'plugin/' + id, CustomOptions.getAuthOptionsWithBody());
|
return this.http.delete<PluginTemplate>(api + 'plugin/' + id, CustomOptions.getAuthOptionsWithBody());
|
||||||
}
|
}
|
||||||
|
|
||||||
countPluginTemplatePerPage(pid: string) {
|
countPluginTemplatePerPage(api: string, pid: string) {
|
||||||
return this.http.get(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + pid + '/pluginTemplate/page/count');
|
return this.http.get(api + properties.adminToolsPortalType + '/' + pid + '/pluginTemplate/page/count');
|
||||||
}
|
}
|
||||||
|
|
||||||
countPluginTemplatePerPageForAllPortals() {
|
countPluginTemplatePerPageForAllPortals(api: string) {
|
||||||
return this.http.get(properties.adminToolsAPIURL + 'pluginTemplate/page/count');
|
return this.http.get(api + '/pluginTemplate/page/count');
|
||||||
}
|
}
|
||||||
|
|
||||||
getPluginsByPage(pid: string, pageId: string) {
|
getPluginsByPage(api: string, pid: string, pageId: string) {
|
||||||
return this.http.get<Array<Plugin>>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + pid + '/plugins/page/' + pageId);
|
return this.http.get<Array<Plugin>>(api + properties.adminToolsPortalType + '/' + pid + '/plugins/page/' + pageId);
|
||||||
}
|
}
|
||||||
|
|
||||||
getPluginTemplatesByPage(pid: string, pageId: string) {
|
getPluginTemplatesByPage(api: string, pid: string, pageId: string) {
|
||||||
return this.http.get<Array<PluginTemplate>>(properties.adminToolsAPIURL + properties.adminToolsPortalType + '/' + pid + '/pluginTemplates/page/' + pageId);
|
return this.http.get<Array<PluginTemplate>>(api + properties.adminToolsPortalType + '/' + pid + '/pluginTemplates/page/' + pageId);
|
||||||
}
|
}
|
||||||
getPluginsByPageRoute(pid:string, route:string){
|
getPluginsByPageRoute(api:string, pid:string, route:string){
|
||||||
let url = properties.adminToolsAPIURL + 'community/' +pid+'/plugins/page/route?route=' + route;
|
let url = api + 'community/' +pid+'/plugins/page/route?route=' + route;
|
||||||
return this.http.get<Array<Plugin>>(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) : */url);
|
return this.http.get<Array<Plugin>>(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) : */url);
|
||||||
}
|
}
|
||||||
getPluginTemplatesByPageRoute(pid:string, route:string){
|
getPluginTemplatesByPageRoute(api:string, pid:string, route:string){
|
||||||
let url = properties.adminToolsAPIURL + 'community/' + pid + '/pluginTemplates/page/route?route=' + route;
|
let url = api + 'community/' + pid + '/pluginTemplates/page/route?route=' + route;
|
||||||
return this.http.get<Array<PluginTemplate>>(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) :*/ url);
|
return this.http.get<Array<PluginTemplate>>(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) :*/ url);
|
||||||
}
|
}
|
||||||
|
|
||||||
togglePlugin(id: string, status: boolean, community) {
|
togglePlugin(id: string, status: boolean, api: string, community) {
|
||||||
return this.http.post(properties.adminToolsAPIURL + 'community/' + community + '/plugin/status/' + id, status, CustomOptions.getAuthOptionsWithBody());
|
return this.http.post(api + 'community/' + community + '/plugin/status/' + id, status, CustomOptions.getAuthOptionsWithBody());
|
||||||
}
|
}
|
||||||
getPluginById(id: string) {
|
getPluginById(api: string, id: string) {
|
||||||
return this.http.get<Plugin>(properties.adminToolsAPIURL + 'plugin/' + id);
|
return this.http.get<Plugin>(api + '/plugin/' + id);
|
||||||
}
|
}
|
||||||
|
|
||||||
getPluginTemplateById(id: string) {
|
getPluginTemplateById(api: string, id: string) {
|
||||||
return this.http.get<PluginTemplate>(properties.adminToolsAPIURL + 'pluginTemplates/' + id);
|
return this.http.get<PluginTemplate>(api + '/pluginTemplates/' + id);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,7 +41,7 @@ export class RefineFieldResultsService {
|
||||||
|
|
||||||
getRefineFieldResultsByFieldName(fieldName:string, entityName:string, properties:EnvProperties):any{
|
getRefineFieldResultsByFieldName(fieldName:string, entityName:string, properties:EnvProperties):any{
|
||||||
let keys:string[]=["funder", "fundinglevel"]; // this covers funder, relfunder, funding stream fields and funding level fields
|
let keys:string[]=["funder", "fundinglevel"]; // this covers funder, relfunder, funding stream fields and funding level fields
|
||||||
let link = properties.searchAPIURLLAst +this.getSearchAPIURLForEntity(entityName)+"?fields="+fieldName +(entityName == "service" ? "&type=services" : "")+(this.fieldIncludesAnyOfTheKeywords(fieldName, keys)?('&sf='+fieldName):'')+ "&format=json";
|
let link = properties.searchAPIURLLAst +this.getSearchAPIURLForEntity(entityName)+"?fields="+fieldName +(this.fieldIncludesAnyOfTheKeywords(fieldName, keys)?('&sf='+fieldName):'')+ "&format=json";
|
||||||
return this.getField(link,fieldName, properties);
|
return this.getField(link,fieldName, properties);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -96,8 +96,6 @@ export class RefineFieldResultsService {
|
||||||
suffix="organizations/";
|
suffix="organizations/";
|
||||||
}else if(entityType == "dataprovider"){
|
}else if(entityType == "dataprovider"){
|
||||||
suffix="datasources/";
|
suffix="datasources/";
|
||||||
}else if(entityType == "service") {
|
|
||||||
suffix = "resources2/";
|
|
||||||
}else if(entityType == "person"){
|
}else if(entityType == "person"){
|
||||||
suffix="people/";
|
suffix="people/";
|
||||||
}else if(entityType == "result"){
|
}else if(entityType == "result"){
|
||||||
|
|
|
@ -220,7 +220,7 @@
|
||||||
<a *ngIf="(menu.route.length == 0 && menu.url.length == 0) || ( menu.route.length >0 && menu.routeRequired && !isEnabled([menu.route], showPage) && isAtleastOneEnabled(menu.routeRequired, showPage))">
|
<a *ngIf="(menu.route.length == 0 && menu.url.length == 0) || ( menu.route.length >0 && menu.routeRequired && !isEnabled([menu.route], showPage) && isAtleastOneEnabled(menu.routeRequired, showPage))">
|
||||||
<span *ngIf="menu.badge" class="badge">{{menu.badge}}</span>
|
<span *ngIf="menu.badge" class="badge">{{menu.badge}}</span>
|
||||||
{{menu.title}}</a>
|
{{menu.title}}</a>
|
||||||
<div *ngIf="menu.items.length > 0 && isClient" class="uk-navbar-dropdown uk-navbar-dropdown-bottom-left uk-height-max-medium uk-overflow-auto">
|
<div *ngIf="menu.items.length > 0" class="uk-navbar-dropdown uk-navbar-dropdown-bottom-left uk-height-max-medium uk-overflow-auto">
|
||||||
<!-- Do not delete this div, because it will remove the margin bottom of navbar -->
|
<!-- Do not delete this div, because it will remove the margin bottom of navbar -->
|
||||||
<div>
|
<div>
|
||||||
<ul class="uk-nav uk-navbar-dropdown-nav">
|
<ul class="uk-nav uk-navbar-dropdown-nav">
|
||||||
|
@ -272,7 +272,7 @@
|
||||||
<a *ngIf="menu.type == 'noAction'">
|
<a *ngIf="menu.type == 'noAction'">
|
||||||
{{menu.title}}
|
{{menu.title}}
|
||||||
</a>
|
</a>
|
||||||
<div *ngIf="menu.items.length > 0 && isClient" class="uk-navbar-dropdown uk-navbar-dropdown-bottom-left uk-height-max-medium uk-overflow-auto"
|
<div *ngIf="menu.items.length > 0" class="uk-navbar-dropdown uk-navbar-dropdown-bottom-left uk-height-max-medium uk-overflow-auto"
|
||||||
style="top: 80px; left: 0px;" id="{{menu._id}}" uk-toggle>
|
style="top: 80px; left: 0px;" id="{{menu._id}}" uk-toggle>
|
||||||
<div>
|
<div>
|
||||||
<ul class="uk-nav uk-navbar-dropdown-nav">
|
<ul class="uk-nav uk-navbar-dropdown-nav">
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
import {
|
import {
|
||||||
ChangeDetectorRef,
|
ChangeDetectorRef,
|
||||||
Component, ElementRef, Inject,
|
Component, ElementRef,
|
||||||
Input,
|
Input,
|
||||||
OnChanges,
|
OnChanges,
|
||||||
OnDestroy,
|
OnDestroy,
|
||||||
OnInit, PLATFORM_ID,
|
OnInit, QueryList,
|
||||||
SimpleChanges, ViewChild,
|
SimpleChanges, ViewChild,
|
||||||
ViewChildren
|
ViewChildren
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
@ -21,7 +21,6 @@ import {NotificationConfiguration} from "../notifications/notifications-sidebar/
|
||||||
import {SearchInputComponent} from "./search-input/search-input.component";
|
import {SearchInputComponent} from "./search-input/search-input.component";
|
||||||
import {Filter} from "../searchPages/searchUtils/searchHelperClasses.class";
|
import {Filter} from "../searchPages/searchUtils/searchHelperClasses.class";
|
||||||
import {RouterHelper} from "../utils/routerHelper.class";
|
import {RouterHelper} from "../utils/routerHelper.class";
|
||||||
import {isPlatformServer} from "@angular/common";
|
|
||||||
|
|
||||||
declare var UIkit;
|
declare var UIkit;
|
||||||
|
|
||||||
|
@ -98,16 +97,12 @@ export class NavigationBarComponent implements OnInit, OnDestroy, OnChanges {
|
||||||
@ViewChild('canvas') canvas: ElementRef;
|
@ViewChild('canvas') canvas: ElementRef;
|
||||||
public routerHelper: RouterHelper = new RouterHelper();
|
public routerHelper: RouterHelper = new RouterHelper();
|
||||||
|
|
||||||
public isClient: boolean = false;
|
|
||||||
constructor(private router: Router,
|
constructor(private router: Router,
|
||||||
private route: ActivatedRoute,
|
private route: ActivatedRoute,
|
||||||
private config: ConfigurationService,
|
private config: ConfigurationService,
|
||||||
private _helpContentService: HelpContentService,
|
private _helpContentService: HelpContentService,
|
||||||
private layoutService: LayoutService,
|
private layoutService: LayoutService,
|
||||||
private cdr: ChangeDetectorRef,
|
private cdr: ChangeDetectorRef) {}
|
||||||
@Inject(PLATFORM_ID) private platform: any) {
|
|
||||||
this.isClient = !isPlatformServer(this.platform);
|
|
||||||
}
|
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
this.subs.push(this.route.queryParams.subscribe(params => {
|
this.subs.push(this.route.queryParams.subscribe(params => {
|
||||||
|
|
|
@ -3,7 +3,7 @@ import {ActivatedRoute} from "@angular/router";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'slider-tab',
|
selector: 'slider-tab',
|
||||||
template: `<ng-content />`
|
template: ``
|
||||||
})
|
})
|
||||||
export class SliderTabComponent {
|
export class SliderTabComponent {
|
||||||
@Input("tabTitle")
|
@Input("tabTitle")
|
||||||
|
|
|
@ -21,7 +21,6 @@ declare var UIkit;
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'slider-tabs',
|
selector: 'slider-tabs',
|
||||||
template: `
|
template: `
|
||||||
<ng-content />
|
|
||||||
<div #sliderElement class="uk-position-relative" [class.uk-slider]="position === 'horizontal'"
|
<div #sliderElement class="uk-position-relative" [class.uk-slider]="position === 'horizontal'"
|
||||||
[ngClass]="customClass">
|
[ngClass]="customClass">
|
||||||
<div [class.uk-slider-container-tabs]="position === 'horizontal'" [class.uk-border-bottom]="border && position === 'horizontal'" [ngClass]="containerClass">
|
<div [class.uk-slider-container-tabs]="position === 'horizontal'" [class.uk-border-bottom]="border && position === 'horizontal'" [ngClass]="containerClass">
|
||||||
|
|
|
@ -58,7 +58,7 @@ import {properties} from "../../../../environments/environment";
|
||||||
|
|
||||||
<i *ngIf="author.orcid">Harvested from ORCID Public Data File</i>
|
<i *ngIf="author.orcid">Harvested from ORCID Public Data File</i>
|
||||||
<i *ngIf="!author.orcid && author.orcid_pending">Derived by OpenAIRE algorithms or harvested
|
<i *ngIf="!author.orcid && author.orcid_pending">Derived by OpenAIRE algorithms or harvested
|
||||||
from 3rd party repositories</i>
|
from 3d party repositories</i>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div class="clipboard-wrapper uk-width-1-1 uk-flex uk-flex-middle uk-flex-center"
|
<div class="clipboard-wrapper uk-width-1-1 uk-flex uk-flex-middle uk-flex-center"
|
||||||
|
|
|
@ -35,7 +35,7 @@ export class ConfigurationService {
|
||||||
|
|
||||||
public initPortal(properties: EnvProperties, pid: string) {
|
public initPortal(properties: EnvProperties, pid: string) {
|
||||||
if (pid == null || this.portal?.getValue()?.static) return;
|
if (pid == null || this.portal?.getValue()?.static) return;
|
||||||
let url = properties.adminToolsAPIURL + properties.adminToolsPortalType + "/" + pid + "/full";
|
let url = properties.adminToolsAPIURL + "/" + properties.adminToolsPortalType + "/" + pid + "/full";
|
||||||
this.promise = new Promise<void>(resolve => {
|
this.promise = new Promise<void>(resolve => {
|
||||||
this.sub = this.http.get<Portal>(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) :*/ url).subscribe(
|
this.sub = this.http.get<Portal>(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) :*/ url).subscribe(
|
||||||
(portal: Portal) => {
|
(portal: Portal) => {
|
||||||
|
|
|
@ -16,22 +16,22 @@ export class EmailService {
|
||||||
}
|
}
|
||||||
|
|
||||||
notifyManagers(pid: string, role: "manager" | "subscriber", email: Email) {
|
notifyManagers(pid: string, role: "manager" | "subscriber", email: Email) {
|
||||||
return this.http.post(properties.adminToolsAPIURL + 'notifyManagers/' + pid + '/' + role, email, CustomOptions.getAuthOptions())
|
return this.http.post(properties.adminToolsAPIURL + '/notifyManagers/' + pid + '/' + role, email, CustomOptions.getAuthOptions())
|
||||||
}
|
}
|
||||||
|
|
||||||
notifyNewManager(email: Email) {
|
notifyNewManager(email: Email) {
|
||||||
return this.http.post(properties.adminToolsAPIURL + 'notifyNewManager', email, CustomOptions.getAuthOptions())
|
return this.http.post(properties.adminToolsAPIURL + '/notifyNewManager', email, CustomOptions.getAuthOptions())
|
||||||
}
|
}
|
||||||
|
|
||||||
sendEmail(properties: EnvProperties, email: Email) {
|
sendEmail(properties: EnvProperties, email: Email) {
|
||||||
return this.http.post(properties.adminToolsAPIURL + "sendMail/", email, CustomOptions.registryOptions());
|
return this.http.post(properties.adminToolsAPIURL + "/sendMail/", email, CustomOptions.registryOptions());
|
||||||
}
|
}
|
||||||
|
|
||||||
contact(properties: EnvProperties, email: Email, recaptcha: string = null):Observable<boolean> {
|
contact(properties: EnvProperties, email: Email, recaptcha: string = null):Observable<boolean> {
|
||||||
const data: EmailRecaptcha = new EmailRecaptcha();
|
const data: EmailRecaptcha = new EmailRecaptcha();
|
||||||
data.email = email;
|
data.email = email;
|
||||||
data.recaptcha = recaptcha;
|
data.recaptcha = recaptcha;
|
||||||
return this.http.post<boolean>(properties.adminToolsAPIURL + 'contact', data);
|
return this.http.post<boolean>(properties.adminToolsAPIURL + '/contact', data);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ export class DataproviderProvenance {
|
||||||
this.provenance.set("re3data_____::", {"urlPrefix": properties.r3DataURL, "name": "re3data.org"});
|
this.provenance.set("re3data_____::", {"urlPrefix": properties.r3DataURL, "name": "re3data.org"});
|
||||||
this.provenance.set("fairsharing_::", {"urlPrefix": properties.fairSharingURL, "name": "FAIRsharing"});
|
this.provenance.set("fairsharing_::", {"urlPrefix": properties.fairSharingURL, "name": "FAIRsharing"});
|
||||||
this.provenance.set("eosc________::", {
|
this.provenance.set("eosc________::", {
|
||||||
"urlPrefix": properties.openScienceCloudURL,
|
"urlPrefix": properties.eoscMarketplaceURL,
|
||||||
"name": "EOSC Resource Hub" });
|
"name": "EOSC Resource Hub" });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,9 +19,9 @@ export class HelperService {
|
||||||
|
|
||||||
let url = properties.adminToolsAPIURL;
|
let url = properties.adminToolsAPIURL;
|
||||||
if (div) {
|
if (div) {
|
||||||
url += 'divhelpcontent?active=true&community=' + communityId + '&page=' + router + '&div=' + div;
|
url += '/divhelpcontent?active=true&community=' + communityId + '&page=' + router + '&div=' + div;
|
||||||
} else {
|
} else {
|
||||||
url += 'pagehelpcontent?active=true&community=' + communityId + '&page=' + router + '&position=' + position;
|
url += '/pagehelpcontent?active=true&community=' + communityId + '&page=' + router + '&position=' + position;
|
||||||
if (before) {
|
if (before) {
|
||||||
url += '&before=' + before;
|
url += '&before=' + before;
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ export class HelperService {
|
||||||
if (typeof properties.useHelpTexts == "undefined" || properties.useHelpTexts) {
|
if (typeof properties.useHelpTexts == "undefined" || properties.useHelpTexts) {
|
||||||
let page_route: string = router.split('?')[0].substring(0);
|
let page_route: string = router.split('?')[0].substring(0);
|
||||||
let url = properties.adminToolsAPIURL;
|
let url = properties.adminToolsAPIURL;
|
||||||
url += portalType + '/' + portal + '/pagehelpcontent/grouped?active=true&page=' +
|
url += '/' + portalType + '/' + portal + '/pagehelpcontent/grouped?active=true&page=' +
|
||||||
((page_route.indexOf("/" + portal + "/") != -1) ? ("/" + page_route.split("/" + portal + "/")[1]) : page_route);
|
((page_route.indexOf("/" + portal + "/") != -1) ? ("/" + page_route.split("/" + portal + "/")[1]) : page_route);
|
||||||
return this.http.get(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)+ (properties.forceCacheReload?'&forceReload=true':'')) :*/ url);
|
return this.http.get(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)+ (properties.forceCacheReload?'&forceReload=true':'')) :*/ url);
|
||||||
} else {
|
} else {
|
||||||
|
@ -60,7 +60,7 @@ export class HelperService {
|
||||||
if (typeof properties.useHelpTexts == "undefined" || properties.useHelpTexts) {
|
if (typeof properties.useHelpTexts == "undefined" || properties.useHelpTexts) {
|
||||||
let page_route: string = router.split('?')[0].substring(0);
|
let page_route: string = router.split('?')[0].substring(0);
|
||||||
let url = properties.adminToolsAPIURL;
|
let url = properties.adminToolsAPIURL;
|
||||||
url += properties.adminToolsPortalType + '/' + communityId + '/divhelpcontent/grouped?active=true&page=' +
|
url += '/' + properties.adminToolsPortalType + '/' + communityId + '/divhelpcontent/grouped?active=true&page=' +
|
||||||
((page_route.indexOf("/" + communityId + "/") != -1) ? ("/" + page_route.split("/" + communityId + "/")[1]) : page_route);
|
((page_route.indexOf("/" + communityId + "/") != -1) ? ("/" + page_route.split("/" + communityId + "/")[1]) : page_route);
|
||||||
return this.http.get((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload ? '&forceReload=true' : '')) : url);
|
return this.http.get((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload ? '&forceReload=true' : '')) : url);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -52,7 +52,6 @@ export interface EnvProperties {
|
||||||
wikiDataURL?: string;
|
wikiDataURL?: string;
|
||||||
fundRefURL?: string;
|
fundRefURL?: string;
|
||||||
fairSharingURL?: string,
|
fairSharingURL?: string,
|
||||||
openScienceCloudURL?: string,
|
|
||||||
eoscMarketplaceURL?: string,
|
eoscMarketplaceURL?: string,
|
||||||
sherpaURL?: string;
|
sherpaURL?: string;
|
||||||
sherpaURLSuffix?: string;
|
sherpaURLSuffix?: string;
|
||||||
|
|
|
@ -25,7 +25,7 @@ export let common: EnvProperties = {
|
||||||
wikiDataURL: "https://www.wikidata.org/wiki/",
|
wikiDataURL: "https://www.wikidata.org/wiki/",
|
||||||
fundRefURL: "https://data.crossref.org/fundingdata/funder/",
|
fundRefURL: "https://data.crossref.org/fundingdata/funder/",
|
||||||
fairSharingURL: "https://fairsharing.org/",
|
fairSharingURL: "https://fairsharing.org/",
|
||||||
openScienceCloudURL: "https://open-science-cloud.ec.europa.eu/resources/services/",
|
eoscMarketplaceURL: "https://open-science-cloud.ec.europa.eu/resources/services/",
|
||||||
sherpaURL: "http://sherpa.ac.uk/romeo/issn/",
|
sherpaURL: "http://sherpa.ac.uk/romeo/issn/",
|
||||||
sherpaURLSuffix: "/",
|
sherpaURLSuffix: "/",
|
||||||
zenodo: "https://zenodo.org/",
|
zenodo: "https://zenodo.org/",
|
||||||
|
@ -111,12 +111,12 @@ export let commonDev: EnvProperties = {
|
||||||
orcidTokenURL: "https://sandbox.orcid.org/oauth/authorize?",
|
orcidTokenURL: "https://sandbox.orcid.org/oauth/authorize?",
|
||||||
orcidClientId: "APP-A5M3KTX6NCN67L91",
|
orcidClientId: "APP-A5M3KTX6NCN67L91",
|
||||||
utilsService: "http://scoobydoo.di.uoa.gr:8000",
|
utilsService: "http://scoobydoo.di.uoa.gr:8000",
|
||||||
vocabulariesAPI: "https://services.openaire.eu/provision/mvc/vocabularies/",
|
vocabulariesAPI: "https://dev-openaire.d4science.org/provision/mvc/vocabularies/",
|
||||||
loginServiceURL: "http://dl170.madgik.di.uoa.gr:19080/login-service/",
|
loginServiceURL: "http://mpagasas.di.uoa.gr:19080/login-service/",
|
||||||
cookieDomain: ".di.uoa.gr",
|
cookieDomain: ".di.uoa.gr",
|
||||||
feedbackmail: "kostis30fylloy@gmail.com",
|
feedbackmail: "kostis30fylloy@gmail.com",
|
||||||
cacheUrl: "http://dl170.madgik.di.uoa.gr:3000/get?url=",
|
cacheUrl: "http://dl170.madgik.di.uoa.gr:3000/get?url=",
|
||||||
monitorServiceAPIURL: "http://mpagasas.di.uoa.gr:19380/uoa-monitor-service/",
|
monitorServiceAPIURL: "http://mpagasas.di.uoa.gr:19380/uoa-monitor-service",
|
||||||
adminToolsAPIURL: "http://duffy.di.uoa.gr:19280/uoa-admin-tools/",
|
adminToolsAPIURL: "http://duffy.di.uoa.gr:19280/uoa-admin-tools/",
|
||||||
datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/api/",
|
datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/api/",
|
||||||
contextsAPI: "https://dev-openaire.d4science.org/openaire/context",
|
contextsAPI: "https://dev-openaire.d4science.org/openaire/context",
|
||||||
|
@ -135,8 +135,6 @@ export let commonDev: EnvProperties = {
|
||||||
miningBackendURL: 'https://beta.services.openaire.eu/interactive-mining',
|
miningBackendURL: 'https://beta.services.openaire.eu/interactive-mining',
|
||||||
feedbackmailForMissingEntities: 'feedback@openaire.eu',
|
feedbackmailForMissingEntities: 'feedback@openaire.eu',
|
||||||
connectPortalUrl: 'http://scoobydoo.di.uoa.gr:4200',
|
connectPortalUrl: 'http://scoobydoo.di.uoa.gr:4200',
|
||||||
// eosc urls
|
|
||||||
eoscMarketplaceURL: "https://search.marketplace.sandbox.eosc-beyond.eu"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export let commonTest: EnvProperties = {
|
export let commonTest: EnvProperties = {
|
||||||
|
@ -154,7 +152,7 @@ export let commonTest: EnvProperties = {
|
||||||
loginServiceURL: " https://services.openaire.eu/login-service/",
|
loginServiceURL: " https://services.openaire.eu/login-service/",
|
||||||
cacheUrl: "https://explore.openaire.eu/cache/get?url=",
|
cacheUrl: "https://explore.openaire.eu/cache/get?url=",
|
||||||
datasourcesAPI: "https://services.openaire.eu/openaire/ds/api/",
|
datasourcesAPI: "https://services.openaire.eu/openaire/ds/api/",
|
||||||
monitorServiceAPIURL: "https://services.openaire.eu/uoa-monitor-service/",
|
monitorServiceAPIURL: "https://services.openaire.eu/uoa-monitor-service",
|
||||||
adminToolsAPIURL: "https://services.openaire.eu/uoa-admin-tools/",
|
adminToolsAPIURL: "https://services.openaire.eu/uoa-admin-tools/",
|
||||||
contextsAPI: "https://services.openaire.eu/openaire/context",
|
contextsAPI: "https://services.openaire.eu/openaire/context",
|
||||||
communityAPI: "https://services.openaire.eu/openaire/community/",
|
communityAPI: "https://services.openaire.eu/openaire/community/",
|
||||||
|
@ -165,8 +163,7 @@ export let commonTest: EnvProperties = {
|
||||||
adminPortalURL: "https://admin.connect.openaire.eu",
|
adminPortalURL: "https://admin.connect.openaire.eu",
|
||||||
baseOpenaireLink: 'https://explore.openaire.eu',
|
baseOpenaireLink: 'https://explore.openaire.eu',
|
||||||
|
|
||||||
// eosc urls
|
|
||||||
eoscMarketplaceURL: "https://search.marketplace.sandbox.eosc-beyond.eu"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export let commonBeta: EnvProperties = {
|
export let commonBeta: EnvProperties = {
|
||||||
|
@ -184,7 +181,7 @@ export let commonBeta: EnvProperties = {
|
||||||
loginServiceURL: "https://beta.services.openaire.eu/login-service/",
|
loginServiceURL: "https://beta.services.openaire.eu/login-service/",
|
||||||
cacheUrl: "https://demo.openaire.eu/cache/get?url=",
|
cacheUrl: "https://demo.openaire.eu/cache/get?url=",
|
||||||
datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/api/",
|
datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/api/",
|
||||||
monitorServiceAPIURL: "https://beta.services.openaire.eu/uoa-monitor-service/",
|
monitorServiceAPIURL: "https://beta.services.openaire.eu/uoa-monitor-service",
|
||||||
adminToolsAPIURL: "https://beta.services.openaire.eu/uoa-admin-tools/",
|
adminToolsAPIURL: "https://beta.services.openaire.eu/uoa-admin-tools/",
|
||||||
contextsAPI: "https://beta.services.openaire.eu/openaire/context",
|
contextsAPI: "https://beta.services.openaire.eu/openaire/context",
|
||||||
communityAPI: "https://beta.services.openaire.eu/openaire/community/",
|
communityAPI: "https://beta.services.openaire.eu/openaire/community/",
|
||||||
|
@ -206,8 +203,6 @@ export let commonBeta: EnvProperties = {
|
||||||
deleteBrowserCacheUrl: 'https://beta.services.openaire.eu/uoa-admin-tools/cache',
|
deleteBrowserCacheUrl: 'https://beta.services.openaire.eu/uoa-admin-tools/cache',
|
||||||
connectPortalUrl: 'https://beta.connect.openaire.eu',
|
connectPortalUrl: 'https://beta.connect.openaire.eu',
|
||||||
|
|
||||||
// eosc urls
|
|
||||||
eoscMarketplaceURL: "https://search.marketplace.sandbox.eosc-beyond.eu/"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export let commonProd: EnvProperties = {
|
export let commonProd: EnvProperties = {
|
||||||
|
@ -225,7 +220,7 @@ export let commonProd: EnvProperties = {
|
||||||
loginServiceURL: "https://services.openaire.eu/login-service/",
|
loginServiceURL: "https://services.openaire.eu/login-service/",
|
||||||
cacheUrl: "https://explore.openaire.eu/cache/get?url=",
|
cacheUrl: "https://explore.openaire.eu/cache/get?url=",
|
||||||
datasourcesAPI: "https://services.openaire.eu/openaire/ds/api/",
|
datasourcesAPI: "https://services.openaire.eu/openaire/ds/api/",
|
||||||
monitorServiceAPIURL: "https://services.openaire.eu/uoa-monitor-service/",
|
monitorServiceAPIURL: "https://services.openaire.eu/uoa-monitor-service",
|
||||||
adminToolsAPIURL: "https://services.openaire.eu/uoa-admin-tools/",
|
adminToolsAPIURL: "https://services.openaire.eu/uoa-admin-tools/",
|
||||||
contextsAPI: "https://services.openaire.eu/openaire/context",
|
contextsAPI: "https://services.openaire.eu/openaire/context",
|
||||||
communityAPI: "https://services.openaire.eu/openaire/community/",
|
communityAPI: "https://services.openaire.eu/openaire/community/",
|
||||||
|
@ -248,10 +243,7 @@ export let commonProd: EnvProperties = {
|
||||||
connectPortalUrl: 'https://connect.openaire.eu',
|
connectPortalUrl: 'https://connect.openaire.eu',
|
||||||
|
|
||||||
//irish
|
//irish
|
||||||
openOrgsUrl:"https://orgs.openaire.eu",
|
openOrgsUrl:"https://orgs.openaire.eu"
|
||||||
|
|
||||||
// eosc urls
|
|
||||||
eoscMarketplaceURL: "https://search.marketplace.eosc-beyond.eu"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -193,8 +193,7 @@
|
||||||
[url]="properties.domain + properties.baseLink + url + '?' + urlParam + '=' + result.id"
|
[url]="properties.domain + properties.baseLink + url + '?' + urlParam + '=' + result.id"
|
||||||
[showTooltip]="false" [compactView]="compactView">
|
[showTooltip]="false" [compactView]="compactView">
|
||||||
<span *ngIf="orcid">
|
<span *ngIf="orcid">
|
||||||
<!-- <orcid-work *ngIf="showOrcid && ((result.identifiers && result.identifiers.size > 0) || properties.environment == 'development')"-->
|
<orcid-work *ngIf="showOrcid && result.identifiers && result.identifiers.size > 0"
|
||||||
<orcid-work *ngIf="showOrcid"
|
|
||||||
[resultId]="result.relcanId" [resultTitle]="result.title"
|
[resultId]="result.relcanId" [resultTitle]="result.title"
|
||||||
[type]="result.resultType" [pageType]="'search'"
|
[type]="result.resultType" [pageType]="'search'"
|
||||||
[putCodes]="result.orcidPutCodes" [givenPutCode]="true" [identifiers]="result.identifiers"
|
[putCodes]="result.orcidPutCodes" [givenPutCode]="true" [identifiers]="result.identifiers"
|
||||||
|
@ -340,8 +339,7 @@
|
||||||
[isMobile]="isMobile"
|
[isMobile]="isMobile"
|
||||||
[showTooltip]="false">
|
[showTooltip]="false">
|
||||||
<span *ngIf="orcid">
|
<span *ngIf="orcid">
|
||||||
<!-- <orcid-work *ngIf="showOrcid && ((result.identifiers && result.identifiers.size > 0) || properties.environment == 'development')"-->
|
<orcid-work *ngIf="showOrcid && result.identifiers && result.identifiers.size > 0"
|
||||||
<orcid-work *ngIf="showOrcid"
|
|
||||||
[resultId]="result.relcanId" [resultTitle]="result.title"
|
[resultId]="result.relcanId" [resultTitle]="result.title"
|
||||||
[type]="result.resultType" [pageType]="'search'"
|
[type]="result.resultType" [pageType]="'search'"
|
||||||
[putCodes]="result.orcidPutCodes" [givenPutCode]="true" [identifiers]="result.identifiers"
|
[putCodes]="result.orcidPutCodes" [givenPutCode]="true" [identifiers]="result.identifiers"
|
||||||
|
|
|
@ -129,8 +129,7 @@ export class ResultPreviewComponent implements OnInit, OnChanges {
|
||||||
this.share = true;
|
this.share = true;
|
||||||
this.cite = true;
|
this.cite = true;
|
||||||
this.orcid = (this.properties.adminToolsPortalType == 'explore' || this.properties.adminToolsPortalType == 'community' || this.properties.adminToolsPortalType == 'aggregator' || this.properties.dashboard == 'irish') &&
|
this.orcid = (this.properties.adminToolsPortalType == 'explore' || this.properties.adminToolsPortalType == 'community' || this.properties.adminToolsPortalType == 'aggregator' || this.properties.dashboard == 'irish') &&
|
||||||
// this.showOrcid && ((this.result.identifiers && this.result.identifiers.size > 0) || properties.environment == 'development');
|
this.showOrcid && this.result.identifiers && this.result.identifiers.size > 0;
|
||||||
this.showOrcid;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
projectActions() {
|
projectActions() {
|
||||||
|
|
Loading…
Reference in New Issue