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
85405a2e
Commit
85405a2e
authored
Oct 11, 2017
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of github.com:grafana/grafana into develop
parents
331b50dc
0f627009
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
34 additions
and
21 deletions
+34
-21
public/app/core/services/backend_srv.ts
+26
-14
public/app/features/dashboard/PanelModel.ts
+1
-0
public/app/features/dashboard/dashnav/dashnav.ts
+6
-6
scripts/webpack/webpack.dev.js
+1
-1
No files found.
public/app/core/services/backend_srv.ts
View file @
85405a2e
...
...
@@ -235,13 +235,13 @@ export class BackendSrv {
createDashboardFolder
(
name
)
{
const
dash
=
{
schemaVersion
:
16
,
title
:
name
,
editable
:
true
,
hideControls
:
true
,
rows
:
[
{
panels
:
[
{
id
:
1
,
folderId
:
0
,
headings
:
false
,
limit
:
1000
,
...
...
@@ -249,28 +249,40 @@ export class BackendSrv {
query
:
''
,
recent
:
false
,
search
:
true
,
span
:
4
,
starred
:
false
,
tags
:
[],
title
:
'Dashboards in this folder'
,
type
:
'dashlist'
type
:
'dashlist'
,
gridPos
:
{
x
:
0
,
y
:
0
,
w
:
4
,
h
:
10
}
},
{
id
:
2
,
onlyAlertsOnDashboard
:
true
,
span
:
4
,
title
:
'Alerts in this folder'
,
type
:
'alertlist'
type
:
'alertlist'
,
gridPos
:
{
x
:
4
,
y
:
0
,
w
:
4
,
h
:
10
}
},
{
span
:
4
,
id
:
3
,
title
:
'Permissions for this folder'
,
type
:
'permissionlist'
,
folderId
:
0
folderId
:
0
,
gridPos
:
{
x
:
8
,
y
:
0
,
w
:
4
,
h
:
10
}
],
showTitle
:
true
,
title
:
name
,
titleSize
:
'h1'
}
]
};
...
...
@@ -280,8 +292,8 @@ export class BackendSrv {
return
this
.
getDashboard
(
'db'
,
res
.
slug
);
})
.
then
(
res
=>
{
res
.
dashboard
.
rows
[
0
].
panels
[
0
].
folderId
=
res
.
dashboard
.
id
;
res
.
dashboard
.
rows
[
0
].
panels
[
2
].
folderId
=
res
.
dashboard
.
id
;
res
.
dashboard
.
panels
[
0
].
folderId
=
res
.
dashboard
.
id
;
res
.
dashboard
.
panels
[
2
].
folderId
=
res
.
dashboard
.
id
;
return
this
.
saveDashboard
(
res
.
dashboard
,
{
overwrite
:
false
});
});
}
...
...
public/app/features/dashboard/PanelModel.ts
View file @
85405a2e
...
...
@@ -18,6 +18,7 @@ export class PanelModel {
gridPos
:
GridPos
;
type
:
string
;
title
:
string
;
alert
?:
any
;
// non persisted
fullscreen
:
boolean
;
...
...
public/app/features/dashboard/dashnav/dashnav.ts
View file @
85405a2e
...
...
@@ -92,16 +92,16 @@ export class DashNavCtrl {
}
deleteDashboard
()
{
var
confirmText
=
""
;
var
confirmText
=
''
;
var
text2
=
this
.
dashboard
.
title
;
var
alerts
=
this
.
dashboard
.
rows
.
reduce
((
memo
,
row
)
=>
{
memo
+=
row
.
panels
.
filter
(
panel
=>
panel
.
alert
).
length
;
return
memo
;
}
,
0
);
const
alerts
=
_
.
sumBy
(
this
.
dashboard
.
panels
,
panel
=>
{
return
panel
.
alert
?
1
:
0
;
});
if
(
alerts
>
0
)
{
confirmText
=
'DELETE'
;
text2
=
`This dashboard contains
${
alerts
}
alerts. Deleting this dashboad will also delete those alerts`
;
text2
=
`This dashboard contains
${
alerts
}
alerts. Deleting this dashboa
r
d will also delete those alerts`
;
}
appEvents
.
emit
(
'confirm-modal'
,
{
...
...
scripts/webpack/webpack.dev.js
View file @
85405a2e
...
...
@@ -10,7 +10,7 @@ const WebpackCleanupPlugin = require('webpack-cleanup-plugin');
const
BundleAnalyzerPlugin
=
require
(
'webpack-bundle-analyzer'
).
BundleAnalyzerPlugin
;
module
.
exports
=
merge
(
common
,
{
devtool
:
"
eval
-source-map"
,
devtool
:
"
cheap-module
-source-map"
,
entry
:
{
dark
:
'./public/sass/grafana.dark.scss'
,
...
...
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