Skip to content

Commit

Permalink
fix: pretty stats table: filters and alerts by grid
Browse files Browse the repository at this point in the history
  • Loading branch information
popstas committed Aug 24, 2020
1 parent e6a7f48 commit d59baf3
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions components/Stats.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<div v-for="subval of fStat.subvalues" :key="subval.value"
:class="{'item-details__subvalue': true, [subval.validateClass]: true}"
>
{{ subval.value }}: {{ subval.count }}
<span class="item-details__subvalue-text">{{ subval.value }}: {{ subval.count }}</span>

<FilterPresetButton class="field-preset" :preset="{ q: fStat.name + '=' + subval.value }" toggle no-count>
<icon name="filter" scale="0.6"></icon>
Expand Down Expand Up @@ -57,6 +57,10 @@
}
.item-details__subvalue {
&:hover {
background: #eee;
}
&.warning {
&::after {
content: "";
Expand All @@ -71,6 +75,11 @@
float: right;
}
}
&-text {
display: inline-block;
min-width: 100px;
}
}
}
</style>
Expand Down Expand Up @@ -205,7 +214,7 @@ export default {
name: field.name,
title: field.comment || field.name,
class: validateClass,
value: valueText || val,
value: '<span class="item-details__subvalue-text">' + (valueText || val) + '</span>',
subvalues: subvalues,
});
}
Expand Down

0 comments on commit d59baf3

Please sign in to comment.