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
2dc44f60
Commit
2dc44f60
authored
Nov 23, 2018
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into develop
parents
a5947e82
f4bc0231
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
71 additions
and
21 deletions
+71
-21
docs/sources/auth/overview.md
+11
-2
public/app/core/utils/kbn.ts
+2
-2
public/app/features/explore/Typeahead.tsx
+1
-1
public/app/plugins/datasource/logging/language_provider.test.ts
+9
-0
public/app/plugins/datasource/logging/language_provider.ts
+18
-10
public/app/plugins/datasource/prometheus/language_provider.ts
+3
-2
public/sass/components/_footer.scss
+2
-1
public/sass/components/_gf-form.scss
+1
-2
public/sass/components/_query_editor.scss
+1
-1
public/sass/layout/_page.scss
+23
-0
No files found.
docs/sources/auth/overview.md
View file @
2dc44f60
...
...
@@ -78,8 +78,8 @@ disable_login_form = true
### Automatic OAuth login
Set to true to attempt login with OAuth automatically, skipping the login screen.
This setting is ignored if multiple OAuth providers are configured.
Set to true to attempt login with OAuth automatically, skipping the login screen.
This setting is ignored if multiple OAuth providers are configured.
Defaults to
`false`
.
```
bash
...
...
@@ -95,3 +95,12 @@ Set to the option detailed below to true to hide sign-out menu link. Useful if y
[
auth]
disable_signout_menu
=
true
```
### URL redirect after signing out
URL to redirect the user to after signing out from Grafana. This can for example be used to enable signout from oauth provider.
```
bash
[
auth]
signout_redirect_url
=
```
public/app/core/utils/kbn.ts
View file @
2dc44f60
...
...
@@ -584,8 +584,8 @@ kbn.valueFormats.flowcms = kbn.formatBuilders.fixedUnit('cms');
kbn.valueFormats.flowcfs = kbn.formatBuilders.fixedUnit('
cfs
');
kbn.valueFormats.flowcfm = kbn.formatBuilders.fixedUnit('
cfm
');
kbn.valueFormats.litreh = kbn.formatBuilders.fixedUnit('
l
/
h
');
kbn.valueFormats.flowlpm = kbn.formatBuilders.decimalSIPrefix('
L
');
kbn.valueFormats.flowmlpm = kbn.formatBuilders.decimalSIPrefix('
L
', -1);
kbn.valueFormats.flowlpm = kbn.formatBuilders.decimalSIPrefix('
l
/
min
');
kbn.valueFormats.flowmlpm = kbn.formatBuilders.decimalSIPrefix('
mL
/
min
', -1);
// Angle
kbn.valueFormats.degree = kbn.formatBuilders.fixedUnit('
°
');
...
...
public/app/features/explore/Typeahead.tsx
View file @
2dc44f60
...
...
@@ -42,7 +42,7 @@ class TypeaheadItem extends React.PureComponent<TypeaheadItemProps> {
render
()
{
const
{
isSelected
,
item
,
prefix
}
=
this
.
props
;
const
className
=
isSelected
?
'typeahead-item typeahead-item__selected'
:
'typeahead-item'
;
const
{
label
}
=
item
;
const
label
=
item
.
label
||
''
;
return
(
<
li
ref=
{
this
.
getRef
}
className=
{
className
}
onClick=
{
this
.
onClick
}
>
<
Highlighter
textToHighlight=
{
label
}
searchWords=
{
[
prefix
]
}
highlightClassName=
"typeahead-match"
/>
...
...
public/app/plugins/datasource/logging/language_provider.test.ts
View file @
2dc44f60
...
...
@@ -95,5 +95,14 @@ describe('Query imports', () => {
const
result
=
await
instance
.
importPrometheusQuery
(
'metric{foo="bar",baz="42"}'
);
expect
(
result
).
toEqual
(
'{foo="bar"}'
);
});
it
(
'returns selector query from selector query with all labels if logging label list is empty'
,
async
()
=>
{
const
datasourceWithLabels
=
{
metadataRequest
:
url
=>
(
url
===
'/api/prom/label'
?
{
data
:
{
data
:
[]
}
}
:
{
data
:
{
data
:
[]
}
}),
};
const
instance
=
new
LanguageProvider
(
datasourceWithLabels
);
const
result
=
await
instance
.
importPrometheusQuery
(
'metric{foo="bar",baz="42"}'
);
expect
(
result
).
toEqual
(
'{baz="42",foo="bar"}'
);
});
});
});
public/app/plugins/datasource/logging/language_provider.ts
View file @
2dc44f60
...
...
@@ -97,9 +97,10 @@ export default class LoggingLanguageProvider extends LanguageProvider {
if
(
history
&&
history
.
length
>
0
)
{
const
historyItems
=
_
.
chain
(
history
)
.
uniqBy
(
'query.expr'
)
.
take
(
HISTORY_ITEM_COUNT
)
.
map
(
h
=>
h
.
query
.
expr
)
.
filter
()
.
uniq
()
.
take
(
HISTORY_ITEM_COUNT
)
.
map
(
wrapLabel
)
.
map
(
item
=>
addHistoryMetadata
(
item
,
history
))
.
value
();
...
...
@@ -194,17 +195,24 @@ export default class LoggingLanguageProvider extends LanguageProvider {
// Keep only labels that exist on origin and target datasource
await
this
.
start
();
// fetches all existing label keys
const
commonLabels
=
{};
for
(
const
key
in
labels
)
{
const
existingKeys
=
this
.
labelKeys
[
EMPTY_SELECTOR
];
if
(
existingKeys
&&
existingKeys
.
indexOf
(
key
)
>
-
1
)
{
// Should we check for label value equality here?
commonLabels
[
key
]
=
labels
[
key
];
const
existingKeys
=
this
.
labelKeys
[
EMPTY_SELECTOR
];
let
labelsToKeep
=
{};
if
(
existingKeys
&&
existingKeys
.
length
>
0
)
{
// Check for common labels
for
(
const
key
in
labels
)
{
if
(
existingKeys
&&
existingKeys
.
indexOf
(
key
)
>
-
1
)
{
// Should we check for label value equality here?
labelsToKeep
[
key
]
=
labels
[
key
];
}
}
}
else
{
// Keep all labels by default
labelsToKeep
=
labels
;
}
const
labelKeys
=
Object
.
keys
(
commonLabels
).
sort
();
const
labelKeys
=
Object
.
keys
(
labelsToKeep
).
sort
();
const
cleanSelector
=
labelKeys
.
map
(
key
=>
`
${
key
}${
commonLabels
[
key
].
operator
}${
commonLabels
[
key
].
value
}
`
)
.
map
(
key
=>
`
${
key
}${
labelsToKeep
[
key
].
operator
}${
labelsToKeep
[
key
].
value
}
`
)
.
join
(
','
);
return
[
'{'
,
cleanSelector
,
'}'
].
join
(
''
);
...
...
public/app/plugins/datasource/prometheus/language_provider.ts
View file @
2dc44f60
...
...
@@ -125,9 +125,10 @@ export default class PromQlLanguageProvider extends LanguageProvider {
if
(
history
&&
history
.
length
>
0
)
{
const
historyItems
=
_
.
chain
(
history
)
.
uniqBy
(
'query.expr'
)
.
take
(
HISTORY_ITEM_COUNT
)
.
map
(
h
=>
h
.
query
.
expr
)
.
filter
()
.
uniq
()
.
take
(
HISTORY_ITEM_COUNT
)
.
map
(
wrapLabel
)
.
map
(
item
=>
addHistoryMetadata
(
item
,
history
))
.
value
();
...
...
public/sass/components/_footer.scss
View file @
2dc44f60
...
...
@@ -4,7 +4,7 @@
.footer
{
color
:
$footer-link-color
;
padding
:
5
rem
0
1rem
0
;
padding
:
1
rem
0
1rem
0
;
font-size
:
$font-size-sm
;
position
:
relative
;
width
:
98%
;
/* was causing horiz scrollbars - need to examine */
...
...
@@ -38,6 +38,7 @@
}
}
// Keeping footer inside the graphic on Login screen
.login-page
{
.footer
{
bottom
:
$spacer
;
...
...
public/sass/components/_gf-form.scss
View file @
2dc44f60
...
...
@@ -82,7 +82,7 @@ $input-border: 1px solid $input-border-color;
align-content
:
flex-start
;
.gf-form
+
.gf-form
{
margin-
righ
t
:
$gf-form-margin
;
margin-
lef
t
:
$gf-form-margin
;
}
}
...
...
@@ -163,7 +163,6 @@ $input-border: 1px solid $input-border-color;
width
:
100%
;
height
:
$gf-form-input-height
;
padding
:
$input-padding-y
$input-padding-x
;
margin-right
:
$gf-form-margin
;
font-size
:
$font-size-md
;
line-height
:
$input-line-height
;
color
:
$input-color
;
...
...
public/sass/components/_query_editor.scss
View file @
2dc44f60
...
...
@@ -35,7 +35,7 @@
}
.gf-form
+
.gf-form
{
margin-
righ
t
:
0
;
margin-
lef
t
:
0
;
}
}
...
...
public/sass/layout/_page.scss
View file @
2dc44f60
...
...
@@ -40,6 +40,29 @@
&
--dashboard
{
height
:
calc
(
100%
-
56px
);
}
// Sticky footer
display
:
flex
;
flex-direction
:
column
;
>
div
{
flex-grow
:
1
;
}
>
.footer
{
flex-shrink
:
0
;
}
// Render in correct position even ng-view div is not rendered yet
>
.footer
:first-child
{
flex-grow
:
1
;
display
:
flex
;
>
*
{
width
:
100%
;
align-self
:
flex-end
;
}
}
}
// fix for phantomjs
...
...
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