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 5cdf8f0..17d97cf 100644 --- a/template/template.go +++ b/template/template.go @@ -10,541 +10,284 @@ func GetHtml() string { four-key Metrics - - - + - - -
-

four-key Metrics

-
{repositoryName} | {teamName} | {startDate} - {endDate}
-
Deployment Frequencies
-
+ canvas { + margin: 50px 0; + } + + .button-wrapper { + margin: auto; + width: max-content; + } -
Lead Times
-
+ .btn-chart { + -moz-appearance: none; + -webkit-appearance: none; + -ms-progress-appearance: unset; + border: 1px solid #767676; + background-color: transparent; + color: #767676; + font-size: 12px; + padding: 7px 14px; + margin: 0 5px; + outline: none; + cursor: pointer; + user-select: none; + } -
Mean Times
-
+ .btn-chart:hover, + .btn-chart.active { + border: 1px solid #2185d0; + color: #2185d0; + } -
Fail Percentages
-
-
- - + .btn-chart:disabled, + .btn-chart:disabled:hover { + border: none; + background-color: #767676; + color: #cdcdcd; + cursor: not-allowed; + } + @media (max-width: 1080px) { + .container { + width: 100%; + max-width: calc(100% - 40px); + padding: 50px 20px; + } + } + + + +
+

four-key Metrics

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