ITOTEAM-530 Inform the user how many days are left until the end of the wind for each selected day

This commit is contained in:
Peter Maquiran
2024-06-26 10:11:02 +01:00
parent fbaf0afcf1
commit 02891dbb9a
18 changed files with 246 additions and 118 deletions
@@ -7,7 +7,7 @@ import { environment } from 'src/environments/environment';
const meterProvider = new MeterProvider();
metrics.setGlobalMeterProvider(meterProvider);
if (window.location.protocol !== 'https:' && environment.presidential == false) {
if (window.location.protocol !== 'https:' && environment.apiURL != 'https://gdqas-api.oapr.gov.ao/api/') {
const metricReader = new PeriodicExportingMetricReader({
exporter: new OTLPMetricExporter({
url: 'http://5-180-182-151.cloud-xip.com:4318/v1/metrics',
@@ -20,7 +20,6 @@ if (window.location.protocol !== 'https:' && environment.presidential == false)
meterProvider.addMetricReader(metricReader);
}
export const meter = meterProvider.getMeter('example-exporter-collector');
export const RequestCounter = meter.createCounter('post_requests', {
description: 'Example of a Counter',
@@ -64,7 +64,7 @@ const createTracingInstance = ({bugPrint, name, module, autoFinish}): TracingTyp
return data.tags[key]
},
finish: () => {
if(environment.presidential == false) {
if(environment.apiURL != 'https://gdqas-api.oapr.gov.ao/api/') {
span.end();
UseCaseCounter.add(1, {user: SessionStore?.user?.FullName, outcome:data.tags['outcome'], usecase: name})
}