[Admin|Trunk]: Replace with properties utilsService all calls of utilities Service.

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-admin-portal/trunk@56257 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
k.triantafyllou 2019-06-28 09:49:21 +00:00
parent bfe739e453
commit 6e188b81af
3 changed files with 8 additions and 10 deletions

View File

@ -168,10 +168,10 @@ export class AffiliationsComponent implements OnInit {
addAffiliation() { addAffiliation() {
if (!this.isEmptyAffiliation()) { if (!this.isEmptyAffiliation()) {
this.utilitiesService.getTiny(this.properties.tinyUrl + this.affiliation.logo_url).subscribe((logo_url)=> { this.utilitiesService.getTiny(this.properties.utilsService + '/tiny?url=' + this.affiliation.logo_url).subscribe((logo_url)=> {
this.affiliation.logo_url = logo_url; this.affiliation.logo_url = logo_url;
this.utilitiesService.getTiny(this.properties.tinyUrl + this.affiliation.website_url).subscribe((website_url) => { this.utilitiesService.getTiny(this.properties.utilsService + '/tiny?url='+ this.affiliation.website_url).subscribe((website_url) => {
this.affiliation.website_url = website_url; this.affiliation.website_url = website_url;
if (!this.curatorAffiliations) { if (!this.curatorAffiliations) {

View File

@ -59,7 +59,7 @@ export class CuratorComponent implements OnInit {
this.curator = curator; this.curator = curator;
this.curator.email = Session.getUserEmail(); this.curator.email = Session.getUserEmail();
if (this.curator.photo && this.curator.photo !== '') { if (this.curator.photo && this.curator.photo !== '') {
this.photo = this.properties.downloadUrl + '/' + this.curator.photo; this.photo = this.properties.utilsService + '/download/' + this.curator.photo;
} else { } else {
this.photo = '../../../assets/common-assets/curator-default.png'; this.photo = '../../../assets/common-assets/curator-default.png';
} }
@ -102,7 +102,7 @@ export class CuratorComponent implements OnInit {
this.curator = curator; this.curator = curator;
this.curator.email = Session.getUserEmail(); this.curator.email = Session.getUserEmail();
if (this.curator.photo && this.curator.photo !== '') { if (this.curator.photo && this.curator.photo !== '') {
this.photo = this.properties.downloadUrl + '/' + this.curator.photo; this.photo = this.properties.utilsService + '/download/' + this.curator.photo;
} else { } else {
this.photo = '../../../assets/common-assets/curator-default.png'; this.photo = '../../../assets/common-assets/curator-default.png';
} }
@ -193,9 +193,9 @@ export class CuratorComponent implements OnInit {
if ((this.hasChanged || this.affiliationsChanged) && this.curator && this.curator.name && this.curator.name !== '') { if ((this.hasChanged || this.affiliationsChanged) && this.curator && this.curator.name && this.curator.name !== '') {
this.showLoading = true; this.showLoading = true;
if (this.file) { if (this.file) {
this.utilitiesService.uploadPhoto(this.properties.uploadService + '/' + this.curator._id, this.file).subscribe((res) => { this.utilitiesService.uploadPhoto(this.properties.utilsService + '/upload/' + this.curator._id, this.file).subscribe((res) => {
if (this.curator.photo && this.curator.photo !== '') { if (this.curator.photo && this.curator.photo !== '') {
this.utilitiesService.deletePhoto(this.properties.deleteUrl + '/' + this.curator.photo).subscribe(); this.utilitiesService.deletePhoto(this.properties.utilsService + '/delete/' + this.curator.photo).subscribe();
} }
this.curator.photo = res.filename; this.curator.photo = res.filename;
this.curatorService.updateCurator(this.properties.adminToolsAPIURL + 'curator', this.curatorService.updateCurator(this.properties.adminToolsAPIURL + 'curator',
@ -215,7 +215,7 @@ export class CuratorComponent implements OnInit {
); );
} else { } else {
if(this.deletePhoto) { if(this.deletePhoto) {
this.utilitiesService.deletePhoto(this.properties.deleteUrl + '/' + this.curator.photo).subscribe(); this.utilitiesService.deletePhoto(this.properties.utilsService + '/delete/' + this.curator.photo).subscribe();
this.curator.photo = ''; this.curator.photo = '';
} }
this.curatorService.updateCurator(this.properties.adminToolsAPIURL + 'curator', this.curatorService.updateCurator(this.properties.adminToolsAPIURL + 'curator',

View File

@ -32,9 +32,7 @@
"ercGuidlines" : "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf", "ercGuidlines" : "http://erc.europa.eu/sites/default/files/document/file/ERC_Open_Access_Guidelines-revised_2014.pdf",
"helpdesk" : "https://www.openaire.eu/support/helpdesk", "helpdesk" : "https://www.openaire.eu/support/helpdesk",
"uploadService" : "http://mpagasas.di.uoa.gr:8001/upload", "uploadService" : "http://mpagasas.di.uoa.gr:8001/upload",
"downloadUrl" : "http://mpagasas.di.uoa.gr:8001/download", "utilsService" : "http://mpagasas.di.uoa.gr:8000",
"deleteUrl" : "http://mpagasas.di.uoa.gr:8001/delete",
"tinyUrl": "http://mpagasas.di.uoa.gr:8001/tiny?url=",
"vocabulariesAPI" :"https://beta.services.openaire.eu/provision/mvc/vocabularies/", "vocabulariesAPI" :"https://beta.services.openaire.eu/provision/mvc/vocabularies/",