mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
CST-11012 Dynamically retrieving rest URL for the coar-notify-page
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
<p [innerHTML]="('coar-notify-support-title.content' | translate)"></p>
|
<p [innerHTML]="('coar-notify-support-title.content' | translate)"></p>
|
||||||
|
|
||||||
<h2>{{ 'coar-notify-support.ldn-inbox.title' | translate }}</h2>
|
<h2>{{ 'coar-notify-support.ldn-inbox.title' | translate }}</h2>
|
||||||
<p [innerHTML]="('coar-notify-support.ldn-inbox.content' | translate)"></p>
|
<p [innerHTML]="('coar-notify-support.ldn-inbox.content' | translate).replace('{restApiUrl}', coarRestApiUrl)"></p>
|
||||||
|
|
||||||
<h2>{{ 'coar-notify-support.message-moderation.title' | translate }}</h2>
|
<h2>{{ 'coar-notify-support.message-moderation.title' | translate }}</h2>
|
||||||
<p [innerHTML]="('coar-notify-support.message-moderation.content' | translate)"></p>
|
<p [innerHTML]="('coar-notify-support.message-moderation.content' | translate)"></p>
|
||||||
|
@@ -1,23 +1,26 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component, OnInit } from '@angular/core';
|
||||||
import { NotifyInfoService } from './notify-info.service';
|
import { NotifyInfoService } from './notify-info.service';
|
||||||
|
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'ds-notify-info',
|
selector: 'ds-notify-info',
|
||||||
templateUrl: './notify-info.component.html',
|
templateUrl: './notify-info.component.html',
|
||||||
styleUrls: ['./notify-info.component.scss']
|
styleUrls: ['./notify-info.component.scss']
|
||||||
})
|
})
|
||||||
export class NotifyInfoComponent implements OnInit {
|
export class NotifyInfoComponent implements OnInit {
|
||||||
|
|
||||||
coarLdnEnabled: boolean;
|
coarLdnEnabled: boolean;
|
||||||
|
coarRestApiUrl: string;
|
||||||
|
|
||||||
constructor(
|
constructor(
|
||||||
public notifyInfoService: NotifyInfoService,
|
public notifyInfoService: NotifyInfoService,
|
||||||
) { }
|
) {
|
||||||
|
}
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
|
this.coarRestApiUrl = this.notifyInfoService.getCoarLdnRestApiUrl();
|
||||||
|
|
||||||
this.notifyInfoService.isCoarConfigEnabled().subscribe(value => {
|
this.notifyInfoService.isCoarConfigEnabled().subscribe(value => {
|
||||||
this.coarLdnEnabled = value;
|
this.coarLdnEnabled = value;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@@ -2,6 +2,7 @@ import { Injectable } from '@angular/core';
|
|||||||
import { getFirstSucceededRemoteData } from '../../shared/operators';
|
import { getFirstSucceededRemoteData } from '../../shared/operators';
|
||||||
import { ConfigurationDataService } from '../../data/configuration-data.service';
|
import { ConfigurationDataService } from '../../data/configuration-data.service';
|
||||||
import { map, Observable } from 'rxjs';
|
import { map, Observable } from 'rxjs';
|
||||||
|
import { DefaultAppConfig } from '../../../../config/default-app-config';
|
||||||
|
|
||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
@@ -22,4 +23,16 @@ export class NotifyInfoService {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getCoarLdnRestApiUrl(): string {
|
||||||
|
const appConfig = new DefaultAppConfig();
|
||||||
|
const restConfig = appConfig.rest;
|
||||||
|
|
||||||
|
const ssl = restConfig.ssl;
|
||||||
|
const host = restConfig.host;
|
||||||
|
const port = restConfig.port;
|
||||||
|
const namespace = restConfig.nameSpace;
|
||||||
|
|
||||||
|
return `${ssl ? 'https' : 'http'}://${host}:${port}${namespace}`;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@@ -873,7 +873,7 @@
|
|||||||
|
|
||||||
"coar-notify-support.ldn-inbox.title": "LDN InBox",
|
"coar-notify-support.ldn-inbox.title": "LDN InBox",
|
||||||
|
|
||||||
"coar-notify-support.ldn-inbox.content": "For your convenience, our LDN (Linked Data Notifications) InBox is easily accessible at <code>${restApiUrl}/ldn/inbox</code>. The LDN InBox enables seamless communication and data exchange, ensuring efficient and effective collaboration.",
|
"coar-notify-support.ldn-inbox.content": "For your convenience, our LDN (Linked Data Notifications) InBox is easily accessible at <code>{restApiUrl}ldn/inbox</code>. The LDN InBox enables seamless communication and data exchange, ensuring efficient and effective collaboration.",
|
||||||
|
|
||||||
"coar-notify-support.message-moderation.title": "Message Moderation",
|
"coar-notify-support.message-moderation.title": "Message Moderation",
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user