Commit b5e66b4b authored by mfluharty's avatar mfluharty

Show recent failures count per case

parent ce5c65f8
<script> <script>
import { mapActions } from 'vuex'; import { mapActions } from 'vuex';
import { GlBadge } from '@gitlab/ui';
import { n__ } from '~/locale';
export default { export default {
name: 'TestIssueBody', name: 'TestIssueBody',
components: {
GlBadge,
},
props: { props: {
issue: { issue: {
type: Object, type: Object,
...@@ -21,6 +26,13 @@ export default { ...@@ -21,6 +26,13 @@ export default {
}, },
methods: { methods: {
...mapActions(['openModal']), ...mapActions(['openModal']),
recentFailuresText(count) {
return n__(
'Failed %d time in the last 14 days',
'Failed %d times in the last 14 days',
count,
);
},
}, },
}; };
</script> </script>
...@@ -32,7 +44,10 @@ export default { ...@@ -32,7 +44,10 @@ export default {
class="btn-link btn-blank text-left break-link vulnerability-name-button" class="btn-link btn-blank text-left break-link vulnerability-name-button"
@click="openModal({ issue })" @click="openModal({ issue })"
> >
<div v-if="isNew" class="badge badge-danger gl-mr-2">{{ s__('New') }}</div> <gl-badge v-if="isNew" variant="danger" class="gl-mr-2">{{ s__('New') }}</gl-badge>
<gl-badge v-if="issue.recent_failures" variant="warning" class="gl-mr-2">
{{ recentFailuresText(issue.recent_failures) }}
</gl-badge>
{{ issue.name }} {{ issue.name }}
</button> </button>
</div> </div>
......
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