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
cbb9a63b
Unverified
Commit
cbb9a63b
authored
Jun 30, 2020
by
Ryan McKinley
Committed by
GitHub
Jun 30, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Azure: query builder cleanup (#25956)
parent
3a9a4f4a
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
13 deletions
+25
-13
public/app/plugins/datasource/grafana-azure-monitor-datasource/azure_monitor/azure_monitor_datasource.test.ts
+16
-5
public/app/plugins/datasource/grafana-azure-monitor-datasource/azure_monitor/azure_monitor_datasource.ts
+5
-2
public/app/plugins/datasource/grafana-azure-monitor-datasource/azure_monitor/response_parser.ts
+0
-4
public/app/plugins/datasource/grafana-azure-monitor-datasource/partials/query.editor.html
+4
-1
public/app/plugins/datasource/grafana-azure-monitor-datasource/query_ctrl.ts
+0
-1
No files found.
public/app/plugins/datasource/grafana-azure-monitor-datasource/azure_monitor/azure_monitor_datasource.test.ts
View file @
cbb9a63b
...
@@ -931,11 +931,22 @@ describe('AzureMonitorDatasource', () => {
...
@@ -931,11 +931,22 @@ describe('AzureMonitorDatasource', () => {
'Transactions'
'Transactions'
)
)
.
then
((
results
:
any
)
=>
{
.
then
((
results
:
any
)
=>
{
expect
(
results
.
dimensions
.
length
).
toEqual
(
4
);
expect
(
results
.
dimensions
).
toMatchInlineSnapshot
(
`
expect
(
results
.
dimensions
[
0
].
text
).
toEqual
(
'None'
);
Array [
expect
(
results
.
dimensions
[
0
].
value
).
toEqual
(
'None'
);
Object {
expect
(
results
.
dimensions
[
1
].
text
).
toEqual
(
'Response type'
);
"text": "Response type",
expect
(
results
.
dimensions
[
1
].
value
).
toEqual
(
'ResponseType'
);
"value": "ResponseType",
},
Object {
"text": "Geo type",
"value": "GeoType",
},
Object {
"text": "API name",
"value": "ApiName",
},
]
`
);
});
});
});
});
...
...
public/app/plugins/datasource/grafana-azure-monitor-datasource/azure_monitor/azure_monitor_datasource.ts
View file @
cbb9a63b
...
@@ -74,11 +74,14 @@ export default class AzureMonitorDatasource extends DataSourceWithBackend<AzureM
...
@@ -74,11 +74,14 @@ export default class AzureMonitorDatasource extends DataSourceWithBackend<AzureM
const
aggregation
=
templateSrv
.
replace
(
item
.
aggregation
,
scopedVars
);
const
aggregation
=
templateSrv
.
replace
(
item
.
aggregation
,
scopedVars
);
const
top
=
templateSrv
.
replace
(
item
.
top
||
''
,
scopedVars
);
const
top
=
templateSrv
.
replace
(
item
.
top
||
''
,
scopedVars
);
const
dimensionsFilters
=
item
.
dimensionFilters
.
map
(
f
=>
{
const
dimensionsFilters
=
item
.
dimensionFilters
.
filter
(
f
=>
f
.
dimension
&&
f
.
dimension
!==
'None'
)
.
map
(
f
=>
{
const
filter
=
templateSrv
.
replace
(
f
.
filter
,
scopedVars
);
return
{
return
{
dimension
:
templateSrv
.
replace
(
f
.
dimension
,
scopedVars
),
dimension
:
templateSrv
.
replace
(
f
.
dimension
,
scopedVars
),
operator
:
f
.
operator
||
'eq'
,
operator
:
f
.
operator
||
'eq'
,
filter
:
templateSrv
.
replace
(
f
.
filter
,
scopedVars
),
filter
:
filter
||
'*'
,
// send * when empty
};
};
});
});
...
...
public/app/plugins/datasource/grafana-azure-monitor-datasource/azure_monitor/response_parser.ts
View file @
cbb9a63b
...
@@ -92,10 +92,6 @@ export default class ResponseParser {
...
@@ -92,10 +92,6 @@ export default class ResponseParser {
return
dimensions
;
return
dimensions
;
}
}
if
(
!
metricData
.
isDimensionRequired
)
{
dimensions
.
push
({
text
:
'None'
,
value
:
'None'
});
}
for
(
let
i
=
0
;
i
<
metricData
.
dimensions
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
metricData
.
dimensions
.
length
;
i
++
)
{
const
text
=
metricData
.
dimensions
[
i
].
localizedValue
;
const
text
=
metricData
.
dimensions
[
i
].
localizedValue
;
const
value
=
metricData
.
dimensions
[
i
].
value
;
const
value
=
metricData
.
dimensions
[
i
].
value
;
...
...
public/app/plugins/datasource/grafana-azure-monitor-datasource/partials/query.editor.html
View file @
cbb9a63b
...
@@ -100,7 +100,7 @@
...
@@ -100,7 +100,7 @@
>
>
</gf-form-dropdown>
</gf-form-dropdown>
</div>
</div>
<div
class=
"gf-form
gf-form--grow aggregation-dropdown-wrapper
"
>
<div
class=
"gf-form"
>
<label
class=
"gf-form-label query-keyword width-9"
>
Aggregation
</label>
<label
class=
"gf-form-label query-keyword width-9"
>
Aggregation
</label>
<div
class=
"gf-form-select-wrapper gf-form-select-wrapper--caret-indent"
>
<div
class=
"gf-form-select-wrapper gf-form-select-wrapper--caret-indent"
>
<select
<select
...
@@ -111,6 +111,9 @@
...
@@ -111,6 +111,9 @@
></select>
></select>
</div>
</div>
</div>
</div>
<div
class=
"gf-form gf-form--grow"
>
<div
class=
"gf-form-label gf-form-label--grow"
></div>
</div>
</div>
</div>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form-inline"
>
<div
class=
"gf-form"
>
<div
class=
"gf-form"
>
...
...
public/app/plugins/datasource/grafana-azure-monitor-datasource/query_ctrl.ts
View file @
cbb9a63b
...
@@ -533,7 +533,6 @@ export class AzureMonitorQueryCtrl extends QueryCtrl {
...
@@ -533,7 +533,6 @@ export class AzureMonitorQueryCtrl extends QueryCtrl {
operator
:
'eq'
,
operator
:
'eq'
,
filter
:
''
,
filter
:
''
,
});
});
this
.
refresh
();
}
}
azureMonitorRemoveDimensionFilter
(
index
:
number
)
{
azureMonitorRemoveDimensionFilter
(
index
:
number
)
{
...
...
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