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
9e24c094
Unverified
Commit
9e24c094
authored
May 13, 2020
by
Dominik Prokop
Committed by
GitHub
May 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Transformations: Make transform dropdowns not cropped (#24615)
parent
ab12c908
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
34 additions
and
10 deletions
+34
-10
packages/grafana-ui/src/components/StatsPicker/StatsPicker.tsx
+3
-1
packages/grafana-ui/src/components/ValuePicker/ValuePicker.tsx
+3
-0
public/app/core/components/TransformersUI/CalculateFieldTransformerEditor.tsx
+5
-0
public/app/core/components/TransformersUI/ReduceTransformerEditor.tsx
+1
-0
public/app/core/components/TransformersUI/SeriesToFieldsTransformerEditor.tsx
+7
-1
public/app/features/dashboard/components/TransformationsEditor/TransformationsEditor.tsx
+15
-8
No files found.
packages/grafana-ui/src/components/StatsPicker/StatsPicker.tsx
View file @
9e24c094
...
...
@@ -14,6 +14,7 @@ interface Props {
allowMultiple
?:
boolean
;
defaultStat
?:
string
;
className
?:
string
;
menuPlacement
?:
'auto'
|
'bottom'
|
'top'
;
}
export
class
StatsPicker
extends
PureComponent
<
Props
>
{
...
...
@@ -62,7 +63,7 @@ export class StatsPicker extends PureComponent<Props> {
};
render
()
{
const
{
stats
,
allowMultiple
,
defaultStat
,
placeholder
,
className
}
=
this
.
props
;
const
{
stats
,
allowMultiple
,
defaultStat
,
placeholder
,
className
,
menuPlacement
}
=
this
.
props
;
const
select
=
fieldReducers
.
selectOptions
(
stats
);
return
(
...
...
@@ -75,6 +76,7 @@ export class StatsPicker extends PureComponent<Props> {
options=
{
select
.
options
}
placeholder=
{
placeholder
}
onChange=
{
this
.
onSelectionChange
}
menuPlacement=
{
menuPlacement
}
/>
);
}
...
...
packages/grafana-ui/src/components/ValuePicker/ValuePicker.tsx
View file @
9e24c094
...
...
@@ -17,6 +17,7 @@ interface ValuePickerProps<T> {
variant
?:
ButtonVariant
;
size
?:
ComponentSize
;
isFullWidth
?:
boolean
;
menuPlacement
?:
'auto'
|
'bottom'
|
'top'
;
}
export
function
ValuePicker
<
T
>
({
...
...
@@ -27,6 +28,7 @@ export function ValuePicker<T>({
variant
,
size
=
'sm'
,
isFullWidth
=
true
,
menuPlacement
,
}:
ValuePickerProps
<
T
>
)
{
const
[
isPicking
,
setIsPicking
]
=
useState
(
false
);
...
...
@@ -50,6 +52,7 @@ export function ValuePicker<T>({
setIsPicking
(
false
);
onChange
(
value
);
}
}
menuPlacement=
{
menuPlacement
}
/>
)
}
</>
...
...
public/app/core/components/TransformersUI/CalculateFieldTransformerEditor.tsx
View file @
9e24c094
...
...
@@ -201,6 +201,7 @@ export class CalculateFieldTransformerEditor extends React.PureComponent<
stats=
{
[
options
.
reducer
]
}
onChange=
{
this
.
onStatsChange
}
defaultStat=
{
ReducerID
.
sum
}
menuPlacement=
"bottom"
/>
</
div
>
</
div
>
...
...
@@ -279,12 +280,14 @@ export class CalculateFieldTransformerEditor extends React.PureComponent<
className=
"min-width-18 gf-form-spacing"
value=
{
options
?.
left
}
onChange=
{
this
.
onBinaryLeftChanged
}
menuPlacement=
"bottom"
/>
<
Select
className=
"width-8 gf-form-spacing"
options=
{
ops
}
value=
{
options
.
operator
??
ops
[
0
].
value
}
onChange=
{
this
.
onBinaryOperationChanged
}
menuPlacement=
"bottom"
/>
<
Select
allowCustomValue
...
...
@@ -293,6 +296,7 @@ export class CalculateFieldTransformerEditor extends React.PureComponent<
options=
{
rightNames
}
value=
{
options
?.
right
}
onChange=
{
this
.
onBinaryRightChanged
}
menuPlacement=
"bottom"
/>
</
div
>
</
div
>
...
...
@@ -318,6 +322,7 @@ export class CalculateFieldTransformerEditor extends React.PureComponent<
options=
{
calculationModes
}
value=
{
calculationModes
.
find
(
v
=>
v
.
value
===
mode
)
}
onChange=
{
this
.
onModeChanged
}
menuPlacement=
"bottom"
/>
</
div
>
</
div
>
...
...
public/app/core/components/TransformersUI/ReduceTransformerEditor.tsx
View file @
9e24c094
...
...
@@ -30,6 +30,7 @@ export const ReduceTransformerEditor: React.FC<TransformerUIProps<ReduceTransfor
reducers
:
stats
as
ReducerID
[],
});
}
}
menuPlacement=
"bottom"
/>
</
div
>
</
div
>
...
...
public/app/core/components/TransformersUI/SeriesToFieldsTransformerEditor.tsx
View file @
9e24c094
...
...
@@ -33,7 +33,13 @@ export const SeriesToFieldsTransformerEditor: React.FC<TransformerUIProps<Series
<
div
className=
"gf-form-inline"
>
<
div
className=
"gf-form gf-form--grow"
>
<
div
className=
"gf-form-label width-8"
>
Field name
</
div
>
<
Select
options=
{
fieldNameOptions
}
value=
{
options
.
byField
}
onChange=
{
onSelectField
}
isClearable
/>
<
Select
options=
{
fieldNameOptions
}
value=
{
options
.
byField
}
onChange=
{
onSelectField
}
isClearable
menuPlacement=
"bottom"
/>
</
div
>
</
div
>
);
...
...
public/app/features/dashboard/components/TransformationsEditor/TransformationsEditor.tsx
View file @
9e24c094
...
...
@@ -65,14 +65,21 @@ export class TransformationsEditor extends React.PureComponent<Props> {
});
return
(
<
ValuePicker
size=
"md"
variant=
"secondary"
label=
"Add transformation"
options=
{
availableTransformers
}
onChange=
{
this
.
onTransformationAdd
}
isFullWidth=
{
false
}
/>
<
div
className=
{
css
`
max-width: 66%;
`
}
>
<
ValuePicker
size=
"md"
variant=
"secondary"
label=
"Add transformation"
options=
{
availableTransformers
}
onChange=
{
this
.
onTransformationAdd
}
isFullWidth=
{
false
}
menuPlacement=
"bottom"
/>
</
div
>
);
};
...
...
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