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
7cb456ea
Commit
7cb456ea
authored
Dec 07, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Aligned styling of stats popover/box with rest of grafana & minor css refactoring
parent
fb4925a8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
43 additions
and
20 deletions
+43
-20
public/app/features/explore/LogLabels.tsx
+14
-8
public/sass/components/_panel_logs.scss
+29
-12
No files found.
public/app/features/explore/LogLabels.tsx
View file @
7cb456ea
...
...
@@ -48,15 +48,21 @@ export class Stats extends PureComponent<{
const
otherProportion
=
otherCount
/
total
;
return
(
<>
<
div
className=
"logs-stats__info"
>
{
label
}
:
{
total
}
of
{
rowCount
}
rows have that label
<
span
className=
"logs-stats__icon fa fa-window-close"
onClick=
{
onClickClose
}
/>
<
div
className=
"logs-stats"
>
<
div
className=
"logs-stats__header"
>
<
span
className=
"logs-stats__title"
>
{
label
}
:
{
total
}
of
{
rowCount
}
rows have that label
</
span
>
<
span
className=
"logs-stats__close fa fa-remove"
onClick=
{
onClickClose
}
/>
</
div
>
<
div
className=
"logs-stats__body"
>
{
topRows
.
map
(
stat
=>
<
StatsRow
key=
{
stat
.
value
}
{
...
stat
}
active=
{
stat
.
value
===
value
}
/>)
}
{
insertActiveRow
&&
activeRow
&&
<
StatsRow
key=
{
activeRow
.
value
}
{
...
activeRow
}
active
/>
}
{
otherCount
>
0
&&
(
<
StatsRow
key=
"__OTHERS__"
count=
{
otherCount
}
value=
"Other"
proportion=
{
otherProportion
}
/>
)
}
</
div
>
{
topRows
.
map
(
stat
=>
<
StatsRow
key=
{
stat
.
value
}
{
...
stat
}
active=
{
stat
.
value
===
value
}
/>)
}
{
insertActiveRow
&&
activeRow
&&
<
StatsRow
key=
{
activeRow
.
value
}
{
...
activeRow
}
active
/>
}
{
otherCount
>
0
&&
<
StatsRow
key=
"__OTHERS__"
count=
{
otherCount
}
value=
"Other"
proportion=
{
otherProportion
}
/>
}
</>
</
div
>
);
}
}
...
...
public/sass/components/_panel_logs.scss
View file @
7cb456ea
...
...
@@ -173,10 +173,6 @@ $column-horizontal-spacing: 10px;
.logs-row__stats
{
margin
:
5px
0
;
background-color
:
$popover-bg
;
color
:
$popover-color
;
border
:
1px
solid
$popover-border-color
;
padding
:
10px
;
}
.logs-row__field-highlight
:hover
{
...
...
@@ -211,21 +207,42 @@ $column-horizontal-spacing: 10px;
top
:
1
.25em
;
left
:
-10px
;
z-index
:
100
;
justify-content
:
space-between
;
box-shadow
:
$popover-shadow
;
}
/*
* Stats popover & message stats box
*/
.logs-stats
{
background-color
:
$popover-bg
;
color
:
$popover-color
;
border
:
1px
solid
$popover-border-color
;
padding
:
10px
;
border-radius
:
$border-radius
;
justify-content
:
space-between
;
box-shadow
:
$popover-shadow
;
max-width
:
500px
;
}
.logs-stats__header
{
background-color
:
$popover-border-color
;
padding
:
6px
10px
;
display
:
flex
;
}
.logs-stats__title
{
font-weight
:
$font-weight-semi-bold
;
padding-right
:
$spacer
;
overflow
:
hidden
;
display
:
inline-block
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
flex-grow
:
1
;
}
.logs-stats__
info
{
margin-bottom
:
$spacer
/
2
;
.logs-stats__
body
{
padding
:
20px
10px
10px
10px
;
}
.logs-stats__icon
{
margin-left
:
0
.5em
;
.logs-stats__close
{
cursor
:
pointer
;
}
...
...
@@ -272,6 +289,6 @@ $column-horizontal-spacing: 10px;
}
&
__innerbar
{
background
-color
:
$blue
;
background
:
$blue
;
}
}
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