Commit ec9b3164 authored by gj4210's avatar gj4210 👽
Browse files

FIX: Progressbar labels now centered & black (closes #165)

parent 2c86e70e
Pipeline #131968 passed with stages
in 4 minutes and 30 seconds
...@@ -21,13 +21,13 @@ ...@@ -21,13 +21,13 @@
<template v-slot:cell(usage)="data"> <template v-slot:cell(usage)="data">
<div v-for="subnet in bcd2subnets[data.item.name]" <div v-for="subnet in bcd2subnets[data.item.name]"
:key="subnet.cidr" class="same-height"> :key="subnet.cidr" class="same-height">
<b-progress style="height: 1.5rem; margin-bottom: 1rem;" <b-progress style="height: 1.5rem; margin-bottom: 1rem; position: relative"
v-if="isIPv4(subnet.cidr)" v-if="isIPv4(subnet.cidr)"
show-progress :max="IPAddressCount(subnet.cidr)"> :max="IPAddressCount(subnet.cidr)">
<b-progress-bar <b-progress-bar
:label="usagePercentage(subnet) +'%'"
:variant="progressVariant(usagePercentage(subnet))" :variant="progressVariant(usagePercentage(subnet))"
:value="subnet.dns_addr_rr_count"></b-progress-bar> :value="subnet.dns_addr_rr_count"/>
<div class="better-progress-label">{{ usagePercentage(subnet) +'%' }}</div>
</b-progress> </b-progress>
<p v-else class="text-center"><i>N/A</i></p> <p v-else class="text-center"><i>N/A</i></p>
</div> </div>
...@@ -227,4 +227,13 @@ export default { ...@@ -227,4 +227,13 @@ export default {
</script> </script>
<style scoped> <style scoped>
.better-progress-label {
position: absolute;
top:0;
left:0;
width: 100%;
height: 100%;
text-align: center;
line-height: 1.5rem;
}
</style> </style>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment