Skip to content

Commit

Permalink
[8.8] [Cases] Edit labels for file attachments (#156026) (#156405)
Browse files Browse the repository at this point in the history
# Backport

This will backport the following commits from `main` to `8.8`:
- [[Cases] Edit labels for file attachments
(#156026)](#156026)

<!--- Backport version: 8.9.7 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sqren/backport)

<!--BACKPORT [{"author":{"name":"Lisa
Cawley","email":"lcawley@elastic.co"},"sourceCommit":{"committedDate":"2023-05-02T14:49:53Z","message":"[Cases]
Edit labels for file attachments
(#156026)","sha":"30eb413215cf87f96ba5f58e562a7f9b2fbf7241","branchLabelMapping":{"^v8.9.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Team:ResponseOps","Feature:Cases","ui-copy","v8.8.0","v8.9.0"],"number":156026,"url":"https://github.com/elastic/kibana/pull/156026","mergeCommit":{"message":"[Cases]
Edit labels for file attachments
(#156026)","sha":"30eb413215cf87f96ba5f58e562a7f9b2fbf7241"}},"sourceBranch":"main","suggestedTargetBranches":["8.8"],"targetPullRequestStates":[{"branch":"8.8","label":"v8.8.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.9.0","labelRegex":"^v8.9.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/156026","number":156026,"mergeCommit":{"message":"[Cases]
Edit labels for file attachments
(#156026)","sha":"30eb413215cf87f96ba5f58e562a7f9b2fbf7241"}}]}]
BACKPORT-->
  • Loading branch information
lcawl authored May 2, 2023
1 parent c7be057 commit ab23724
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ export const BULK_ACTIONS = i18n.translate('xpack.cases.caseTable.bulkActions',
});

export const EXTERNAL_INCIDENT = i18n.translate('xpack.cases.caseTable.snIncident', {
defaultMessage: 'External Incident',
defaultMessage: 'External incident',
});

export const SEVERITY = i18n.translate('xpack.cases.caseTable.severity', {
defaultMessage: 'Severity',
});

export const INCIDENT_MANAGEMENT_SYSTEM = i18n.translate('xpack.cases.caseTable.incidentSystem', {
defaultMessage: 'Incident Management System',
defaultMessage: 'Incident management system',
});

export const SEARCH_PLACEHOLDER = i18n.translate('xpack.cases.caseTable.searchPlaceholder', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe('useCasesColumns ', () => {
"sortable": true,
},
Object {
"name": "External Incident",
"name": "External incident",
"render": [Function],
"width": undefined,
},
Expand Down Expand Up @@ -232,7 +232,7 @@ describe('useCasesColumns ', () => {
"sortable": true,
},
Object {
"name": "External Incident",
"name": "External incident",
"render": [Function],
"width": undefined,
},
Expand Down Expand Up @@ -316,7 +316,7 @@ describe('useCasesColumns ', () => {
"sortable": true,
},
Object {
"name": "External Incident",
"name": "External incident",
"render": [Function],
"width": undefined,
},
Expand Down Expand Up @@ -395,7 +395,7 @@ describe('useCasesColumns ', () => {
"sortable": true,
},
Object {
"name": "External Incident",
"name": "External incident",
"render": [Function],
"width": undefined,
},
Expand Down Expand Up @@ -479,7 +479,7 @@ describe('useCasesColumns ', () => {
"sortable": true,
},
Object {
"name": "External Incident",
"name": "External incident",
"render": [Function],
"width": undefined,
},
Expand Down Expand Up @@ -638,7 +638,7 @@ describe('useCasesColumns ', () => {
"sortable": true,
},
Object {
"name": "External Incident",
"name": "External incident",
"render": [Function],
"width": undefined,
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ describe('getFileType', () => {
expect(actions[0]).toStrictEqual({
type: AttachmentActionType.CUSTOM,
isPrimary: false,
label: 'Download File',
label: 'Download file',
render: expect.any(Function),
});

Expand All @@ -102,7 +102,7 @@ describe('getFileType', () => {
expect(actions[1]).toStrictEqual({
type: AttachmentActionType.CUSTOM,
isPrimary: false,
label: 'Delete File',
label: 'Delete file',
render: expect.any(Function),
});

Expand All @@ -126,7 +126,7 @@ describe('getFileType', () => {
expect(actions[1]).toStrictEqual({
type: AttachmentActionType.CUSTOM,
isPrimary: false,
label: 'Delete File',
label: 'Delete file',
render: expect.any(Function),
});

Expand Down
8 changes: 4 additions & 4 deletions x-pack/plugins/cases/public/components/files/translations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ export const ACTIONS = i18n.translate('xpack.cases.caseView.files.actions', {
});

export const ADD_FILE = i18n.translate('xpack.cases.caseView.files.addFile', {
defaultMessage: 'Add File',
defaultMessage: 'Add file',
});

export const CLOSE_MODAL = i18n.translate('xpack.cases.caseView.files.closeModal', {
defaultMessage: 'Close',
});

export const DATE_ADDED = i18n.translate('xpack.cases.caseView.files.dateAdded', {
defaultMessage: 'Date Added',
defaultMessage: 'Date added',
});

export const DELETE_FILE = i18n.translate('xpack.cases.caseView.files.deleteFile', {
defaultMessage: 'Delete File',
defaultMessage: 'Delete file',
});

export const DOWNLOAD_FILE = i18n.translate('xpack.cases.caseView.files.downloadFile', {
defaultMessage: 'Download File',
defaultMessage: 'Download file',
});

export const FILES_TABLE = i18n.translate('xpack.cases.caseView.files.filesTable', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,18 @@ describe('useFilesTableColumns', () => {
"data-test-subj": "cases-files-table-date-added",
"dataType": "date",
"field": "created",
"name": "Date Added",
"name": "Date added",
},
Object {
"actions": Array [
Object {
"description": "Download File",
"description": "Download file",
"isPrimary": true,
"name": "Download",
"render": [Function],
},
Object {
"description": "Delete File",
"description": "Delete file",
"isPrimary": true,
"name": "Delete",
"render": [Function],
Expand Down

0 comments on commit ab23724

Please sign in to comment.