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
6f1a6d5a
Commit
6f1a6d5a
authored
Sep 24, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changed name of emitAppEvent to just appEvent
parent
69e80fd1
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
23 additions
and
23 deletions
+23
-23
src/app/controllers/dashboardCtrl.js
+2
-2
src/app/controllers/dashboardNavCtrl.js
+6
-6
src/app/controllers/grafanaCtrl.js
+1
-1
src/app/controllers/search.js
+2
-2
src/app/directives/dashEditLink.js
+1
-1
src/app/panels/timepicker/module.js
+1
-1
src/app/services/alertSrv.js
+1
-1
src/app/services/dashboard/dashboardKeyBindings.js
+4
-4
src/app/services/panelSrv.js
+3
-3
src/app/services/timeSrv.js
+1
-1
src/test/specs/helpers.js
+1
-1
No files found.
src/app/controllers/dashboardCtrl.js
View file @
6f1a6d5a
...
...
@@ -58,7 +58,7 @@ function (angular, $, config, _) {
$scope
.
setWindowTitleAndTheme
();
$scope
.
emitA
ppEvent
(
"dashboard-loaded"
,
$scope
.
dashboard
);
$scope
.
a
ppEvent
(
"dashboard-loaded"
,
$scope
.
dashboard
);
};
$scope
.
setWindowTitleAndTheme
=
function
()
{
...
...
@@ -113,7 +113,7 @@ function (angular, $, config, _) {
var
editScope
=
$rootScope
.
$new
();
editScope
.
object
=
options
.
object
;
editScope
.
updateHandler
=
options
.
updateHandler
;
$scope
.
emitA
ppEvent
(
'show-dash-editor'
,
{
src
:
'app/partials/edit_json.html'
,
scope
:
editScope
});
$scope
.
a
ppEvent
(
'show-dash-editor'
,
{
src
:
'app/partials/edit_json.html'
,
scope
:
editScope
});
};
$scope
.
checkFeatureToggles
=
function
()
{
...
...
src/app/controllers/dashboardNavCtrl.js
View file @
6f1a6d5a
...
...
@@ -69,7 +69,7 @@ function (angular, _, moment, config, store) {
};
$scope
.
openSearch
=
function
()
{
$scope
.
emitA
ppEvent
(
'show-dash-editor'
,
{
src
:
'app/partials/search.html'
});
$scope
.
a
ppEvent
(
'show-dash-editor'
,
{
src
:
'app/partials/search.html'
});
};
$scope
.
saveDashboard
=
function
()
{
...
...
@@ -88,7 +88,7 @@ function (angular, _, moment, config, store) {
$rootScope
.
$emit
(
'dashboard-saved'
,
$scope
.
dashboard
);
},
function
(
err
)
{
$scope
.
emitA
ppEvent
(
'alert-error'
,
[
'Save failed'
,
err
]);
$scope
.
a
ppEvent
(
'alert-error'
,
[
'Save failed'
,
err
]);
});
};
...
...
@@ -101,9 +101,9 @@ function (angular, _, moment, config, store) {
var
id
=
options
.
id
;
$scope
.
db
.
deleteDashboard
(
id
).
then
(
function
(
id
)
{
alertSrv
.
set
(
'Dashboard Deleted'
,
id
+
' has been deleted'
,
'success'
,
5000
);
},
function
()
{
alertSrv
.
set
(
'Dashboard Not Deleted'
,
'An error occurred deleting the dashboard'
,
'error'
,
5000
);
$scope
.
appEvent
(
'alert-success'
,
[
'Dashboard Deleted'
,
id
+
' has been deleted'
]
);
},
function
(
err
)
{
$scope
.
appEvent
(
'alert-error'
,
[
'Deleted failed'
,
err
]
);
});
};
...
...
@@ -138,7 +138,7 @@ function (angular, _, moment, config, store) {
};
$scope
.
editJson
=
function
()
{
$scope
.
emitA
ppEvent
(
'show-json-editor'
,
{
object
:
$scope
.
dashboard
});
$scope
.
a
ppEvent
(
'show-json-editor'
,
{
object
:
$scope
.
dashboard
});
};
$scope
.
openSaveDropdown
=
function
()
{
...
...
src/app/controllers/grafanaCtrl.js
View file @
6f1a6d5a
...
...
@@ -41,7 +41,7 @@ function (angular, config, _, $, store) {
this
.
$on
(
'$destroy'
,
unbind
);
};
$rootScope
.
emitA
ppEvent
=
function
(
name
,
payload
)
{
$rootScope
.
a
ppEvent
=
function
(
name
,
payload
)
{
$rootScope
.
$emit
(
name
,
payload
);
};
...
...
src/app/controllers/search.js
View file @
6f1a6d5a
...
...
@@ -29,7 +29,7 @@ function (angular, _, config, $) {
$scope
.
keyDown
=
function
(
evt
)
{
if
(
evt
.
keyCode
===
27
)
{
$scope
.
emitA
ppEvent
(
'hide-dash-editor'
);
$scope
.
a
ppEvent
(
'hide-dash-editor'
);
}
if
(
evt
.
keyCode
===
40
)
{
$scope
.
moveSelection
(
1
);
...
...
@@ -121,7 +121,7 @@ function (angular, _, config, $) {
$scope
.
deleteDashboard
=
function
(
dash
,
evt
)
{
evt
.
stopPropagation
();
$scope
.
emitA
ppEvent
(
'delete-dashboard'
,
{
id
:
dash
.
id
,
title
:
dash
.
title
});
$scope
.
a
ppEvent
(
'delete-dashboard'
,
{
id
:
dash
.
id
,
title
:
dash
.
title
});
$scope
.
results
.
dashboards
=
_
.
without
(
$scope
.
results
.
dashboards
,
dash
);
};
...
...
src/app/directives/dashEditLink.js
View file @
6f1a6d5a
...
...
@@ -16,7 +16,7 @@ function (angular, $) {
elem
.
bind
(
'click'
,
function
()
{
$timeout
(
function
()
{
var
editorScope
=
attrs
.
editorScope
===
'isolated'
?
null
:
scope
;
scope
.
emitA
ppEvent
(
'show-dash-editor'
,
{
src
:
partial
,
scope
:
editorScope
});
scope
.
a
ppEvent
(
'show-dash-editor'
,
{
src
:
partial
,
scope
:
editorScope
});
});
});
}
...
...
src/app/panels/timepicker/module.js
View file @
6f1a6d5a
...
...
@@ -79,7 +79,7 @@ function (angular, app, _, moment, kbn) {
$scope
.
temptime
.
to
.
date
=
moment
(
$scope
.
temptime
.
to
.
date
).
add
(
'days'
,
1
).
toDate
();
}
$scope
.
emitA
ppEvent
(
'show-dash-editor'
,
{
src
:
'app/panels/timepicker/custom.html'
,
scope
:
$scope
});
$scope
.
a
ppEvent
(
'show-dash-editor'
,
{
src
:
'app/panels/timepicker/custom.html'
,
scope
:
$scope
});
};
// Constantly validate the input of the fields. This function does not change any date variables
...
...
src/app/services/alertSrv.js
View file @
6f1a6d5a
...
...
@@ -18,7 +18,7 @@ function (angular, _) {
self
.
set
(
alert
[
0
],
alert
[
1
],
'warning'
,
5000
);
});
$rootScope
.
onAppEvent
(
'alert-success'
,
function
(
e
,
alert
)
{
self
.
set
(
alert
[
0
],
alert
[
0
],
'success'
,
3000
);
self
.
set
(
alert
[
0
],
alert
[
1
],
'success'
,
3000
);
});
};
...
...
src/app/services/dashboard/dashboardKeyBindings.js
View file @
6f1a6d5a
...
...
@@ -22,7 +22,7 @@ function(angular, $) {
});
keyboardManager
.
bind
(
'ctrl+f'
,
function
()
{
scope
.
emitA
ppEvent
(
'show-dash-editor'
,
{
src
:
'app/partials/search.html'
});
scope
.
a
ppEvent
(
'show-dash-editor'
,
{
src
:
'app/partials/search.html'
});
},
{
inputDisabled
:
true
});
keyboardManager
.
bind
(
'ctrl+h'
,
function
()
{
...
...
@@ -31,7 +31,7 @@ function(angular, $) {
},
{
inputDisabled
:
true
});
keyboardManager
.
bind
(
'ctrl+s'
,
function
(
evt
)
{
scope
.
emitA
ppEvent
(
'save-dashboard'
,
evt
);
scope
.
a
ppEvent
(
'save-dashboard'
,
evt
);
},
{
inputDisabled
:
true
});
keyboardManager
.
bind
(
'ctrl+r'
,
function
()
{
...
...
@@ -39,7 +39,7 @@ function(angular, $) {
},
{
inputDisabled
:
true
});
keyboardManager
.
bind
(
'ctrl+z'
,
function
(
evt
)
{
scope
.
emitA
ppEvent
(
'zoom-out'
,
evt
);
scope
.
a
ppEvent
(
'zoom-out'
,
evt
);
},
{
inputDisabled
:
true
});
keyboardManager
.
bind
(
'esc'
,
function
()
{
...
...
@@ -53,7 +53,7 @@ function(angular, $) {
modalData
.
$scope
.
dismiss
();
}
scope
.
emitA
ppEvent
(
'hide-dash-editor'
);
scope
.
a
ppEvent
(
'hide-dash-editor'
);
scope
.
exitFullscreen
();
},
{
inputDisabled
:
true
});
...
...
src/app/services/panelSrv.js
View file @
6f1a6d5a
...
...
@@ -52,19 +52,19 @@ function (angular, _) {
$scope
.
toggleFullscreen
(
true
);
}
else
{
$scope
.
emitA
ppEvent
(
'show-dash-editor'
,
{
src
:
'app/partials/paneleditor.html'
,
scope
:
$scope
});
$scope
.
a
ppEvent
(
'show-dash-editor'
,
{
src
:
'app/partials/paneleditor.html'
,
scope
:
$scope
});
}
};
$scope
.
sharePanel
=
function
()
{
$scope
.
emitA
ppEvent
(
'show-modal'
,
{
$scope
.
a
ppEvent
(
'show-modal'
,
{
src
:
'./app/partials/share-panel.html'
,
scope
:
$scope
.
$new
()
});
};
$scope
.
editPanelJson
=
function
()
{
$scope
.
emitA
ppEvent
(
'show-json-editor'
,
{
object
:
$scope
.
panel
,
updateHandler
:
$scope
.
replacePanel
});
$scope
.
a
ppEvent
(
'show-json-editor'
,
{
object
:
$scope
.
panel
,
updateHandler
:
$scope
.
replacePanel
});
};
$scope
.
updateColumnSpan
=
function
(
span
)
{
...
...
src/app/services/timeSrv.js
View file @
6f1a6d5a
...
...
@@ -91,7 +91,7 @@ define([
this
.
old_refresh
=
null
;
}
$rootScope
.
emitA
ppEvent
(
'time-range-changed'
,
this
.
time
);
$rootScope
.
a
ppEvent
(
'time-range-changed'
,
this
.
time
);
$timeout
(
this
.
refreshDashboard
,
0
);
};
...
...
src/test/specs/helpers.js
View file @
6f1a6d5a
...
...
@@ -68,7 +68,7 @@ define([
self
.
$httpBackend
=
$httpBackend
;
self
.
$rootScope
.
onAppEvent
=
function
()
{};
self
.
$rootScope
.
emitA
ppEvent
=
function
()
{};
self
.
$rootScope
.
a
ppEvent
=
function
()
{};
self
.
service
=
$injector
.
get
(
name
);
});
...
...
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