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
f465a799
Commit
f465a799
authored
Jul 20, 2015
by
Torkel Ödegaard
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2366 from raventools/remove-hubot-script
Remove grafana.coffee
parents
0a59d6ab
fc284231
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
60 deletions
+0
-60
vendor/grafana.coffee
+0
-60
No files found.
vendor/grafana.coffee
deleted
100644 → 0
View file @
0a59d6ab
# Description:
# A way to interact with the Google Images API.
#
# Commands:
# hubot image me <query> - The Original. Queries Google Images for <query> and returns a random top result.
# hubot animate me <query> - The same thing as `image me`, except adds a few parameters to try to return an animated GIF instead.
# hubot mustache me <url> - Adds a mustache to the specified URL.
# hubot mustache me <query> - Searches Google Images for the specified query and mustaches it.
module
.
exports
=
(
robot
)
->
robot
.
hear
/grafana (.*)/i
,
(
msg
)
->
sendUrl
msg
.
match
[
1
]
robot
.
router
.
get
'/hubot/test'
,
(
req
,
res
)
->
sendUrl
()
res
.
send
'OK '
imageMe
=
(
msg
,
cb
)
->
cb
'http://localhost:3000/render/dashboard/solo/grafana-play-home?from=now-1h&to=now&panelId=4&fullscreen'
sendUrl
=
(
params
)
->
https
=
require
'https'
querystring
=
require
'querystring'
opts
=
params
.
split
(
' '
)
dashboard
=
opts
[
0
]
panelId
=
opts
[
1
]
from
=
opts
[
2
]
imageUrl
=
"http://localhost:3000/render/dashboard/solo/
#{
dashboard
}
/?panelId=
#{
panelId
}
"
link
=
"http://localhost:3000/dashboard/db/
#{
dashboard
}
/?panelId=
#{
panelId
}
&fullscreen"
if
from
imageUrl
+=
"&from=
#{
from
}
"
link
+=
"&from=
#{
from
}
"
console
.
log
'imageUrl: '
+
imageUrl
hipchat
=
{}
hipchat
.
format
=
'json'
hipchat
.
auth_token
=
process
.
env
.
HUBOT_HIPCHAT_TOKEN
console
.
log
'token: '
+
hipchat
.
auth_token
hipchat
.
room_id
=
'877465'
hipchat
.
message
=
"<a href='
#{
link
}
'><img src='
#{
imageUrl
}
'></img></a>"
hipchat
.
from
=
"hubot"
hipchat
.
message_format
=
"html"
params
=
querystring
.
stringify
(
hipchat
)
path
=
"/v1/rooms/message/?
#{
params
}
"
data
=
''
https
.
get
{
host
:
'api.hipchat.com'
,
path
:
path
},
(
res
)
->
res
.
on
'data'
,
(
chunk
)
->
data
+=
chunk
.
toString
()
res
.
on
'end'
,
()
->
json
=
JSON
.
parse
(
data
)
console
.
log
"Hipchat response "
,
data
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