File tree Expand file tree Collapse file tree 1 file changed +2
-8
lines changed
site/src/pages/TemplatePage/TemplateInsightsPage Expand file tree Collapse file tree 1 file changed +2
-8
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,7 @@ const UserLatencyPanel = (props: BoxProps) => {
81
81
queryFn : ( ) =>
82
82
getInsightsUserLatency ( {
83
83
template_ids : template . id ,
84
- start_time : toTimeFilter ( getTimeFor7DaysAgo ( ) ) ,
84
+ start_time : toTimeFilter ( new Date ( template . created_at ) ) ,
85
85
end_time : toTimeFilter ( new Date ( ) ) ,
86
86
} ) ,
87
87
} )
@@ -140,7 +140,7 @@ const TemplateUsagePanel = (props: BoxProps) => {
140
140
queryFn : ( ) =>
141
141
getInsightsTemplate ( {
142
142
template_ids : template . id ,
143
- start_time : toTimeFilter ( getTimeFor7DaysAgo ( ) ) ,
143
+ start_time : toTimeFilter ( new Date ( template . created_at ) ) ,
144
144
end_time : toTimeFilter ( new Date ( ) ) ,
145
145
} ) ,
146
146
} )
@@ -269,12 +269,6 @@ const NoDataAvailable = (props: BoxProps) => {
269
269
)
270
270
}
271
271
272
- function getTimeFor7DaysAgo ( ) : Date {
273
- const sevenDaysAgo = new Date ( )
274
- sevenDaysAgo . setDate ( sevenDaysAgo . getDate ( ) - 7 )
275
- return sevenDaysAgo
276
- }
277
-
278
272
function toTimeFilter ( date : Date ) {
279
273
date . setHours ( 0 , 0 , 0 , 0 )
280
274
const year = date . getUTCFullYear ( )
You can’t perform that action at this time.
0 commit comments