From 0cf61944dc3277767bd85a4bc481c106db30af3a Mon Sep 17 00:00:00 2001 From: Thomas Georgios Giannos Date: Mon, 15 Apr 2024 12:00:48 +0300 Subject: [PATCH 1/3] Small fix on metrics config --- dmp-backend/web/src/main/resources/config/metrics.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dmp-backend/web/src/main/resources/config/metrics.yml b/dmp-backend/web/src/main/resources/config/metrics.yml index d3d0f4731..ec44ac45f 100644 --- a/dmp-backend/web/src/main/resources/config/metrics.yml +++ b/dmp-backend/web/src/main/resources/config/metrics.yml @@ -3,7 +3,7 @@ metrics: enable: true intervalSeconds: 600 nexusDate: "2021-01-01T00:00:00.00Z" - usersLoginClient: ${IDP_APIKEY_CLIENT_ID:} + usersLoginClient: ${IDP_APIKEY_CLIENT_ID_UUID:} referenceTypes: funderIds: [] grantIds: [] From 8942784d49376d6f5fd40e5cac76f671144d2708 Mon Sep 17 00:00:00 2001 From: amentis Date: Mon, 15 Apr 2024 12:22:23 +0300 Subject: [PATCH 2/3] notification enum utils fix --- .../notification-template-field-options.component.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dmp-frontend/src/notification-service/ui/admin/notification-template/editor/field-options/notification-template-field-options.component.ts b/dmp-frontend/src/notification-service/ui/admin/notification-template/editor/field-options/notification-template-field-options.component.ts index ec6eb97d7..601a3f9a1 100644 --- a/dmp-frontend/src/notification-service/ui/admin/notification-template/editor/field-options/notification-template-field-options.component.ts +++ b/dmp-frontend/src/notification-service/ui/admin/notification-template/editor/field-options/notification-template-field-options.component.ts @@ -1,6 +1,6 @@ import { Component, Input, OnInit } from '@angular/core'; import { UntypedFormArray } from '@angular/forms'; -import { EnumUtils } from '@app/core/services/utilities/enum-utils.service'; +import { NotificationServiceEnumUtils } from '@notification-service/core/formatting/enum-utils.service'; import { BaseComponent } from '@common/base/base.component'; import { ValidationErrorModel } from '@common/forms/validation/error-model/validation-error-model'; import { NotificationFieldInfoEditorModel, NotificationFieldOptionsEditorModel } from '../notification-template-editor.model'; @@ -25,7 +25,7 @@ export class NotificationTemplateFieldOptionsComponent extends BaseComponent imp readonly separatorKeysCodes: number[] = [ENTER, COMMA]; constructor( - public enumUtils: EnumUtils, + public enumUtils: NotificationServiceEnumUtils, ) { super(); } ngOnInit() { From 249cc24be4d40b31ab0e7723800d6615ebd38fb2 Mon Sep 17 00:00:00 2001 From: Thomas Georgios Giannos Date: Mon, 15 Apr 2024 12:26:16 +0300 Subject: [PATCH 3/3] Metrics config cleanup and bug fix --- .../service/metrics/MetricsServiceImpl.java | 16 ++++++++-------- .../src/main/resources/config/metrics-devel.yml | 4 ++++ .../web/src/main/resources/config/metrics.yml | 8 ++++---- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/dmp-backend/core/src/main/java/eu/eudat/service/metrics/MetricsServiceImpl.java b/dmp-backend/core/src/main/java/eu/eudat/service/metrics/MetricsServiceImpl.java index 2e86cefc5..71983ce21 100644 --- a/dmp-backend/core/src/main/java/eu/eudat/service/metrics/MetricsServiceImpl.java +++ b/dmp-backend/core/src/main/java/eu/eudat/service/metrics/MetricsServiceImpl.java @@ -66,15 +66,15 @@ public class MetricsServiceImpl implements MetricsService { this.setGaugeValue(gauges, MetricNames.NEXUS_PREFIX + MetricNames.DMP, calculatePublishedDmps(true), MetricLabels.PUBLISHED); this.setGaugeValue(gauges, MetricNames.NEXUS_PREFIX + MetricNames.DMP, calculateDoiedDmps(true), MetricLabels.DOIED); - this.setGaugeValue(gauges, MetricNames.DMP, calculateDraftDmpsWithGrant(false), MetricLabels.DRAFT); - this.setGaugeValue(gauges, MetricNames.DMP, calculateFinalizedDmpsWithGrant(false), MetricLabels.FINALIZED); - this.setGaugeValue(gauges, MetricNames.DMP, calculatePublishedDmpsWithGrant(false), MetricLabels.PUBLISHED); - this.setGaugeValue(gauges, MetricNames.DMP, calculateDoiedDmpsWithGrant(false), MetricLabels.DOIED); + this.setGaugeValue(gauges, MetricNames.DMP_WITH_GRANT, calculateDraftDmpsWithGrant(false), MetricLabels.DRAFT); + this.setGaugeValue(gauges, MetricNames.DMP_WITH_GRANT, calculateFinalizedDmpsWithGrant(false), MetricLabels.FINALIZED); + this.setGaugeValue(gauges, MetricNames.DMP_WITH_GRANT, calculatePublishedDmpsWithGrant(false), MetricLabels.PUBLISHED); + this.setGaugeValue(gauges, MetricNames.DMP_WITH_GRANT, calculateDoiedDmpsWithGrant(false), MetricLabels.DOIED); - this.setGaugeValue(gauges, MetricNames.NEXUS_PREFIX + MetricNames.DMP, calculateDraftDmpsWithGrant(true), MetricLabels.DRAFT); - this.setGaugeValue(gauges, MetricNames.NEXUS_PREFIX + MetricNames.DMP, calculateFinalizedDmpsWithGrant(true), MetricLabels.FINALIZED); - this.setGaugeValue(gauges, MetricNames.NEXUS_PREFIX + MetricNames.DMP, calculatePublishedDmpsWithGrant(true), MetricLabels.PUBLISHED); - this.setGaugeValue(gauges, MetricNames.NEXUS_PREFIX + MetricNames.DMP, calculateDoiedDmpsWithGrant(true), MetricLabels.DOIED); + this.setGaugeValue(gauges, MetricNames.NEXUS_PREFIX + MetricNames.DMP_WITH_GRANT, calculateDraftDmpsWithGrant(true), MetricLabels.DRAFT); + this.setGaugeValue(gauges, MetricNames.NEXUS_PREFIX + MetricNames.DMP_WITH_GRANT, calculateFinalizedDmpsWithGrant(true), MetricLabels.FINALIZED); + this.setGaugeValue(gauges, MetricNames.NEXUS_PREFIX + MetricNames.DMP_WITH_GRANT, calculatePublishedDmpsWithGrant(true), MetricLabels.PUBLISHED); + this.setGaugeValue(gauges, MetricNames.NEXUS_PREFIX + MetricNames.DMP_WITH_GRANT, calculateDoiedDmpsWithGrant(true), MetricLabels.DOIED); this.setGaugeValue(gauges, MetricNames.FUNDERS, calculateAllFunders(false), null); this.setGaugeValue(gauges, MetricNames.GRANTS, calculateAllGrants(false), null); diff --git a/dmp-backend/web/src/main/resources/config/metrics-devel.yml b/dmp-backend/web/src/main/resources/config/metrics-devel.yml index ba506bfab..5e9147e8f 100644 --- a/dmp-backend/web/src/main/resources/config/metrics-devel.yml +++ b/dmp-backend/web/src/main/resources/config/metrics-devel.yml @@ -1,5 +1,9 @@ metrics: task: + enable: true + intervalSeconds: 600 + nexusDate: "2021-01-01T00:00:00.00Z" + usersLoginClient: ${IDP_APIKEY_CLIENT_ID_UUID:} referenceTypes: funderIds: ["538928bb-c7c6-452e-b66d-08e539f5f082"] grantIds: ["5b9c284f-f041-4995-96cc-fad7ad13289c"] diff --git a/dmp-backend/web/src/main/resources/config/metrics.yml b/dmp-backend/web/src/main/resources/config/metrics.yml index ec44ac45f..0f6163011 100644 --- a/dmp-backend/web/src/main/resources/config/metrics.yml +++ b/dmp-backend/web/src/main/resources/config/metrics.yml @@ -1,9 +1,9 @@ metrics: task: - enable: true - intervalSeconds: 600 - nexusDate: "2021-01-01T00:00:00.00Z" - usersLoginClient: ${IDP_APIKEY_CLIENT_ID_UUID:} + enable: false + intervalSeconds: null + nexusDate: null + usersLoginClient: null referenceTypes: funderIds: [] grantIds: []