-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: added copying from all fields in modal feat: added copying from all fields in modal * feat: Filter / Export visibility improvements * feat: added disabling/enabling whole category of filters * feat: fixed Simple mode feat: fixed Simple mode * feat: improved naming scheme and descriptions for settings * chore: new version * fix: conditions for export button * feat: added filter tooltips, callid filtering and checking if any filters exist before showing menu * feat: added tooltip to "simple mode" switch * fix: added missing line * fix: removed part of tooltip that got added by mistake * fix: updated tooltip to be consistent with other ones * feat: redo eth/ip/tcp/udp packet encoders in .ts * fix: checkbox styling in filter * fix: aligned checkboxes inside "collapse" with checkbox in "collapse" title * feat: extraction of exporter functions from SimplePanel.tsx to separate files and proper typing for them * feat: extraction of formatting, sorting and filtering functions from simple to separate files with proper types * feat: revised filter tooltip visuals * fix: ipv6 with middle segments missing * fix: incorrect payload length + removal of accidentally setting flow label * chore: cleanup
- Loading branch information
1 parent
ad103f9
commit 678a14e
Showing
21 changed files
with
717 additions
and
2,638 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React, { FC, useRef, useState } from 'react'; | ||
import { IconButton } from '@grafana/ui'; | ||
|
||
|
||
export const CopyText: FC<{ text: string }> = ({ text }) => { | ||
const [copied, setCopied] = useState(false); | ||
const textAreaRef: any = useRef(null); | ||
const copy = () => { | ||
if (navigator && navigator.clipboard) { | ||
navigator.clipboard.writeText(text); | ||
setCopied(true); | ||
} else { | ||
if (textAreaRef && textAreaRef.current) { | ||
textAreaRef.current.focus(); | ||
textAreaRef.current.select(); | ||
document.execCommand('copy'); | ||
} | ||
setCopied(false); | ||
} | ||
}; | ||
return ( | ||
<> | ||
<textarea | ||
ref={textAreaRef} value={text} style={{ pointerEvents: 'none', opacity: 0, position: 'fixed', left: 0, top: 0, border: 0, padding: 0 }} /> | ||
|
||
<IconButton | ||
name="copy" | ||
tooltip={copied ? 'Copied!' : 'Copy'} | ||
onClick={copy} | ||
/> | ||
</> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.