Merge pull request 'Connect Production release September' (#50) from develop into master
Reviewed-on: #50
This commit is contained in:
commit
d6735a566f
|
@ -11,15 +11,17 @@ import {properties} from "../../../../../environments/environment";
|
|||
<h6 class="uk-margin-remove multi-line-ellipsis lines-2">
|
||||
<p class="uk-margin-remove">
|
||||
<a *ngIf="externalPortalUrl" [href]="externalPortalUrl + projectUrl + '?projectId='+project['openaireId']" class="uk-link uk-link-heading" [class.uk-disabled]="project.name == 'unidentified'">
|
||||
{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}
|
||||
<span *ngIf="project['code'] != 'unidentified'">{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}</span>
|
||||
<span *ngIf="project['code'] == 'unidentified'">{{project['funderName']}}</span>
|
||||
</a>
|
||||
<a *ngIf="!externalPortalUrl" [routerLink]="projectUrl" [queryParams]="routerHelper.createQueryParam('projectId',project['openaireId'])" class="uk-link uk-link-heading" [class.uk-disabled]="project.name == 'unidentified'">
|
||||
{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}
|
||||
<span *ngIf="project['code'] != 'unidentified'">{{(project['acronym'] ? ('[' + project['acronym'] + '] ') : '')}}{{project['name']}}</span>
|
||||
<span *ngIf="project['code'] == 'unidentified'">{{project['funderName']}} </span>
|
||||
</a>
|
||||
</p>
|
||||
</h6>
|
||||
</ng-container>
|
||||
<span *ngIf="project['funderName']" class="uk-margin-small-top">
|
||||
<span *ngIf="project['funderName'] && project['code'] != 'unidentified'" class="uk-margin-small-top">
|
||||
<span class="uk-text-meta">Funder: </span>{{project['funderName']}}
|
||||
</span>
|
||||
`
|
||||
|
|
|
@ -91,6 +91,7 @@ export class CustomizationOptions {
|
|||
identity: {
|
||||
mainColor: string;
|
||||
secondaryColor: string;
|
||||
customCss: string;
|
||||
};
|
||||
identityIsCustom: boolean;
|
||||
backgroundsIsCustom: boolean;
|
||||
|
@ -119,6 +120,7 @@ export class CustomizationOptions {
|
|||
this.identity = {
|
||||
mainColor: mainColor ? mainColor : CustomizationOptions.getIdentity().mainColor,
|
||||
secondaryColor: secondaryColor ? secondaryColor : CustomizationOptions.getIdentity().secondaryColor,
|
||||
customCss: ""
|
||||
};
|
||||
this.identityIsCustom = false;
|
||||
this.backgroundsIsCustom = false;
|
||||
|
@ -185,6 +187,9 @@ export class CustomizationOptions {
|
|||
if (current.identity && current.identity.mainColor && current.identity.secondaryColor) {
|
||||
updated = new CustomizationOptions(current.identity.mainColor, current.identity.secondaryColor);
|
||||
}
|
||||
if(current.identity && !current.identity.customCss){
|
||||
current.identity.customCss = defaultCO.identity.customCss;
|
||||
}
|
||||
if (!current.backgrounds) {
|
||||
current.backgrounds = Object.assign({}, updated.backgrounds);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
</div>
|
||||
<form *ngIf="!showLoading" [formGroup]="myForm">
|
||||
<div class="uk-grid uk-child-width-1-2">
|
||||
<div *ngIf="placementsOptions.length > 1 && myForm.get('placement').value" input [formInput]="myForm.get('placement')"
|
||||
<div *ngIf="placementsOptions.length > 1" input [formInput]="myForm.get('placement')"
|
||||
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>
|
||||
|
|
|
@ -149,6 +149,9 @@ export class PageContentFormComponent implements OnInit {
|
|||
if (page.left) {
|
||||
this.placementsOptions.push({label: "left", value: "left"});
|
||||
}
|
||||
if (page.right) {
|
||||
this.placementsOptions.push({label: "right", value: "right"});
|
||||
}
|
||||
this.orderOptions = [];
|
||||
for (let i = 1; i < countContents + 1; i++) {
|
||||
this.orderOptions.push({label: "" + i, value: i});
|
||||
|
|
|
@ -89,7 +89,7 @@ import {PluginBaseFormComponent} from "../../utils/base-plugin.form.component";
|
|||
</plugin-field-edit>
|
||||
Subjects
|
||||
</div>
|
||||
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall uk-margin-medium-left "> Manage community info <a routerLink="../../info/profile" target="_blank">here</a>.</div>
|
||||
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall uk-margin-medium-left "> Manage community info <a routerLink="../../../info/profile" target="_blank">here</a>.</div>
|
||||
<div class="uk-margin-top uk-text-meta uk-text-xsmall">
|
||||
Pages & menus
|
||||
</div>
|
||||
|
@ -148,10 +148,10 @@ import {PluginBaseFormComponent} from "../../utils/base-plugin.form.component";
|
|||
</div>
|
||||
|
||||
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall"> If some information is enabled here,
|
||||
but still not visible, please check related <a routerLink="../entities" target="_blank">entity</a> or <a routerLink="../pages" target="_blank">page</a>.
|
||||
but still not visible, please check related <a routerLink="../../entities" target="_blank">entity</a> or <a routerLink="../../pages" target="_blank">page</a>.
|
||||
</div>
|
||||
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall">
|
||||
Change the custom section background options <a routerLink="../../customize-layout" target="_blank"> here.</a>
|
||||
Change the custom section background options <a routerLink="../../../customize-layout" target="_blank"> here.</a>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
|
|
|
@ -30,7 +30,7 @@ import {PluginSearchBar} from "./plugin-search-bar.component";
|
|||
|
||||
</div>
|
||||
|
||||
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall uk-margin-medium-left "> Manage community info <a routerLink="../../info/profile" target="_blank">here</a>.</div>
|
||||
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall uk-margin-medium-left "> Manage community info <a routerLink="../../../info/profile" target="_blank">here</a>.</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
|
|
|
@ -33,7 +33,7 @@ import {PluginBaseFormComponent, PluginEditEvent} from "../../utils/base-plugin.
|
|||
|
||||
</ng-container>
|
||||
<div class="uk-alert uk-alert-warning uk-text-small uk-padding-xsmall">
|
||||
Change the custom section background options <a routerLink="../../customize-layout" target="_blank"> here.</a>
|
||||
Change the custom section background options <a routerLink="../../../customize-layout" target="_blank"> here.</a>
|
||||
</div>
|
||||
</ng-container>
|
||||
<ng-container *ngIf="selectedIndex > -1">
|
||||
|
|
|
@ -11,7 +11,7 @@ import {PluginSuggestedRepositories} from "./plugin-suggested-repositories.compo
|
|||
<plugin-field-edit [value]="pluginObject.description"
|
||||
type="textarea" field="description" (changed)="valueChanged($event)" [switchToHTMLEditor]="true"></plugin-field-edit>
|
||||
<div class="uk-alert uk-alert-warning uk-text-small"> Manage the content providers list in
|
||||
<a routerLink="../../../info/content-providers" target="_blank">Community info</a> by adding them in deposit.</div>
|
||||
<a routerLink="../../../config/content-providers" target="_blank">community content config</a> by adding them in deposit.</div>
|
||||
</div>
|
||||
`,
|
||||
|
||||
|
|
|
@ -131,7 +131,7 @@ export class PortalsComponent implements OnInit {
|
|||
|
||||
public confirmedDeletePortals(data: any) {
|
||||
this.showLoading = true;
|
||||
this.subscriptions.push(this._helpContentService.deleteCommunities(this.selectedPortals, this.properties.adminToolsAPIURL).subscribe(
|
||||
this.subscriptions.push(this._helpContentService.deleteCommunities(this.selectedPortals, this.properties.adminToolsAPIURL, this.getPortalType()).subscribe(
|
||||
_ => {
|
||||
this.deletePortalsFromArray(this.selectedPortals);
|
||||
NotificationHandler.rise('Portals have been <b>successfully deleted</b>');
|
||||
|
@ -141,7 +141,11 @@ export class PortalsComponent implements OnInit {
|
|||
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) {
|
||||
const portal: Portal = this.checkboxes[i].portal;
|
||||
this.index = this.portals.findIndex(value => value._id === portal._id);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}));
|
||||
}
|
||||
|
|
|
@ -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') ;
|
||||
|
|
|
@ -406,11 +406,10 @@ export class HelpContentService {
|
|||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
deleteCommunities(ids : string[], helpContentUrl:string) {
|
||||
deleteCommunities(ids : string[], helpContentUrl:string, portalType:string) {
|
||||
// let headers = new Headers({'Content-Type': 'application/json'});
|
||||
// let options = new RequestOptions({headers: headers});
|
||||
|
||||
return this.http.post(helpContentUrl + properties.adminToolsPortalType + '/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||
return this.http.post(helpContentUrl + '/' + portalType + '/delete',JSON.stringify(ids), CustomOptions.getAuthOptionsWithBody())
|
||||
.pipe(catchError(this.handleError));
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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) => {
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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/",
|
||||
|
|
Loading…
Reference in New Issue