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
c7d701c8
Commit
c7d701c8
authored
Dec 05, 2018
by
Torkel Ödegaard
Committed by
David Kaltschmidt
Dec 06, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explore logs styling poc, WIP
parent
8bac55ca
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
32 deletions
+51
-32
public/app/features/explore/Logs.tsx
+24
-24
public/sass/_grafana.scss
+1
-0
public/sass/components/_logs-rows.scss
+23
-0
public/sass/pages/_explore.scss
+3
-8
No files found.
public/app/features/explore/Logs.tsx
View file @
c7d701c8
...
...
@@ -64,18 +64,18 @@ function Row({
'logs-row-match-highlight--preview'
:
previewHighlights
,
});
return
(
<>
<
div
className=
"logs-row"
>
{
showDuplicates
&&
(
<
div
className=
"logs-row-duplicates"
>
{
row
.
duplicates
>
0
?
`${row.duplicates + 1}x`
:
null
}
</
div
>
)
}
<
div
className=
{
row
.
logLevel
?
`logs-row-level logs-row-level-${row.logLevel}`
:
''
}
/>
{
showUtc
&&
(
<
div
className=
"logs-row
-
time"
title=
{
`Local: ${row.timeLocal} (${row.timeFromNow})`
}
>
<
div
className=
"logs-row
__
time"
title=
{
`Local: ${row.timeLocal} (${row.timeFromNow})`
}
>
{
row
.
timestamp
}
</
div
>
)
}
{
showLocalTime
&&
(
<
div
className=
"logs-row
-
time"
title=
{
`${row.timestamp} (${row.timeFromNow})`
}
>
<
div
className=
"logs-row
__
time"
title=
{
`${row.timestamp} (${row.timeFromNow})`
}
>
{
row
.
timeLocal
}
</
div
>
)
}
...
...
@@ -96,7 +96,7 @@ function Row({
row
.
entry
)
}
</
div
>
</>
</
div
>
);
}
...
...
@@ -263,25 +263,25 @@ export default class Logs extends PureComponent<LogsProps, LogsState> {
}
// Grid options
const
cssColumnSizes
=
[];
if
(
showDuplicates
)
{
cssColumnSizes
.
push
(
'max-content'
);
}
// Log-level indicator line
cssColumnSizes
.
push
(
'3px'
);
if
(
showUtc
)
{
cssColumnSizes
.
push
(
'minmax(10
0px, max-content)'
);
}
if
(
showLocalTime
)
{
cssColumnSizes
.
push
(
'minmax(10
0px, max-content)'
);
}
if
(
showLabels
)
{
cssColumnSizes
.
push
(
'fit-content(20%)'
);
}
cssColumnSizes
.
push
(
'1fr'
);
const
logEntriesStyle
=
{
gridTemplateColumns
:
cssColumnSizes
.
join
(
' '
),
};
//
const cssColumnSizes = [];
//
if (showDuplicates) {
//
cssColumnSizes.push('max-content');
//
}
//
//
Log-level indicator line
//
cssColumnSizes.push('3px');
//
if (showUtc) {
// cssColumnSizes.push('minmax(22
0px, max-content)');
//
}
//
if (showLocalTime) {
// cssColumnSizes.push('minmax(14
0px, max-content)');
//
}
//
if (showLabels) {
//
cssColumnSizes.push('fit-content(20%)');
//
}
//
cssColumnSizes.push('1fr');
//
const logEntriesStyle = {
//
gridTemplateColumns: cssColumnSizes.join(' '),
//
};
const
scanText
=
scanRange
?
`Scanning
${
rangeUtil
.
describeTimeRange
(
scanRange
)}
`
:
'Scanning...'
;
...
...
@@ -342,7 +342,7 @@ export default class Logs extends PureComponent<LogsProps, LogsState> {
</
div
>
</
div
>
<
div
className=
"logs-
entries"
style=
{
logEntriesStyle
}
>
<
div
className=
"logs-
rows"
>
{
hasData
&&
!
deferLogs
&&
// Only inject highlighterExpression in the first set for performance reasons
...
...
public/sass/_grafana.scss
View file @
c7d701c8
...
...
@@ -101,6 +101,7 @@
@import
'components/delete_button'
;
@import
'components/add_data_source.scss'
;
@import
'components/page_loader'
;
@import
'components/logs-rows'
;
// PAGES
@import
'pages/login'
;
...
...
public/sass/components/_logs-rows.scss
0 → 100644
View file @
c7d701c8
.logs-rows
{
// display: grid;
// grid-column-gap: 1rem;
// grid-row-gap: 0.1rem;
// font-family: $font-family-monospace;
// font-size: 12px;
display
:
table
;
}
.logs-row
{
display
:
table-row
;
>
div
{
display
:
table-cell
;
}
}
.logs-row__time
{
white-space
:
nowrap
;
}
.logs-row__message
{
}
public/sass/pages/_explore.scss
View file @
c7d701c8
...
...
@@ -289,14 +289,6 @@
top
:
4px
;
}
.logs-entries
{
display
:
grid
;
grid-column-gap
:
1rem
;
grid-row-gap
:
0
.1rem
;
font-family
:
$font-family-monospace
;
font-size
:
12px
;
}
.logs-row-match-highlight
{
// Undoing mark styling
background
:
inherit
;
...
...
@@ -319,6 +311,9 @@
opacity
:
0
.8
;
}
.logs-row__time
{
}
.logs-row-level-critical
,
.logs-row-level-crit
{
background-color
:
#705da0
;
...
...
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