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
3f7aaedd
Commit
3f7aaedd
authored
Apr 12, 2019
by
Hugo Häggmark
Committed by
Torkel Ödegaard
Apr 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Chore: Remove implicit anys for DashboardModel and tests (#16553)
Progress: #14714
parent
c17226af
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
17 deletions
+19
-17
public/app/features/dashboard/state/DashboardModel.test.ts
+17
-16
public/app/features/dashboard/state/DashboardModel.ts
+0
-0
public/app/types/dashboard.ts
+2
-1
No files found.
public/app/features/dashboard/state/DashboardModel.test.ts
View file @
3f7aaedd
// @ts-ignore
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
{
DashboardModel
}
from
'../state/DashboardModel'
;
import
{
DashboardModel
}
from
'../state/DashboardModel'
;
import
{
PanelModel
}
from
'../state/PanelModel'
;
import
{
PanelModel
}
from
'../state/PanelModel'
;
...
@@ -6,7 +7,7 @@ jest.mock('app/core/services/context_srv', () => ({}));
...
@@ -6,7 +7,7 @@ jest.mock('app/core/services/context_srv', () => ({}));
describe
(
'DashboardModel'
,
()
=>
{
describe
(
'DashboardModel'
,
()
=>
{
describe
(
'when creating new dashboard model defaults only'
,
()
=>
{
describe
(
'when creating new dashboard model defaults only'
,
()
=>
{
let
model
;
let
model
:
DashboardModel
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
model
=
new
DashboardModel
({},
{});
model
=
new
DashboardModel
({},
{});
...
@@ -27,7 +28,7 @@ describe('DashboardModel', () => {
...
@@ -27,7 +28,7 @@ describe('DashboardModel', () => {
});
});
describe
(
'when getting next panel id'
,
()
=>
{
describe
(
'when getting next panel id'
,
()
=>
{
let
model
;
let
model
:
DashboardModel
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
model
=
new
DashboardModel
({
model
=
new
DashboardModel
({
...
@@ -69,7 +70,7 @@ describe('DashboardModel', () => {
...
@@ -69,7 +70,7 @@ describe('DashboardModel', () => {
});
});
describe
(
'row and panel manipulation'
,
()
=>
{
describe
(
'row and panel manipulation'
,
()
=>
{
let
dashboard
;
let
dashboard
:
DashboardModel
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
dashboard
=
new
DashboardModel
({});
dashboard
=
new
DashboardModel
({});
...
@@ -112,7 +113,7 @@ describe('DashboardModel', () => {
...
@@ -112,7 +113,7 @@ describe('DashboardModel', () => {
});
});
describe
(
'Given editable false dashboard'
,
()
=>
{
describe
(
'Given editable false dashboard'
,
()
=>
{
let
model
;
let
model
:
DashboardModel
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
model
=
new
DashboardModel
({
editable
:
false
});
model
=
new
DashboardModel
({
editable
:
false
});
...
@@ -130,8 +131,8 @@ describe('DashboardModel', () => {
...
@@ -130,8 +131,8 @@ describe('DashboardModel', () => {
});
});
describe
(
'when loading dashboard with old influxdb query schema'
,
()
=>
{
describe
(
'when loading dashboard with old influxdb query schema'
,
()
=>
{
let
model
;
let
model
:
DashboardModel
;
let
target
;
let
target
:
any
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
model
=
new
DashboardModel
({
model
=
new
DashboardModel
({
...
@@ -197,7 +198,7 @@ describe('DashboardModel', () => {
...
@@ -197,7 +198,7 @@ describe('DashboardModel', () => {
});
});
describe
(
'when creating dashboard model with missing list for annoations or templating'
,
()
=>
{
describe
(
'when creating dashboard model with missing list for annoations or templating'
,
()
=>
{
let
model
;
let
model
:
DashboardModel
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
model
=
new
DashboardModel
({
model
=
new
DashboardModel
({
...
@@ -222,7 +223,7 @@ describe('DashboardModel', () => {
...
@@ -222,7 +223,7 @@ describe('DashboardModel', () => {
});
});
describe
(
'Formatting epoch timestamp when timezone is set as utc'
,
()
=>
{
describe
(
'Formatting epoch timestamp when timezone is set as utc'
,
()
=>
{
let
dashboard
;
let
dashboard
:
DashboardModel
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
dashboard
=
new
DashboardModel
({
timezone
:
'utc'
});
dashboard
=
new
DashboardModel
({
timezone
:
'utc'
});
...
@@ -242,7 +243,7 @@ describe('DashboardModel', () => {
...
@@ -242,7 +243,7 @@ describe('DashboardModel', () => {
});
});
describe
(
'updateSubmenuVisibility with empty lists'
,
()
=>
{
describe
(
'updateSubmenuVisibility with empty lists'
,
()
=>
{
let
model
;
let
model
:
DashboardModel
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
model
=
new
DashboardModel
({});
model
=
new
DashboardModel
({});
...
@@ -255,7 +256,7 @@ describe('DashboardModel', () => {
...
@@ -255,7 +256,7 @@ describe('DashboardModel', () => {
});
});
describe
(
'updateSubmenuVisibility with annotation'
,
()
=>
{
describe
(
'updateSubmenuVisibility with annotation'
,
()
=>
{
let
model
;
let
model
:
DashboardModel
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
model
=
new
DashboardModel
({
model
=
new
DashboardModel
({
...
@@ -272,7 +273,7 @@ describe('DashboardModel', () => {
...
@@ -272,7 +273,7 @@ describe('DashboardModel', () => {
});
});
describe
(
'updateSubmenuVisibility with template var'
,
()
=>
{
describe
(
'updateSubmenuVisibility with template var'
,
()
=>
{
let
model
;
let
model
:
DashboardModel
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
model
=
new
DashboardModel
({
model
=
new
DashboardModel
({
...
@@ -289,7 +290,7 @@ describe('DashboardModel', () => {
...
@@ -289,7 +290,7 @@ describe('DashboardModel', () => {
});
});
describe
(
'updateSubmenuVisibility with hidden template var'
,
()
=>
{
describe
(
'updateSubmenuVisibility with hidden template var'
,
()
=>
{
let
model
;
let
model
:
DashboardModel
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
model
=
new
DashboardModel
({
model
=
new
DashboardModel
({
...
@@ -306,7 +307,7 @@ describe('DashboardModel', () => {
...
@@ -306,7 +307,7 @@ describe('DashboardModel', () => {
});
});
describe
(
'updateSubmenuVisibility with hidden annotation toggle'
,
()
=>
{
describe
(
'updateSubmenuVisibility with hidden annotation toggle'
,
()
=>
{
let
dashboard
;
let
dashboard
:
DashboardModel
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
dashboard
=
new
DashboardModel
({
dashboard
=
new
DashboardModel
({
...
@@ -323,7 +324,7 @@ describe('DashboardModel', () => {
...
@@ -323,7 +324,7 @@ describe('DashboardModel', () => {
});
});
describe
(
'When collapsing row'
,
()
=>
{
describe
(
'When collapsing row'
,
()
=>
{
let
dashboard
;
let
dashboard
:
DashboardModel
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
dashboard
=
new
DashboardModel
({
dashboard
=
new
DashboardModel
({
...
@@ -365,7 +366,7 @@ describe('DashboardModel', () => {
...
@@ -365,7 +366,7 @@ describe('DashboardModel', () => {
});
});
describe
(
'When expanding row'
,
()
=>
{
describe
(
'When expanding row'
,
()
=>
{
let
dashboard
;
let
dashboard
:
DashboardModel
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
dashboard
=
new
DashboardModel
({
dashboard
=
new
DashboardModel
({
...
@@ -637,7 +638,7 @@ describe('DashboardModel', () => {
...
@@ -637,7 +638,7 @@ describe('DashboardModel', () => {
});
});
describe
(
'Given a dashboard with one panel legend on and two off'
,
()
=>
{
describe
(
'Given a dashboard with one panel legend on and two off'
,
()
=>
{
let
model
;
let
model
:
DashboardModel
;
beforeEach
(()
=>
{
beforeEach
(()
=>
{
const
data
=
{
const
data
=
{
...
...
public/app/features/dashboard/state/DashboardModel.ts
View file @
3f7aaedd
This diff is collapsed.
Click to expand it.
public/app/types/dashboard.ts
View file @
3f7aaedd
...
@@ -15,6 +15,7 @@ export interface DashboardDTO {
...
@@ -15,6 +15,7 @@ export interface DashboardDTO {
export
interface
DashboardMeta
{
export
interface
DashboardMeta
{
canSave
?:
boolean
;
canSave
?:
boolean
;
canEdit
?:
boolean
;
canEdit
?:
boolean
;
canDelete
?:
boolean
;
canShare
?:
boolean
;
canShare
?:
boolean
;
canStar
?:
boolean
;
canStar
?:
boolean
;
canAdmin
?:
boolean
;
canAdmin
?:
boolean
;
...
@@ -25,7 +26,7 @@ export interface DashboardMeta {
...
@@ -25,7 +26,7 @@ export interface DashboardMeta {
canMakeEditable
?:
boolean
;
canMakeEditable
?:
boolean
;
submenuEnabled
?:
boolean
;
submenuEnabled
?:
boolean
;
provisioned
?:
boolean
;
provisioned
?:
boolean
;
focusPanelId
?:
boolean
;
focusPanelId
?:
number
;
isStarred
?:
boolean
;
isStarred
?:
boolean
;
showSettings
?:
boolean
;
showSettings
?:
boolean
;
expires
?:
string
;
expires
?:
string
;
...
...
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