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
7a2e886e
Commit
7a2e886e
authored
Dec 08, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' into develop-settings
parents
1b6be031
10a77b03
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
27 deletions
+40
-27
pkg/api/index.go
+0
-15
public/app/features/dashboard/folder_dashboards_ctrl.ts
+1
-2
public/app/features/dashboard/folder_page_loader.ts
+38
-5
public/app/features/dashboard/folder_permissions_ctrl.ts
+1
-2
public/sass/components/_gf-form.scss
+0
-3
No files found.
pkg/api/index.go
View file @
7a2e886e
...
...
@@ -118,21 +118,6 @@ func setIndexViewData(c *middleware.Context) (*dtos.IndexViewData, error) {
Children
:
dashboardChildNavs
,
})
dashboardFolderChildNavs
:=
[]
*
dtos
.
NavLink
{
{
Text
:
"Dashboards"
,
Id
:
"manage-folder-dashboards"
,
Url
:
setting
.
AppSubUrl
+
"/dashboards"
,
Icon
:
"fa fa-fw fa-th-large"
},
{
Text
:
"Permissions"
,
Id
:
"manage-folder-permissions"
,
Url
:
setting
.
AppSubUrl
+
"/dashboards?1"
,
Icon
:
"fa fa-fw fa-lock"
},
}
data
.
NavTree
=
append
(
data
.
NavTree
,
&
dtos
.
NavLink
{
Text
:
"Dashboards"
,
Id
:
"manage-folder"
,
SubTitle
:
"Manage folder dashboards & permissions"
,
Icon
:
"fa fa-folder-open"
,
Url
:
setting
.
AppSubUrl
+
"/"
,
HideFromMenu
:
true
,
Children
:
dashboardFolderChildNavs
,
})
if
c
.
IsSignedIn
{
profileNode
:=
&
dtos
.
NavLink
{
Text
:
c
.
SignedInUser
.
Name
,
...
...
public/app/features/dashboard/folder_dashboards_ctrl.ts
View file @
7a2e886e
...
...
@@ -8,9 +8,8 @@ export class FolderDashboardsCtrl {
constructor
(
private
backendSrv
,
navModelSrv
,
private
$routeParams
)
{
if
(
this
.
$routeParams
.
folderId
&&
this
.
$routeParams
.
type
&&
this
.
$routeParams
.
slug
)
{
this
.
folderId
=
$routeParams
.
folderId
;
this
.
navModel
=
navModelSrv
.
getNav
(
'manage-folder'
,
'manage-folder-dashboards'
,
0
);
new
FolderPageLoader
(
this
.
backendSrv
,
this
.
$routeParams
).
load
(
this
.
navModel
,
this
.
folderId
);
new
FolderPageLoader
(
this
.
backendSrv
,
this
.
$routeParams
).
load
(
this
,
this
.
folderId
,
'manage-folder-dashboards'
);
}
}
}
public/app/features/dashboard/folder_page_loader.ts
View file @
7a2e886e
...
...
@@ -3,18 +3,51 @@ import _ from "lodash";
export
class
FolderPageLoader
{
constructor
(
private
backendSrv
,
private
$routeParams
)
{
}
load
(
navModel
,
folderId
)
{
load
(
ctrl
,
folderId
,
activeChildId
)
{
ctrl
.
navModel
=
{
main
:
{
icon
:
'fa fa-folder-open'
,
id
:
'manage-folder'
,
subTitle
:
'Manage folder dashboards & permissions'
,
url
:
'/fsdfds'
,
text
:
''
,
breadcrumbs
:
[
{
title
:
'Dashboards'
,
uri
:
'/dashboards'
},
{
title
:
' '
},
],
children
:
[
{
active
:
activeChildId
===
'manage-folder-dashboards'
,
icon
:
'fa fa-fw fa-th-large'
,
id
:
'manage-folder-dashboards'
,
text
:
'Dashboards'
,
url
:
'/dashboards'
},
{
active
:
activeChildId
===
'manage-folder-permissions'
,
icon
:
'fa fa-fw fa-lock'
,
id
:
'manage-folder-permissions'
,
text
:
'Permissions'
,
url
:
'/dashboards/permissions'
}
]
}
};
this
.
backendSrv
.
getDashboard
(
this
.
$routeParams
.
type
,
this
.
$routeParams
.
slug
).
then
(
result
=>
{
const
folderTitle
=
result
.
dashboard
.
title
;
navModel
.
main
.
text
=
''
;
navModel
.
main
.
breadcrumbs
=
[
ctrl
.
navModel
.
main
.
text
=
''
;
ctrl
.
navModel
.
main
.
breadcrumbs
=
[
{
title
:
'Dashboards'
,
uri
:
'/dashboards'
},
{
title
:
folderTitle
}
];
const
folderUrl
=
`/dashboards/folder/
${
folderId
}
/
${
result
.
meta
.
type
}
/
${
result
.
meta
.
slug
}
`
;
const
dashTab
=
_
.
find
(
navModel
.
main
.
children
,
{
id
:
'manage-folder-dashboards'
});
const
dashTab
=
_
.
find
(
ctrl
.
navModel
.
main
.
children
,
{
id
:
'manage-folder-dashboards'
});
dashTab
.
url
=
folderUrl
;
const
permTab
=
_
.
find
(
navModel
.
main
.
children
,
{
id
:
'manage-folder-permissions'
});
const
permTab
=
_
.
find
(
ctrl
.
navModel
.
main
.
children
,
{
id
:
'manage-folder-permissions'
});
permTab
.
url
=
folderUrl
+
'/permissions'
;
});
}
...
...
public/app/features/dashboard/folder_permissions_ctrl.ts
View file @
7a2e886e
...
...
@@ -8,9 +8,8 @@ export class FolderPermissionsCtrl {
constructor
(
private
backendSrv
,
navModelSrv
,
private
$routeParams
)
{
if
(
this
.
$routeParams
.
folderId
&&
this
.
$routeParams
.
type
&&
this
.
$routeParams
.
slug
)
{
this
.
folderId
=
$routeParams
.
folderId
;
this
.
navModel
=
navModelSrv
.
getNav
(
'manage-folder'
,
'manage-folder-permissions'
,
0
);
new
FolderPageLoader
(
this
.
backendSrv
,
this
.
$routeParams
).
load
(
this
.
navModel
,
this
.
folderId
);
new
FolderPageLoader
(
this
.
backendSrv
,
this
.
$routeParams
).
load
(
this
,
this
.
folderId
,
'manage-folder-permissions'
);
}
}
}
public/sass/components/_gf-form.scss
View file @
7a2e886e
...
...
@@ -8,7 +8,6 @@ $input-border: 1px solid $input-border-color;
align-items
:
center
;
text-align
:
left
;
position
:
relative
;
font-size
:
$font-size-sm
;
&
--offset-1
{
margin-left
:
$spacer
;
...
...
@@ -71,7 +70,6 @@ $input-border: 1px solid $input-border-color;
background-color
:
$input-label-bg
;
display
:
block
;
font-size
:
$font-size-sm
;
border
:
$input-btn-border-width
solid
$input-label-border-color
;
@include
border-radius
(
$label-border-radius-sm
);
...
...
@@ -90,7 +88,6 @@ $input-border: 1px solid $input-border-color;
.gf-form-pre
{
display
:
block
;
flex-grow
:
1
;
font-size
:
$font-size-sm
;
margin
:
0
;
margin-right
:
$gf-form-margin
;
border
:
$input-btn-border-width
solid
transparent
;
...
...
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