Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
web-et-numerique
web-et-numerique-internet
data.grandlyon.com
web-portal
components
custom-apps
web-app
Commits
ad6b227f
Commit
ad6b227f
authored
Jan 06, 2021
by
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
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
package.json
View file @
ad6b227f
{
"name"
:
"webapp"
,
"version"
:
"2.6.1
3
"
,
"version"
:
"2.6.1
4
"
,
"license"
:
"GNU Affero General Public License v3.0"
,
"scripts"
:
{
"ng"
:
"ng"
,
...
...
src/app/dataset-detail/services/usage-statistics.service.ts
View file @
ad6b227f
...
...
@@ -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
.
g
et
FullYear
()}
-
${
`0
${
today
.
getMonth
()}
`
.
slice
(
-
2
)}
-
${
today
.
getDate
()}
`
;
today
.
s
et
Month
(
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
(
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment