mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-07 01:54:15 +00:00
Merge remote-tracking branch 'origin/CST-13316-improvments-part-two' into coar-notify-7-part-two
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<h2 class="border-bottom pb-2">{{'admin-notify-dashboard.title'| translate}}</h2>
|
||||
<div class="my-4">{{'admin-notify-dashboard.description' | translate}}</div>
|
||||
<div>
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="nav-item">
|
||||
|
@@ -4,7 +4,7 @@
|
||||
<div class="col-md-9">
|
||||
<div class="h4">
|
||||
<button (click)="resetDefaultConfiguration()" *ngIf="(selectedSearchConfig$ | async) !== defaultConfiguration" class="badge badge-primary mr-1 mb-1">
|
||||
{{'admin.notify.dashboard.filter' | translate}} {{ 'admin-notify-dashboard.' + (selectedSearchConfig$ | async) | translate}}
|
||||
{{ 'admin-notify-logs.' + (selectedSearchConfig$ | async) | translate}}
|
||||
<span> ×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
@@ -2,6 +2,7 @@ export interface AdminNotifyMetricsBox {
|
||||
color: string;
|
||||
textColor?: string;
|
||||
title: string;
|
||||
description: string;
|
||||
config: string;
|
||||
count?: number;
|
||||
}
|
||||
|
@@ -16,8 +16,12 @@
|
||||
<div *ngIf="message.queueLastStartTime">{{ message.queueLastStartTime | date:"YYYY/MM/d hh:mm:ss" }}</div>
|
||||
<div *ngIf="!message.queueLastStartTime">n/a</div>
|
||||
</td>
|
||||
<td class="cell-small text-truncate">
|
||||
<a *ngIf="message.relatedItem" [routerLink]="'/items/' + (isInbound ? message.context : message.object)">{{ message.relatedItem }}</a>
|
||||
<td>
|
||||
<ds-truncatable [id]="message.id">
|
||||
<ds-truncatable-part [id]="message.id" [minLines]="2">
|
||||
<a *ngIf="message.relatedItem" [routerLink]="'/items/' + (message.context || message.object)">{{ message.relatedItem }}</a>
|
||||
</ds-truncatable-part>
|
||||
</ds-truncatable>
|
||||
<div *ngIf="!message.relatedItem">n/a</div>
|
||||
</td>
|
||||
<td>
|
||||
@@ -33,7 +37,10 @@
|
||||
<td>
|
||||
<div class="d-flex flex-column">
|
||||
<button class="btn mb-2 btn-dark" (click)="openDetailModal(message)">{{ 'notify-message-result.detail' | translate }}</button>
|
||||
<button *ngIf="message.queueStatusLabel !== reprocessStatus" (click)="reprocessMessage(message)" class="btn btn-warning">
|
||||
<button *ngIf="message.queueStatusLabel !== reprocessStatus && (message.queueStatusLabel === failureStatus || message.queueStatusLabel === unmappedActionStatus)"
|
||||
(click)="reprocessMessage(message)"
|
||||
class="btn btn-warning"
|
||||
>
|
||||
{{ 'notify-message-result.reprocess' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
|
@@ -1,9 +0,0 @@
|
||||
.cell-small {
|
||||
max-width: 180px;
|
||||
}
|
||||
|
||||
.table-responsive {
|
||||
td, th {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
}
|
@@ -22,7 +22,6 @@ import { DatePipe } from '@angular/common';
|
||||
@Component({
|
||||
selector: 'ds-admin-notify-search-result',
|
||||
templateUrl: './admin-notify-search-result.component.html',
|
||||
styleUrls: ['./admin-notify-search-result.component.scss'],
|
||||
providers: [
|
||||
{
|
||||
provide: SEARCH_CONFIG_SERVICE,
|
||||
@@ -33,6 +32,8 @@ import { DatePipe } from '@angular/common';
|
||||
export class AdminNotifySearchResultComponent extends TabulatableResultListElementsComponent<PaginatedList<AdminNotifySearchResult>, AdminNotifySearchResult> implements OnInit, OnDestroy{
|
||||
public messagesSubject$: BehaviorSubject<AdminNotifyMessage[]> = new BehaviorSubject([]);
|
||||
public reprocessStatus = 'QUEUE_STATUS_QUEUED_FOR_RETRY';
|
||||
public failureStatus = 'QUEUE_STATUS_FAILED';
|
||||
public unmappedActionStatus = 'QUEUE_STATUS_UNMAPPED_ACTION';
|
||||
//we check on one type of config to render specific table headers
|
||||
public isInbound: boolean;
|
||||
|
||||
|
@@ -171,8 +171,7 @@ export class MenuResolver implements Resolve<boolean> {
|
||||
this.authorizationService.isAuthorized(FeatureID.AdministratorOf),
|
||||
this.authorizationService.isAuthorized(FeatureID.CanSubmit),
|
||||
this.authorizationService.isAuthorized(FeatureID.CanEditItem),
|
||||
this.authorizationService.isAuthorized(FeatureID.CanSeeQA)
|
||||
]).subscribe(([isCollectionAdmin, isCommunityAdmin, isSiteAdmin, canSubmit, canEditItem, canSeeQA]) => {
|
||||
]).subscribe(([isCollectionAdmin, isCommunityAdmin, isSiteAdmin, canSubmit, canEditItem]) => {
|
||||
const newSubMenuList = [
|
||||
{
|
||||
id: 'new_community',
|
||||
@@ -301,49 +300,12 @@ export class MenuResolver implements Resolve<boolean> {
|
||||
icon: 'pencil-alt',
|
||||
index: 1
|
||||
};
|
||||
const notificationSubMenuList = [
|
||||
/* Notifications */
|
||||
{
|
||||
id: 'notifications',
|
||||
active: false,
|
||||
visible: true,
|
||||
model: {
|
||||
type: MenuItemType.TEXT,
|
||||
text: 'menu.section.notifications'
|
||||
} as TextMenuItemModel,
|
||||
icon: 'bell',
|
||||
index: 4
|
||||
},
|
||||
{
|
||||
id: 'notifications_quality-assurance',
|
||||
parentID: 'notifications',
|
||||
active: false,
|
||||
visible: canSeeQA,
|
||||
model: {
|
||||
type: MenuItemType.LINK,
|
||||
text: 'menu.section.quality-assurance',
|
||||
link: '/notifications/quality-assurance'
|
||||
} as LinkMenuItemModel,
|
||||
},
|
||||
{
|
||||
id: 'notifications_reciter',
|
||||
parentID: 'notifications',
|
||||
active: false,
|
||||
visible: true,
|
||||
model: {
|
||||
type: MenuItemType.LINK,
|
||||
text: 'menu.section.notifications_reciter',
|
||||
link: '/notifications/' + NOTIFICATIONS_RECITER_SUGGESTION_PATH
|
||||
} as LinkMenuItemModel,
|
||||
},
|
||||
];
|
||||
|
||||
const menuList = [
|
||||
...newSubMenuList,
|
||||
newSubMenu,
|
||||
...editSubMenuList,
|
||||
editSubMenu,
|
||||
...notificationSubMenuList,
|
||||
|
||||
// TODO: enable this menu item once the feature has been implemented
|
||||
// {
|
||||
@@ -582,8 +544,10 @@ export class MenuResolver implements Resolve<boolean> {
|
||||
* Create menu sections dependent on whether or not the current user is a site administrator
|
||||
*/
|
||||
createSiteAdministratorMenuSections() {
|
||||
this.authorizationService.isAuthorized(FeatureID.AdministratorOf)
|
||||
.subscribe((authorized) => {
|
||||
combineLatest([
|
||||
this.authorizationService.isAuthorized(FeatureID.AdministratorOf),
|
||||
this.authorizationService.isAuthorized(FeatureID.CanSeeQA)
|
||||
]).subscribe(([authorized, canSeeQA]) => {
|
||||
const menuList = [
|
||||
/* Admin Search */
|
||||
{
|
||||
@@ -707,6 +671,40 @@ export class MenuResolver implements Resolve<boolean> {
|
||||
link: '/admin/ldn/services'
|
||||
} as LinkMenuItemModel,
|
||||
},
|
||||
/* Notifications */
|
||||
{
|
||||
id: 'notifications',
|
||||
active: false,
|
||||
visible: authorized,
|
||||
model: {
|
||||
type: MenuItemType.TEXT,
|
||||
text: 'menu.section.notifications'
|
||||
} as TextMenuItemModel,
|
||||
icon: 'bell',
|
||||
index: 4
|
||||
},
|
||||
{
|
||||
id: 'notifications_quality-assurance',
|
||||
parentID: 'notifications',
|
||||
active: false,
|
||||
visible: authorized && canSeeQA,
|
||||
model: {
|
||||
type: MenuItemType.LINK,
|
||||
text: 'menu.section.quality-assurance',
|
||||
link: '/notifications/quality-assurance'
|
||||
} as LinkMenuItemModel,
|
||||
},
|
||||
{
|
||||
id: 'notifications_reciter',
|
||||
parentID: 'notifications',
|
||||
active: false,
|
||||
visible: authorized,
|
||||
model: {
|
||||
type: MenuItemType.LINK,
|
||||
text: 'menu.section.notifications_reciter',
|
||||
link: '/notifications/' + NOTIFICATIONS_RECITER_SUGGESTION_PATH
|
||||
} as LinkMenuItemModel,
|
||||
},
|
||||
];
|
||||
|
||||
menuList.forEach((menuSection) => this.menuService.addSection(MenuID.ADMIN, Object.assign(menuSection, {
|
||||
|
@@ -3,6 +3,7 @@
|
||||
[ngStyle]="{'background-color': boxConfig.color}"
|
||||
[dsHoverClass]="'shadow-lg'"
|
||||
(click)="onClick(boxConfig)"
|
||||
[title]="boxConfig.description | translate"
|
||||
>
|
||||
<div [ngStyle]="{'color': boxConfig.textColor}" class="d-flex flex-column justify-content-center align-items-center">
|
||||
<div class="mb-3 font-weight-bold box-counter">{{ boxConfig.count ?? 0 }}</div>
|
||||
|
@@ -3465,6 +3465,8 @@
|
||||
|
||||
"admin-notify-dashboard.title": "Notify Dashboard",
|
||||
|
||||
"admin-notify-dashboard.description": "The Notify dashboard monitor the general usage of the COAR Notify protocol across the repository. In the “Metrics” tab are statistics about usage of the COAR Notify protocol. In the “Logs/Inbound” and “Logs/Outbound” tabs it’s possible to search and check the individual status of each LDN message, either received or sent.",
|
||||
|
||||
"admin-notify-dashboard.metrics": "Metrics",
|
||||
|
||||
"admin-notify-dashboard.received-ldn": "Number of received LDN",
|
||||
@@ -3473,24 +3475,64 @@
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.incoming.accepted": "Accepted",
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.incoming.accepted.description": "Accepted inbound notifications",
|
||||
|
||||
"admin-notify-logs.NOTIFY.incoming.accepted": "Currently displaying: Accepted notifications",
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.incoming.processed": "Processed LDN",
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.incoming.processed.description": "Processed inbound notifications",
|
||||
|
||||
"admin-notify-logs.NOTIFY.incoming.processed": "Currently displaying: Processed LDN",
|
||||
|
||||
"admin-notify-logs.NOTIFY.incoming.failure": "Currently displaying: Failed notifications",
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.incoming.failure": "Failure",
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.incoming.failure.description": "Failed inbound notifications",
|
||||
|
||||
"admin-notify-logs.NOTIFY.outgoing.failure": "Currently displaying: Failed notifications",
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.outgoing.failure": "Failure",
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.outgoing.failure.description": "Failed outbound notifications",
|
||||
|
||||
"admin-notify-logs.NOTIFY.incoming.untrusted": "Currently displaying: Untrusted notifications",
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.incoming.untrusted": "Untrusted",
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.incoming.untrusted.description": "Inbound notifications not trusted",
|
||||
|
||||
"admin-notify-logs.NOTIFY.incoming.delivered": "Currently displaying: Delivered notifications",
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.incoming.delivered.description": "Inbound notifications successfully delivered",
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.outgoing.delivered": "Delivered",
|
||||
|
||||
"admin-notify-logs.NOTIFY.outgoing.delivered": "Currently displaying: Delivered notifications",
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.outgoing.delivered.description": "Outbound notifications successfully delivered",
|
||||
|
||||
"admin-notify-logs.NOTIFY.outgoing.queued": "Currently displaying: Queued notifications",
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.outgoing.queued.description": "Notifications currently queued",
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.outgoing.queued": "Queued",
|
||||
|
||||
"admin-notify-logs.NOTIFY.outgoing.queued_for_retry": "Currently displaying: Queued for retry notifications",
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.outgoing.queued_for_retry": "Queued for retry",
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.outgoing.queued_for_retry.description": "Notifications currently queued for retry",
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.incoming.involvedItems": "Involved items",
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.incoming.involvedItems.description": "Items related to inbound notifications",
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.outgoing.involvedItems": "Involved items",
|
||||
|
||||
"admin-notify-dashboard.NOTIFY.outgoing.involvedItems.description": "Items related to outbound notifications",
|
||||
|
||||
"admin.notify.dashboard.breadcrumbs": "Dashboard",
|
||||
|
||||
"admin.notify.dashboard.inbound": "Inbound messages",
|
||||
|
@@ -462,28 +462,33 @@ export class DefaultAppConfig implements AppConfig {
|
||||
{
|
||||
color: '#B8DAFF',
|
||||
title: 'admin-notify-dashboard.NOTIFY.incoming.accepted',
|
||||
config: 'NOTIFY.incoming.accepted'
|
||||
config: 'NOTIFY.incoming.accepted',
|
||||
description: 'admin-notify-dashboard.NOTIFY.incoming.accepted.description'
|
||||
},
|
||||
{
|
||||
color: '#D4EDDA',
|
||||
title: 'admin-notify-dashboard.NOTIFY.incoming.processed',
|
||||
config: 'NOTIFY.incoming.processed'
|
||||
config: 'NOTIFY.incoming.processed',
|
||||
description: 'admin-notify-dashboard.NOTIFY.incoming.processed.description'
|
||||
},
|
||||
{
|
||||
color: '#FDBBC7',
|
||||
title: 'admin-notify-dashboard.NOTIFY.incoming.failure',
|
||||
config: 'NOTIFY.incoming.failure'
|
||||
config: 'NOTIFY.incoming.failure',
|
||||
description: 'admin-notify-dashboard.NOTIFY.incoming.failure.description'
|
||||
},
|
||||
{
|
||||
color: '#FDBBC7',
|
||||
title: 'admin-notify-dashboard.NOTIFY.incoming.untrusted',
|
||||
config: 'NOTIFY.incoming.untrusted'
|
||||
config: 'NOTIFY.incoming.untrusted',
|
||||
description: 'admin-notify-dashboard.NOTIFY.incoming.untrusted.description'
|
||||
},
|
||||
{
|
||||
color: '#43515F',
|
||||
title: 'admin-notify-dashboard.NOTIFY.incoming.involvedItems',
|
||||
textColor: '#fff',
|
||||
config: 'NOTIFY.incoming.involvedItems',
|
||||
description: 'admin-notify-dashboard.NOTIFY.incoming.involvedItems.description'
|
||||
},
|
||||
]
|
||||
},
|
||||
@@ -493,28 +498,33 @@ export class DefaultAppConfig implements AppConfig {
|
||||
{
|
||||
color: '#D4EDDA',
|
||||
title: 'admin-notify-dashboard.NOTIFY.outgoing.delivered',
|
||||
config: 'NOTIFY.outgoing.delivered'
|
||||
config: 'NOTIFY.outgoing.delivered',
|
||||
description: 'admin-notify-dashboard.NOTIFY.outgoing.delivered.description'
|
||||
},
|
||||
{
|
||||
color: '#B8DAFF',
|
||||
title: 'admin-notify-dashboard.NOTIFY.outgoing.queued',
|
||||
config: 'NOTIFY.outgoing.queued'
|
||||
config: 'NOTIFY.outgoing.queued',
|
||||
description: 'admin-notify-dashboard.NOTIFY.outgoing.queued.description'
|
||||
},
|
||||
{
|
||||
color: '#FDEEBB',
|
||||
title: 'admin-notify-dashboard.NOTIFY.outgoing.queued_for_retry',
|
||||
config: 'NOTIFY.outgoing.queued_for_retry'
|
||||
config: 'NOTIFY.outgoing.queued_for_retry',
|
||||
description: 'admin-notify-dashboard.NOTIFY.outgoing.queued_for_retry.description'
|
||||
},
|
||||
{
|
||||
color: '#FDBBC7',
|
||||
title: 'admin-notify-dashboard.NOTIFY.outgoing.failure',
|
||||
config: 'NOTIFY.outgoing.failure'
|
||||
config: 'NOTIFY.outgoing.failure',
|
||||
description: 'admin-notify-dashboard.NOTIFY.outgoing.failure.description'
|
||||
},
|
||||
{
|
||||
color: '#43515F',
|
||||
title: 'admin-notify-dashboard.NOTIFY.outgoing.involvedItems',
|
||||
textColor: '#fff',
|
||||
config: 'NOTIFY.outgoing.involvedItems',
|
||||
description: 'admin-notify-dashboard.NOTIFY.outgoing.involvedItems.description'
|
||||
},
|
||||
]
|
||||
}
|
||||
|
@@ -331,29 +331,34 @@ export const environment: BuildConfig = {
|
||||
boxes: [
|
||||
{
|
||||
color: '#B8DAFF',
|
||||
title: 'admin-notify-dashboard.accepted',
|
||||
config: 'NOTIFY.incoming.accepted'
|
||||
title: 'admin-notify-dashboard.NOTIFY.incoming.accepted',
|
||||
config: 'NOTIFY.incoming.accepted',
|
||||
description: 'admin-notify-dashboard.NOTIFY.incoming.accepted.description'
|
||||
},
|
||||
{
|
||||
color: '#D4EDDA',
|
||||
title: 'admin-notify-dashboard.processed',
|
||||
config: 'NOTIFY.incoming.processed'
|
||||
title: 'admin-notify-dashboard.NOTIFY.incoming.processed',
|
||||
config: 'NOTIFY.incoming.processed',
|
||||
description: 'admin-notify-dashboard.NOTIFY.incoming.processed.description'
|
||||
},
|
||||
{
|
||||
color: '#FDBBC7',
|
||||
title: 'admin-notify-dashboard.failure',
|
||||
config: 'NOTIFY.incoming.failure'
|
||||
title: 'admin-notify-dashboard.NOTIFY.incoming.failure',
|
||||
config: 'NOTIFY.incoming.failure',
|
||||
description: 'admin-notify-dashboard.NOTIFY.incoming.failure.description'
|
||||
},
|
||||
{
|
||||
color: '#FDBBC7',
|
||||
title: 'admin-notify-dashboard.untrusted',
|
||||
config: 'NOTIFY.incoming.untrusted'
|
||||
title: 'admin-notify-dashboard.NOTIFY.incoming.untrusted',
|
||||
config: 'NOTIFY.incoming.untrusted',
|
||||
description: 'admin-notify-dashboard.NOTIFY.incoming.untrusted.description'
|
||||
},
|
||||
{
|
||||
color: '#43515F',
|
||||
title: 'admin-notify-dashboard.involved-items',
|
||||
title: 'admin-notify-dashboard.NOTIFY.incoming.involvedItems',
|
||||
textColor: '#fff',
|
||||
config: 'NOTIFY.incoming.involvedItems',
|
||||
description: 'admin-notify-dashboard.NOTIFY.incoming.involvedItems.description'
|
||||
},
|
||||
]
|
||||
},
|
||||
@@ -362,29 +367,34 @@ export const environment: BuildConfig = {
|
||||
boxes: [
|
||||
{
|
||||
color: '#D4EDDA',
|
||||
title: 'admin-notify-dashboard.delivered',
|
||||
config: 'NOTIFY.outgoing.delivered'
|
||||
title: 'admin-notify-dashboard.NOTIFY.outgoing.delivered',
|
||||
config: 'NOTIFY.outgoing.delivered',
|
||||
description: 'admin-notify-dashboard.NOTIFY.outgoing.delivered.description'
|
||||
},
|
||||
{
|
||||
color: '#B8DAFF',
|
||||
title: 'admin-notify-dashboard.queued',
|
||||
config: 'NOTIFY.outgoing.queued'
|
||||
title: 'admin-notify-dashboard.NOTIFY.outgoing.queued',
|
||||
config: 'NOTIFY.outgoing.queued',
|
||||
description: 'admin-notify-dashboard.NOTIFY.outgoing.queued.description'
|
||||
},
|
||||
{
|
||||
color: '#FDEEBB',
|
||||
title: 'admin-notify-dashboard.queued-for-retry',
|
||||
config: 'NOTIFY.outgoing.queued_for_retry'
|
||||
title: 'admin-notify-dashboard.NOTIFY.outgoing.queued_for_retry',
|
||||
config: 'NOTIFY.outgoing.queued_for_retry',
|
||||
description: 'admin-notify-dashboard.NOTIFY.outgoing.queued_for_retry.description'
|
||||
},
|
||||
{
|
||||
color: '#FDBBC7',
|
||||
title: 'admin-notify-dashboard.failure',
|
||||
config: 'NOTIFY.outgoing.failure'
|
||||
title: 'admin-notify-dashboard.NOTIFY.outgoing.failure',
|
||||
config: 'NOTIFY.outgoing.failure',
|
||||
description: 'admin-notify-dashboard.NOTIFY.outgoing.failure.description'
|
||||
},
|
||||
{
|
||||
color: '#43515F',
|
||||
title: 'admin-notify-dashboard.involved-items',
|
||||
title: 'admin-notify-dashboard.NOTIFY.outgoing.involvedItems',
|
||||
textColor: '#fff',
|
||||
config: 'NOTIFY.outgoing.involvedItems',
|
||||
description: 'admin-notify-dashboard.NOTIFY.outgoing.involvedItems.description'
|
||||
},
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user