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
2faf8c72
Commit
2faf8c72
authored
Nov 28, 2018
by
Torkel Ödegaard
Committed by
Marcus Efraimsson
Nov 28, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix elastic ng-inject (build issue) (#14195)
fix elastic ng-inject issue in query editor
parent
9afb8b64
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
32 deletions
+31
-32
public/app/plugins/datasource/elasticsearch/bucket_agg.ts
+15
-16
public/app/plugins/datasource/elasticsearch/metric_agg.ts
+16
-16
No files found.
public/app/plugins/datasource/elasticsearch/bucket_agg.ts
View file @
2faf8c72
...
@@ -2,22 +2,8 @@ import coreModule from 'app/core/core_module';
...
@@ -2,22 +2,8 @@ import coreModule from 'app/core/core_module';
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
*
as
queryDef
from
'./query_def'
;
import
*
as
queryDef
from
'./query_def'
;
export
function
elasticBucketAgg
()
{
return
{
templateUrl
:
'public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html'
,
controller
:
'ElasticBucketAggCtrl'
,
restrict
:
'E'
,
scope
:
{
target
:
'='
,
index
:
'='
,
onChange
:
'&'
,
getFields
:
'&'
,
},
};
}
export
class
ElasticBucketAggCtrl
{
export
class
ElasticBucketAggCtrl
{
/** @ng
i
nject */
/** @ng
I
nject */
constructor
(
$scope
,
uiSegmentSrv
,
$q
,
$rootScope
)
{
constructor
(
$scope
,
uiSegmentSrv
,
$q
,
$rootScope
)
{
const
bucketAggs
=
$scope
.
target
.
bucketAggs
;
const
bucketAggs
=
$scope
.
target
.
bucketAggs
;
...
@@ -226,5 +212,18 @@ export class ElasticBucketAggCtrl {
...
@@ -226,5 +212,18 @@ export class ElasticBucketAggCtrl {
}
}
}
}
export
function
elasticBucketAgg
()
{
return
{
templateUrl
:
'public/app/plugins/datasource/elasticsearch/partials/bucket_agg.html'
,
controller
:
ElasticBucketAggCtrl
,
restrict
:
'E'
,
scope
:
{
target
:
'='
,
index
:
'='
,
onChange
:
'&'
,
getFields
:
'&'
,
},
};
}
coreModule
.
directive
(
'elasticBucketAgg'
,
elasticBucketAgg
);
coreModule
.
directive
(
'elasticBucketAgg'
,
elasticBucketAgg
);
coreModule
.
controller
(
'ElasticBucketAggCtrl'
,
ElasticBucketAggCtrl
);
public/app/plugins/datasource/elasticsearch/metric_agg.ts
View file @
2faf8c72
...
@@ -2,22 +2,8 @@ import coreModule from 'app/core/core_module';
...
@@ -2,22 +2,8 @@ import coreModule from 'app/core/core_module';
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
*
as
queryDef
from
'./query_def'
;
import
*
as
queryDef
from
'./query_def'
;
export
function
elasticMetricAgg
()
{
return
{
templateUrl
:
'public/app/plugins/datasource/elasticsearch/partials/metric_agg.html'
,
controller
:
'ElasticMetricAggCtrl'
,
restrict
:
'E'
,
scope
:
{
target
:
'='
,
index
:
'='
,
onChange
:
'&'
,
getFields
:
'&'
,
esVersion
:
'='
,
},
};
}
export
class
ElasticMetricAggCtrl
{
export
class
ElasticMetricAggCtrl
{
/** @ngInject */
constructor
(
$scope
,
uiSegmentSrv
,
$q
,
$rootScope
)
{
constructor
(
$scope
,
uiSegmentSrv
,
$q
,
$rootScope
)
{
const
metricAggs
=
$scope
.
target
.
metrics
;
const
metricAggs
=
$scope
.
target
.
metrics
;
$scope
.
metricAggTypes
=
queryDef
.
getMetricAggTypes
(
$scope
.
esVersion
);
$scope
.
metricAggTypes
=
queryDef
.
getMetricAggTypes
(
$scope
.
esVersion
);
...
@@ -209,5 +195,19 @@ export class ElasticMetricAggCtrl {
...
@@ -209,5 +195,19 @@ export class ElasticMetricAggCtrl {
}
}
}
}
export
function
elasticMetricAgg
()
{
return
{
templateUrl
:
'public/app/plugins/datasource/elasticsearch/partials/metric_agg.html'
,
controller
:
ElasticMetricAggCtrl
,
restrict
:
'E'
,
scope
:
{
target
:
'='
,
index
:
'='
,
onChange
:
'&'
,
getFields
:
'&'
,
esVersion
:
'='
,
},
};
}
coreModule
.
directive
(
'elasticMetricAgg'
,
elasticMetricAgg
);
coreModule
.
directive
(
'elasticMetricAgg'
,
elasticMetricAgg
);
coreModule
.
controller
(
'ElasticMetricAggCtrl'
,
ElasticMetricAggCtrl
);
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