Commit 15997680 authored by lauraMon's avatar lauraMon

Adds status dropdown to list and translations

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