diff options
author | Mike Lewis <mlewis@gitlab.com> | 2019-06-07 20:13:17 +0000 |
---|---|---|
committer | Mike Lewis <mlewis@gitlab.com> | 2019-06-07 20:13:17 +0000 |
commit | 99df0218f82b851b017bd0eea1b8351dc89df6ed (patch) | |
tree | b01f884fbd1418dd5465fc1741f1620061ae8c5c /app/assets/javascripts/monitoring/components/charts/single_stat.vue | |
parent | 3eea6906747d10bea501426febaf15d2c209e06a (diff) | |
parent | e07b2b277f79bc25cdce22ca2defba1ba80791aa (diff) | |
download | gitlab-ce-99df0218f82b851b017bd0eea1b8351dc89df6ed.tar.gz |
Merge branch 'master' into 'docs/fix-example-dot-net'
# Conflicts:
# doc/user/project/clusters/serverless/index.md
Diffstat (limited to 'app/assets/javascripts/monitoring/components/charts/single_stat.vue')
-rw-r--r-- | app/assets/javascripts/monitoring/components/charts/single_stat.vue | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/app/assets/javascripts/monitoring/components/charts/single_stat.vue b/app/assets/javascripts/monitoring/components/charts/single_stat.vue new file mode 100644 index 00000000000..b03a6ca1806 --- /dev/null +++ b/app/assets/javascripts/monitoring/components/charts/single_stat.vue @@ -0,0 +1,37 @@ +<script> +import { GlSingleStat } from '@gitlab/ui/dist/charts'; + +export default { + components: { + GlSingleStat, + }, + inheritAttrs: false, + props: { + title: { + type: String, + required: true, + }, + value: { + type: Number, + required: true, + }, + unit: { + type: String, + required: true, + }, + }, + computed: { + valueWithUnit() { + return `${this.value}${this.unit}`; + }, + }, +}; +</script> +<template> + <div class="prometheus-graph col-12 col-lg-6"> + <div class="prometheus-graph-header"> + <h5 ref="graphTitle" class="prometheus-graph-title">{{ title }}</h5> + </div> + <gl-single-stat :value="valueWithUnit" :title="title" variant="success" /> + </div> +</template> |