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
8a39b32b
Commit
8a39b32b
authored
Sep 28, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: moved elasticsearch specs to plugin folder and to typescript
parent
7d2646f6
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
50 additions
and
57 deletions
+50
-57
public/app/plugins/datasource/elasticsearch/bucket_agg.js
+1
-1
public/app/plugins/datasource/elasticsearch/datasource.js
+4
-4
public/app/plugins/datasource/elasticsearch/directives.js
+2
-2
public/app/plugins/datasource/elasticsearch/elastic_response.js
+1
-1
public/app/plugins/datasource/elasticsearch/index_pattern.js
+0
-0
public/app/plugins/datasource/elasticsearch/metric_agg.js
+1
-1
public/app/plugins/datasource/elasticsearch/query_builder.js
+0
-0
public/app/plugins/datasource/elasticsearch/query_ctrl.js
+0
-0
public/app/plugins/datasource/elasticsearch/query_def.js
+0
-0
public/app/plugins/datasource/elasticsearch/specs/datasource_specs.ts
+10
-13
public/app/plugins/datasource/elasticsearch/specs/elastic_response_specs.ts
+6
-6
public/app/plugins/datasource/elasticsearch/specs/index_pattern_specs.ts
+8
-9
public/app/plugins/datasource/elasticsearch/specs/query_builder_specs.ts
+6
-7
public/app/plugins/datasource/elasticsearch/specs/query_ctrl_specs.ts
+10
-12
public/app/plugins/datasource/influxdb/specs/query_builder_specs.ts
+1
-1
No files found.
public/app/plugins/datasource/elasticsearch/bucket
A
gg.js
→
public/app/plugins/datasource/elasticsearch/bucket
_a
gg.js
View file @
8a39b32b
define
([
'angular'
,
'lodash'
,
'./query
D
ef'
,
'./query
_d
ef'
,
],
function
(
angular
,
_
,
queryDef
)
{
'use strict'
;
...
...
public/app/plugins/datasource/elasticsearch/datasource.js
View file @
8a39b32b
...
...
@@ -3,10 +3,10 @@ define([
'lodash'
,
'moment'
,
'kbn'
,
'./query
B
uilder'
,
'./index
P
attern'
,
'./elastic
R
esponse'
,
'./query
C
trl'
,
'./query
_b
uilder'
,
'./index
_p
attern'
,
'./elastic
_r
esponse'
,
'./query
_c
trl'
,
'./directives'
],
function
(
angular
,
_
,
moment
,
kbn
,
ElasticQueryBuilder
,
IndexPattern
,
ElasticResponse
)
{
...
...
public/app/plugins/datasource/elasticsearch/directives.js
View file @
8a39b32b
define
([
'angular'
,
'./bucket
A
gg'
,
'./metric
A
gg'
,
'./bucket
_a
gg'
,
'./metric
_a
gg'
,
],
function
(
angular
)
{
'use strict'
;
...
...
public/app/plugins/datasource/elasticsearch/elastic
R
esponse.js
→
public/app/plugins/datasource/elasticsearch/elastic
_r
esponse.js
View file @
8a39b32b
define
([
"lodash"
,
"./query
D
ef"
"./query
_d
ef"
],
function
(
_
,
queryDef
)
{
'use strict'
;
...
...
public/app/plugins/datasource/elasticsearch/index
P
attern.js
→
public/app/plugins/datasource/elasticsearch/index
_p
attern.js
View file @
8a39b32b
File moved
public/app/plugins/datasource/elasticsearch/metric
A
gg.js
→
public/app/plugins/datasource/elasticsearch/metric
_a
gg.js
View file @
8a39b32b
define
([
'angular'
,
'lodash'
,
'./query
D
ef'
'./query
_d
ef'
],
function
(
angular
,
_
,
queryDef
)
{
'use strict'
;
...
...
public/app/plugins/datasource/elasticsearch/query
B
uilder.js
→
public/app/plugins/datasource/elasticsearch/query
_b
uilder.js
View file @
8a39b32b
File moved
public/app/plugins/datasource/elasticsearch/query
C
trl.js
→
public/app/plugins/datasource/elasticsearch/query
_c
trl.js
View file @
8a39b32b
File moved
public/app/plugins/datasource/elasticsearch/query
D
ef.js
→
public/app/plugins/datasource/elasticsearch/query
_d
ef.js
View file @
8a39b32b
File moved
public/
test/specs/elasticsearch-specs.j
s
→
public/
app/plugins/datasource/elasticsearch/specs/datasource_specs.t
s
View file @
8a39b32b
define
([
'./helpers'
,
'moment'
,
'angular'
,
'app/plugins/datasource/elasticsearch/datasource'
,
],
function
(
helpers
,
moment
,
angular
)
{
'use strict'
;
///<amd-dependency path="../datasource" />
///<amd-dependency path="test/specs/helpers" name="helpers" />
describe
(
'ElasticDatasource'
,
function
()
{
import
{
describe
,
beforeEach
,
it
,
sinon
,
expect
,
angularMocks
}
from
'test/lib/common'
;
import
moment
=
require
(
'moment'
);
import
angular
=
require
(
'angular'
);
declare
var
helpers
:
any
;
describe
(
'ElasticDatasource'
,
function
()
{
var
ctx
=
new
helpers
.
ServiceTestContext
();
beforeEach
(
module
(
'grafana.services'
));
beforeEach
(
angularMocks
.
module
(
'grafana.services'
));
beforeEach
(
ctx
.
providePhase
([
'templateSrv'
,
'backendSrv'
]));
beforeEach
(
ctx
.
createService
(
'ElasticDatasource'
));
beforeEach
(
function
()
{
...
...
@@ -69,9 +70,5 @@ define([
var
header
=
angular
.
fromJson
(
parts
[
0
]);
expect
(
header
.
index
).
to
.
eql
([
'asd-2015.05.30'
,
'asd-2015.05.31'
,
'asd-2015.06.01'
]);
});
});
});
});
public/
test/specs/elasticsearch-response-specs.j
s
→
public/
app/plugins/datasource/elasticsearch/specs/elastic_response_specs.t
s
View file @
8a39b32b
define
([
'app/plugins/datasource/elasticsearch/elasticResponse'
,
],
function
(
ElasticResponse
)
{
'use strict'
;
///<amd-dependency path="../elastic_response" name="ElasticResponse"/>
describe
(
'ElasticResponse'
,
function
()
{
import
{
describe
,
beforeEach
,
it
,
sinon
,
expect
}
from
'test/lib/common'
;
declare
var
ElasticResponse
:
any
;
describe
(
'ElasticResponse'
,
function
()
{
var
targets
;
var
response
;
var
result
;
...
...
@@ -410,5 +411,4 @@ define([
});
});
});
});
public/
test/specs/elasticsearch-indexPattern-specs.j
s
→
public/
app/plugins/datasource/elasticsearch/specs/index_pattern_specs.t
s
View file @
8a39b32b
define
([
'moment'
,
'app/plugins/datasource/elasticsearch/indexPattern'
],
function
(
moment
,
IndexPattern
)
{
'use strict'
;
///<amd-dependency path="../index_pattern" name="IndexPattern"/>
///<amd-dependency path="test/specs/helpers" name="helpers" />
describe
(
'IndexPattern'
,
function
()
{
import
{
describe
,
beforeEach
,
it
,
sinon
,
expect
}
from
'test/lib/common'
;
import
moment
=
require
(
'moment'
);
declare
var
IndexPattern
:
any
;
describe
(
'IndexPattern'
,
function
()
{
describe
(
'when getting index for today'
,
function
()
{
it
(
'should return correct index name'
,
function
()
{
...
...
@@ -44,9 +46,6 @@ define([
});
});
});
});
});
public/
test/specs/elasticsearch-querybuilder-specs.j
s
→
public/
app/plugins/datasource/elasticsearch/specs/query_builder_specs.t
s
View file @
8a39b32b
define
([
'app/plugins/datasource/elasticsearch/queryBuilder'
],
function
(
ElasticQueryBuilder
)
{
'use strict'
;
///<amd-dependency path="../query_builder" name="ElasticQueryBuilder"/>
describe
(
'ElasticQueryBuilder'
,
function
()
{
import
{
describe
,
beforeEach
,
it
,
sinon
,
expect
}
from
'test/lib/common'
;
declare
var
ElasticQueryBuilder
:
any
;
describe
(
'ElasticQueryBuilder'
,
function
()
{
var
builder
;
beforeEach
(
function
()
{
...
...
@@ -119,6 +120,4 @@ define([
expect
(
query
.
aggs
[
"2"
].
aggs
[
"4"
].
date_histogram
.
field
).
to
.
be
(
"@timestamp"
);
});
});
});
public/
test/specs/elasticsearch-queryctrl-specs.j
s
→
public/
app/plugins/datasource/elasticsearch/specs/query_ctrl_specs.t
s
View file @
8a39b32b
define
([
'./helpers'
,
'app/plugins/datasource/elasticsearch/queryCtrl'
,
'app/services/uiSegmentSrv'
],
function
(
helpers
)
{
'use strict'
;
///<amd-dependency path="../query_ctrl" />
///<amd-dependency path="app/services/uiSegmentSrv" />
///<amd-dependency path="test/specs/helpers" name="helpers" />
describe
(
'ElasticQueryCtrl'
,
function
()
{
import
{
describe
,
beforeEach
,
it
,
sinon
,
expect
,
angularMocks
}
from
'test/lib/common'
;
declare
var
helpers
:
any
;
describe
(
'ElasticQueryCtrl'
,
function
()
{
var
ctx
=
new
helpers
.
ControllerTestContext
();
beforeEach
(
module
(
'grafana.controllers'
));
beforeEach
(
module
(
'grafana.services'
));
beforeEach
(
angularMocks
.
module
(
'grafana.controllers'
));
beforeEach
(
angularMocks
.
module
(
'grafana.services'
));
beforeEach
(
ctx
.
providePhase
());
beforeEach
(
ctx
.
createControllerPhase
(
'ElasticQueryCtrl'
));
...
...
@@ -25,8 +26,5 @@ define([
beforeEach
(
function
()
{
ctx
.
scope
.
init
();
});
});
});
});
public/app/plugins/datasource/influxdb/specs/query_builder_specs.ts
View file @
8a39b32b
///<amd-dependency path="app/plugins/datasource/influxdb/query_builder" name="InfluxQueryBuilder"/>
//
import
{
describe
,
beforeEach
,
it
,
sinon
,
expect
}
from
'test/lib/common'
;
declare
var
InfluxQueryBuilder
:
any
;
...
...
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