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
9ac38214
Commit
9ac38214
authored
Dec 06, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
made unknown color theme aware and sync with graph color, some minor cleanup
parent
9c9d6c15
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
13 deletions
+14
-13
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
+1
-11
No files found.
public/app/core/logs_model.ts
View file @
9ac38214
import
_
from
'lodash'
;
import
{
TimeSeries
}
from
'app/core/core'
;
import
colors
from
'app/core/utils/colors'
;
import
colors
,
{
getThemeColor
}
from
'app/core/utils/colors'
;
export
enum
LogLevel
{
crit
=
'critical'
,
...
...
@@ -22,7 +22,7 @@ export const LogLevelColor = {
[
LogLevel
.
info
]:
colors
[
0
],
[
LogLevel
.
debug
]:
colors
[
5
],
[
LogLevel
.
trace
]:
colors
[
2
],
[
LogLevel
.
unkown
]:
'#ddd'
,
[
LogLevel
.
unkown
]:
getThemeColor
(
'#8e8e8e'
,
'#dde4ed'
)
,
};
export
interface
LogSearchMatch
{
...
...
public/app/core/utils/colors.ts
View file @
9ac38214
import
_
from
'lodash'
;
import
tinycolor
from
'tinycolor2'
;
import
config
from
'app/core/config'
;
export
const
PALETTE_ROWS
=
4
;
export
const
PALETTE_COLUMNS
=
14
;
...
...
@@ -90,5 +91,9 @@ export function hslToHex(color) {
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
default
colors
;
public/sass/_variables.dark.scss
View file @
9ac38214
...
...
@@ -350,3 +350,6 @@ $diff-json-icon: $gray-7;
//Submenu
$variable-option-bg
:
$blue-dark
;
// logs
$logs-color-unkown
:
$gray-2
;
public/sass/_variables.light.scss
View file @
9ac38214
...
...
@@ -359,3 +359,6 @@ $diff-json-icon: $gray-4;
//Submenu
$variable-option-bg
:
$blue-light
;
// logs
$logs-color-unkown
:
$gray-5
;
public/sass/components/_panel_logs.scss
View file @
9ac38214
...
...
@@ -54,7 +54,6 @@ $column-horizontal-spacing: 10px;
font-size
:
12px
;
display
:
table
;
table-layout
:
fixed
;
margin
:
0
-
(
nth
(
$panel-padding
,
2
));
}
.logs-row
{
...
...
@@ -66,14 +65,6 @@ $column-horizontal-spacing: 10px;
vertical-align
:
middle
;
border-top
:
1px
solid
transparent
;
border-bottom
:
1px
solid
transparent
;
&
:first-child
{
padding-left
:
$column-horizontal-spacing
-
2px
;
}
&
:last-child
{
padding-left
:
$column-horizontal-spacing
;
}
}
&
:hover
{
...
...
@@ -111,7 +102,6 @@ $column-horizontal-spacing: 10px;
.logs-row__level
{
position
:
relative
;
// width: 12px;
&
:
:
after
{
content
:
''
;
...
...
@@ -120,7 +110,7 @@ $column-horizontal-spacing: 10px;
top
:
1px
;
bottom
:
1px
;
width
:
3px
;
background-color
:
$
gray-2
;
background-color
:
$
logs-color-unkown
;
}
&
--critical
,
...
...
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