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
23abf044
Commit
23abf044
authored
Jun 14, 2018
by
Tobias Skarhed
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix PR feedback
parent
a3552a60
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
81 additions
and
81 deletions
+81
-81
public/app/features/dashboard/specs/exporter.jest.ts
+81
-81
No files found.
public/app/features/dashboard/specs/exporter.jest.ts
View file @
23abf044
...
...
@@ -14,61 +14,61 @@ describe('given dashboard with repeated panels', () => {
beforeEach
(
done
=>
{
dash
=
{
templating
:
{
list
:
[]
},
annotations
:
{
list
:
[]
},
templating
:
{
list
:
[
{
name
:
'apps'
,
type
:
'query'
,
datasource
:
'gfdb'
,
current
:
{
value
:
'Asd'
,
text
:
'Asd'
},
options
:
[{
value
:
'Asd'
,
text
:
'Asd'
}],
},
{
name
:
'prefix'
,
type
:
'constant'
,
current
:
{
value
:
'collectd'
,
text
:
'collectd'
},
options
:
[],
},
{
name
:
'ds'
,
type
:
'datasource'
,
query
:
'testdb'
,
current
:
{
value
:
'prod'
,
text
:
'prod'
},
options
:
[],
},
],
},
annotations
:
{
list
:
[
{
name
:
'logs'
,
datasource
:
'gfdb'
,
},
],
},
panels
:
[
{
id
:
6
,
datasource
:
'gfdb'
,
type
:
'graph'
},
{
id
:
7
},
{
id
:
8
,
datasource
:
'-- Mixed --'
,
targets
:
[{
datasource
:
'other'
}],
},
{
id
:
9
,
datasource
:
'$ds'
},
{
id
:
2
,
repeat
:
'apps'
,
datasource
:
'gfdb'
,
type
:
'graph'
,
},
{
id
:
3
,
repeat
:
null
,
repeatPanelId
:
2
},
],
};
config
.
buildInfo
=
{
version
:
'3.0.2'
,
};
dash
.
templating
.
list
.
push
({
name
:
'apps'
,
type
:
'query'
,
datasource
:
'gfdb'
,
current
:
{
value
:
'Asd'
,
text
:
'Asd'
},
options
:
[{
value
:
'Asd'
,
text
:
'Asd'
}],
});
dash
.
templating
.
list
.
push
({
name
:
'prefix'
,
type
:
'constant'
,
current
:
{
value
:
'collectd'
,
text
:
'collectd'
},
options
:
[],
});
dash
.
templating
.
list
.
push
({
name
:
'ds'
,
type
:
'datasource'
,
query
:
'testdb'
,
current
:
{
value
:
'prod'
,
text
:
'prod'
},
options
:
[],
});
dash
.
annotations
.
list
.
push
({
name
:
'logs'
,
datasource
:
'gfdb'
,
});
dash
.
panels
=
[
{
id
:
6
,
datasource
:
'gfdb'
,
type
:
'graph'
},
{
id
:
7
},
{
id
:
8
,
datasource
:
'-- Mixed --'
,
targets
:
[{
datasource
:
'other'
}],
},
{
id
:
9
,
datasource
:
'$ds'
},
];
dash
.
panels
.
push
({
id
:
2
,
repeat
:
'apps'
,
datasource
:
'gfdb'
,
type
:
'graph'
,
});
dash
.
panels
.
push
({
id
:
3
,
repeat
:
null
,
repeatPanelId
:
2
});
//Stubs test function calls
var
datasourceSrvStub
=
{
get
:
jest
.
fn
(
arg
=>
getStub
(
arg
))
};
...
...
@@ -157,38 +157,38 @@ describe('given dashboard with repeated panels', () => {
});
});
function
getStub
(
arg
)
{
// Stub responses
var
stubs
=
[];
stubs
[
'gfdb'
]
=
{
name
:
'gfdb'
,
meta
:
{
id
:
'testdb'
,
info
:
{
version
:
'1.2.1'
},
name
:
'TestDB'
},
};
stubs
[
'other'
]
=
{
name
:
'other'
,
meta
:
{
id
:
'other'
,
info
:
{
version
:
'1.2.1'
},
name
:
'OtherDB'
},
};
stubs
[
'-- Mixed --'
]
=
{
name
:
'mixed'
,
meta
:
{
id
:
'mixed'
,
info
:
{
version
:
'1.2.1'
},
name
:
'Mixed'
,
builtIn
:
true
,
},
};
stubs
[
'-- Grafana --'
]
=
{
name
:
'-- Grafana --'
,
meta
:
{
id
:
'grafana'
,
info
:
{
version
:
'1.2.1'
},
name
:
'grafana'
,
builtIn
:
true
,
},
};
// Stub responses
var
stubs
=
[];
stubs
[
'gfdb'
]
=
{
name
:
'gfdb'
,
meta
:
{
id
:
'testdb'
,
info
:
{
version
:
'1.2.1'
},
name
:
'TestDB'
},
};
stubs
[
'other'
]
=
{
name
:
'other'
,
meta
:
{
id
:
'other'
,
info
:
{
version
:
'1.2.1'
},
name
:
'OtherDB'
},
};
stubs
[
'-- Mixed --'
]
=
{
name
:
'mixed'
,
meta
:
{
id
:
'mixed'
,
info
:
{
version
:
'1.2.1'
},
name
:
'Mixed'
,
builtIn
:
true
,
},
};
stubs
[
'-- Grafana --'
]
=
{
name
:
'-- Grafana --'
,
meta
:
{
id
:
'grafana'
,
info
:
{
version
:
'1.2.1'
},
name
:
'grafana'
,
builtIn
:
true
,
},
};
function
getStub
(
arg
)
{
return
Promise
.
resolve
(
stubs
[
arg
]);
}
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