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
ef77748a
Unverified
Commit
ef77748a
authored
Dec 06, 2018
by
Torkel Ödegaard
Committed by
GitHub
Dec 06, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #14368 from grafana/explore-logs-styling-alt2
Explore logs styling
parents
be2d9edd
e7fe0bd6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
18 deletions
+57
-18
public/app/core/config.ts
+5
-1
public/app/core/logs_model.ts
+2
-2
public/app/core/utils/colors.ts
+5
-0
public/sass/_variables.dark.scss
+3
-0
public/sass/_variables.light.scss
+3
-0
public/sass/components/_panel_logs.scss
+39
-15
No files found.
public/app/core/config.ts
View file @
ef77748a
...
@@ -54,7 +54,11 @@ export class Settings {
...
@@ -54,7 +54,11 @@ export class Settings {
}
}
}
}
const
bootData
=
(
window
as
any
).
grafanaBootData
||
{
settings
:
{}
};
const
bootData
=
(
window
as
any
).
grafanaBootData
||
{
settings
:
{},
user
:
{},
};
const
options
=
bootData
.
settings
;
const
options
=
bootData
.
settings
;
options
.
bootData
=
bootData
;
options
.
bootData
=
bootData
;
...
...
public/app/core/logs_model.ts
View file @
ef77748a
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
{
TimeSeries
}
from
'app/core/core'
;
import
{
TimeSeries
}
from
'app/core/core'
;
import
colors
from
'app/core/utils/colors'
;
import
colors
,
{
getThemeColor
}
from
'app/core/utils/colors'
;
export
enum
LogLevel
{
export
enum
LogLevel
{
crit
=
'critical'
,
crit
=
'critical'
,
...
@@ -22,7 +22,7 @@ export const LogLevelColor = {
...
@@ -22,7 +22,7 @@ export const LogLevelColor = {
[
LogLevel
.
info
]:
colors
[
0
],
[
LogLevel
.
info
]:
colors
[
0
],
[
LogLevel
.
debug
]:
colors
[
5
],
[
LogLevel
.
debug
]:
colors
[
5
],
[
LogLevel
.
trace
]:
colors
[
2
],
[
LogLevel
.
trace
]:
colors
[
2
],
[
LogLevel
.
unkown
]:
'#ddd'
,
[
LogLevel
.
unkown
]:
getThemeColor
(
'#8e8e8e'
,
'#dde4ed'
)
,
};
};
export
interface
LogSearchMatch
{
export
interface
LogSearchMatch
{
...
...
public/app/core/utils/colors.ts
View file @
ef77748a
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
tinycolor
from
'tinycolor2'
;
import
tinycolor
from
'tinycolor2'
;
import
config
from
'app/core/config'
;
export
const
PALETTE_ROWS
=
4
;
export
const
PALETTE_ROWS
=
4
;
export
const
PALETTE_COLUMNS
=
14
;
export
const
PALETTE_COLUMNS
=
14
;
...
@@ -90,5 +91,9 @@ export function hslToHex(color) {
...
@@ -90,5 +91,9 @@ export function hslToHex(color) {
return
tinycolor
(
color
).
toHexString
();
return
tinycolor
(
color
).
toHexString
();
}
}
export
function
getThemeColor
(
dark
:
string
,
light
:
string
):
string
{
return
config
.
bootData
.
user
.
lightTheme
?
light
:
dark
;
}
export
let
sortedColors
=
sortColorsByHue
(
colors
);
export
let
sortedColors
=
sortColorsByHue
(
colors
);
export
default
colors
;
export
default
colors
;
public/sass/_variables.dark.scss
View file @
ef77748a
...
@@ -350,3 +350,6 @@ $diff-json-icon: $gray-7;
...
@@ -350,3 +350,6 @@ $diff-json-icon: $gray-7;
//Submenu
//Submenu
$variable-option-bg
:
$blue-dark
;
$variable-option-bg
:
$blue-dark
;
// logs
$logs-color-unkown
:
$gray-2
;
public/sass/_variables.light.scss
View file @
ef77748a
...
@@ -359,3 +359,6 @@ $diff-json-icon: $gray-4;
...
@@ -359,3 +359,6 @@ $diff-json-icon: $gray-4;
//Submenu
//Submenu
$variable-option-bg
:
$blue-light
;
$variable-option-bg
:
$blue-light
;
// logs
$logs-color-unkown
:
$gray-5
;
public/sass/components/_panel_logs.scss
View file @
ef77748a
$column-horizontal-spacing
:
10px
;
.logs-panel-controls
{
.logs-panel-controls
{
display
:
flex
;
display
:
flex
;
background-color
:
$page-bg
;
background-color
:
$page-bg
;
...
@@ -59,8 +61,14 @@
...
@@ -59,8 +61,14 @@
>
div
{
>
div
{
display
:
table-cell
;
display
:
table-cell
;
padding-left
:
10px
;
padding-right
:
$column-horizontal-spacing
;
border
:
1px
solid
transparent
;
vertical-align
:
middle
;
border-top
:
1px
solid
transparent
;
border-bottom
:
1px
solid
transparent
;
}
&
:hover
{
background
:
$page-bg
;
}
}
}
}
...
@@ -70,6 +78,7 @@
...
@@ -70,6 +78,7 @@
.logs-row__labels
{
.logs-row__labels
{
max-width
:
20%
;
max-width
:
20%
;
line-height
:
1
.2
;
}
}
.logs-row__message
{
.logs-row__message
{
...
@@ -93,36 +102,55 @@
...
@@ -93,36 +102,55 @@
}
}
.logs-row__level
{
.logs-row__level
{
background-color
:
transparent
;
position
:
relative
;
position
:
relative
;
width
:
3px
;
padding
:
0
!
important
;
&
:
:
after
{
content
:
''
;
display
:
block
;
position
:
absolute
;
top
:
1px
;
bottom
:
1px
;
width
:
3px
;
background-color
:
$logs-color-unkown
;
}
&
--critical
,
&
--critical
,
&
--crit
{
&
--crit
{
background-color
:
#705da0
;
&
:
:
after
{
background-color
:
#705da0
;
}
}
}
&
--error
,
&
--error
,
&
--err
{
&
--err
{
background-color
:
#e24d42
;
&
:
:
after
{
background-color
:
#e24d42
;
}
}
}
&
--warning
,
&
--warning
,
&
--warn
{
&
--warn
{
background-color
:
#eab839
;
&
:
:
after
{
background-color
:
$warn
;
}
}
}
&
--info
{
&
--info
{
background-color
:
#7eb26d
;
&
:
:
after
{
background-color
:
#7eb26d
;
}
}
}
&
--debug
{
&
--debug
{
background-color
:
#1f78c1
;
&
:
:
after
{
background-color
:
#1f78c1
;
}
}
}
&
--trace
{
&
--trace
{
background-color
:
#6ed0e0
;
&
:
:
after
{
background-color
:
#6ed0e0
;
}
}
}
}
}
...
@@ -162,10 +190,6 @@
...
@@ -162,10 +190,6 @@
box-shadow
:
$popover-shadow
;
box-shadow
:
$popover-shadow
;
}
}
.logs-row__labels
{
line-height
:
1
.2
;
}
.logs-stats__info
{
.logs-stats__info
{
margin-bottom
:
$spacer
/
2
;
margin-bottom
:
$spacer
/
2
;
}
}
...
...
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