Commit 15997680 authored by lauraMon's avatar lauraMon

Adds status dropdown to list and translations

parent 2b5c2980
<script>
import { GlEmptyState, GlDeprecatedButton, GlLoadingIcon, GlTable, GlAlert } from '@gitlab/ui';
import {
GlEmptyState,
GlDeprecatedButton,
GlLoadingIcon,
GlTable,
GlAlert,
GlNewDropdown,
GlNewDropdownItem,
} from '@gitlab/ui';
import { s__ } from '~/locale';
import TimeAgo from '~/vue_shared/components/time_ago_tooltip.vue';
import getAlerts from '../graphql/queries/getAlerts.query.graphql';
......@@ -42,6 +50,11 @@ export default {
label: s__('AlertManagement|Status'),
},
],
statuses: {
triggered: s__('AlertManagement|Triggered'),
acknowledged: s__('AlertManagement|Acknowledged'),
ignored: s__('AlertManagement|Ignored'),
},
components: {
GlEmptyState,
GlLoadingIcon,
......@@ -49,6 +62,8 @@ export default {
GlAlert,
GlDeprecatedButton,
TimeAgo,
GlNewDropdown,
GlNewDropdownItem,
},
props: {
projectPath: {
......@@ -140,6 +155,13 @@ export default {
<template #cell(title)="{ item }">
<div class="gl-max-w-full text-truncate">{{ item.title }}</div>
</template>
<template #cell(status)>
<gl-new-dropdown class="w-100">
<gl-new-dropdown-item v-for="(label, field) in $options.statuses" :key="field"
>{{ label }}
</gl-new-dropdown-item>
</gl-new-dropdown>
</template>
<template #empty>
{{ s__('AlertManagement|No alerts to display.') }}
......
......@@ -1085,6 +1085,9 @@ msgstr ""
msgid "Account: %{account}"
msgstr ""
msgid "Acknowledged"
msgstr ""
msgid "Action to take when receiving an alert."
msgstr ""
......@@ -22143,6 +22146,9 @@ msgstr ""
msgid "Trigger was successfully updated."
msgstr ""
msgid "Triggered"
msgstr ""
msgid "Triggerer"
msgstr ""
......
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