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
26385dea
Commit
26385dea
authored
Jan 22, 2019
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Began work on improving structure and organization of components under features/dashboard, #14062
parent
2264c275
Show whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
39 additions
and
57 deletions
+39
-57
public/app/features/dashboard/all.ts
+5
-14
public/app/features/dashboard/components/DashExportModal/DashExportCtrl.ts
+2
-2
public/app/features/dashboard/components/DashExportModal/DashboardExporter.test.ts
+2
-2
public/app/features/dashboard/components/DashExportModal/DashboardExporter.ts
+1
-1
public/app/features/dashboard/components/DashExportModal/index.ts
+2
-0
public/app/features/dashboard/components/DashExportModal/template.html
+0
-0
public/app/features/dashboard/components/DashLinks/DashLinksContainerCtrl.ts
+1
-1
public/app/features/dashboard/components/DashLinks/DashLinksEditorCtrl.ts
+3
-3
public/app/features/dashboard/components/DashLinks/editor.html
+0
-0
public/app/features/dashboard/components/DashLinks/index.ts
+2
-0
public/app/features/dashboard/components/DashNav/DashNavCtrl.ts
+2
-2
public/app/features/dashboard/components/DashNav/index.ts
+1
-0
public/app/features/dashboard/components/DashNav/template.html
+0
-0
public/app/features/dashboard/components/ExportDataModal/ExportDataModalCtrl.ts
+1
-1
public/app/features/dashboard/components/ExportDataModal/index.ts
+1
-0
public/app/features/dashboard/components/ExportDataModal/template.html
+0
-0
public/app/features/dashboard/components/FolderPicker/FolderPickerCtrl.ts
+1
-1
public/app/features/dashboard/components/FolderPicker/index.ts
+1
-0
public/app/features/dashboard/components/FolderPicker/template.html
+0
-0
public/app/features/dashboard/folder_permissions_ctrl.ts
+0
-25
public/app/features/manage-dashboards/CreateFolderCtrl.ts
+0
-0
public/app/features/manage-dashboards/DashboardImportCtrl.test.ts
+2
-2
public/app/features/manage-dashboards/DashboardImportCtrl.ts
+0
-0
public/app/features/manage-dashboards/FolderDashboardsCtrl.ts
+1
-1
public/app/features/manage-dashboards/components/MoveToFolderModal/MoveToFolderCtrl.ts
+1
-1
public/app/features/manage-dashboards/components/MoveToFolderModal/index.ts
+1
-0
public/app/features/manage-dashboards/components/MoveToFolderModal/template.html
+0
-0
public/app/features/manage-dashboards/index.ts
+9
-1
public/app/features/manage-dashboards/services/FolderPageLoader.ts
+0
-0
No files found.
public/app/features/dashboard/all.ts
View file @
26385dea
...
@@ -2,7 +2,6 @@ import './dashboard_ctrl';
...
@@ -2,7 +2,6 @@ import './dashboard_ctrl';
import
'./alerting_srv'
;
import
'./alerting_srv'
;
import
'./history/history'
;
import
'./history/history'
;
import
'./dashboard_loader_srv'
;
import
'./dashboard_loader_srv'
;
import
'./dashnav/dashnav'
;
import
'./submenu/submenu'
;
import
'./submenu/submenu'
;
import
'./save_as_modal'
;
import
'./save_as_modal'
;
import
'./save_modal'
;
import
'./save_modal'
;
...
@@ -17,17 +16,17 @@ import './unsaved_changes_srv';
...
@@ -17,17 +16,17 @@ import './unsaved_changes_srv';
import
'./unsaved_changes_modal'
;
import
'./unsaved_changes_modal'
;
import
'./timepicker/timepicker'
;
import
'./timepicker/timepicker'
;
import
'./upload'
;
import
'./upload'
;
import
'./export/export_modal'
;
import
'./export_data/export_data_modal'
;
import
'./ad_hoc_filters'
;
import
'./ad_hoc_filters'
;
import
'./repeat_option/repeat_option'
;
import
'./repeat_option/repeat_option'
;
import
'./dashgrid/DashboardGridDirective'
;
import
'./dashgrid/DashboardGridDirective'
;
import
'./dashgrid/RowOptions'
;
import
'./dashgrid/RowOptions'
;
import
'./folder_picker/folder_picker'
;
import
'./move_to_folder_modal/move_to_folder'
;
import
'./settings/settings'
;
import
'./settings/settings'
;
import
'./panellinks/module'
;
import
'./panellinks/module'
;
import
'./dashlinks/module'
;
import
'./components/DashLinks'
;
import
'./components/DashExportModal'
;
import
'./components/DashNav'
;
import
'./components/ExportDataModal'
;
import
'./components/FolderPicker'
;
// angular wrappers
// angular wrappers
import
{
react2AngularDirective
}
from
'app/core/utils/react2angular'
;
import
{
react2AngularDirective
}
from
'app/core/utils/react2angular'
;
...
@@ -35,11 +34,3 @@ import DashboardPermissions from './permissions/DashboardPermissions';
...
@@ -35,11 +34,3 @@ import DashboardPermissions from './permissions/DashboardPermissions';
react2AngularDirective
(
'dashboardPermissions'
,
DashboardPermissions
,
[
'dashboardId'
,
'folder'
]);
react2AngularDirective
(
'dashboardPermissions'
,
DashboardPermissions
,
[
'dashboardId'
,
'folder'
]);
import
coreModule
from
'app/core/core_module'
;
import
{
FolderDashboardsCtrl
}
from
'./folder_dashboards_ctrl'
;
import
{
DashboardImportCtrl
}
from
'./dashboard_import_ctrl'
;
import
{
CreateFolderCtrl
}
from
'./create_folder_ctrl'
;
coreModule
.
controller
(
'FolderDashboardsCtrl'
,
FolderDashboardsCtrl
);
coreModule
.
controller
(
'DashboardImportCtrl'
,
DashboardImportCtrl
);
coreModule
.
controller
(
'CreateFolderCtrl'
,
CreateFolderCtrl
);
public/app/features/dashboard/
export/export_moda
l.ts
→
public/app/features/dashboard/
components/DashExportModal/DashExportCtr
l.ts
View file @
26385dea
...
@@ -2,7 +2,7 @@ import angular from 'angular';
...
@@ -2,7 +2,7 @@ import angular from 'angular';
import
{
saveAs
}
from
'file-saver'
;
import
{
saveAs
}
from
'file-saver'
;
import
coreModule
from
'app/core/core_module'
;
import
coreModule
from
'app/core/core_module'
;
import
{
DashboardExporter
}
from
'./
e
xporter'
;
import
{
DashboardExporter
}
from
'./
DashboardE
xporter'
;
export
class
DashExportCtrl
{
export
class
DashExportCtrl
{
dash
:
any
;
dash
:
any
;
...
@@ -66,7 +66,7 @@ export class DashExportCtrl {
...
@@ -66,7 +66,7 @@ export class DashExportCtrl {
export
function
dashExportDirective
()
{
export
function
dashExportDirective
()
{
return
{
return
{
restrict
:
'E'
,
restrict
:
'E'
,
templateUrl
:
'public/app/features/dashboard/
export/export_modal
.html'
,
templateUrl
:
'public/app/features/dashboard/
components/DashExportModal/template
.html'
,
controller
:
DashExportCtrl
,
controller
:
DashExportCtrl
,
bindToController
:
true
,
bindToController
:
true
,
controllerAs
:
'ctrl'
,
controllerAs
:
'ctrl'
,
...
...
public/app/features/dashboard/
specs/e
xporter.test.ts
→
public/app/features/dashboard/
components/DashExportModal/DashboardE
xporter.test.ts
View file @
26385dea
...
@@ -6,8 +6,8 @@ jest.mock('app/core/store', () => {
...
@@ -6,8 +6,8 @@ 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
'.
./export/e
xporter'
;
import
{
DashboardExporter
}
from
'.
/DashboardE
xporter'
;
import
{
DashboardModel
}
from
'../dashboard_model'
;
import
{
DashboardModel
}
from
'../
../
dashboard_model'
;
describe
(
'given dashboard with repeated panels'
,
()
=>
{
describe
(
'given dashboard with repeated panels'
,
()
=>
{
let
dash
,
exported
;
let
dash
,
exported
;
...
...
public/app/features/dashboard/
export/e
xporter.ts
→
public/app/features/dashboard/
components/DashExportModal/DashboardE
xporter.ts
View file @
26385dea
import
config
from
'app/core/config'
;
import
config
from
'app/core/config'
;
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
{
DashboardModel
}
from
'../dashboard_model'
;
import
{
DashboardModel
}
from
'../
../
dashboard_model'
;
export
class
DashboardExporter
{
export
class
DashboardExporter
{
constructor
(
private
datasourceSrv
)
{}
constructor
(
private
datasourceSrv
)
{}
...
...
public/app/features/dashboard/components/DashExportModal/index.ts
0 → 100644
View file @
26385dea
export
{
DashboardExporter
}
from
'./DashboardExporter'
;
export
{
DashExportCtrl
}
from
'./DashExportCtrl'
;
public/app/features/dashboard/
export/export_modal
.html
→
public/app/features/dashboard/
components/DashExportModal/template
.html
View file @
26385dea
File moved
public/app/features/dashboard/
dashlinks/module
.ts
→
public/app/features/dashboard/
components/DashLinks/DashLinksContainerCtrl
.ts
View file @
26385dea
import
angular
from
'angular'
;
import
angular
from
'angular'
;
import
_
from
'lodash'
;
import
_
from
'lodash'
;
import
{
iconMap
}
from
'./
editor
'
;
import
{
iconMap
}
from
'./
DashLinksEditorCtrl
'
;
function
dashLinksContainer
()
{
function
dashLinksContainer
()
{
return
{
return
{
...
...
public/app/features/dashboard/
dashlinks/editor
.ts
→
public/app/features/dashboard/
components/DashLinks/DashLinksEditorCtrl
.ts
View file @
26385dea
...
@@ -11,7 +11,7 @@ export let iconMap = {
...
@@ -11,7 +11,7 @@ export let iconMap = {
cloud
:
'fa-cloud'
,
cloud
:
'fa-cloud'
,
};
};
export
class
DashLinkEditorCtrl
{
export
class
DashLink
s
EditorCtrl
{
dashboard
:
any
;
dashboard
:
any
;
iconMap
:
any
;
iconMap
:
any
;
mode
:
any
;
mode
:
any
;
...
@@ -65,8 +65,8 @@ export class DashLinkEditorCtrl {
...
@@ -65,8 +65,8 @@ export class DashLinkEditorCtrl {
function
dashLinksEditor
()
{
function
dashLinksEditor
()
{
return
{
return
{
restrict
:
'E'
,
restrict
:
'E'
,
controller
:
DashLinkEditorCtrl
,
controller
:
DashLink
s
EditorCtrl
,
templateUrl
:
'public/app/features/dashboard/
dashl
inks/editor.html'
,
templateUrl
:
'public/app/features/dashboard/
components/DashL
inks/editor.html'
,
bindToController
:
true
,
bindToController
:
true
,
controllerAs
:
'ctrl'
,
controllerAs
:
'ctrl'
,
scope
:
{
scope
:
{
...
...
public/app/features/dashboard/
dashl
inks/editor.html
→
public/app/features/dashboard/
components/DashL
inks/editor.html
View file @
26385dea
File moved
public/app/features/dashboard/components/DashLinks/index.ts
0 → 100644
View file @
26385dea
export
{
DashLinksContainerCtrl
}
from
'./DashLinksContainerCtrl'
;
export
{
DashLinksEditorCtrl
}
from
'./DashLinksEditorCtrl'
;
public/app/features/dashboard/
dashnav/dashnav
.ts
→
public/app/features/dashboard/
components/DashNav/DashNavCtrl
.ts
View file @
26385dea
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_model'
;
import
{
DashboardModel
}
from
'../
../
dashboard_model'
;
export
class
DashNavCtrl
{
export
class
DashNavCtrl
{
dashboard
:
DashboardModel
;
dashboard
:
DashboardModel
;
...
@@ -107,7 +107,7 @@ export class DashNavCtrl {
...
@@ -107,7 +107,7 @@ export class DashNavCtrl {
export
function
dashNavDirective
()
{
export
function
dashNavDirective
()
{
return
{
return
{
restrict
:
'E'
,
restrict
:
'E'
,
templateUrl
:
'public/app/features/dashboard/
dashnav/dashnav
.html'
,
templateUrl
:
'public/app/features/dashboard/
components/DashNav/template
.html'
,
controller
:
DashNavCtrl
,
controller
:
DashNavCtrl
,
bindToController
:
true
,
bindToController
:
true
,
controllerAs
:
'ctrl'
,
controllerAs
:
'ctrl'
,
...
...
public/app/features/dashboard/components/DashNav/index.ts
0 → 100644
View file @
26385dea
export
{
DashNavCtrl
}
from
'./DashNavCtrl'
;
public/app/features/dashboard/
dashnav/dashnav
.html
→
public/app/features/dashboard/
components/DashNav/template
.html
View file @
26385dea
File moved
public/app/features/dashboard/
export_data/export_data_moda
l.ts
→
public/app/features/dashboard/
components/ExportDataModal/ExportDataModalCtr
l.ts
View file @
26385dea
...
@@ -31,7 +31,7 @@ export class ExportDataModalCtrl {
...
@@ -31,7 +31,7 @@ export class ExportDataModalCtrl {
export
function
exportDataModal
()
{
export
function
exportDataModal
()
{
return
{
return
{
restrict
:
'E'
,
restrict
:
'E'
,
templateUrl
:
'public/app/features/dashboard/
export_data/export_data_modal
.html'
,
templateUrl
:
'public/app/features/dashboard/
components/ExportDataModal/template
.html'
,
controller
:
ExportDataModalCtrl
,
controller
:
ExportDataModalCtrl
,
controllerAs
:
'ctrl'
,
controllerAs
:
'ctrl'
,
scope
:
{
scope
:
{
...
...
public/app/features/dashboard/components/ExportDataModal/index.ts
0 → 100644
View file @
26385dea
export
{
ExportDataModalCtrl
}
from
'./ExportDataModalCtrl'
;
public/app/features/dashboard/
export_data/export_data_modal
.html
→
public/app/features/dashboard/
components/ExportDataModal/template
.html
View file @
26385dea
File moved
public/app/features/dashboard/
folder_picker/folder_picker
.ts
→
public/app/features/dashboard/
components/FolderPicker/FolderPickerCtrl
.ts
View file @
26385dea
...
@@ -168,7 +168,7 @@ export class FolderPickerCtrl {
...
@@ -168,7 +168,7 @@ export class FolderPickerCtrl {
export
function
folderPicker
()
{
export
function
folderPicker
()
{
return
{
return
{
restrict
:
'E'
,
restrict
:
'E'
,
templateUrl
:
'public/app/features/dashboard/
folder_picker/folder_picker
.html'
,
templateUrl
:
'public/app/features/dashboard/
components/FolderPicker/template
.html'
,
controller
:
FolderPickerCtrl
,
controller
:
FolderPickerCtrl
,
bindToController
:
true
,
bindToController
:
true
,
controllerAs
:
'ctrl'
,
controllerAs
:
'ctrl'
,
...
...
public/app/features/dashboard/components/FolderPicker/index.ts
0 → 100644
View file @
26385dea
export
{
FolderPickerCtrl
}
from
'./FolderPickerCtrl'
;
public/app/features/dashboard/
folder_picker/folder_picker
.html
→
public/app/features/dashboard/
components/FolderPicker/template
.html
View file @
26385dea
File moved
public/app/features/dashboard/folder_permissions_ctrl.ts
deleted
100644 → 0
View file @
2264c275
import
{
FolderPageLoader
}
from
'./folder_page_loader'
;
export
class
FolderPermissionsCtrl
{
navModel
:
any
;
folderId
:
number
;
uid
:
string
;
dashboard
:
any
;
meta
:
any
;
/** @ngInject */
constructor
(
private
backendSrv
,
navModelSrv
,
private
$routeParams
,
$location
)
{
if
(
this
.
$routeParams
.
uid
)
{
this
.
uid
=
$routeParams
.
uid
;
new
FolderPageLoader
(
this
.
backendSrv
).
load
(
this
,
this
.
uid
,
'manage-folder-permissions'
).
then
(
folder
=>
{
if
(
$location
.
path
()
!==
folder
.
meta
.
url
)
{
$location
.
path
(
`
${
folder
.
meta
.
url
}
/permissions`
).
replace
();
}
this
.
dashboard
=
folder
.
dashboard
;
this
.
meta
=
folder
.
meta
;
});
}
}
}
public/app/features/
dashboard/create_folder_c
trl.ts
→
public/app/features/
manage-dashboards/CreateFolderC
trl.ts
View file @
26385dea
File moved
public/app/features/
dashboard/specs/dashboard_import_c
trl.test.ts
→
public/app/features/
manage-dashboards/DashboardImportC
trl.test.ts
View file @
26385dea
import
{
DashboardImportCtrl
}
from
'.
./dashboard_import_c
trl'
;
import
{
DashboardImportCtrl
}
from
'.
/DashboardImportC
trl'
;
import
config
from
'
../../..
/core/config'
;
import
config
from
'
app
/core/config'
;
describe
(
'DashboardImportCtrl'
,
()
=>
{
describe
(
'DashboardImportCtrl'
,
()
=>
{
const
ctx
:
any
=
{};
const
ctx
:
any
=
{};
...
...
public/app/features/
dashboard/dashboard_import_c
trl.ts
→
public/app/features/
manage-dashboards/DashboardImportC
trl.ts
View file @
26385dea
File moved
public/app/features/
dashboard/folder_dashboards_c
trl.ts
→
public/app/features/
manage-dashboards/FolderDashboardsC
trl.ts
View file @
26385dea
import
{
FolderPageLoader
}
from
'./
folder_page_l
oader'
;
import
{
FolderPageLoader
}
from
'./
services/FolderPageL
oader'
;
import
locationUtil
from
'app/core/utils/location_util'
;
import
locationUtil
from
'app/core/utils/location_util'
;
export
class
FolderDashboardsCtrl
{
export
class
FolderDashboardsCtrl
{
...
...
public/app/features/
dashboard/move_to_folder_modal/move_to_folder
.ts
→
public/app/features/
manage-dashboards/components/MoveToFolderModal/MoveToFolderCtrl
.ts
View file @
26385dea
...
@@ -46,7 +46,7 @@ export class MoveToFolderCtrl {
...
@@ -46,7 +46,7 @@ export class MoveToFolderCtrl {
export
function
moveToFolderModal
()
{
export
function
moveToFolderModal
()
{
return
{
return
{
restrict
:
'E'
,
restrict
:
'E'
,
templateUrl
:
'public/app/features/
dashboard/move_to_folder_modal/move_to_folder
.html'
,
templateUrl
:
'public/app/features/
manage-dashboards/components/MoveToFolderModal/template
.html'
,
controller
:
MoveToFolderCtrl
,
controller
:
MoveToFolderCtrl
,
bindToController
:
true
,
bindToController
:
true
,
controllerAs
:
'ctrl'
,
controllerAs
:
'ctrl'
,
...
...
public/app/features/manage-dashboards/components/MoveToFolderModal/index.ts
0 → 100644
View file @
26385dea
export
{
MoveToFolderCtrl
}
from
'./MoveToFolderCtrl'
;
public/app/features/
dashboard/move_to_folder_modal/move_to_folder
.html
→
public/app/features/
manage-dashboards/components/MoveToFolderModal/template
.html
View file @
26385dea
File moved
public/app/features/manage-dashboards/index.ts
View file @
26385dea
import
coreModule
from
'app/core/core_module
'
;
export
*
from
'./components/MoveToFolderModal
'
;
import
{
DashboardListCtrl
}
from
'./DashboardListCtrl'
;
import
{
DashboardListCtrl
}
from
'./DashboardListCtrl'
;
import
{
SnapshotListCtrl
}
from
'./SnapshotListCtrl'
;
import
{
SnapshotListCtrl
}
from
'./SnapshotListCtrl'
;
import
{
FolderDashboardsCtrl
}
from
'./FolderDashboardsCtrl'
;
import
{
DashboardImportCtrl
}
from
'./DashboardImportCtrl'
;
import
{
CreateFolderCtrl
}
from
'./CreateFolderCtrl'
;
import
coreModule
from
'app/core/core_module'
;
coreModule
.
controller
(
'DashboardListCtrl'
,
DashboardListCtrl
);
coreModule
.
controller
(
'DashboardListCtrl'
,
DashboardListCtrl
);
coreModule
.
controller
(
'SnapshotListCtrl'
,
SnapshotListCtrl
);
coreModule
.
controller
(
'SnapshotListCtrl'
,
SnapshotListCtrl
);
coreModule
.
controller
(
'FolderDashboardsCtrl'
,
FolderDashboardsCtrl
);
coreModule
.
controller
(
'DashboardImportCtrl'
,
DashboardImportCtrl
);
coreModule
.
controller
(
'CreateFolderCtrl'
,
CreateFolderCtrl
);
public/app/features/
dashboard/folder_page_l
oader.ts
→
public/app/features/
manage-dashboards/services/FolderPageL
oader.ts
View file @
26385dea
File moved
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