Skip to content

Commit

Permalink
[Discover] Rearrange removals
Browse files Browse the repository at this point in the history
  • Loading branch information
jughosta committed Sep 12, 2024
1 parent 2c424a9 commit 036b749
Showing 1 changed file with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,16 @@ export function overrideGridCopyEvent({ event, dataGridWrapper }: OverrideGridCo
function getCellTextContent(cell: Element) {
const cellCloned = cell.cloneNode(true) as HTMLElement;

// Logs Explorer
dropBySelector(cellCloned, 'svg');
// remove from the grid
dropBySelector(cellCloned, '.euiIcon');
dropBySelector(cellCloned, '.euiToken');
dropBySelector(cellCloned, '.euiToolTipAnchor');
dropBySelector(cellCloned, 'svg');

// Logs Explorer
appendTextToSelector(cellCloned, '[data-test-subj*="dataTablePopoverChip_"]', ', ', true);
appendTextToSelector(cellCloned, '[data-test-subj*="logLevelBadge-"]', ': ');

// remove field tokens so field types don't get copied
dropBySelector(cellCloned, '.kbnFieldIcon');

// for Document column
appendTextToSelector(cellCloned, '.unifiedDataTable__descriptionListTitle', ': ');
appendTextToSelector(cellCloned, '.unifiedDataTable__descriptionListDescription', ', ', true);
Expand All @@ -110,9 +111,6 @@ function getCellTextContent(cell: Element) {
replaceWithSrcTextNode(cellCloned, 'img');
replaceWithSrcTextNode(cellCloned, 'audio');

// remove from the grid
dropBySelector(cellCloned, '.euiToolTipAnchor');

return (cellCloned.textContent || '').trim();
}

Expand Down

0 comments on commit 036b749

Please sign in to comment.