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
fc2a0691
Commit
fc2a0691
authored
May 25, 2016
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(export): fixed refactoring issue with dynamic dashbord srv
parent
39240713
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
26 deletions
+5
-26
public/app/features/dashboard/dashboard_ctrl.ts
+3
-4
public/app/features/dashboard/dynamic_dashboard_srv.ts
+2
-0
public/app/features/dashboard/export/export_modal.html
+0
-20
public/app/features/dashboard/submenu/submenu.ts
+0
-2
No files found.
public/app/features/dashboard/dashboard_ctrl.ts
View file @
fc2a0691
...
...
@@ -6,7 +6,6 @@ import moment from 'moment';
import
_
from
'lodash'
;
import
coreModule
from
'app/core/core_module'
;
import
{
DynamicDashboardSrv
}
from
'./dynamic_dashboard_srv'
;
export
class
DashboardCtrl
{
...
...
@@ -19,13 +18,13 @@ export class DashboardCtrl {
templateValuesSrv
,
dashboardSrv
,
unsavedChangesSrv
,
dynamicDashboardSrv
,
dashboardViewStateSrv
,
contextSrv
,
$timeout
)
{
$scope
.
editor
=
{
index
:
0
};
$scope
.
panels
=
config
.
panels
;
$scope
.
dynamicDashboardSrv
=
new
DynamicDashboardSrv
();
var
resizeEventTimeout
;
...
...
@@ -43,7 +42,7 @@ export class DashboardCtrl {
// template values service needs to initialize completely before
// the rest of the dashboard can load
templateValuesSrv
.
init
(
dashboard
).
finally
(
function
()
{
$scope
.
dynamicDashboardSrv
.
init
(
dashboard
);
dynamicDashboardSrv
.
init
(
dashboard
);
unsavedChangesSrv
.
init
(
dashboard
,
$scope
);
...
...
@@ -64,7 +63,7 @@ export class DashboardCtrl {
};
$scope
.
templateVariableUpdated
=
function
()
{
$scope
.
dynamicDashboardSrv
.
update
(
$scope
.
dashboard
);
dynamicDashboardSrv
.
update
(
$scope
.
dashboard
);
};
$scope
.
updateSubmenuVisibility
=
function
()
{
...
...
public/app/features/dashboard/dynamic_dashboard_srv.ts
View file @
fc2a0691
...
...
@@ -184,3 +184,5 @@ export class DynamicDashboardSrv {
}
}
coreModule
.
service
(
'dynamicDashboardSrv'
,
DynamicDashboardSrv
);
public/app/features/dashboard/export/export_modal.html
View file @
fc2a0691
...
...
@@ -23,28 +23,8 @@
<i
class=
"fa fa-check"
></i>
</label>
</div>
<div
class=
"gf-form gf-form--grow"
>
<label
class=
"gf-form-label width-8"
>
Description
</label>
<input
type=
"text"
class=
"gf-form-input"
ng-model=
"ctrl.dash.description"
ng-change=
"ctrl.titleChanged()"
>
<label
class=
"gf-form-label text-success"
ng-show=
"ctrl.dash.description"
>
<i
class=
"fa fa-check"
></i>
</label>
</div>
</div>
<!-- <h3 class="section-heading"> -->
<!-- Dashboard data sources -->
<!-- </h3> -->
<!-- -->
<!-- <div class="gf-form-group"> -->
<!-- <div class="gf-form-inline" ng-repeat="input in ctrl.dash.__inputs"> -->
<!-- <div class="gf-form width-25"> -->
<!-- <label class="gf-form-label width-8">Name</label> -->
<!-- <input type="text" class="gf-form-input" ng-model="input.name"> -->
<!-- </div> -->
<!-- </div> -->
<!-- </div> -->
<div
class=
"gf-form-button-row"
>
<button
type=
"button"
class=
"btn gf-form-btn width-10 btn-success"
ng-click=
"ctrl.save()"
>
<i
class=
"fa fa-save"
></i>
Save to file
...
...
public/app/features/dashboard/submenu/submenu.ts
View file @
fc2a0691
...
...
@@ -12,7 +12,6 @@ export class SubmenuCtrl {
constructor
(
private
$rootScope
,
private
templateValuesSrv
,
private
templateSrv
,
private
dynamicDashboardSrv
,
private
$location
)
{
this
.
annotations
=
this
.
dashboard
.
templating
.
list
;
this
.
variables
=
this
.
dashboard
.
templating
.
list
;
...
...
@@ -45,7 +44,6 @@ export class SubmenuCtrl {
variableUpdated
(
variable
)
{
this
.
templateValuesSrv
.
variableUpdated
(
variable
).
then
(()
=>
{
this
.
dynamicDashboardSrv
.
update
(
this
.
dashboard
);
this
.
updateUrlParamsWithCurrentVariables
();
this
.
$rootScope
.
$emit
(
'template-variable-value-updated'
);
this
.
$rootScope
.
$broadcast
(
'refresh'
);
...
...
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