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
e5fbbe96
Commit
e5fbbe96
authored
Feb 05, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed error handling, and error logging for panel rendering
parent
8e1b7536
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
36 additions
and
11 deletions
+36
-11
data/png/77dedee4f4d479cea6f9d608353ed098.png
+0
-0
data/png/9e956287bee2bc4eabd91f9bb06ab458.png
+0
-0
grafana
+0
-1
pkg/api/render.go
+3
-2
pkg/middleware/middleware.go
+1
-6
src/app/features/account/partials/account.html
+0
-2
src/views/500.html
+32
-0
No files found.
data/png/77dedee4f4d479cea6f9d608353ed098.png
0 → 100644
View file @
e5fbbe96
63.3 KB
data/png/9e956287bee2bc4eabd91f9bb06ab458.png
0 → 100644
View file @
e5fbbe96
71.8 KB
grafana
@
d5471c15
Subproject commit d5471c153ab8ab0d4be57154300d28a75af1d363
pkg/api/render.go
View file @
e5fbbe96
...
...
@@ -20,10 +20,11 @@ func RenderToPng(c *middleware.Context) {
}
renderOpts
.
Url
=
"http://localhost:3000/"
+
renderOpts
.
Url
pngPath
,
err
:=
renderer
.
RenderToPng
(
renderOpts
)
if
err
!=
nil
{
c
.
HTML
(
500
,
"error.html"
,
nil
)
c
.
Handle
(
500
,
"Failed to render to png"
,
err
)
return
}
c
.
Resp
.
Header
()
.
Set
(
"Content-Type"
,
"image/png"
)
...
...
pkg/middleware/middleware.go
View file @
e5fbbe96
...
...
@@ -88,12 +88,7 @@ func (ctx *Context) Handle(status int, title string, err error) {
}
}
switch
status
{
case
404
:
ctx
.
Data
[
"Title"
]
=
"Page Not Found"
case
500
:
ctx
.
Data
[
"Title"
]
=
"Internal Server Error"
}
ctx
.
Data
[
"Title"
]
=
title
ctx
.
HTML
(
status
,
strconv
.
Itoa
(
status
))
}
...
...
src/app/features/account/partials/account.html
View file @
e5fbbe96
...
...
@@ -22,8 +22,6 @@
</div>
<br>
<panel-loader
type=
"'test'"
></panel-loader>
<br>
<button
type=
"submit"
class=
"pull-right btn btn-success"
ng-click=
"update()"
>
Update
</button>
</form>
...
...
src/views/500.html
0 → 100644
View file @
e5fbbe96
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"utf-8"
>
<meta
http-equiv=
"X-UA-Compatible"
content=
"IE=edge,chrome=1"
>
<meta
name=
"viewport"
content=
"width=device-width"
>
<title>
Grafana
</title>
<link
rel=
"stylesheet"
href=
"[[.AppSubUrl]]/css/grafana.dark.min.css"
title=
"Dark"
>
<link
rel=
"icon"
type=
"image/png"
href=
"[[.AppSubUrl]]/img/fav32.png"
>
</head>
<body>
<div
class=
"gf-box"
style=
"margin: 200px auto 0 auto; width: 500px;"
>
<div
class=
"gf-box-header"
>
<span
class=
"gf-box-title"
>
Server side error :(
</span>
</div>
<div
class=
"gf-box-body"
>
<h4>
[[.Title]]
</h4>
[[.ErrorMsg]]
</div>
</div>
</body>
</html>
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