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
aafd4a33
Commit
aafd4a33
authored
Jan 31, 2019
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moved dashboard state components to state folder
parent
6663b2fa
Show whitespace changes
Inline
Side-by-side
Showing
50 changed files
with
66 additions
and
66 deletions
+66
-66
public/app/core/services/backend_srv.ts
+1
-1
public/app/features/alerting/AlertTab.tsx
+2
-2
public/app/features/alerting/StateHistory.tsx
+1
-1
public/app/features/alerting/TestRuleResult.test.tsx
+1
-1
public/app/features/alerting/TestRuleResult.tsx
+1
-1
public/app/features/annotations/annotations_srv.ts
+1
-1
public/app/features/dashboard/components/AddPanelWidget/AddPanelWidget.tsx
+2
-2
public/app/features/dashboard/components/DashExportModal/DashboardExporter.test.ts
+1
-1
public/app/features/dashboard/components/DashExportModal/DashboardExporter.ts
+1
-1
public/app/features/dashboard/components/DashNav/DashNavCtrl.ts
+1
-1
public/app/features/dashboard/components/DashboardRow/DashboardRow.test.tsx
+1
-1
public/app/features/dashboard/components/DashboardRow/DashboardRow.tsx
+2
-2
public/app/features/dashboard/components/DashboardSettings/SettingsCtrl.ts
+1
-1
public/app/features/dashboard/components/VersionHistory/HistoryListCtrl.ts
+1
-1
public/app/features/dashboard/components/VersionHistory/HistorySrv.test.ts
+1
-1
public/app/features/dashboard/components/VersionHistory/HistorySrv.ts
+1
-1
public/app/features/dashboard/containers/DashboardCtrl.ts
+1
-1
public/app/features/dashboard/dashgrid/DashboardGrid.tsx
+1
-2
public/app/features/dashboard/dashgrid/DashboardPanel.tsx
+1
-2
public/app/features/dashboard/dashgrid/PanelChrome.tsx
+2
-2
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeader.tsx
+2
-2
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.tsx
+1
-1
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderMenu.tsx
+2
-2
public/app/features/dashboard/dashgrid/PanelResizer.tsx
+1
-1
public/app/features/dashboard/panel_editor/GeneralTab.tsx
+1
-1
public/app/features/dashboard/panel_editor/PanelEditor.tsx
+2
-2
public/app/features/dashboard/panel_editor/QueriesTab.tsx
+2
-2
public/app/features/dashboard/panel_editor/QueryEditorRow.tsx
+1
-1
public/app/features/dashboard/panel_editor/QueryOptions.tsx
+1
-1
public/app/features/dashboard/panel_editor/VisualizationTab.tsx
+2
-2
public/app/features/dashboard/services/ChangeTracker.test.ts
+2
-2
public/app/features/dashboard/services/ChangeTracker.ts
+1
-1
public/app/features/dashboard/services/DashboardSrv.ts
+1
-1
public/app/features/dashboard/services/DashboardViewStateSrv.test.ts
+1
-1
public/app/features/dashboard/services/DashboardViewStateSrv.ts
+1
-1
public/app/features/dashboard/state/DashboardMigrator.test.ts
+2
-2
public/app/features/dashboard/state/DashboardMigrator.ts
+2
-2
public/app/features/dashboard/state/DashboardModel.repeat.test.ts
+1
-1
public/app/features/dashboard/state/DashboardModel.test.ts
+2
-2
public/app/features/dashboard/state/DashboardModel.ts
+2
-2
public/app/features/dashboard/state/PanelModel.test.ts
+1
-1
public/app/features/dashboard/state/PanelModel.ts
+0
-0
public/app/features/dashboard/state/index.ts
+2
-0
public/app/features/dashboard/utils/getPanelMenu.ts
+2
-2
public/app/features/dashboard/utils/panel.ts
+2
-2
public/app/features/panel/specs/metrics_panel_ctrl.test.ts
+1
-1
public/app/features/templating/specs/variable_srv.test.ts
+1
-1
public/app/features/templating/specs/variable_srv_init.test.ts
+1
-1
public/app/features/templating/variable_srv.ts
+1
-1
public/test/specs/helpers.ts
+1
-1
No files found.
public/app/core/services/backend_srv.ts
View file @
aafd4a33
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
coreModule
from
'app/core/core_module'
;
import
coreModule
from
'app/core/core_module'
;
import
appEvents
from
'app/core/app_events'
;
import
appEvents
from
'app/core/app_events'
;
import
{
DashboardModel
}
from
'app/features/dashboard/
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'app/features/dashboard/
state/DashboardM
odel'
;
export
class
BackendSrv
{
export
class
BackendSrv
{
private
inFlightRequests
=
{};
private
inFlightRequests
=
{};
...
...
public/app/features/alerting/AlertTab.tsx
View file @
aafd4a33
...
@@ -12,8 +12,8 @@ import StateHistory from './StateHistory';
...
@@ -12,8 +12,8 @@ import StateHistory from './StateHistory';
import
'app/features/alerting/AlertTabCtrl'
;
import
'app/features/alerting/AlertTabCtrl'
;
// Types
// Types
import
{
DashboardModel
}
from
'../dashboard/
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../dashboard/
state/DashboardM
odel'
;
import
{
PanelModel
}
from
'../dashboard/
panel_m
odel'
;
import
{
PanelModel
}
from
'../dashboard/
state/PanelM
odel'
;
import
{
TestRuleResult
}
from
'./TestRuleResult'
;
import
{
TestRuleResult
}
from
'./TestRuleResult'
;
interface
Props
{
interface
Props
{
...
...
public/app/features/alerting/StateHistory.tsx
View file @
aafd4a33
import
React
,
{
PureComponent
}
from
'react'
;
import
React
,
{
PureComponent
}
from
'react'
;
import
alertDef
from
'./state/alertDef'
;
import
alertDef
from
'./state/alertDef'
;
import
{
getBackendSrv
}
from
'app/core/services/backend_srv'
;
import
{
getBackendSrv
}
from
'app/core/services/backend_srv'
;
import
{
DashboardModel
}
from
'../dashboard/
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../dashboard/
state/DashboardM
odel'
;
import
appEvents
from
'../../core/app_events'
;
import
appEvents
from
'../../core/app_events'
;
interface
Props
{
interface
Props
{
...
...
public/app/features/alerting/TestRuleResult.test.tsx
View file @
aafd4a33
import
React
from
'react'
;
import
React
from
'react'
;
import
{
shallow
}
from
'enzyme'
;
import
{
shallow
}
from
'enzyme'
;
import
{
DashboardModel
}
from
'../dashboard/
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../dashboard/
state/DashboardM
odel'
;
import
{
Props
,
TestRuleResult
}
from
'./TestRuleResult'
;
import
{
Props
,
TestRuleResult
}
from
'./TestRuleResult'
;
jest
.
mock
(
'app/core/services/backend_srv'
,
()
=>
({
jest
.
mock
(
'app/core/services/backend_srv'
,
()
=>
({
...
...
public/app/features/alerting/TestRuleResult.tsx
View file @
aafd4a33
import
React
,
{
PureComponent
}
from
'react'
;
import
React
,
{
PureComponent
}
from
'react'
;
import
{
JSONFormatter
}
from
'app/core/components/JSONFormatter/JSONFormatter'
;
import
{
JSONFormatter
}
from
'app/core/components/JSONFormatter/JSONFormatter'
;
import
{
getBackendSrv
}
from
'app/core/services/backend_srv'
;
import
{
getBackendSrv
}
from
'app/core/services/backend_srv'
;
import
{
DashboardModel
}
from
'../dashboard/
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../dashboard/
state/DashboardM
odel'
;
import
{
LoadingPlaceholder
}
from
'@grafana/ui/src'
;
import
{
LoadingPlaceholder
}
from
'@grafana/ui/src'
;
export
interface
Props
{
export
interface
Props
{
...
...
public/app/features/annotations/annotations_srv.ts
View file @
aafd4a33
...
@@ -10,7 +10,7 @@ import coreModule from 'app/core/core_module';
...
@@ -10,7 +10,7 @@ import coreModule from 'app/core/core_module';
import
{
makeRegions
,
dedupAnnotations
}
from
'./events_processing'
;
import
{
makeRegions
,
dedupAnnotations
}
from
'./events_processing'
;
// Types
// Types
import
{
DashboardModel
}
from
'../dashboard/
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../dashboard/
state/DashboardM
odel'
;
export
class
AnnotationsSrv
{
export
class
AnnotationsSrv
{
globalAnnotationsPromise
:
any
;
globalAnnotationsPromise
:
any
;
...
...
public/app/features/dashboard/components/AddPanelWidget/AddPanelWidget.tsx
View file @
aafd4a33
import
React
from
'react'
;
import
React
from
'react'
;
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
config
from
'app/core/config'
;
import
config
from
'app/core/config'
;
import
{
PanelModel
}
from
'../../
panel_m
odel'
;
import
{
PanelModel
}
from
'../../
state/PanelM
odel'
;
import
{
DashboardModel
}
from
'../../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../../
state/DashboardM
odel'
;
import
store
from
'app/core/store'
;
import
store
from
'app/core/store'
;
import
{
LS_PANEL_COPY_KEY
}
from
'app/core/constants'
;
import
{
LS_PANEL_COPY_KEY
}
from
'app/core/constants'
;
import
{
updateLocation
}
from
'app/core/actions'
;
import
{
updateLocation
}
from
'app/core/actions'
;
...
...
public/app/features/dashboard/components/DashExportModal/DashboardExporter.test.ts
View file @
aafd4a33
...
@@ -7,7 +7,7 @@ jest.mock('app/core/store', () => {
...
@@ -7,7 +7,7 @@ jest.mock('app/core/store', () => {
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
config
from
'app/core/config'
;
import
config
from
'app/core/config'
;
import
{
DashboardExporter
}
from
'./DashboardExporter'
;
import
{
DashboardExporter
}
from
'./DashboardExporter'
;
import
{
DashboardModel
}
from
'../../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../../
state/DashboardM
odel'
;
describe
(
'given dashboard with repeated panels'
,
()
=>
{
describe
(
'given dashboard with repeated panels'
,
()
=>
{
let
dash
,
exported
;
let
dash
,
exported
;
...
...
public/app/features/dashboard/components/DashExportModal/DashboardExporter.ts
View file @
aafd4a33
import
config
from
'app/core/config'
;
import
config
from
'app/core/config'
;
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
{
DashboardModel
}
from
'../../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../../
state/DashboardM
odel'
;
export
class
DashboardExporter
{
export
class
DashboardExporter
{
constructor
(
private
datasourceSrv
)
{}
constructor
(
private
datasourceSrv
)
{}
...
...
public/app/features/dashboard/components/DashNav/DashNavCtrl.ts
View file @
aafd4a33
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
angular
from
'angular'
;
import
angular
from
'angular'
;
import
{
appEvents
,
NavModel
}
from
'app/core/core'
;
import
{
appEvents
,
NavModel
}
from
'app/core/core'
;
import
{
DashboardModel
}
from
'../../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../../
state/DashboardM
odel'
;
export
class
DashNavCtrl
{
export
class
DashNavCtrl
{
dashboard
:
DashboardModel
;
dashboard
:
DashboardModel
;
...
...
public/app/features/dashboard/components/DashboardRow/DashboardRow.test.tsx
View file @
aafd4a33
import
React
from
'react'
;
import
React
from
'react'
;
import
{
shallow
}
from
'enzyme'
;
import
{
shallow
}
from
'enzyme'
;
import
{
DashboardRow
}
from
'./DashboardRow'
;
import
{
DashboardRow
}
from
'./DashboardRow'
;
import
{
PanelModel
}
from
'../../
panel_m
odel'
;
import
{
PanelModel
}
from
'../../
state/PanelM
odel'
;
describe
(
'DashboardRow'
,
()
=>
{
describe
(
'DashboardRow'
,
()
=>
{
let
wrapper
,
panel
,
dashboardMock
;
let
wrapper
,
panel
,
dashboardMock
;
...
...
public/app/features/dashboard/components/DashboardRow/DashboardRow.tsx
View file @
aafd4a33
import
React
from
'react'
;
import
React
from
'react'
;
import
classNames
from
'classnames'
;
import
classNames
from
'classnames'
;
import
{
PanelModel
}
from
'../../
panel_m
odel'
;
import
{
PanelModel
}
from
'../../
state/PanelM
odel'
;
import
{
DashboardModel
}
from
'../../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../../
state/DashboardM
odel'
;
import
templateSrv
from
'app/features/templating/template_srv'
;
import
templateSrv
from
'app/features/templating/template_srv'
;
import
appEvents
from
'app/core/app_events'
;
import
appEvents
from
'app/core/app_events'
;
...
...
public/app/features/dashboard/components/DashboardSettings/SettingsCtrl.ts
View file @
aafd4a33
import
{
coreModule
,
appEvents
,
contextSrv
}
from
'app/core/core'
;
import
{
coreModule
,
appEvents
,
contextSrv
}
from
'app/core/core'
;
import
{
DashboardModel
}
from
'../../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../../
state/DashboardM
odel'
;
import
$
from
'jquery'
;
import
$
from
'jquery'
;
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
angular
from
'angular'
;
import
angular
from
'angular'
;
...
...
public/app/features/dashboard/components/VersionHistory/HistoryListCtrl.ts
View file @
aafd4a33
...
@@ -3,7 +3,7 @@ import angular from 'angular';
...
@@ -3,7 +3,7 @@ import angular from 'angular';
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
locationUtil
from
'app/core/utils/location_util'
;
import
locationUtil
from
'app/core/utils/location_util'
;
import
{
DashboardModel
}
from
'../../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../../
state/DashboardM
odel'
;
import
{
HistoryListOpts
,
RevisionsModel
,
CalculateDiffOptions
,
HistorySrv
}
from
'./HistorySrv'
;
import
{
HistoryListOpts
,
RevisionsModel
,
CalculateDiffOptions
,
HistorySrv
}
from
'./HistorySrv'
;
export
class
HistoryListCtrl
{
export
class
HistoryListCtrl
{
...
...
public/app/features/dashboard/components/VersionHistory/HistorySrv.test.ts
View file @
aafd4a33
import
{
versions
,
restore
}
from
'./__mocks__/history'
;
import
{
versions
,
restore
}
from
'./__mocks__/history'
;
import
{
HistorySrv
}
from
'./HistorySrv'
;
import
{
HistorySrv
}
from
'./HistorySrv'
;
import
{
DashboardModel
}
from
'../../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../../
state/DashboardM
odel'
;
jest
.
mock
(
'app/core/store'
);
jest
.
mock
(
'app/core/store'
);
describe
(
'historySrv'
,
()
=>
{
describe
(
'historySrv'
,
()
=>
{
...
...
public/app/features/dashboard/components/VersionHistory/HistorySrv.ts
View file @
aafd4a33
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
coreModule
from
'app/core/core_module'
;
import
coreModule
from
'app/core/core_module'
;
import
{
DashboardModel
}
from
'../../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../../
state/DashboardM
odel'
;
export
interface
HistoryListOpts
{
export
interface
HistoryListOpts
{
limit
:
number
;
limit
:
number
;
...
...
public/app/features/dashboard/containers/DashboardCtrl.ts
View file @
aafd4a33
...
@@ -8,7 +8,7 @@ import { removePanel } from 'app/features/dashboard/utils/panel';
...
@@ -8,7 +8,7 @@ import { removePanel } from 'app/features/dashboard/utils/panel';
import
{
AnnotationsSrv
}
from
'../../annotations/annotations_srv'
;
import
{
AnnotationsSrv
}
from
'../../annotations/annotations_srv'
;
// Types
// Types
import
{
DashboardModel
}
from
'../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../
state/DashboardM
odel'
;
export
class
DashboardCtrl
{
export
class
DashboardCtrl
{
dashboard
:
DashboardModel
;
dashboard
:
DashboardModel
;
...
...
public/app/features/dashboard/dashgrid/DashboardGrid.tsx
View file @
aafd4a33
...
@@ -3,8 +3,7 @@ import { hot } from 'react-hot-loader';
...
@@ -3,8 +3,7 @@ import { hot } from 'react-hot-loader';
import
ReactGridLayout
,
{
ItemCallback
}
from
'react-grid-layout'
;
import
ReactGridLayout
,
{
ItemCallback
}
from
'react-grid-layout'
;
import
{
GRID_CELL_HEIGHT
,
GRID_CELL_VMARGIN
,
GRID_COLUMN_COUNT
}
from
'app/core/constants'
;
import
{
GRID_CELL_HEIGHT
,
GRID_CELL_VMARGIN
,
GRID_COLUMN_COUNT
}
from
'app/core/constants'
;
import
{
DashboardPanel
}
from
'./DashboardPanel'
;
import
{
DashboardPanel
}
from
'./DashboardPanel'
;
import
{
DashboardModel
}
from
'../dashboard_model'
;
import
{
DashboardModel
,
PanelModel
}
from
'../state'
;
import
{
PanelModel
}
from
'../panel_model'
;
import
classNames
from
'classnames'
;
import
classNames
from
'classnames'
;
import
sizeMe
from
'react-sizeme'
;
import
sizeMe
from
'react-sizeme'
;
...
...
public/app/features/dashboard/dashgrid/DashboardPanel.tsx
View file @
aafd4a33
...
@@ -11,8 +11,7 @@ import { DashboardRow } from '../components/DashboardRow';
...
@@ -11,8 +11,7 @@ import { DashboardRow } from '../components/DashboardRow';
import
{
PanelChrome
}
from
'./PanelChrome'
;
import
{
PanelChrome
}
from
'./PanelChrome'
;
import
{
PanelEditor
}
from
'../panel_editor/PanelEditor'
;
import
{
PanelEditor
}
from
'../panel_editor/PanelEditor'
;
import
{
PanelModel
}
from
'../panel_model'
;
import
{
PanelModel
,
DashboardModel
}
from
'../state'
;
import
{
DashboardModel
}
from
'../dashboard_model'
;
import
{
PanelPlugin
}
from
'app/types'
;
import
{
PanelPlugin
}
from
'app/types'
;
import
{
PanelResizer
}
from
'./PanelResizer'
;
import
{
PanelResizer
}
from
'./PanelResizer'
;
...
...
public/app/features/dashboard/dashgrid/PanelChrome.tsx
View file @
aafd4a33
...
@@ -14,8 +14,8 @@ import { applyPanelTimeOverrides } from 'app/features/dashboard/utils/panel';
...
@@ -14,8 +14,8 @@ import { applyPanelTimeOverrides } from 'app/features/dashboard/utils/panel';
import
{
PANEL_HEADER_HEIGHT
}
from
'app/core/constants'
;
import
{
PANEL_HEADER_HEIGHT
}
from
'app/core/constants'
;
// Types
// Types
import
{
PanelModel
}
from
'../
panel_m
odel'
;
import
{
PanelModel
}
from
'../
state/PanelM
odel'
;
import
{
DashboardModel
}
from
'../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../
state/DashboardM
odel'
;
import
{
PanelPlugin
}
from
'app/types'
;
import
{
PanelPlugin
}
from
'app/types'
;
import
{
TimeRange
}
from
'@grafana/ui'
;
import
{
TimeRange
}
from
'@grafana/ui'
;
...
...
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeader.tsx
View file @
aafd4a33
...
@@ -6,8 +6,8 @@ import PanelHeaderCorner from './PanelHeaderCorner';
...
@@ -6,8 +6,8 @@ import PanelHeaderCorner from './PanelHeaderCorner';
import
{
PanelHeaderMenu
}
from
'./PanelHeaderMenu'
;
import
{
PanelHeaderMenu
}
from
'./PanelHeaderMenu'
;
import
templateSrv
from
'app/features/templating/template_srv'
;
import
templateSrv
from
'app/features/templating/template_srv'
;
import
{
DashboardModel
}
from
'app/features/dashboard/
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'app/features/dashboard/
state/DashboardM
odel'
;
import
{
PanelModel
}
from
'app/features/dashboard/
panel_m
odel'
;
import
{
PanelModel
}
from
'app/features/dashboard/
state/PanelM
odel'
;
import
{
ClickOutsideWrapper
}
from
'app/core/components/ClickOutsideWrapper/ClickOutsideWrapper'
;
import
{
ClickOutsideWrapper
}
from
'app/core/components/ClickOutsideWrapper/ClickOutsideWrapper'
;
export
interface
Props
{
export
interface
Props
{
...
...
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderCorner.tsx
View file @
aafd4a33
import
React
,
{
Component
}
from
'react'
;
import
React
,
{
Component
}
from
'react'
;
import
Remarkable
from
'remarkable'
;
import
Remarkable
from
'remarkable'
;
import
{
Tooltip
}
from
'@grafana/ui'
;
import
{
Tooltip
}
from
'@grafana/ui'
;
import
{
PanelModel
}
from
'app/features/dashboard/
panel_m
odel'
;
import
{
PanelModel
}
from
'app/features/dashboard/
state/PanelM
odel'
;
import
templateSrv
from
'app/features/templating/template_srv'
;
import
templateSrv
from
'app/features/templating/template_srv'
;
import
{
LinkSrv
}
from
'app/features/panel/panellinks/link_srv'
;
import
{
LinkSrv
}
from
'app/features/panel/panellinks/link_srv'
;
import
{
getTimeSrv
,
TimeSrv
}
from
'app/features/dashboard/services/TimeSrv'
;
import
{
getTimeSrv
,
TimeSrv
}
from
'app/features/dashboard/services/TimeSrv'
;
...
...
public/app/features/dashboard/dashgrid/PanelHeader/PanelHeaderMenu.tsx
View file @
aafd4a33
import
React
,
{
PureComponent
}
from
'react'
;
import
React
,
{
PureComponent
}
from
'react'
;
import
{
DashboardModel
}
from
'app/features/dashboard/
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'app/features/dashboard/
state/DashboardM
odel'
;
import
{
PanelModel
}
from
'app/features/dashboard/
panel_m
odel'
;
import
{
PanelModel
}
from
'app/features/dashboard/
state/PanelM
odel'
;
import
{
PanelHeaderMenuItem
}
from
'./PanelHeaderMenuItem'
;
import
{
PanelHeaderMenuItem
}
from
'./PanelHeaderMenuItem'
;
import
{
getPanelMenu
}
from
'app/features/dashboard/utils/getPanelMenu'
;
import
{
getPanelMenu
}
from
'app/features/dashboard/utils/getPanelMenu'
;
import
{
PanelMenuItem
}
from
'@grafana/ui'
;
import
{
PanelMenuItem
}
from
'@grafana/ui'
;
...
...
public/app/features/dashboard/dashgrid/PanelResizer.tsx
View file @
aafd4a33
...
@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
...
@@ -2,7 +2,7 @@ import React, { PureComponent } from 'react';
import
{
throttle
}
from
'lodash'
;
import
{
throttle
}
from
'lodash'
;
import
Draggable
,
{
DraggableEventHandler
}
from
'react-draggable'
;
import
Draggable
,
{
DraggableEventHandler
}
from
'react-draggable'
;
import
{
PanelModel
}
from
'../
panel_m
odel'
;
import
{
PanelModel
}
from
'../
state/PanelM
odel'
;
interface
Props
{
interface
Props
{
isEditing
:
boolean
;
isEditing
:
boolean
;
...
...
public/app/features/dashboard/panel_editor/GeneralTab.tsx
View file @
aafd4a33
...
@@ -3,7 +3,7 @@ import React, { PureComponent } from 'react';
...
@@ -3,7 +3,7 @@ import React, { PureComponent } from 'react';
import
{
getAngularLoader
,
AngularComponent
}
from
'app/core/services/AngularLoader'
;
import
{
getAngularLoader
,
AngularComponent
}
from
'app/core/services/AngularLoader'
;
import
{
EditorTabBody
}
from
'./EditorTabBody'
;
import
{
EditorTabBody
}
from
'./EditorTabBody'
;
import
{
PanelModel
}
from
'../
panel_m
odel'
;
import
{
PanelModel
}
from
'../
state/PanelM
odel'
;
import
'./../../panel/GeneralTabCtrl'
;
import
'./../../panel/GeneralTabCtrl'
;
interface
Props
{
interface
Props
{
...
...
public/app/features/dashboard/panel_editor/PanelEditor.tsx
View file @
aafd4a33
...
@@ -11,8 +11,8 @@ import { store } from 'app/store/store';
...
@@ -11,8 +11,8 @@ import { store } from 'app/store/store';
import
{
updateLocation
}
from
'app/core/actions'
;
import
{
updateLocation
}
from
'app/core/actions'
;
import
{
AngularComponent
}
from
'app/core/services/AngularLoader'
;
import
{
AngularComponent
}
from
'app/core/services/AngularLoader'
;
import
{
PanelModel
}
from
'../
panel_m
odel'
;
import
{
PanelModel
}
from
'../
state/PanelM
odel'
;
import
{
DashboardModel
}
from
'../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../
state/DashboardM
odel'
;
import
{
PanelPlugin
}
from
'app/types/plugins'
;
import
{
PanelPlugin
}
from
'app/types/plugins'
;
import
{
Tooltip
}
from
'@grafana/ui'
;
import
{
Tooltip
}
from
'@grafana/ui'
;
...
...
public/app/features/dashboard/panel_editor/QueriesTab.tsx
View file @
aafd4a33
...
@@ -16,8 +16,8 @@ import { BackendSrv, getBackendSrv } from 'app/core/services/backend_srv';
...
@@ -16,8 +16,8 @@ import { BackendSrv, getBackendSrv } from 'app/core/services/backend_srv';
import
config
from
'app/core/config'
;
import
config
from
'app/core/config'
;
// Types
// Types
import
{
PanelModel
}
from
'../
panel_m
odel'
;
import
{
PanelModel
}
from
'../
state/PanelM
odel'
;
import
{
DashboardModel
}
from
'../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../
state/DashboardM
odel'
;
import
{
DataQuery
,
DataSourceSelectItem
}
from
'@grafana/ui/src/types'
;
import
{
DataQuery
,
DataSourceSelectItem
}
from
'@grafana/ui/src/types'
;
import
{
PluginHelp
}
from
'app/core/components/PluginHelp/PluginHelp'
;
import
{
PluginHelp
}
from
'app/core/components/PluginHelp/PluginHelp'
;
...
...
public/app/features/dashboard/panel_editor/QueryEditorRow.tsx
View file @
aafd4a33
...
@@ -9,7 +9,7 @@ import { AngularComponent, getAngularLoader } from 'app/core/services/AngularLoa
...
@@ -9,7 +9,7 @@ import { AngularComponent, getAngularLoader } from 'app/core/services/AngularLoa
import
{
Emitter
}
from
'app/core/utils/emitter'
;
import
{
Emitter
}
from
'app/core/utils/emitter'
;
// Types
// Types
import
{
PanelModel
}
from
'../
panel_m
odel'
;
import
{
PanelModel
}
from
'../
state/PanelM
odel'
;
import
{
DataQuery
,
DataSourceApi
}
from
'@grafana/ui'
;
import
{
DataQuery
,
DataSourceApi
}
from
'@grafana/ui'
;
interface
Props
{
interface
Props
{
...
...
public/app/features/dashboard/panel_editor/QueryOptions.tsx
View file @
aafd4a33
...
@@ -13,7 +13,7 @@ import DataSourceOption from './DataSourceOption';
...
@@ -13,7 +13,7 @@ import DataSourceOption from './DataSourceOption';
import
{
FormLabel
}
from
'@grafana/ui'
;
import
{
FormLabel
}
from
'@grafana/ui'
;
// Types
// Types
import
{
PanelModel
}
from
'../
panel_m
odel'
;
import
{
PanelModel
}
from
'../
state/PanelM
odel'
;
import
{
DataSourceSelectItem
}
from
'@grafana/ui/src/types'
;
import
{
DataSourceSelectItem
}
from
'@grafana/ui/src/types'
;
import
{
ValidationEvents
}
from
'app/types'
;
import
{
ValidationEvents
}
from
'app/types'
;
...
...
public/app/features/dashboard/panel_editor/VisualizationTab.tsx
View file @
aafd4a33
...
@@ -11,8 +11,8 @@ import { PluginHelp } from 'app/core/components/PluginHelp/PluginHelp';
...
@@ -11,8 +11,8 @@ import { PluginHelp } from 'app/core/components/PluginHelp/PluginHelp';
import
{
FadeIn
}
from
'app/core/components/Animations/FadeIn'
;
import
{
FadeIn
}
from
'app/core/components/Animations/FadeIn'
;
// Types
// Types
import
{
PanelModel
}
from
'../
panel_m
odel'
;
import
{
PanelModel
}
from
'../
state/PanelM
odel'
;
import
{
DashboardModel
}
from
'../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../
state/DashboardM
odel'
;
import
{
PanelPlugin
}
from
'app/types/plugins'
;
import
{
PanelPlugin
}
from
'app/types/plugins'
;
interface
Props
{
interface
Props
{
...
...
public/app/features/dashboard/services/ChangeTracker.test.ts
View file @
aafd4a33
import
{
ChangeTracker
}
from
'./ChangeTracker'
;
import
{
ChangeTracker
}
from
'./ChangeTracker'
;
import
{
contextSrv
}
from
'app/core/services/context_srv'
;
import
{
contextSrv
}
from
'app/core/services/context_srv'
;
import
{
DashboardModel
}
from
'../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../
state/DashboardM
odel'
;
import
{
PanelModel
}
from
'../
panel_m
odel'
;
import
{
PanelModel
}
from
'../
state/PanelM
odel'
;
jest
.
mock
(
'app/core/services/context_srv'
,
()
=>
({
jest
.
mock
(
'app/core/services/context_srv'
,
()
=>
({
contextSrv
:
{
contextSrv
:
{
...
...
public/app/features/dashboard/services/ChangeTracker.ts
View file @
aafd4a33
import
angular
from
'angular'
;
import
angular
from
'angular'
;
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
{
DashboardModel
}
from
'../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../
state/DashboardM
odel'
;
export
class
ChangeTracker
{
export
class
ChangeTracker
{
current
:
any
;
current
:
any
;
...
...
public/app/features/dashboard/services/DashboardSrv.ts
View file @
aafd4a33
import
coreModule
from
'app/core/core_module'
;
import
coreModule
from
'app/core/core_module'
;
import
{
DashboardModel
}
from
'../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../
state/DashboardM
odel'
;
import
locationUtil
from
'app/core/utils/location_util'
;
import
locationUtil
from
'app/core/utils/location_util'
;
export
class
DashboardSrv
{
export
class
DashboardSrv
{
...
...
public/app/features/dashboard/services/DashboardViewStateSrv.test.ts
View file @
aafd4a33
import
config
from
'app/core/config'
;
import
config
from
'app/core/config'
;
import
{
DashboardViewStateSrv
}
from
'./DashboardViewStateSrv'
;
import
{
DashboardViewStateSrv
}
from
'./DashboardViewStateSrv'
;
import
{
DashboardModel
}
from
'../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../
state/DashboardM
odel'
;
describe
(
'when updating view state'
,
()
=>
{
describe
(
'when updating view state'
,
()
=>
{
const
location
=
{
const
location
=
{
...
...
public/app/features/dashboard/services/DashboardViewStateSrv.ts
View file @
aafd4a33
...
@@ -2,7 +2,7 @@ import angular from 'angular';
...
@@ -2,7 +2,7 @@ import angular from 'angular';
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
config
from
'app/core/config'
;
import
config
from
'app/core/config'
;
import
appEvents
from
'app/core/app_events'
;
import
appEvents
from
'app/core/app_events'
;
import
{
DashboardModel
}
from
'../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../
state/DashboardM
odel'
;
// represents the transient view state
// represents the transient view state
// like fullscreen panel & edit
// like fullscreen panel & edit
...
...
public/app/features/dashboard/s
pecs/dashboard_migration
.test.ts
→
public/app/features/dashboard/s
tate/DashboardMigrator
.test.ts
View file @
aafd4a33
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
{
DashboardModel
}
from
'../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../
state/DashboardM
odel'
;
import
{
PanelModel
}
from
'../
panel_m
odel'
;
import
{
PanelModel
}
from
'../
state/PanelM
odel'
;
import
{
GRID_CELL_HEIGHT
,
GRID_CELL_VMARGIN
}
from
'app/core/constants'
;
import
{
GRID_CELL_HEIGHT
,
GRID_CELL_VMARGIN
}
from
'app/core/constants'
;
import
{
expect
}
from
'test/lib/common'
;
import
{
expect
}
from
'test/lib/common'
;
...
...
public/app/features/dashboard/
dashboard_migration
.ts
→
public/app/features/dashboard/
state/DashboardMigrator
.ts
View file @
aafd4a33
...
@@ -7,8 +7,8 @@ import {
...
@@ -7,8 +7,8 @@ import {
MIN_PANEL_HEIGHT
,
MIN_PANEL_HEIGHT
,
DEFAULT_PANEL_SPAN
,
DEFAULT_PANEL_SPAN
,
}
from
'app/core/constants'
;
}
from
'app/core/constants'
;
import
{
PanelModel
}
from
'./
panel_m
odel'
;
import
{
PanelModel
}
from
'./
PanelM
odel'
;
import
{
DashboardModel
}
from
'./
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'./
DashboardM
odel'
;
import
getFactors
from
'app/core/utils/factors'
;
import
getFactors
from
'app/core/utils/factors'
;
export
class
DashboardMigrator
{
export
class
DashboardMigrator
{
...
...
public/app/features/dashboard/s
pecs/
repeat.test.ts
→
public/app/features/dashboard/s
tate/DashboardModel.
repeat.test.ts
View file @
aafd4a33
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
{
DashboardModel
}
from
'../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../
state/DashboardM
odel'
;
import
{
expect
}
from
'test/lib/common'
;
import
{
expect
}
from
'test/lib/common'
;
jest
.
mock
(
'app/core/services/context_srv'
,
()
=>
({}));
jest
.
mock
(
'app/core/services/context_srv'
,
()
=>
({}));
...
...
public/app/features/dashboard/s
pecs/dashboard_m
odel.test.ts
→
public/app/features/dashboard/s
tate/DashboardM
odel.test.ts
View file @
aafd4a33
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
{
DashboardModel
}
from
'../
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../
state/DashboardM
odel'
;
import
{
PanelModel
}
from
'../
panel_m
odel'
;
import
{
PanelModel
}
from
'../
state/PanelM
odel'
;
jest
.
mock
(
'app/core/services/context_srv'
,
()
=>
({}));
jest
.
mock
(
'app/core/services/context_srv'
,
()
=>
({}));
...
...
public/app/features/dashboard/
dashboard_m
odel.ts
→
public/app/features/dashboard/
state/DashboardM
odel.ts
View file @
aafd4a33
...
@@ -7,8 +7,8 @@ import { Emitter } from 'app/core/utils/emitter';
...
@@ -7,8 +7,8 @@ import { Emitter } from 'app/core/utils/emitter';
import
{
contextSrv
}
from
'app/core/services/context_srv'
;
import
{
contextSrv
}
from
'app/core/services/context_srv'
;
import
sortByKeys
from
'app/core/utils/sort_by_keys'
;
import
sortByKeys
from
'app/core/utils/sort_by_keys'
;
import
{
PanelModel
}
from
'./
panel_m
odel'
;
import
{
PanelModel
}
from
'./
PanelM
odel'
;
import
{
DashboardMigrator
}
from
'./
dashboard_migration
'
;
import
{
DashboardMigrator
}
from
'./
DashboardMigrator
'
;
import
{
TimeRange
}
from
'@grafana/ui/src'
;
import
{
TimeRange
}
from
'@grafana/ui/src'
;
export
class
DashboardModel
{
export
class
DashboardModel
{
...
...
public/app/features/dashboard/s
pecs/panel_m
odel.test.ts
→
public/app/features/dashboard/s
tate/PanelM
odel.test.ts
View file @
aafd4a33
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
{
PanelModel
}
from
'../
panel_m
odel'
;
import
{
PanelModel
}
from
'../
state/PanelM
odel'
;
describe
(
'PanelModel'
,
()
=>
{
describe
(
'PanelModel'
,
()
=>
{
describe
(
'when creating new panel model'
,
()
=>
{
describe
(
'when creating new panel model'
,
()
=>
{
...
...
public/app/features/dashboard/
panel_m
odel.ts
→
public/app/features/dashboard/
state/PanelM
odel.ts
View file @
aafd4a33
File moved
public/app/features/dashboard/state/index.ts
0 → 100644
View file @
aafd4a33
export
{
DashboardModel
}
from
'./DashboardModel'
;
export
{
PanelModel
}
from
'./PanelModel'
;
public/app/features/dashboard/utils/getPanelMenu.ts
View file @
aafd4a33
...
@@ -2,8 +2,8 @@ import { updateLocation } from 'app/core/actions';
...
@@ -2,8 +2,8 @@ import { updateLocation } from 'app/core/actions';
import
{
store
}
from
'app/store/store'
;
import
{
store
}
from
'app/store/store'
;
import
{
removePanel
,
duplicatePanel
,
copyPanel
,
editPanelJson
,
sharePanel
}
from
'app/features/dashboard/utils/panel'
;
import
{
removePanel
,
duplicatePanel
,
copyPanel
,
editPanelJson
,
sharePanel
}
from
'app/features/dashboard/utils/panel'
;
import
{
PanelModel
}
from
'app/features/dashboard/
panel_m
odel'
;
import
{
PanelModel
}
from
'app/features/dashboard/
state/PanelM
odel'
;
import
{
DashboardModel
}
from
'app/features/dashboard/
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'app/features/dashboard/
state/DashboardM
odel'
;
import
{
PanelMenuItem
}
from
'@grafana/ui'
;
import
{
PanelMenuItem
}
from
'@grafana/ui'
;
export
const
getPanelMenu
=
(
dashboard
:
DashboardModel
,
panel
:
PanelModel
)
=>
{
export
const
getPanelMenu
=
(
dashboard
:
DashboardModel
,
panel
:
PanelModel
)
=>
{
...
...
public/app/features/dashboard/utils/panel.ts
View file @
aafd4a33
...
@@ -2,8 +2,8 @@
...
@@ -2,8 +2,8 @@
import
store
from
'app/core/store'
;
import
store
from
'app/core/store'
;
// Models
// Models
import
{
DashboardModel
}
from
'app/features/dashboard/
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'app/features/dashboard/
state/DashboardM
odel'
;
import
{
PanelModel
}
from
'app/features/dashboard/
panel_m
odel'
;
import
{
PanelModel
}
from
'app/features/dashboard/
state/PanelM
odel'
;
import
{
TimeRange
}
from
'@grafana/ui'
;
import
{
TimeRange
}
from
'@grafana/ui'
;
// Utils
// Utils
...
...
public/app/features/panel/specs/metrics_panel_ctrl.test.ts
View file @
aafd4a33
...
@@ -11,7 +11,7 @@ jest.mock('app/core/config', () => {
...
@@ -11,7 +11,7 @@ jest.mock('app/core/config', () => {
});
});
import
q
from
'q'
;
import
q
from
'q'
;
import
{
PanelModel
}
from
'app/features/dashboard/
panel_m
odel'
;
import
{
PanelModel
}
from
'app/features/dashboard/
state/PanelM
odel'
;
import
{
MetricsPanelCtrl
}
from
'../metrics_panel_ctrl'
;
import
{
MetricsPanelCtrl
}
from
'../metrics_panel_ctrl'
;
describe
(
'MetricsPanelCtrl'
,
()
=>
{
describe
(
'MetricsPanelCtrl'
,
()
=>
{
...
...
public/app/features/templating/specs/variable_srv.test.ts
View file @
aafd4a33
import
'../all'
;
import
'../all'
;
import
{
VariableSrv
}
from
'../variable_srv'
;
import
{
VariableSrv
}
from
'../variable_srv'
;
import
{
DashboardModel
}
from
'../../dashboard/
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../../dashboard/
state/DashboardM
odel'
;
import
moment
from
'moment'
;
import
moment
from
'moment'
;
import
$q
from
'q'
;
import
$q
from
'q'
;
...
...
public/app/features/templating/specs/variable_srv_init.test.ts
View file @
aafd4a33
...
@@ -2,7 +2,7 @@ import '../all';
...
@@ -2,7 +2,7 @@ import '../all';
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
{
VariableSrv
}
from
'../variable_srv'
;
import
{
VariableSrv
}
from
'../variable_srv'
;
import
{
DashboardModel
}
from
'../../dashboard/
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'../../dashboard/
state/DashboardM
odel'
;
import
$q
from
'q'
;
import
$q
from
'q'
;
describe
(
'VariableSrv init'
,
function
(
this
:
any
)
{
describe
(
'VariableSrv init'
,
function
(
this
:
any
)
{
...
...
public/app/features/templating/variable_srv.ts
View file @
aafd4a33
...
@@ -8,7 +8,7 @@ import { variableTypes } from './variable';
...
@@ -8,7 +8,7 @@ import { variableTypes } from './variable';
import
{
Graph
}
from
'app/core/utils/dag'
;
import
{
Graph
}
from
'app/core/utils/dag'
;
import
{
TemplateSrv
}
from
'app/features/templating/template_srv'
;
import
{
TemplateSrv
}
from
'app/features/templating/template_srv'
;
import
{
TimeSrv
}
from
'app/features/dashboard/services/TimeSrv'
;
import
{
TimeSrv
}
from
'app/features/dashboard/services/TimeSrv'
;
import
{
DashboardModel
}
from
'app/features/dashboard/
dashboard_m
odel'
;
import
{
DashboardModel
}
from
'app/features/dashboard/
state/DashboardM
odel'
;
// Types
// Types
import
{
TimeRange
}
from
'@grafana/ui/src'
;
import
{
TimeRange
}
from
'@grafana/ui/src'
;
...
...
public/test/specs/helpers.ts
View file @
aafd4a33
...
@@ -2,7 +2,7 @@ import _ from 'lodash';
...
@@ -2,7 +2,7 @@ import _ from 'lodash';
import
config
from
'app/core/config'
;
import
config
from
'app/core/config'
;
import
*
as
dateMath
from
'app/core/utils/datemath'
;
import
*
as
dateMath
from
'app/core/utils/datemath'
;
import
{
angularMocks
,
sinon
}
from
'../lib/common'
;
import
{
angularMocks
,
sinon
}
from
'../lib/common'
;
import
{
PanelModel
}
from
'app/features/dashboard/
panel_m
odel'
;
import
{
PanelModel
}
from
'app/features/dashboard/
state/PanelM
odel'
;
export
function
ControllerTestContext
(
this
:
any
)
{
export
function
ControllerTestContext
(
this
:
any
)
{
const
self
=
this
;
const
self
=
this
;
...
...
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