mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-18 15:33:04 +00:00
add link, rename tabs, small refactor
This commit is contained in:
@@ -8,10 +8,10 @@
|
|||||||
<a class="nav-link active">{{'admin-notify-dashboard.metrics' | translate}}</a>
|
<a class="nav-link active">{{'admin-notify-dashboard.metrics' | translate}}</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" [routerLink]="'inbound'" [queryParams]="{view: 'table'}">{{'admin.notify.dashboard.inbound' | translate}}</a>
|
<a class="nav-link" [routerLink]="'inbound'" [queryParams]="{view: 'table'}">{{'admin.notify.dashboard.inbound-logs' | translate}}</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" [routerLink]="'outbound'" [queryParams]="{view: 'table'}">{{'admin.notify.dashboard.outbound' | translate}}</a>
|
<a class="nav-link" [routerLink]="'outbound'" [queryParams]="{view: 'table'}">{{'admin.notify.dashboard.outbound-logs' | translate}}</a>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="mt-2">
|
<div class="mt-2">
|
||||||
<ds-admin-notify-metrics *ngIf="(notifyMetricsRows$ | async)?.length" [boxesConfig]="notifyMetricsRows$ | async"></ds-admin-notify-metrics>
|
<ds-admin-notify-metrics *ngIf="(notifyMetricsRows$ | async)?.length" [boxesConfig]="notifyMetricsRows$ | async"></ds-admin-notify-metrics>
|
||||||
|
@@ -9,10 +9,10 @@
|
|||||||
<a class="nav-link" [routerLink]="'../'">{{'admin-notify-dashboard.metrics' | translate}}</a>
|
<a class="nav-link" [routerLink]="'../'">{{'admin-notify-dashboard.metrics' | translate}}</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link active">{{'admin.notify.dashboard.inbound' | translate}}</a>
|
<a class="nav-link active">{{'admin.notify.dashboard.inbound-logs' | translate}}</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" [routerLink]="'../outbound'" [queryParams]="{view: 'table'}">{{'admin.notify.dashboard.outbound' | translate}}</a>
|
<a class="nav-link" [routerLink]="'../outbound'" [queryParams]="{view: 'table'}">{{'admin.notify.dashboard.outbound-logs' | translate}}</a>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="col-12 text-left h4 my-4">{{'admin.notify.dashboard.inbound' | translate}}</div>
|
<div class="col-12 text-left h4 my-4">{{'admin.notify.dashboard.inbound' | translate}}</div>
|
||||||
|
@@ -9,10 +9,10 @@
|
|||||||
<a class="nav-link" [routerLink]="'../'">{{'admin-notify-dashboard.metrics' | translate}}</a>
|
<a class="nav-link" [routerLink]="'../'">{{'admin-notify-dashboard.metrics' | translate}}</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" [routerLink]="'../inbound'" [queryParams]="{view: 'table'}">{{'admin.notify.dashboard.inbound' | translate}}</a>
|
<a class="nav-link" [routerLink]="'../inbound'" [queryParams]="{view: 'table'}">{{'admin.notify.dashboard.inbound-logs' | translate}}</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link active">{{'admin.notify.dashboard.outbound' | translate}}</a>
|
<a class="nav-link active">{{'admin.notify.dashboard.outbound-logs' | translate}}</a>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<div class="col-12 text-left h4 my-4">{{'admin.notify.dashboard.outbound' | translate}}</div>
|
<div class="col-12 text-left h4 my-4">{{'admin.notify.dashboard.outbound' | translate}}</div>
|
||||||
|
@@ -16,12 +16,10 @@
|
|||||||
<div>{{ message.queueLastStartTime }}</div>
|
<div>{{ message.queueLastStartTime }}</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div *ngIf="isInbound">{{ message.context }}</div>
|
<a [routerLink]="'/items/' + (isInbound ? message.context : message.object)">{{ message.relatedItem }}</a>
|
||||||
<div *ngIf="!isInbound">{{ message.object }}</div>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div *ngIf="isInbound">{{ message.origin }}</div>
|
<div>{{ message.ldnService }}</div>
|
||||||
<div *ngIf="!isInbound">{{ message.target }}</div>
|
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div>{{ message.coarNotifyType }}</div>
|
<div>{{ message.coarNotifyType }}</div>
|
||||||
|
@@ -60,6 +60,18 @@ export class AdminNotifyMessage extends DSpaceObject {
|
|||||||
@autoserialize
|
@autoserialize
|
||||||
object: string;
|
object: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the related item
|
||||||
|
*/
|
||||||
|
@autoserialize
|
||||||
|
relatedItem: string;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name of the related ldn service
|
||||||
|
*/
|
||||||
|
@autoserialize
|
||||||
|
ldnService: string;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The context of the message
|
* The context of the message
|
||||||
*/
|
*/
|
||||||
|
@@ -58,27 +58,15 @@ export class AdminNotifyMessagesService extends IdentifiableDataService<AdminNot
|
|||||||
public getDetailedMessages(messages: AdminNotifyMessage[]): Observable<AdminNotifyMessage[]> {
|
public getDetailedMessages(messages: AdminNotifyMessage[]): Observable<AdminNotifyMessage[]> {
|
||||||
return from(messages.map(message => this.formatMessageLabels(message))).pipe(
|
return from(messages.map(message => this.formatMessageLabels(message))).pipe(
|
||||||
mergeMap(message =>
|
mergeMap(message =>
|
||||||
message.target ? this.ldnServicesService.findById(message.target.toString()).pipe(
|
message.target || message.origin ? this.ldnServicesService.findById((message.target || message.origin).toString()).pipe(
|
||||||
getAllSucceededRemoteDataPayload(),
|
getAllSucceededRemoteDataPayload(),
|
||||||
map(detail => ({...message, target: detail.name}))
|
map(detail => ({...message, ldnService: detail.name}))
|
||||||
) : of(message),
|
) : of(message),
|
||||||
),
|
),
|
||||||
mergeMap(message =>
|
mergeMap(message =>
|
||||||
message.object ? this.itemDataService.findById(message.object.toString()).pipe(
|
message.object || message.context ? this.itemDataService.findById(message.object || message.context).pipe(
|
||||||
getAllSucceededRemoteDataPayload(),
|
getAllSucceededRemoteDataPayload(),
|
||||||
map(detail => ({...message, object: detail.name}))
|
map(detail => ({...message, relatedItem: detail.name}))
|
||||||
) : of(message),
|
|
||||||
),
|
|
||||||
mergeMap(message =>
|
|
||||||
message.origin ? this.ldnServicesService.findById(message.origin.toString()).pipe(
|
|
||||||
getAllSucceededRemoteDataPayload(),
|
|
||||||
map(detail => ({...message, origin: detail.name}))
|
|
||||||
) : of(message),
|
|
||||||
),
|
|
||||||
mergeMap(message =>
|
|
||||||
message.context ? this.itemDataService.findById(message.context).pipe(
|
|
||||||
getAllSucceededRemoteDataPayload(),
|
|
||||||
map(detail => ({...message, context: detail.name}))
|
|
||||||
) : of(message),
|
) : of(message),
|
||||||
),
|
),
|
||||||
scan((acc: any, value: any) => [...acc, value], []),
|
scan((acc: any, value: any) => [...acc, value], []),
|
||||||
@@ -93,7 +81,6 @@ export class AdminNotifyMessagesService extends IdentifiableDataService<AdminNot
|
|||||||
public reprocessMessage(message: AdminNotifyMessage, messageSubject: BehaviorSubject<AdminNotifyMessage[]>): Observable<AdminNotifyMessage[]> {
|
public reprocessMessage(message: AdminNotifyMessage, messageSubject: BehaviorSubject<AdminNotifyMessage[]>): Observable<AdminNotifyMessage[]> {
|
||||||
const requestId = this.requestService.generateRequestId();
|
const requestId = this.requestService.generateRequestId();
|
||||||
|
|
||||||
|
|
||||||
return this.halService.getEndpoint(this.reprocessEndpoint).pipe(
|
return this.halService.getEndpoint(this.reprocessEndpoint).pipe(
|
||||||
map(endpoint => endpoint.replace('{id}', message.id)),
|
map(endpoint => endpoint.replace('{id}', message.id)),
|
||||||
map((endpointURL: string) => new GetRequest(requestId, endpointURL)),
|
map((endpointURL: string) => new GetRequest(requestId, endpointURL)),
|
||||||
|
@@ -3473,9 +3473,11 @@
|
|||||||
|
|
||||||
"admin.notify.dashboard.inbound": "Inbound messages",
|
"admin.notify.dashboard.inbound": "Inbound messages",
|
||||||
|
|
||||||
|
"admin.notify.dashboard.inbound-logs": "Logs/Inbound",
|
||||||
|
|
||||||
"admin.notify.dashboard.outbound": "Outbound messages",
|
"admin.notify.dashboard.outbound": "Outbound messages",
|
||||||
|
|
||||||
"admin.notify.dashboard.breadcrumbs": "Dashboard",
|
"admin.notify.dashboard.outbound-logs": "Logs/Outbound",
|
||||||
|
|
||||||
"NOTIFY.incoming.search.results.head": "Incoming",
|
"NOTIFY.incoming.search.results.head": "Incoming",
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user