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
b499bdea
Commit
b499bdea
authored
Oct 01, 2014
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
working on panel rendering
parent
3bba8b2c
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
grafana
+1
-1
pkg/api/api_render.go
+8
-5
No files found.
grafana
@
de1de852
Subproject commit d
584076b93b4ebfb33e5a5f375feb6d6ff7f9bfc
Subproject commit d
e1de852fc130d6b5c75c28a93aab38bbbe726b8
pkg/api/api_render.go
View file @
b499bdea
package
api
import
"github.com/gin-gonic/gin"
import
(
log
"github.com/alecthomas/log4go"
"github.com/gin-gonic/gin"
)
func
init
()
{
addRoutes
(
func
(
self
*
HttpServer
)
{
self
.
router
.
GET
(
"/api/render"
,
self
.
renderToPng
)
self
.
router
.
GET
(
"/api/render
/*url
"
,
self
.
renderToPng
)
})
}
func
(
self
*
HttpServer
)
renderToPng
(
c
*
gin
.
Context
)
{
qs
:=
c
.
Request
.
URL
.
Query
(
)
url
:=
qs
[
"url"
][
0
]
pngPath
,
err
:=
self
.
renderer
.
RenderToPng
(
url
)
url
:=
c
.
Params
.
ByName
(
"url"
)
log
.
Info
(
"Rendering url %v"
,
url
)
pngPath
,
err
:=
self
.
renderer
.
RenderToPng
(
"http://localhost:3000/"
+
url
)
if
err
!=
nil
{
c
.
HTML
(
500
,
"error.html"
,
nil
)
}
...
...
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