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
4822d027
Commit
4822d027
authored
May 12, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Things are starting to work again
parent
35cc0a1c
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
6 additions
and
94 deletions
+6
-94
public/app/directives/dashUpload.js
+1
-1
public/app/features/dashboard/shareModalCtrl.js
+2
-3
public/app/features/panel/soloPanelCtrl.js
+2
-15
public/app/partials/search.html
+1
-1
public/test/specs/soloPanelCtrl-specs.js
+0
-73
public/test/test-main.js
+0
-1
No files found.
public/app/directives/dashUpload.js
View file @
4822d027
...
...
@@ -25,7 +25,7 @@ function (angular, kbn) {
}
var
title
=
kbn
.
slugifyForUrl
(
window
.
grafanaImportDashboard
.
title
);
window
.
grafanaImportDashboard
.
id
=
null
;
$location
.
path
(
'/dashboard
/
import/'
+
title
);
$location
.
path
(
'/dashboard
-
import/'
+
title
);
});
};
};
...
...
public/app/features/dashboard/shareModalCtrl.js
View file @
4822d027
...
...
@@ -71,12 +71,11 @@ function (angular, _, require, config) {
$scope
.
shareUrl
=
linkSrv
.
addParamsToUrl
(
baseUrl
,
params
);
var
soloUrl
=
$scope
.
shareUrl
;
soloUrl
=
soloUrl
.
replace
(
'/dashboard/db/'
,
'/dashboard/solo/db/'
);
soloUrl
=
soloUrl
.
replace
(
'/dashboard/snapshot/'
,
'/dashboard/solo/snapshot/'
);
soloUrl
=
soloUrl
.
replace
(
'/dashboard/'
,
'/dashboard-solo/'
);
$scope
.
iframeHtml
=
'<iframe src="'
+
soloUrl
+
'" width="450" height="200" frameborder="0"></iframe>'
;
$scope
.
imageUrl
=
soloUrl
.
replace
(
'/dashboard
/'
,
'/render/dashboard/
'
);
$scope
.
imageUrl
=
soloUrl
.
replace
(
'/dashboard
'
,
'/render/dashboard
'
);
$scope
.
imageUrl
+=
'&width=1000'
;
$scope
.
imageUrl
+=
'&height=500'
;
};
...
...
public/app/features/panel/soloPanelCtrl.js
View file @
4822d027
...
...
@@ -7,16 +7,7 @@ function (angular, $) {
var
module
=
angular
.
module
(
'grafana.routes'
);
module
.
controller
(
'SoloPanelCtrl'
,
function
(
$scope
,
backendSrv
,
$routeParams
,
dashboardSrv
,
timeSrv
,
$location
,
templateValuesSrv
,
dashboardLoaderSrv
,
contextSrv
)
{
module
.
controller
(
'SoloPanelCtrl'
,
function
(
$scope
,
$routeParams
,
$location
,
dashboardLoaderSrv
,
contextSrv
)
{
var
panelId
;
...
...
@@ -28,7 +19,6 @@ function (angular, $) {
dashboardLoaderSrv
.
loadDashboard
(
$routeParams
.
type
,
$routeParams
.
slug
).
then
(
function
(
result
)
{
$scope
.
initDashboard
(
result
,
$scope
);
});
$scope
.
onAppEvent
(
"dashboard-loaded"
,
$scope
.
initPanelScope
);
...
...
@@ -49,10 +39,7 @@ function (angular, $) {
}
$scope
.
panel
.
span
=
12
;
$scope
.
dashboardViewState
=
{
registerPanel
:
function
()
{
},
state
:
{}};
timeSrv
.
init
(
$scope
.
dashboard
);
templateValuesSrv
.
init
(
$scope
.
dashboard
,
$scope
.
dashboardViewState
);
$scope
.
dashboardViewState
=
{
registerPanel
:
function
()
{
},
state
:
{}};
};
if
(
!
$scope
.
skipAutoInit
)
{
...
...
public/app/partials/search.html
View file @
4822d027
...
...
@@ -67,7 +67,7 @@
<i
class=
"fa fa-plus"
></i>
New
</button>
<a
class=
"btn btn-inverse pull-left"
href=
"
dashboard/import
"
>
<a
class=
"btn btn-inverse pull-left"
href=
"
import/dashboard
"
>
<i
class=
"fa fa-download"
></i>
Import
</a>
...
...
public/test/specs/soloPanelCtrl-specs.js
deleted
100644 → 0
View file @
35cc0a1c
define
([
'helpers'
,
'features/panel/soloPanelCtrl'
,
'features/dashboard/dashboardSrv'
,
],
function
(
helpers
)
{
'use strict'
;
describe
(
'SoloPanelCtrl'
,
function
()
{
var
ctx
=
new
helpers
.
ControllerTestContext
();
var
backendSrv
=
{};
var
routeParams
=
{};
var
search
=
{};
var
contextSrv
=
{
hasRole
:
sinon
.
stub
().
returns
(
true
)
};
beforeEach
(
module
(
'grafana.routes'
));
beforeEach
(
module
(
'grafana.services'
));
beforeEach
(
ctx
.
providePhase
({
$routeParams
:
routeParams
,
contextSrv
:
contextSrv
,
$location
:
{
search
:
function
()
{
return
search
;
}
},
templateValuesSrv
:
{
init
:
sinon
.
stub
()
},
backendSrv
:
backendSrv
}));
beforeEach
(
ctx
.
createControllerPhase
(
'SoloPanelCtrl'
));
describe
(
'setting up solo panel scope'
,
function
()
{
beforeEach
(
function
()
{
var
dashboard
=
{
dashboard
:
{
rows
:
[
{
panels
:
[
{
id
:
23
,
some
:
'prop'
}
]
}
]
},
meta
:
{}
};
routeParams
.
slug
=
"my dash"
;
search
.
panelId
=
23
;
backendSrv
.
getDashboard
=
sinon
.
stub
().
returns
(
ctx
.
$q
.
when
(
dashboard
));
ctx
.
scope
.
init
();
ctx
.
scope
.
$digest
();
});
it
(
'should load dashboard and extract panel and setup panel scope'
,
function
()
{
expect
(
ctx
.
scope
.
panel
.
id
).
to
.
be
(
23
);
expect
(
ctx
.
scope
.
panel
.
some
).
to
.
be
(
'prop'
);
});
it
(
'should hide sidemenu'
,
function
()
{
expect
(
contextSrv
.
sidemenu
).
to
.
be
(
false
);
});
});
});
});
public/test/test-main.js
View file @
4822d027
...
...
@@ -139,7 +139,6 @@ require([
'specs/kbn-format-specs'
,
'specs/dashboardSrv-specs'
,
'specs/dashboardViewStateSrv-specs'
,
'specs/soloPanelCtrl-specs'
,
'specs/singlestat-specs'
,
'specs/dynamicDashboardSrv-specs'
,
'specs/unsavedChangesSrv-specs'
,
...
...
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