Connect Production release September #50

Merged
argiro.kokogiannaki merged 8 commits from develop into master 2024-09-09 12:04:16 +02:00
9 changed files with 38 additions and 38 deletions
Showing only changes of commit ad17ffaf95 - Show all commits

View File

@ -12,7 +12,7 @@ export class CuratorService {
}
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);
}

View File

@ -68,7 +68,7 @@ export class ResourcesService {
}
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)
.pipe(map(pages => {
let result = this.routes.map(() => false);

View File

@ -57,7 +57,7 @@ export class StakeholderService {
getStakeholder(alias: string, shouldUpdate: boolean = false): Observable<Stakeholder> {
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== alias || shouldUpdate) {
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));
})).subscribe(stakeholder => {
this.stakeholderSubject.next(stakeholder);
@ -74,7 +74,7 @@ export class StakeholderService {
getChildStakeholder(parent: string, type: string, child: string, shouldUpdate: boolean = false): Observable<Stakeholder> {
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== child || shouldUpdate) {
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));
})).subscribe(stakeholder => {
this.stakeholderSubject.next(stakeholder);
@ -91,7 +91,7 @@ export class StakeholderService {
getResearcherStakeholder(orcid, name, results, shouldUpdate: boolean = false): Observable<Stakeholder> {
if (!this.stakeholderSubject.value || this.stakeholderSubject.value.alias !== orcid || shouldUpdate) {
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));
})).subscribe(stakeholder => {
stakeholder.index_id = orcid;
@ -123,19 +123,19 @@ export class StakeholderService {
}
getAlias(url: string): Observable<string[]> {
return this.http.get<Stakeholder[]>(url + '/stakeholder/alias', CustomOptions.registryOptions()).pipe(map(stakeholders => {
return this.http.get<Stakeholder[]>(url + 'stakeholder/alias', CustomOptions.registryOptions()).pipe(map(stakeholders => {
return HelperFunctions.copy(stakeholders);
}));
}
getStakeholders(url: string, type: string = null, defaultId: string = null): Observable<(Stakeholder & StakeholderInfo)[]> {
return this.http.get<Stakeholder[]>(url + '/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));
}));
}
getMyStakeholders(url: string, type: string = null): Observable<ManageStakeholders> {
return this.http.get<ManageStakeholders>(url + '/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({
templates: Stakeholder.checkIsUpload(manageStakeholder.templates),
standalone: Stakeholder.checkIsUpload(manageStakeholder.standalone),
@ -155,20 +155,20 @@ export class StakeholderService {
umbrella: umbrella,
standalone: standalone
}
return this.http.post<Stakeholder>(url + '/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));
}));
}
changeVisibility(url: string, path: string[], visibility: Visibility, propagate: boolean = false): Observable<any> {
return this.http.post<Visibility>(url + '/' + path.join('/') + '/change-visibility' + '?visibility=' + visibility + (propagate ? '&propagate=true' : ''), null, CustomOptions.registryOptions());
return this.http.post<Visibility>(url + path.join('/') + '/change-visibility' + '?visibility=' + visibility + (propagate ? '&propagate=true' : ''), null, CustomOptions.registryOptions());
}
saveElement(url: string, element: any, path: string[] = [], isFull: boolean = false): Observable<any> {
if (element.alias && element.alias.startsWith('/')) {
element.alias = element.alias.slice(1);
}
return this.http.post<any>(url + ((path.length > 0) ? '/' : '') + path.join('/') +
return this.http.post<any>(url + path.join('/') +
'/save' + (isFull ? '/full' : ''), element, CustomOptions.registryOptions()).pipe(map(element => {
if (path.length === 0) {
return HelperFunctions.copy(Stakeholder.checkIsUpload(element));
@ -179,7 +179,7 @@ export class StakeholderService {
}
saveBulkElements(url: string, indicators, path: string[] = []): Observable<any> {
return this.http.post<any>(url + ((path.length > 0) ? '/' : '') + path.join('/') +
return this.http.post<any>(url + path.join('/') +
'/save-bulk', indicators, CustomOptions.registryOptions()).pipe(map(element => {
if (path.length === 0) {
return HelperFunctions.copy(Stakeholder.checkIsUpload(element));
@ -190,7 +190,7 @@ export class StakeholderService {
}
saveSection(url: string, element: any, path: string[] = [], index: number = -1): Observable<Section> {
return this.http.post<Section>(url + ((path.length > 0) ? '/' : '') + path.join('/') +
return this.http.post<Section>(url + path.join('/') +
'/save/' + index, element, CustomOptions.registryOptions()).pipe(map(element => {
return HelperFunctions.copy(element);
}));
@ -201,27 +201,27 @@ export class StakeholderService {
if (childrenAction) {
params = "?children=" + childrenAction;
}
return this.http.delete<any>(url + '/' + path.join('/') + '/delete' + params, CustomOptions.registryOptions());
return this.http.delete<any>(url + path.join('/') + '/delete' + params, CustomOptions.registryOptions());
}
reorderElements(url: string, path: string[], ids: string[]): Observable<any> {
return this.http.post<any>(url + '/' + path.join('/') + '/reorder', ids, CustomOptions.registryOptions());
return this.http.post<any>(url + path.join('/') + '/reorder', ids, CustomOptions.registryOptions());
}
reorderIndicators(url: string, path: string[], indicators: string[]): Observable<Indicator[]> {
return this.http.post<Indicator[]>(url + '/' + path.join('/') + '/reorder', indicators, CustomOptions.registryOptions()).pipe(map(indicators => {
return this.http.post<Indicator[]>(url + path.join('/') + '/reorder', indicators, CustomOptions.registryOptions()).pipe(map(indicators => {
return HelperFunctions.copy(indicators);
}));
}
moveIndicator(url: string, path: string[], moveIndicator: MoveIndicator): Observable<SubCategory> {
return this.http.post<SubCategory>(url + '/' + path.join('/') + '/moveIndicator', moveIndicator, CustomOptions.registryOptions()).pipe(map(subCategory => {
return this.http.post<SubCategory>(url + path.join('/') + '/moveIndicator', moveIndicator, CustomOptions.registryOptions()).pipe(map(subCategory => {
return HelperFunctions.copy(subCategory);
}));
}
updateUmbrella(url: string, id: string, update: UpdateUmbrella): Observable<Umbrella> {
return this.http.post<Umbrella>(url + '/' + 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);
}));
}

View File

@ -26,19 +26,19 @@ export class CustomizationService {
saveLayout(properties: EnvProperties, pid: string, layout: Layout, portalType = null): Observable<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());
}
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());
}
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');
}
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 {
return this.http.get('./assets/customizationOptions.json') ;

View File

@ -43,7 +43,7 @@ export class PluginsService {
}
countPluginTemplatePerPageForAllPortals(api: string) {
return this.http.get(api + '/pluginTemplate/page/count');
return this.http.get(api + 'pluginTemplate/page/count');
}
getPluginsByPage(api: string, pid: string, pageId: string) {
@ -66,11 +66,11 @@ export class PluginsService {
return this.http.post(api + 'community/' + community + '/plugin/status/' + id, status, CustomOptions.getAuthOptionsWithBody());
}
getPluginById(api: string, id: string) {
return this.http.get<Plugin>(api + '/plugin/' + id);
return this.http.get<Plugin>(api + 'plugin/' + id);
}
getPluginTemplateById(api: string, id: string) {
return this.http.get<PluginTemplate>(api + '/pluginTemplates/' + id);
return this.http.get<PluginTemplate>(api + 'pluginTemplates/' + id);
}
}

View File

@ -35,7 +35,7 @@ export class ConfigurationService {
public initPortal(properties: EnvProperties, pid: string) {
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.sub = this.http.get<Portal>(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload?'&forceReload=true':'')) :*/ url).subscribe(
(portal: Portal) => {

View File

@ -16,22 +16,22 @@ export class EmailService {
}
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) {
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) {
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> {
const data: EmailRecaptcha = new EmailRecaptcha();
data.email = email;
data.recaptcha = recaptcha;
return this.http.post<boolean>(properties.adminToolsAPIURL + '/contact', data);
return this.http.post<boolean>(properties.adminToolsAPIURL + 'contact', data);
}
}

View File

@ -19,9 +19,9 @@ export class HelperService {
let url = properties.adminToolsAPIURL;
if (div) {
url += '/divhelpcontent?active=true&community=' + communityId + '&page=' + router + '&div=' + div;
url += 'divhelpcontent?active=true&community=' + communityId + '&page=' + router + '&div=' + div;
} else {
url += '/pagehelpcontent?active=true&community=' + communityId + '&page=' + router + '&position=' + position;
url += 'pagehelpcontent?active=true&community=' + communityId + '&page=' + router + '&position=' + position;
if (before) {
url += '&before=' + before;
}
@ -42,7 +42,7 @@ export class HelperService {
if (typeof properties.useHelpTexts == "undefined" || properties.useHelpTexts) {
let page_route: string = router.split('?')[0].substring(0);
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);
return this.http.get(/*(properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url)+ (properties.forceCacheReload?'&forceReload=true':'')) :*/ url);
} else {
@ -60,7 +60,7 @@ export class HelperService {
if (typeof properties.useHelpTexts == "undefined" || properties.useHelpTexts) {
let page_route: string = router.split('?')[0].substring(0);
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);
return this.http.get((properties.useLongCache) ? (properties.cacheUrl + encodeURIComponent(url) + (properties.forceCacheReload ? '&forceReload=true' : '')) : url);
} else {

View File

@ -116,7 +116,7 @@ export let commonDev: EnvProperties = {
cookieDomain: ".di.uoa.gr",
feedbackmail: "kostis30fylloy@gmail.com",
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/",
datasourcesAPI: "https://beta.services.openaire.eu/openaire/ds/api/",
contextsAPI: "https://dev-openaire.d4science.org/openaire/context",
@ -152,7 +152,7 @@ export let commonTest: EnvProperties = {
loginServiceURL: " https://services.openaire.eu/login-service/",
cacheUrl: "https://explore.openaire.eu/cache/get?url=",
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/",
contextsAPI: "https://services.openaire.eu/openaire/context",
communityAPI: "https://services.openaire.eu/openaire/community/",
@ -181,7 +181,7 @@ export let commonBeta: EnvProperties = {
loginServiceURL: "https://beta.services.openaire.eu/login-service/",
cacheUrl: "https://demo.openaire.eu/cache/get?url=",
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/",
contextsAPI: "https://beta.services.openaire.eu/openaire/context",
communityAPI: "https://beta.services.openaire.eu/openaire/community/",
@ -220,7 +220,7 @@ export let commonProd: EnvProperties = {
loginServiceURL: "https://services.openaire.eu/login-service/",
cacheUrl: "https://explore.openaire.eu/cache/get?url=",
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/",
contextsAPI: "https://services.openaire.eu/openaire/context",
communityAPI: "https://services.openaire.eu/openaire/community/",