summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorKushal Pandya <kushal@gitlab.com>2018-07-23 15:10:47 +0530
committerKushal Pandya <kushal@gitlab.com>2018-07-24 12:58:10 +0530
commitd6ec3ac6ba7089b5e9ebdf1d89fe121287c7b9c0 (patch)
treec9e27a26bef5c99c57a70927f6b2dd8bfa9d6a18 /app
parentb48788149485d376776c6ad7c92ef2e4f2e49930 (diff)
downloadgitlab-ce-d6ec3ac6ba7089b5e9ebdf1d89fe121287c7b9c0.tar.gz
Use `roundOffFloat` method to show decimal places in progressbar
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue3
-rw-r--r--app/assets/stylesheets/framework/stacked_progress_bar.scss2
2 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue b/app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue
index b1c2df54ef6..f44d361c47e 100644
--- a/app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue
+++ b/app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue
@@ -1,4 +1,5 @@
<script>
+import { roundOffFloat } from '~/lib/utils/common_utils';
import tooltip from '~/vue_shared/directives/tooltip';
export default {
@@ -70,7 +71,7 @@ export default {
},
methods: {
getPercent(count) {
- return Math.ceil((count / this.totalCount) * 100);
+ return roundOffFloat((count / this.totalCount) * 100, 1);
},
barStyle(percent) {
return `width: ${percent}%;`;
diff --git a/app/assets/stylesheets/framework/stacked_progress_bar.scss b/app/assets/stylesheets/framework/stacked_progress_bar.scss
index 528ba53a48b..29a2d5881f7 100644
--- a/app/assets/stylesheets/framework/stacked_progress_bar.scss
+++ b/app/assets/stylesheets/framework/stacked_progress_bar.scss
@@ -10,7 +10,7 @@
.status-neutral,
.status-red, {
height: 100%;
- min-width: 30px;
+ min-width: 40px;
padding: 0 5px;
font-size: $tooltip-font-size;
font-weight: normal;