Closed chuanlin2018 closed 3 years ago
Thank you for the detail suggestions. I just checked in the following changes:
Thanks for the updates. I’m going to test later today (I hope).
It’s not perfect, but it might be good enough. The issue that’s still out there is that we have a flag, dlStatus
, that indicates whether something from the landing page is being downloaded; however, we have N+1 (where N=number of files) ways of flipping that state simultaneously. For example, what if the user initiates a bundle download and then clicks on several direct file download links? If the completion signal flips the dlStatus
before the bundle download completes, then will the metrics not get updated to reflect the bundle download?
Here’s why it might be good enough:
The ideal design would be one in which the LandingPageComponent
receives an event when something has finished downloading. The event identifies what was being downloaded, either a filename or cart identifier, and the component only receives that event for that file or cart only once (per user action). I think for this to happen the DataCartStatus
class, for one, would need to be a little smarter: when the data on disk changes, the DataCartStatus
should detect what data has changed.
I don’t think it’s worth making it perfect right now, but I wanted to get these ideas down in case we need to revisit this. Meanwhile, I’ll finish my testing.
Make perfect sense. Will think about it.
http://mml.nist.gov:8080/browse/ODD-978
When user do a bundle download or direct download, the metrics data will be updated in certain period of time. The default time is 5 minutes. User can change it by alter the value of delayTimeForMetricsRefresh in environment.ts.
Two events trigger the getMetrics() function in LP: bundle download complete event and direct download click event.