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
97697b93
Commit
97697b93
authored
Oct 30, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactoring: moving and renaming things
parent
152b484e
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
63 additions
and
57 deletions
+63
-57
public/app/app.js
+0
-1
public/app/core/core.ts
+1
-0
public/app/core/services/alertSrv.js
+4
-5
public/app/core/services/all.js
+0
-0
public/app/core/services/analytics.js
+3
-4
public/app/core/services/backendSrv.js
+3
-4
public/app/core/services/contextSrv.js
+3
-4
public/app/core/services/datasourceSrv.js
+3
-4
public/app/core/services/keyboardManager.js
+4
-5
public/app/core/services/popoverSrv.js
+3
-4
public/app/core/services/timer.js
+5
-7
public/app/core/services/uiSegmentSrv.js
+3
-4
public/app/core/services/utilSrv.js
+3
-4
public/app/plugins/datasource/cloudwatch/specs/datasource_specs.ts
+3
-0
public/app/plugins/datasource/elasticsearch/specs/datasource_specs.ts
+1
-0
public/app/plugins/datasource/elasticsearch/specs/query_ctrl_specs.ts
+1
-1
public/app/plugins/datasource/graphite/specs/datasource_specs.ts
+3
-1
public/app/plugins/datasource/graphite/specs/query_ctrl_specs.ts
+3
-1
public/app/plugins/datasource/influxdb/specs/query_ctrl_specs.ts
+2
-1
public/app/plugins/datasource/influxdb_08/specs/datasource-specs.ts
+3
-2
public/app/plugins/datasource/prometheus/specs/datasource_specs.ts
+3
-0
public/test/core/time_series_specs.js
+0
-0
public/test/core/utils/datemath_specs.ts
+0
-0
public/test/core/utils/rangeutil_specs.ts
+0
-0
public/test/specs/kairosdb-datasource-specs.js
+3
-0
public/test/specs/linkSrv-specs.js
+1
-0
public/test/specs/opentsdbDatasource-specs.js
+1
-0
public/test/specs/time_srv_specs.js
+4
-3
tasks/options/requirejs.js
+0
-2
No files found.
public/app/app.js
View file @
97697b93
...
...
@@ -69,7 +69,6 @@ function (angular, $, _, appLevelRequire) {
});
var
preBootRequires
=
[
'app/services/all'
,
'app/features/all'
,
];
...
...
public/app/core/core.ts
View file @
97697b93
...
...
@@ -17,6 +17,7 @@
///<amd-dependency path="./routes/all" />
///<amd-dependency path="./controllers/all" />
///<amd-dependency path="./services/all" />
///<amd-dependency path="./jquery_extended" />
///<amd-dependency path="./partials" />
...
...
public/app/services/alertSrv.js
→
public/app/
core/
services/alertSrv.js
View file @
97697b93
define
([
'angular'
,
'lodash'
'lodash'
,
'../core_module'
,
],
function
(
angular
,
_
)
{
function
(
angular
,
_
,
coreModule
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.services'
);
module
.
service
(
'alertSrv'
,
function
(
$timeout
,
$sce
,
$rootScope
,
$modal
,
$q
)
{
coreModule
.
service
(
'alertSrv'
,
function
(
$timeout
,
$sce
,
$rootScope
,
$modal
,
$q
)
{
var
self
=
this
;
this
.
init
=
function
()
{
...
...
public/app/services/all.js
→
public/app/
core/
services/all.js
View file @
97697b93
File moved
public/app/services/analytics.js
→
public/app/
core/
services/analytics.js
View file @
97697b93
define
([
'angular'
,
'../core_module'
,
],
function
(
angular
)
{
function
(
angular
,
coreModule
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.services'
);
module
.
service
(
'googleAnalyticsSrv'
,
function
(
$rootScope
,
$location
)
{
coreModule
.
service
(
'googleAnalyticsSrv'
,
function
(
$rootScope
,
$location
)
{
var
first
=
true
;
this
.
init
=
function
()
{
...
...
public/app/services/backendSrv.js
→
public/app/
core/
services/backendSrv.js
View file @
97697b93
define
([
'angular'
,
'lodash'
,
'../core_module'
,
'app/core/config'
,
],
function
(
angular
,
_
,
config
)
{
function
(
angular
,
_
,
co
reModule
,
co
nfig
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.services'
);
module
.
service
(
'backendSrv'
,
function
(
$http
,
alertSrv
,
$timeout
)
{
coreModule
.
service
(
'backendSrv'
,
function
(
$http
,
alertSrv
,
$timeout
)
{
var
self
=
this
;
this
.
get
=
function
(
url
,
params
)
{
...
...
public/app/services/contextSrv.js
→
public/app/
core/
services/contextSrv.js
View file @
97697b93
define
([
'angular'
,
'lodash'
,
'../core_module'
,
'app/core/store'
,
'app/core/config'
,
],
function
(
angular
,
_
,
store
,
config
)
{
function
(
angular
,
_
,
coreModule
,
store
,
config
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.services'
);
module
.
service
(
'contextSrv'
,
function
(
$rootScope
,
$timeout
)
{
coreModule
.
service
(
'contextSrv'
,
function
(
$rootScope
,
$timeout
)
{
var
self
=
this
;
function
User
()
{
...
...
public/app/services/datasourceSrv.js
→
public/app/
core/
services/datasourceSrv.js
View file @
97697b93
define
([
'angular'
,
'lodash'
,
'../core_module'
,
'app/core/config'
,
],
function
(
angular
,
_
,
config
)
{
function
(
angular
,
_
,
co
reModule
,
co
nfig
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.services'
);
module
.
service
(
'datasourceSrv'
,
function
(
$q
,
$injector
,
$rootScope
)
{
coreModule
.
service
(
'datasourceSrv'
,
function
(
$q
,
$injector
,
$rootScope
)
{
var
self
=
this
;
this
.
init
=
function
()
{
...
...
public/app/services/keyboardManager.js
→
public/app/
core/
services/keyboardManager.js
View file @
97697b93
define
([
'angular'
,
'lodash'
'lodash'
,
'../core_module'
,
],
function
(
angular
,
_
)
{
function
(
angular
,
_
,
coreModule
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.services'
);
// This service was based on OpenJS library available in BSD License
// http://www.openjs.com/scripts/events/keyboard_shortcuts/index.php
m
odule
.
factory
(
'keyboardManager'
,
[
'$window'
,
'$timeout'
,
function
(
$window
,
$timeout
)
{
coreM
odule
.
factory
(
'keyboardManager'
,
[
'$window'
,
'$timeout'
,
function
(
$window
,
$timeout
)
{
var
keyboardManagerService
=
{};
var
defaultOpt
=
{
...
...
public/app/services/popoverSrv.js
→
public/app/
core/
services/popoverSrv.js
View file @
97697b93
...
...
@@ -2,13 +2,12 @@ define([
'angular'
,
'lodash'
,
'jquery'
,
'../core_module'
,
],
function
(
angular
,
_
,
$
)
{
function
(
angular
,
_
,
$
,
coreModule
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.services'
);
module
.
service
(
'popoverSrv'
,
function
(
$templateCache
,
$timeout
,
$q
,
$http
,
$compile
)
{
coreModule
.
service
(
'popoverSrv'
,
function
(
$templateCache
,
$timeout
,
$q
,
$http
,
$compile
)
{
this
.
getTemplate
=
function
(
url
)
{
return
$q
.
when
(
$templateCache
.
get
(
url
)
||
$http
.
get
(
url
,
{
cache
:
true
}));
...
...
public/app/services/timer.js
→
public/app/
core/
services/timer.js
View file @
97697b93
define
([
'angular'
,
'lodash'
'lodash'
,
'../core_module'
,
],
function
(
angular
,
_
)
{
function
(
angular
,
_
,
coreModule
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.services'
);
module
.
service
(
'timer'
,
function
(
$timeout
)
{
coreModule
.
service
(
'timer'
,
function
(
$timeout
)
{
// This service really just tracks a list of $timeout promises to give us a
// method for cancelling them all when we need to
...
...
@@ -31,4 +30,4 @@ function (angular, _) {
};
});
});
\ No newline at end of file
});
public/app/services/uiSegmentSrv.js
→
public/app/
core/
services/uiSegmentSrv.js
View file @
97697b93
define
([
'angular'
,
'lodash'
,
'../core_module'
,
],
function
(
angular
,
_
)
{
function
(
angular
,
_
,
coreModule
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.services'
);
module
.
service
(
'uiSegmentSrv'
,
function
(
$sce
,
templateSrv
)
{
coreModule
.
service
(
'uiSegmentSrv'
,
function
(
$sce
,
templateSrv
)
{
function
MetricSegment
(
options
)
{
if
(
options
===
'*'
||
options
.
value
===
'*'
)
{
...
...
public/app/services/utilSrv.js
→
public/app/
core/
services/utilSrv.js
View file @
97697b93
define
([
'angular'
,
'../core_module'
,
],
function
(
angular
)
{
function
(
angular
,
coreModule
)
{
'use strict'
;
var
module
=
angular
.
module
(
'grafana.services'
);
module
.
service
(
'utilSrv'
,
function
(
$rootScope
,
$modal
,
$q
)
{
coreModule
.
service
(
'utilSrv'
,
function
(
$rootScope
,
$modal
,
$q
)
{
this
.
init
=
function
()
{
$rootScope
.
onAppEvent
(
'show-modal'
,
this
.
showModal
,
$rootScope
);
...
...
public/app/plugins/datasource/cloudwatch/specs/datasource_specs.ts
View file @
97697b93
...
...
@@ -8,10 +8,13 @@ declare var helpers: any;
describe
(
'CloudWatchDatasource'
,
function
()
{
var
ctx
=
new
helpers
.
ServiceTestContext
();
beforeEach
(
angularMocks
.
module
(
'grafana.core'
));
beforeEach
(
angularMocks
.
module
(
'grafana.services'
));
beforeEach
(
angularMocks
.
module
(
'grafana.controllers'
));
beforeEach
(
ctx
.
providePhase
([
'templateSrv'
,
'backendSrv'
]));
beforeEach
(
ctx
.
createService
(
'CloudWatchDatasource'
));
beforeEach
(
function
()
{
ctx
.
ds
=
new
ctx
.
service
({
jsonData
:
{
...
...
public/app/plugins/datasource/elasticsearch/specs/datasource_specs.ts
View file @
97697b93
...
...
@@ -10,6 +10,7 @@ declare var helpers: any;
describe
(
'ElasticDatasource'
,
function
()
{
var
ctx
=
new
helpers
.
ServiceTestContext
();
beforeEach
(
angularMocks
.
module
(
'grafana.core'
));
beforeEach
(
angularMocks
.
module
(
'grafana.services'
));
beforeEach
(
ctx
.
providePhase
([
'templateSrv'
,
'backendSrv'
]));
beforeEach
(
ctx
.
createService
(
'ElasticDatasource'
));
...
...
public/app/plugins/datasource/elasticsearch/specs/query_ctrl_specs.ts
View file @
97697b93
///<amd-dependency path="../query_ctrl" />
///<amd-dependency path="app/services/uiSegmentSrv" />
///<amd-dependency path="app/
core/
services/uiSegmentSrv" />
///<amd-dependency path="test/specs/helpers" name="helpers" />
import
{
describe
,
beforeEach
,
it
,
sinon
,
expect
,
angularMocks
}
from
'test/lib/common'
;
...
...
public/app/plugins/datasource/graphite/specs/datasource_specs.ts
View file @
97697b93
...
...
@@ -7,10 +7,12 @@ declare var helpers: any;
describe
(
'graphiteDatasource'
,
function
()
{
var
ctx
=
new
helpers
.
ServiceTestContext
();
beforeEach
(
angularMocks
.
module
(
'grafana.core'
));
beforeEach
(
angularMocks
.
module
(
'grafana.services'
));
beforeEach
(
ctx
.
providePhase
([
'backendSrv'
]));
beforeEach
(
ctx
.
providePhase
([
'backendSrv'
]));
beforeEach
(
ctx
.
createService
(
'GraphiteDatasource'
));
beforeEach
(
function
()
{
ctx
.
ds
=
new
ctx
.
service
({
url
:
[
''
]
});
});
...
...
public/app/plugins/datasource/graphite/specs/query_ctrl_specs.ts
View file @
97697b93
///<amd-dependency path="app/plugins/datasource/graphite/gfunc" name="gfunc"/>
///<amd-dependency path="app/plugins/datasource/graphite/query_ctrl" />
///<amd-dependency path="app/services/uiSegmentSrv" />
///<amd-dependency path="app/
core/
services/uiSegmentSrv" />
///<amd-dependency path="test/specs/helpers" name="helpers" />
import
{
describe
,
beforeEach
,
it
,
sinon
,
expect
,
angularMocks
}
from
'test/lib/common'
;
...
...
@@ -11,8 +11,10 @@ declare var helpers: any;
describe
(
'GraphiteQueryCtrl'
,
function
()
{
var
ctx
=
new
helpers
.
ControllerTestContext
();
beforeEach
(
angularMocks
.
module
(
'grafana.core'
));
beforeEach
(
angularMocks
.
module
(
'grafana.controllers'
));
beforeEach
(
angularMocks
.
module
(
'grafana.services'
));
beforeEach
(
ctx
.
providePhase
());
beforeEach
(
ctx
.
createControllerPhase
(
'GraphiteQueryCtrl'
));
...
...
public/app/plugins/datasource/influxdb/specs/query_ctrl_specs.ts
View file @
97697b93
///<amd-dependency path="app/plugins/datasource/influxdb/query_ctrl"/>
///<amd-dependency path="app/services/uiSegmentSrv" />
///<amd-dependency path="app/
core/
services/uiSegmentSrv" />
///<amd-dependency path="test/specs/helpers" name="helpers" />
import
{
describe
,
beforeEach
,
it
,
sinon
,
expect
,
angularMocks
}
from
'test/lib/common'
;
...
...
@@ -9,6 +9,7 @@ declare var helpers: any;
describe
(
'InfluxDBQueryCtrl'
,
function
()
{
var
ctx
=
new
helpers
.
ControllerTestContext
();
beforeEach
(
angularMocks
.
module
(
'grafana.core'
));
beforeEach
(
angularMocks
.
module
(
'grafana.controllers'
));
beforeEach
(
angularMocks
.
module
(
'grafana.services'
));
beforeEach
(
ctx
.
providePhase
());
...
...
public/app/plugins/datasource/influxdb_08/specs/datasource-specs.ts
View file @
97697b93
///<amd-dependency path="app/plugins/datasource/influxdb_08/datasource"/>
///<amd-dependency path="app/services/backendSrv"/>
///<amd-dependency path="app/services/alertSrv"/>
///<amd-dependency path="app/
core/
services/backendSrv"/>
///<amd-dependency path="app/
core/
services/alertSrv"/>
///<amd-dependency path="test/specs/helpers" name="helpers" />
import
{
describe
,
beforeEach
,
it
,
sinon
,
expect
,
angularMocks
}
from
'test/lib/common'
;
...
...
@@ -10,6 +10,7 @@ declare var helpers: any;
describe
(
'InfluxDatasource'
,
function
()
{
var
ctx
=
new
helpers
.
ServiceTestContext
();
beforeEach
(
angularMocks
.
module
(
'grafana.core'
));
beforeEach
(
angularMocks
.
module
(
'grafana.services'
));
beforeEach
(
ctx
.
providePhase
([
'templateSrv'
]));
beforeEach
(
ctx
.
createService
(
'InfluxDatasource_08'
));
...
...
public/app/plugins/datasource/prometheus/specs/datasource_specs.ts
View file @
97697b93
...
...
@@ -6,12 +6,15 @@ import moment = require('moment');
declare
var
helpers
:
any
;
describe
(
'PrometheusDatasource'
,
function
()
{
var
ctx
=
new
helpers
.
ServiceTestContext
();
beforeEach
(
angularMocks
.
module
(
'grafana.core'
));
beforeEach
(
angularMocks
.
module
(
'grafana.services'
));
beforeEach
(
ctx
.
createService
(
'PrometheusDatasource'
));
beforeEach
(
function
()
{
ctx
.
ds
=
new
ctx
.
service
({
url
:
'proxied'
,
directUrl
:
'direct'
,
user
:
'test'
,
password
:
'mupp'
});
});
describe
(
'When querying prometheus with one target using query editor target spec'
,
function
()
{
var
results
;
var
urlExpected
=
'proxied/api/v1/query_range?query='
+
...
...
public/test/
specs/
core/time_series_specs.js
→
public/test/core/time_series_specs.js
View file @
97697b93
File moved
public/test/
specs/
core/utils/datemath_specs.ts
→
public/test/core/utils/datemath_specs.ts
View file @
97697b93
File moved
public/test/
specs/
core/utils/rangeutil_specs.ts
→
public/test/core/utils/rangeutil_specs.ts
View file @
97697b93
File moved
public/test/specs/kairosdb-datasource-specs.js
View file @
97697b93
...
...
@@ -7,9 +7,12 @@ define([
describe
(
'KairosDBDatasource'
,
function
()
{
var
ctx
=
new
helpers
.
ServiceTestContext
();
beforeEach
(
module
(
'grafana.core'
));
beforeEach
(
module
(
'grafana.services'
));
beforeEach
(
ctx
.
providePhase
([
'templateSrv'
]));
beforeEach
(
ctx
.
createService
(
'KairosDBDatasource'
));
beforeEach
(
function
()
{
ctx
.
ds
=
new
ctx
.
service
({
url
:
''
});
});
...
...
public/test/specs/linkSrv-specs.js
View file @
97697b93
...
...
@@ -7,6 +7,7 @@ define([
describe
(
'linkSrv'
,
function
()
{
var
_linkSrv
;
beforeEach
(
module
(
'grafana.core'
));
beforeEach
(
module
(
'grafana.services'
));
beforeEach
(
inject
(
function
(
linkSrv
)
{
...
...
public/test/specs/opentsdbDatasource-specs.js
View file @
97697b93
...
...
@@ -7,6 +7,7 @@ define([
describe
(
'opentsdb'
,
function
()
{
var
ctx
=
new
helpers
.
ServiceTestContext
();
beforeEach
(
module
(
'grafana.core'
));
beforeEach
(
module
(
'grafana.services'
));
beforeEach
(
ctx
.
providePhase
([
'backendSrv'
]));
...
...
public/test/specs/time
Srv-
specs.js
→
public/test/specs/time
_srv_
specs.js
View file @
97697b93
define
([
'
..
/mocks/dashboard-mock'
,
'
.
/helpers'
,
'
test
/mocks/dashboard-mock'
,
'
test/specs
/helpers'
,
'lodash'
,
'moment'
,
'app/services/timer'
,
'app/
core/
services/timer'
,
'app/features/dashboard/timeSrv'
],
function
(
dashboardMock
,
helpers
,
_
,
moment
)
{
'use strict'
;
...
...
@@ -12,6 +12,7 @@ define([
var
ctx
=
new
helpers
.
ServiceTestContext
();
var
_dashboard
;
beforeEach
(
module
(
'grafana.core'
));
beforeEach
(
module
(
'grafana.services'
));
beforeEach
(
ctx
.
providePhase
([
'$routeParams'
]));
beforeEach
(
ctx
.
createService
(
'timeSrv'
));
...
...
tasks/options/requirejs.js
View file @
97697b93
...
...
@@ -51,9 +51,7 @@ module.exports = function(config,grunt) {
'angular-strap'
,
'angular-dragdrop'
,
'app/core/core'
,
'app/services/all'
,
'app/features/all'
,
'app/controllers/all'
,
// bundle the datasources
'app/plugins/datasource/grafana/datasource'
,
'app/plugins/datasource/graphite/datasource'
,
...
...
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