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
c38000d4
Commit
c38000d4
authored
Mar 13, 2019
by
ryan
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
1bc8e7a8
9c4abc9d
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
27 deletions
+8
-27
packages/grafana-ui/src/components/Gauge/Gauge.tsx
+1
-1
public/app/features/explore/Logs.tsx
+4
-15
public/app/features/templating/custom_variable.ts
+1
-1
public/app/plugins/panel/gauge/GaugePanel.tsx
+0
-9
public/sass/components/_panel_logs.scss
+1
-1
public/sass/components/_switch.scss
+1
-0
No files found.
packages/grafana-ui/src/components/Gauge/Gauge.tsx
View file @
c38000d4
...
@@ -112,7 +112,7 @@ export class Gauge extends PureComponent<Props> {
...
@@ -112,7 +112,7 @@ export class Gauge extends PureComponent<Props> {
},
},
};
};
const
plotSeries
=
{
data
:
[[
0
,
value
]]
};
const
plotSeries
=
{
data
:
[[
0
,
value
.
numeric
]]
};
try
{
try
{
$
.
plot
(
this
.
canvasElement
,
[
plotSeries
],
options
);
$
.
plot
(
this
.
canvasElement
,
[
plotSeries
],
options
);
...
...
public/app/features/explore/Logs.tsx
View file @
c38000d4
...
@@ -64,7 +64,7 @@ interface Props {
...
@@ -64,7 +64,7 @@ interface Props {
interface
State
{
interface
State
{
deferLogs
:
boolean
;
deferLogs
:
boolean
;
renderAll
:
boolean
;
renderAll
:
boolean
;
showLabels
:
boolean
|
null
;
// Tristate: null means auto
showLabels
:
boolean
;
showLocalTime
:
boolean
;
showLocalTime
:
boolean
;
showUtc
:
boolean
;
showUtc
:
boolean
;
}
}
...
@@ -76,7 +76,7 @@ export default class Logs extends PureComponent<Props, State> {
...
@@ -76,7 +76,7 @@ export default class Logs extends PureComponent<Props, State> {
state
=
{
state
=
{
deferLogs
:
true
,
deferLogs
:
true
,
renderAll
:
false
,
renderAll
:
false
,
showLabels
:
null
,
showLabels
:
false
,
showLocalTime
:
true
,
showLocalTime
:
true
,
showUtc
:
false
,
showUtc
:
false
,
};
};
...
@@ -166,12 +166,11 @@ export default class Logs extends PureComponent<Props, State> {
...
@@ -166,12 +166,11 @@ export default class Logs extends PureComponent<Props, State> {
return
null
;
return
null
;
}
}
const
{
deferLogs
,
renderAll
,
showLocalTime
,
showUtc
}
=
this
.
state
;
const
{
deferLogs
,
renderAll
,
showLabels
,
showLocalTime
,
showUtc
}
=
this
.
state
;
let
{
showLabels
}
=
this
.
state
;
const
{
dedupStrategy
}
=
this
.
props
;
const
{
dedupStrategy
}
=
this
.
props
;
const
hasData
=
data
&&
data
.
rows
&&
data
.
rows
.
length
>
0
;
const
hasData
=
data
&&
data
.
rows
&&
data
.
rows
.
length
>
0
;
const
showDuplicates
=
dedupStrategy
!==
LogsDedupStrategy
.
none
;
const
dedupCount
=
dedupedData
.
rows
.
reduce
((
sum
,
row
)
=>
sum
+
row
.
duplicates
,
0
);
const
dedupCount
=
dedupedData
.
rows
.
reduce
((
sum
,
row
)
=>
sum
+
row
.
duplicates
,
0
);
const
showDuplicates
=
dedupStrategy
!==
LogsDedupStrategy
.
none
&&
dedupCount
>
0
;
const
meta
=
[...
data
.
meta
];
const
meta
=
[...
data
.
meta
];
if
(
dedupStrategy
!==
LogsDedupStrategy
.
none
)
{
if
(
dedupStrategy
!==
LogsDedupStrategy
.
none
)
{
...
@@ -186,16 +185,6 @@ export default class Logs extends PureComponent<Props, State> {
...
@@ -186,16 +185,6 @@ export default class Logs extends PureComponent<Props, State> {
const
processedRows
=
dedupedData
.
rows
;
const
processedRows
=
dedupedData
.
rows
;
const
firstRows
=
processedRows
.
slice
(
0
,
PREVIEW_LIMIT
);
const
firstRows
=
processedRows
.
slice
(
0
,
PREVIEW_LIMIT
);
const
lastRows
=
processedRows
.
slice
(
PREVIEW_LIMIT
);
const
lastRows
=
processedRows
.
slice
(
PREVIEW_LIMIT
);
// Check for labels
if
(
showLabels
===
null
)
{
if
(
hasData
)
{
showLabels
=
data
.
rows
.
some
(
row
=>
_
.
size
(
row
.
uniqueLabels
)
>
0
);
}
else
{
showLabels
=
true
;
}
}
const
scanText
=
scanRange
?
`Scanning
${
rangeUtil
.
describeTimeRange
(
scanRange
)}
`
:
'Scanning...'
;
const
scanText
=
scanRange
?
`Scanning
${
rangeUtil
.
describeTimeRange
(
scanRange
)}
`
:
'Scanning...'
;
// React profiler becomes unusable if we pass all rows to all rows and their labels, using getter instead
// React profiler becomes unusable if we pass all rows to all rows and their labels, using getter instead
...
...
public/app/features/templating/custom_variable.ts
View file @
c38000d4
...
@@ -40,7 +40,7 @@ export class CustomVariable implements Variable {
...
@@ -40,7 +40,7 @@ export class CustomVariable implements Variable {
updateOptions
()
{
updateOptions
()
{
// extract options in comma separated string (use backslash to escape wanted commas)
// extract options in comma separated string (use backslash to escape wanted commas)
this
.
options
=
_
.
map
(
this
.
query
.
match
(
/
(?:\\
,|
[^
,
])
+/g
),
text
=>
{
this
.
options
=
_
.
map
(
this
.
query
.
match
(
/
(?:\\
,|
[^
,
])
+/g
),
text
=>
{
text
=
text
.
replace
(
'
\\
,'
,
','
);
text
=
text
.
replace
(
/
\\
,/g
,
','
);
return
{
text
:
text
.
trim
(),
value
:
text
.
trim
()
};
return
{
text
:
text
.
trim
(),
value
:
text
.
trim
()
};
});
});
...
...
public/app/plugins/panel/gauge/GaugePanel.tsx
View file @
c38000d4
...
@@ -2,7 +2,6 @@
...
@@ -2,7 +2,6 @@
import
React
from
'react'
;
import
React
from
'react'
;
// Services & Utils
// Services & Utils
import
{
PanelProps
}
from
'@grafana/ui'
;
import
{
config
}
from
'app/core/config'
;
import
{
config
}
from
'app/core/config'
;
// Components
// Components
...
@@ -14,14 +13,6 @@ import { DisplayValue } from '@grafana/ui/src/utils/displayValue';
...
@@ -14,14 +13,6 @@ import { DisplayValue } from '@grafana/ui/src/utils/displayValue';
import
{
SingleStatPanel
}
from
'./SingleStatPanel'
;
import
{
SingleStatPanel
}
from
'./SingleStatPanel'
;
export
class
GaugePanel
extends
SingleStatPanel
<
GaugeOptions
>
{
export
class
GaugePanel
extends
SingleStatPanel
<
GaugeOptions
>
{
constructor
(
props
:
PanelProps
<
GaugeOptions
>
)
{
super
(
props
);
// if (props.options.valueOptions) {
// console.warn('TODO!! how do we best migration options?');
// }
}
renderStat
(
value
:
DisplayValue
,
width
:
number
,
height
:
number
)
{
renderStat
(
value
:
DisplayValue
,
width
:
number
,
height
:
number
)
{
const
{
options
}
=
this
.
props
;
const
{
options
}
=
this
.
props
;
const
{
display
}
=
options
;
const
{
display
}
=
options
;
...
...
public/sass/components/_panel_logs.scss
View file @
c38000d4
...
@@ -173,7 +173,7 @@ $column-horizontal-spacing: 10px;
...
@@ -173,7 +173,7 @@ $column-horizontal-spacing: 10px;
.logs-row__duplicates
{
.logs-row__duplicates
{
text-align
:
right
;
text-align
:
right
;
width
:
4
.5
em
;
width
:
4em
;
}
}
.logs-row__field-highlight
{
.logs-row__field-highlight
{
...
...
public/sass/components/_switch.scss
View file @
c38000d4
...
@@ -94,6 +94,7 @@ input:checked + .gf-form-switch__slider::before {
...
@@ -94,6 +94,7 @@ input:checked + .gf-form-switch__slider::before {
opacity
:
0
;
opacity
:
0
;
width
:
0
;
width
:
0
;
height
:
0
;
height
:
0
;
appearance
:
none
;
}
}
&
--transparent
{
&
--transparent
{
...
...
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