From 7faa1682b14b5dc27a2d2501f064e6749de78137 Mon Sep 17 00:00:00 2001 From: Aslihan Date: Sat, 8 Aug 2020 21:49:16 +0300 Subject: [PATCH] Refactor chart --- helpers/repository_metric_helper.go | 4 +- template/template.go | 360 ++++++++++++++++++---------- 2 files changed, 241 insertions(+), 123 deletions(-) diff --git a/helpers/repository_metric_helper.go b/helpers/repository_metric_helper.go index e8f1942..7ecc7f2 100644 --- a/helpers/repository_metric_helper.go +++ b/helpers/repository_metric_helper.go @@ -85,8 +85,8 @@ func CalculateMetrics(repo *git.Repository, request MetricsRequest) (FourKeyMetr tagMetricDto := TagMetricDto{ TagName: tagNameParse[len(tagNameParse)-1], TagDate: tagMetricDateRange.tagDate, - MeanTimeRestoreAverage: GetSecondsToHour(tagMetricDateRange.tagMeanTimeRestoreAverageSeconds), - LeadTime: GetSecondsToHour(tagMetricDateRange.tagLeadTimeSeconds), + MeanTimeRestoreAverage: tagMetricDateRange.tagMeanTimeRestoreAverageSeconds, + LeadTime: tagMetricDateRange.tagLeadTimeSeconds, ChangeFailPercentage: tagMetricDateRange.tagChangeFailPercentage, } tagMetricDtoList = append(tagMetricDtoList, tagMetricDto) diff --git a/template/template.go b/template/template.go index 7daaace..17d97cf 100644 --- a/template/template.go +++ b/template/template.go @@ -14,90 +14,97 @@ func GetHtml() string { + - - - -
-

four-key Metrics

-
allTeams | allTeams | 2019-01-01 - 2021-01-01
- -
-
Deployment Frequencies
- -
- - - -
-
- -
Lead Times
- - -
Mean Times
- - - -
Fail Percentages
- -
+ + + +
+

four-key Metrics

+
allTeams | allTeams | 2019-01-01 - 2021-01-01
+ +
+
Deployment Frequencies
+ +
+ + + +
+
+ +
+
Lead Times
+ +
+ + + +
+
+ +
+
Mean Times
+ +
+ + + +
+
+ +
+
Fail Percentages
+ +
+ + + +
+
+