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
a7d62f44
Commit
a7d62f44
authored
Mar 05, 2018
by
bergquist
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ignore iteration property when checking for unsaved changes
closes #11063
parent
1a16e588
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
public/app/features/dashboard/specs/unsaved_changes_srv_specs.ts
+5
-0
public/app/features/dashboard/unsaved_changes_srv.ts
+3
-0
No files found.
public/app/features/dashboard/specs/unsaved_changes_srv_specs.ts
View file @
a7d62f44
...
@@ -66,6 +66,11 @@ describe('unsavedChangesSrv', function() {
...
@@ -66,6 +66,11 @@ describe('unsavedChangesSrv', function() {
expect
(
tracker
.
hasChanges
()).
to
.
be
(
false
);
expect
(
tracker
.
hasChanges
()).
to
.
be
(
false
);
});
});
it
(
'Should ignore .iteration changes'
,
()
=>
{
dash
.
iteration
=
new
Date
().
getTime
()
+
1
;
expect
(
tracker
.
hasChanges
()).
to
.
be
(
false
);
});
it
.
skip
(
'Should ignore row collapse change'
,
function
()
{
it
.
skip
(
'Should ignore row collapse change'
,
function
()
{
dash
.
rows
[
0
].
collapse
=
true
;
dash
.
rows
[
0
].
collapse
=
true
;
expect
(
tracker
.
hasChanges
()).
to
.
be
(
false
);
expect
(
tracker
.
hasChanges
()).
to
.
be
(
false
);
...
...
public/app/features/dashboard/unsaved_changes_srv.ts
View file @
a7d62f44
...
@@ -97,6 +97,9 @@ export class Tracker {
...
@@ -97,6 +97,9 @@ export class Tracker {
dash
.
refresh
=
0
;
dash
.
refresh
=
0
;
dash
.
schemaVersion
=
0
;
dash
.
schemaVersion
=
0
;
// ignore iteration property
delete
dash
.
iteration
;
// filter row and panels properties that should be ignored
// filter row and panels properties that should be ignored
dash
.
rows
=
_
.
filter
(
dash
.
rows
,
function
(
row
)
{
dash
.
rows
=
_
.
filter
(
dash
.
rows
,
function
(
row
)
{
if
(
row
.
repeatRowId
)
{
if
(
row
.
repeatRowId
)
{
...
...
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