Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJose Vargas <jvargas@gitlab.com>2019-04-04 01:10:39 +0300
committerJose Vargas <jvargas@gitlab.com>2019-04-04 23:53:03 +0300
commit976f1feb28265bfc427a00e7031275f49aa7f877 (patch)
treec19195eea183089a6e2ce2ebb36c695094726794 /app/assets/javascripts/monitoring/utils.js
parenta6f9f79b73ec1893e00a41ae20c3e17bd33cccb4 (diff)
Document getTimeDifferenceMinutes usage
Also added a finally clause to the getGraphsDataWithTime promise
Diffstat (limited to 'app/assets/javascripts/monitoring/utils.js')
-rw-r--r--app/assets/javascripts/monitoring/utils.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/assets/javascripts/monitoring/utils.js b/app/assets/javascripts/monitoring/utils.js
index b01bee66d9e..e379827b769 100644
--- a/app/assets/javascripts/monitoring/utils.js
+++ b/app/assets/javascripts/monitoring/utils.js
@@ -1,5 +1,11 @@
import { timeWindows, msPerMinute } from './constants';
+/**
+ * method that converts a predetermined time window to minutes
+ * defaults to 8 hours as the default option
+ * @param {String} timeWindow - The time window to convert to minutes
+ * @returns {number} The time window in minutes
+ */
const getTimeDifferenceMinutes = timeWindow => {
switch (timeWindow) {
case timeWindows.thirtyMinutes: