Commit 3528558b authored by David O'Regan's avatar David O'Regan Committed by Natalia Tepluhina

Alert opsgenie integration select

parent a6cc5485
...@@ -203,8 +203,7 @@ export default { ...@@ -203,8 +203,7 @@ export default {
} }
return { ...el, disabled: false }; return { ...el, disabled: false };
}); });
const [selected] = this.options; this.selectedEndpoint = this.options.find(({ value }) => value === 'opsgenie').value;
this.selectedEndpoint = selected.value;
if (this.targetUrl === null) { if (this.targetUrl === null) {
this.targetUrl = this.selectedService.targetUrl; this.targetUrl = this.selectedService.targetUrl;
} }
...@@ -497,7 +496,7 @@ export default { ...@@ -497,7 +496,7 @@ export default {
> >
<template #append> <template #append>
<clipboard-button <clipboard-button
:text="selectedService.authKey" :text="selectedService.authKey || ''"
:title="$options.i18n.copyToClipboard" :title="$options.i18n.copyToClipboard"
class="gl-m-0!" class="gl-m-0!"
/> />
......
...@@ -177,6 +177,7 @@ describe('AlertsSettingsForm', () => { ...@@ -177,6 +177,7 @@ describe('AlertsSettingsForm', () => {
it('shows a input for the opsgenie target URL', () => { it('shows a input for the opsgenie target URL', () => {
expect(findApiUrl().exists()).toBe(true); expect(findApiUrl().exists()).toBe(true);
expect(findSelect().attributes('value')).toBe('opsgenie');
}); });
}); });
......
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