Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
837a6215
Unverified
Commit
837a6215
authored
Dec 09, 2018
by
Torkel Ödegaard
Committed by
GitHub
Dec 09, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14410 from grafana/davkal/explore-logging-dedup-description
Explore: Logging dedup tooltips
parents
c58f818e
487de2b8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
2 deletions
+19
-2
public/app/core/components/ToggleButtonGroup/ToggleButtonGroup.tsx
+10
-2
public/app/core/logs_model.ts
+7
-0
public/app/features/explore/Logs.tsx
+2
-0
No files found.
public/app/core/components/ToggleButtonGroup/ToggleButtonGroup.tsx
View file @
837a6215
...
@@ -49,9 +49,17 @@ interface ToggleButtonProps {
...
@@ -49,9 +49,17 @@ interface ToggleButtonProps {
value
:
any
;
value
:
any
;
className
?:
string
;
className
?:
string
;
children
:
ReactNode
;
children
:
ReactNode
;
title
?:
string
;
}
}
export
const
ToggleButton
:
SFC
<
ToggleButtonProps
>
=
({
children
,
selected
,
className
=
''
,
value
,
onChange
})
=>
{
export
const
ToggleButton
:
SFC
<
ToggleButtonProps
>
=
({
children
,
selected
,
className
=
''
,
title
=
null
,
value
,
onChange
,
})
=>
{
const
handleChange
=
event
=>
{
const
handleChange
=
event
=>
{
event
.
stopPropagation
();
event
.
stopPropagation
();
if
(
onChange
)
{
if
(
onChange
)
{
...
@@ -61,7 +69,7 @@ export const ToggleButton: SFC<ToggleButtonProps> = ({ children, selected, class
...
@@ -61,7 +69,7 @@ export const ToggleButton: SFC<ToggleButtonProps> = ({ children, selected, class
const
btnClassName
=
`btn
${
className
}
${
selected
?
'active'
:
''
}
`
;
const
btnClassName
=
`btn
${
className
}
${
selected
?
'active'
:
''
}
`
;
return
(
return
(
<
button
className=
{
btnClassName
}
onClick=
{
handleChange
}
>
<
button
className=
{
btnClassName
}
onClick=
{
handleChange
}
title=
{
title
}
>
<
span
>
{
children
}
</
span
>
<
span
>
{
children
}
</
span
>
</
button
>
</
button
>
);
);
...
...
public/app/core/logs_model.ts
View file @
837a6215
...
@@ -88,6 +88,13 @@ export interface LogsStreamLabels {
...
@@ -88,6 +88,13 @@ export interface LogsStreamLabels {
[
key
:
string
]:
string
;
[
key
:
string
]:
string
;
}
}
export
enum
LogsDedupDescription
{
none
=
'No de-duplication'
,
exact
=
'De-duplication of successive lines that are identical, ignoring ISO datetimes.'
,
numbers
=
'De-duplication of successive lines that are identical when ignoring numbers, e.g., IP addresses, latencies.'
,
signature
=
'De-duplication of successive lines that have identical punctuation and whitespace.'
,
}
export
enum
LogsDedupStrategy
{
export
enum
LogsDedupStrategy
{
none
=
'none'
,
none
=
'none'
,
exact
=
'exact'
,
exact
=
'exact'
,
...
...
public/app/features/explore/Logs.tsx
View file @
837a6215
...
@@ -6,6 +6,7 @@ import classnames from 'classnames';
...
@@ -6,6 +6,7 @@ import classnames from 'classnames';
import
*
as
rangeUtil
from
'app/core/utils/rangeutil'
;
import
*
as
rangeUtil
from
'app/core/utils/rangeutil'
;
import
{
RawTimeRange
}
from
'app/types/series'
;
import
{
RawTimeRange
}
from
'app/types/series'
;
import
{
import
{
LogsDedupDescription
,
LogsDedupStrategy
,
LogsDedupStrategy
,
LogsModel
,
LogsModel
,
dedupLogRows
,
dedupLogRows
,
...
@@ -449,6 +450,7 @@ export default class Logs extends PureComponent<LogsProps, LogsState> {
...
@@ -449,6 +450,7 @@ export default class Logs extends PureComponent<LogsProps, LogsState> {
key=
{
i
}
key=
{
i
}
value=
{
dedupType
}
value=
{
dedupType
}
onChange=
{
onChange
}
onChange=
{
onChange
}
title=
{
LogsDedupDescription
[
dedupType
]
||
null
}
selected=
{
selectedValue
===
dedupType
}
selected=
{
selectedValue
===
dedupType
}
>
>
{
dedupType
}
{
dedupType
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment