Bonjour, une mise à jour de la forge logicielle est prévue mardi 02 Décembre 2021 de 08h à 9h. Celle-ci entrainera une interruption de service d'environ 1h de 8h à 9h. Cordialement, Maintenance forge logicielle

Commit ad6b227f authored by Dimitri DI GUSTO's avatar Dimitri DI GUSTO
Browse files

Merge branch 'DOS0089064' into 'master'

DOS0089064

See merge request !112
parents c296d483 92cdb9e4
Pipeline #9942 passed with stage
in 10 minutes and 5 seconds
{
"name": "webapp",
"version": "2.6.13",
"version": "2.6.14",
"license": "GNU Affero General Public License v3.0",
"scripts": {
"ng": "ng",
......
......@@ -19,12 +19,12 @@ export class UsageStatisticsService {
// However the months in javascript dates goes from 0 to 11 so when passing start and end dates, we don't need to subsctract a month
// The backend service expect a 2 digits month while javascript date does not give 'O1' but only '1'. This is while we use a small trick
// to make sure there always two digits for the month in the date
const monthListArray = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'];
const today = new Date();
const aMonthAgo = `${today.getFullYear()}-${`0${today.getMonth()}`.slice(-2)}-${today.getDate()}`;
today.setMonth(today.getMonth() - 1);
const aMonthAgo = `${today.getFullYear()}-${monthListArray[today.getMonth()]}-${today.getDate()}`;
today.setFullYear(today.getFullYear() - 1);
const aMonthAndAYearAgo = `${today.getFullYear()}-${`0${today.getMonth()}`.slice(-2)}-${today.getDate()}`;
const aMonthAndAYearAgo = `${today.getFullYear()}-${monthListArray[today.getMonth()]}-${today.getDate()}`;
const url = `${APP_CONFIG.backendUrls.datasetUsageStatistics}?start=${aMonthAndAYearAgo}&uuid=${uuid}&granularity=month&end=${aMonthAgo}`;
return this._httpClient.get(url).pipe(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment