mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
# Backport This will backport the following commits from `main` to `8.6`: - [[Cases] Update email content and footer (#146036)](https://github.com/elastic/kibana/pull/146036) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Christos Nasikas","email":"christos.nasikas@elastic.co"},"sourceCommit":{"committedDate":"2022-11-23T09:04:26Z","message":"[Cases] Update email content and footer (#146036)\n\n## Summary\r\n\r\nThis PR replace `Kibana` with `Elastic` in the email content and footer.\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"ca2a0cadc3e031ed91a3886e131f796aaa1d11f1","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","Feature:Cases","Feature:Actions/ConnectorTypes","v8.6.0","v8.7.0"],"number":146036,"url":"https://github.com/elastic/kibana/pull/146036","mergeCommit":{"message":"[Cases] Update email content and footer (#146036)\n\n## Summary\r\n\r\nThis PR replace `Kibana` with `Elastic` in the email content and footer.\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"ca2a0cadc3e031ed91a3886e131f796aaa1d11f1"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/146036","number":146036,"mergeCommit":{"message":"[Cases] Update email content and footer (#146036)\n\n## Summary\r\n\r\nThis PR replace `Kibana` with `Elastic` in the email content and footer.\r\n\r\n### Checklist\r\n\r\nDelete any items that are not applicable to this PR.\r\n\r\n- [x] Any text added follows [EUI's writing\r\nguidelines](https://elastic.github.io/eui/#/guidelines/writing), uses\r\nsentence case text and includes [i18n\r\nsupport](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)\r\n- [x] [Unit or functional\r\ntests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)\r\nwere updated or added to match the most common scenarios\r\n\r\n### For maintainers\r\n\r\n- [x] This was checked for breaking API changes and was [labeled\r\nappropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)","sha":"ca2a0cadc3e031ed91a3886e131f796aaa1d11f1"}}]}] BACKPORT--> Co-authored-by: Christos Nasikas <christos.nasikas@elastic.co>
This commit is contained in:
parent
f42a22bdeb
commit
b6907b84b0
6 changed files with 35 additions and 35 deletions
|
@ -51,7 +51,7 @@ describe('EmailNotificationService', () => {
|
|||
],
|
||||
},
|
||||
message:
|
||||
'You are assigned to an Elastic Kibana Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)',
|
||||
'You are assigned to an Elastic Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)',
|
||||
subject: '[Elastic][Cases] Super Bad Security Issue',
|
||||
to: ['damaged_raccoon@elastic.co', 'physical_dinosaur@elastic.co', 'wet_dingo@elastic.co'],
|
||||
});
|
||||
|
@ -74,7 +74,7 @@ describe('EmailNotificationService', () => {
|
|||
],
|
||||
},
|
||||
message:
|
||||
'You are assigned to an Elastic Kibana Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)',
|
||||
'You are assigned to an Elastic Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)',
|
||||
subject: '[Elastic][Cases] Super Bad Security Issue',
|
||||
to: ['damaged_raccoon@elastic.co', 'physical_dinosaur@elastic.co', 'wet_dingo@elastic.co'],
|
||||
});
|
||||
|
@ -102,7 +102,7 @@ describe('EmailNotificationService', () => {
|
|||
],
|
||||
},
|
||||
message:
|
||||
'You are assigned to an Elastic Kibana Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)',
|
||||
'You are assigned to an Elastic Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)',
|
||||
subject: '[Elastic][Cases] Super Bad Security Issue',
|
||||
to: ['physical_dinosaur@elastic.co'],
|
||||
});
|
||||
|
@ -125,7 +125,7 @@ describe('EmailNotificationService', () => {
|
|||
],
|
||||
},
|
||||
message:
|
||||
'You are assigned to an Elastic Kibana Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)',
|
||||
'You are assigned to an Elastic Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)',
|
||||
subject: '[Elastic][Cases] Super Bad Security Issue',
|
||||
to: ['damaged_raccoon@elastic.co', 'physical_dinosaur@elastic.co', 'wet_dingo@elastic.co'],
|
||||
});
|
||||
|
@ -156,7 +156,7 @@ describe('EmailNotificationService', () => {
|
|||
],
|
||||
},
|
||||
message:
|
||||
'You are assigned to an Elastic Kibana Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n\r\n\r\n[View the case details](https://example.com/s/test-space/app/security/cases/mock-id-1)',
|
||||
'You are assigned to an Elastic Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n\r\n\r\n[View the case details](https://example.com/s/test-space/app/security/cases/mock-id-1)',
|
||||
subject: '[Elastic][Cases] Super Bad Security Issue',
|
||||
to: ['damaged_raccoon@elastic.co', 'physical_dinosaur@elastic.co', 'wet_dingo@elastic.co'],
|
||||
});
|
||||
|
@ -186,7 +186,7 @@ describe('EmailNotificationService', () => {
|
|||
],
|
||||
},
|
||||
message:
|
||||
'You are assigned to an Elastic Kibana Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n',
|
||||
'You are assigned to an Elastic Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: defacement\r\n\r\n',
|
||||
subject: '[Elastic][Cases] Super Bad Security Issue',
|
||||
to: ['damaged_raccoon@elastic.co', 'physical_dinosaur@elastic.co', 'wet_dingo@elastic.co'],
|
||||
});
|
||||
|
@ -209,7 +209,7 @@ describe('EmailNotificationService', () => {
|
|||
],
|
||||
},
|
||||
message:
|
||||
'You are assigned to an Elastic Kibana Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: one, two\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)',
|
||||
'You are assigned to an Elastic Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\nTags: one, two\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)',
|
||||
subject: '[Elastic][Cases] Super Bad Security Issue',
|
||||
to: ['damaged_raccoon@elastic.co', 'physical_dinosaur@elastic.co', 'wet_dingo@elastic.co'],
|
||||
});
|
||||
|
@ -232,7 +232,7 @@ describe('EmailNotificationService', () => {
|
|||
],
|
||||
},
|
||||
message:
|
||||
'You are assigned to an Elastic Kibana Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)',
|
||||
'You are assigned to an Elastic Case.\r\n\r\nTitle: Super Bad Security Issue\r\n\r\nStatus: open\r\n\r\nSeverity: low\r\n\r\n\r\n\r\n[View the case details](https://example.com/app/security/cases/mock-id-1)',
|
||||
subject: '[Elastic][Cases] Super Bad Security Issue',
|
||||
to: ['damaged_raccoon@elastic.co', 'physical_dinosaur@elastic.co', 'wet_dingo@elastic.co'],
|
||||
});
|
||||
|
|
|
@ -56,7 +56,7 @@ export class EmailNotificationService implements NotificationService {
|
|||
publicBaseUrl?: IBasePath['publicBaseUrl']
|
||||
) {
|
||||
const lineBreak = '\r\n\r\n';
|
||||
let message = `You are assigned to an Elastic Kibana Case.${lineBreak}`;
|
||||
let message = `You are assigned to an Elastic Case.${lineBreak}`;
|
||||
message = `${message}Title: ${theCase.attributes.title}${lineBreak}`;
|
||||
message = `${message}Status: ${theCase.attributes.status}${lineBreak}`;
|
||||
message = `${message}Severity: ${theCase.attributes.severity}${lineBreak}`;
|
||||
|
|
|
@ -436,7 +436,7 @@ describe('params validation', () => {
|
|||
"cc": Array [],
|
||||
"kibanaFooterLink": Object {
|
||||
"path": "/",
|
||||
"text": "Go to Kibana",
|
||||
"text": "Go to Elastic",
|
||||
},
|
||||
"message": "this is the message",
|
||||
"subject": "this is a test",
|
||||
|
@ -508,7 +508,7 @@ describe('execute()', () => {
|
|||
message: 'a message to you',
|
||||
kibanaFooterLink: {
|
||||
path: '/',
|
||||
text: 'Go to Kibana',
|
||||
text: 'Go to Elastic',
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -542,7 +542,7 @@ describe('execute()', () => {
|
|||
|
||||
--
|
||||
|
||||
This message was sent by Kibana.",
|
||||
This message was sent by Elastic.",
|
||||
"subject": "the subject",
|
||||
},
|
||||
"hasAuth": true,
|
||||
|
@ -593,7 +593,7 @@ describe('execute()', () => {
|
|||
|
||||
--
|
||||
|
||||
This message was sent by Kibana.",
|
||||
This message was sent by Elastic.",
|
||||
"subject": "the subject",
|
||||
},
|
||||
"hasAuth": false,
|
||||
|
@ -644,7 +644,7 @@ describe('execute()', () => {
|
|||
|
||||
--
|
||||
|
||||
This message was sent by Kibana.",
|
||||
This message was sent by Elastic.",
|
||||
"subject": "the subject",
|
||||
},
|
||||
"hasAuth": false,
|
||||
|
@ -707,7 +707,7 @@ describe('execute()', () => {
|
|||
message: '{{rogue}}',
|
||||
kibanaFooterLink: {
|
||||
path: '/',
|
||||
text: 'Go to Kibana',
|
||||
text: 'Go to Elastic',
|
||||
},
|
||||
};
|
||||
const variables = {
|
||||
|
@ -729,7 +729,7 @@ describe('execute()', () => {
|
|||
],
|
||||
"kibanaFooterLink": Object {
|
||||
"path": "/",
|
||||
"text": "Go to Kibana",
|
||||
"text": "Go to Elastic",
|
||||
},
|
||||
"message": "\\\\*bold\\\\*",
|
||||
"subject": "*bold*",
|
||||
|
@ -738,7 +738,7 @@ describe('execute()', () => {
|
|||
`);
|
||||
});
|
||||
|
||||
test('provides a footer link to Kibana when publicBaseUrl is defined', async () => {
|
||||
test('provides a footer link to Elastic when publicBaseUrl is defined', async () => {
|
||||
const connectorTypeWithPublicUrl = getConnectorType({
|
||||
publicBaseUrl: 'https://localhost:1234/foo/bar',
|
||||
});
|
||||
|
@ -752,11 +752,11 @@ describe('execute()', () => {
|
|||
|
||||
--
|
||||
|
||||
This message was sent by Kibana. [Go to Kibana](https://localhost:1234/foo/bar)."
|
||||
This message was sent by Elastic. [Go to Elastic](https://localhost:1234/foo/bar)."
|
||||
`);
|
||||
});
|
||||
|
||||
test('allows to generate a deep link into Kibana when publicBaseUrl is defined', async () => {
|
||||
test('allows to generate a deep link into Elastic when publicBaseUrl is defined', async () => {
|
||||
const connectorTypeWithPublicUrl = getConnectorType({
|
||||
publicBaseUrl: 'https://localhost:1234/foo/bar',
|
||||
});
|
||||
|
@ -767,7 +767,7 @@ describe('execute()', () => {
|
|||
...params,
|
||||
kibanaFooterLink: {
|
||||
path: '/my/app',
|
||||
text: 'View this in Kibana',
|
||||
text: 'View this in Elastic',
|
||||
},
|
||||
},
|
||||
};
|
||||
|
@ -781,7 +781,7 @@ describe('execute()', () => {
|
|||
|
||||
--
|
||||
|
||||
This message was sent by Kibana. [View this in Kibana](https://localhost:1234/foo/bar/my/app)."
|
||||
This message was sent by Elastic. [View this in Elastic](https://localhost:1234/foo/bar/my/app)."
|
||||
`);
|
||||
});
|
||||
|
||||
|
|
|
@ -160,7 +160,7 @@ const ParamsSchemaProps = {
|
|||
path: schema.string({ defaultValue: '/' }),
|
||||
text: schema.string({
|
||||
defaultValue: i18n.translate('xpack.stackConnectors.email.kibanaFooterLinkText', {
|
||||
defaultMessage: 'Go to Kibana',
|
||||
defaultMessage: 'Go to Elastic',
|
||||
}),
|
||||
}),
|
||||
}),
|
||||
|
@ -396,12 +396,12 @@ function getFooterMessage({
|
|||
}) {
|
||||
if (!publicBaseUrl) {
|
||||
return i18n.translate('xpack.stackConnectors.email.sentByKibanaMessage', {
|
||||
defaultMessage: 'This message was sent by Kibana.',
|
||||
defaultMessage: 'This message was sent by Elastic.',
|
||||
});
|
||||
}
|
||||
|
||||
return i18n.translate('xpack.stackConnectors.email.customViewInKibanaMessage', {
|
||||
defaultMessage: 'This message was sent by Kibana. [{kibanaFooterLinkText}]({link}).',
|
||||
defaultMessage: 'This message was sent by Elastic. [{kibanaFooterLinkText}]({link}).',
|
||||
values: {
|
||||
kibanaFooterLinkText: kibanaFooterLink.text,
|
||||
link: `${publicBaseUrl}${kibanaFooterLink.path === '/' ? '' : kibanaFooterLink.path}`,
|
||||
|
|
|
@ -43,8 +43,8 @@ export function initPlugin(router: IRouter, path: string) {
|
|||
cc: null,
|
||||
bcc: null,
|
||||
subject: 'email-subject',
|
||||
html: `<p>email-message</p>\n<p>--</p>\n<p>This message was sent by Kibana. <a href=\"https://localhost:5601\">Go to Kibana</a>.</p>\n`,
|
||||
text: 'email-message\n\n--\n\nThis message was sent by Kibana. [Go to Kibana](https://localhost:5601).',
|
||||
html: `<p>email-message</p>\n<p>--</p>\n<p>This message was sent by Elastic. <a href=\"https://localhost:5601\">Go to Elastic</a>.</p>\n`,
|
||||
text: 'email-message\n\n--\n\nThis message was sent by Elastic. [Go to Elastic](https://localhost:5601).',
|
||||
headers: {},
|
||||
},
|
||||
});
|
||||
|
|
|
@ -124,8 +124,8 @@ export default function emailTest({ getService }: FtrProviderContext) {
|
|||
cc: null,
|
||||
bcc: null,
|
||||
subject: 'email-subject',
|
||||
html: `<p>email-message</p>\n<p>--</p>\n<p>This message was sent by Kibana. <a href=\"https://localhost:5601\">Go to Kibana</a>.</p>\n`,
|
||||
text: 'email-message\n\n--\n\nThis message was sent by Kibana. [Go to Kibana](https://localhost:5601).',
|
||||
html: `<p>email-message</p>\n<p>--</p>\n<p>This message was sent by Elastic. <a href=\"https://localhost:5601\">Go to Elastic</a>.</p>\n`,
|
||||
text: 'email-message\n\n--\n\nThis message was sent by Elastic. [Go to Elastic](https://localhost:5601).',
|
||||
headers: {},
|
||||
},
|
||||
});
|
||||
|
@ -147,10 +147,10 @@ export default function emailTest({ getService }: FtrProviderContext) {
|
|||
.then((resp: any) => {
|
||||
const { text, html } = resp.body.data.message;
|
||||
expect(text).to.eql(
|
||||
'_italic_ **bold** https://elastic.co link\n\n--\n\nThis message was sent by Kibana. [Go to Kibana](https://localhost:5601).'
|
||||
'_italic_ **bold** https://elastic.co link\n\n--\n\nThis message was sent by Elastic. [Go to Elastic](https://localhost:5601).'
|
||||
);
|
||||
expect(html).to.eql(
|
||||
`<p><em>italic</em> <strong>bold</strong> <a href="https://elastic.co">https://elastic.co</a> link</p>\n<p>--</p>\n<p>This message was sent by Kibana. <a href=\"https://localhost:5601\">Go to Kibana</a>.</p>\n`
|
||||
`<p><em>italic</em> <strong>bold</strong> <a href="https://elastic.co">https://elastic.co</a> link</p>\n<p>--</p>\n<p>This message was sent by Elastic. <a href=\"https://localhost:5601\">Go to Elastic</a>.</p>\n`
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@ -166,7 +166,7 @@ export default function emailTest({ getService }: FtrProviderContext) {
|
|||
message: 'message',
|
||||
kibanaFooterLink: {
|
||||
path: '/my/path',
|
||||
text: 'View my path in Kibana',
|
||||
text: 'View my path in Elastic',
|
||||
},
|
||||
},
|
||||
})
|
||||
|
@ -174,10 +174,10 @@ export default function emailTest({ getService }: FtrProviderContext) {
|
|||
.then((resp: any) => {
|
||||
const { text, html } = resp.body.data.message;
|
||||
expect(text).to.eql(
|
||||
'message\n\n--\n\nThis message was sent by Kibana. [View my path in Kibana](https://localhost:5601/my/path).'
|
||||
'message\n\n--\n\nThis message was sent by Elastic. [View my path in Elastic](https://localhost:5601/my/path).'
|
||||
);
|
||||
expect(html).to.eql(
|
||||
`<p>message</p>\n<p>--</p>\n<p>This message was sent by Kibana. <a href=\"https://localhost:5601/my/path\">View my path in Kibana</a>.</p>\n`
|
||||
`<p>message</p>\n<p>--</p>\n<p>This message was sent by Elastic. <a href=\"https://localhost:5601/my/path\">View my path in Elastic</a>.</p>\n`
|
||||
);
|
||||
});
|
||||
});
|
||||
|
@ -325,8 +325,8 @@ export default function emailTest({ getService }: FtrProviderContext) {
|
|||
cc: null,
|
||||
bcc: null,
|
||||
subject: 'email-subject',
|
||||
html: `<p>email-message</p>\n<p>--</p>\n<p>This message was sent by Kibana. <a href=\"https://localhost:5601\">Go to Kibana</a>.</p>\n`,
|
||||
text: 'email-message\n\n--\n\nThis message was sent by Kibana. [Go to Kibana](https://localhost:5601).',
|
||||
html: `<p>email-message</p>\n<p>--</p>\n<p>This message was sent by Elastic. <a href=\"https://localhost:5601\">Go to Elastic</a>.</p>\n`,
|
||||
text: 'email-message\n\n--\n\nThis message was sent by Elastic. [Go to Elastic](https://localhost:5601).',
|
||||
headers: {},
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue