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
dee0e5fc
Commit
dee0e5fc
authored
Aug 13, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
final fixes for fullscreen url state, #672
parent
56269758
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
11 additions
and
0 deletions
+11
-0
src/app/controllers/dashLoader.js
+1
-0
src/app/controllers/search.js
+1
-0
src/app/services/dashboard/dashboardSrv.js
+0
-0
src/app/services/dashboard/dashboardViewStateSrv.js
+1
-0
src/app/services/playlistSrv.js
+1
-0
src/app/services/unsavedChangesSrv.js
+7
-0
No files found.
src/app/controllers/dashLoader.js
View file @
dee0e5fc
...
...
@@ -75,6 +75,7 @@ function (angular, _, moment, config) {
.
then
(
function
(
result
)
{
alertSrv
.
set
(
'Dashboard Saved'
,
'Dashboard has been saved as "'
+
result
.
title
+
'"'
,
'success'
,
5000
);
$location
.
search
({});
$location
.
path
(
result
.
url
);
$rootScope
.
$emit
(
'dashboard-saved'
,
$scope
.
dashboard
);
...
...
src/app/controllers/search.js
View file @
dee0e5fc
...
...
@@ -41,6 +41,7 @@ function (angular, _, config, $) {
var
selectedDash
=
$scope
.
results
.
dashboards
[
$scope
.
selectedIndex
];
if
(
selectedDash
)
{
$location
.
search
({});
$location
.
path
(
"/dashboard/db/"
+
selectedDash
.
id
);
setTimeout
(
function
()
{
$
(
'body'
).
click
();
// hack to force dropdown to close;
...
...
src/app/services/dashboard/dashboardSrv.js
View file @
dee0e5fc
src/app/services/dashboard/dashboardViewStateSrv.js
View file @
dee0e5fc
...
...
@@ -25,6 +25,7 @@ function (angular, _, $) {
$scope
.
onAppEvent
(
'$routeUpdate'
,
function
()
{
var
urlState
=
self
.
getQueryStringState
();
console
.
log
(
"route updated!"
);
if
(
self
.
needsSync
(
urlState
))
{
self
.
update
(
urlState
,
true
);
}
...
...
src/app/services/playlistSrv.js
View file @
dee0e5fc
...
...
@@ -68,6 +68,7 @@ function (angular, _, kbn) {
timerInstance
=
setInterval
(
function
()
{
$rootScope
.
$apply
(
function
()
{
angular
.
element
(
window
).
unbind
(
'resize'
);
$location
.
search
({});
$location
.
path
(
dashboards
[
index
%
dashboards
.
length
].
url
);
index
++
;
});
...
...
src/app/services/unsavedChangesSrv.js
View file @
dee0e5fc
...
...
@@ -28,10 +28,12 @@ function(angular, _, config) {
$rootScope
.
$on
(
"dashboard-saved"
,
function
(
event
,
savedDashboard
)
{
self
.
original
=
angular
.
copy
(
savedDashboard
);
self
.
current
=
savedDashboard
;
self
.
orignalPath
=
$location
.
path
();
});
$rootScope
.
$on
(
"$routeChangeSuccess"
,
function
()
{
self
.
original
=
null
;
self
.
originalPath
=
$location
.
path
();
});
window
.
onbeforeunload
=
function
()
{
...
...
@@ -42,6 +44,11 @@ function(angular, _, config) {
this
.
init
=
function
()
{
$rootScope
.
$on
(
"$locationChangeStart"
,
function
(
event
,
next
)
{
if
(
self
.
originalPath
===
$location
.
path
())
{
console
.
log
(
"skipping"
);
return
;
}
if
(
self
.
has_unsaved_changes
())
{
event
.
preventDefault
();
self
.
next
=
next
;
...
...
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