datadog_proxy 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/datadog_proxy/app.rb +4 -0
- data/lib/datadog_proxy/version.rb +1 -1
- data/lib/datadog_proxy/views/snapshot.erb +32 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8a042b0c28e403246666581c74f0e884488b574
|
4
|
+
data.tar.gz: a4f213d2dc1b0e33b4eb8dec9ef45152fe53c86c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b9a4050cd762f5fcff11b4adace2869b697d1d82b9e3139d5589c47f2f220b023ff6a775f67dd8c81cfde510a7864936858ffaa355cc3425d92ab686eecb8317
|
7
|
+
data.tar.gz: 5a6cef66aa85abea02ebc75513621eecf7efbdb2665db0071e717aeea15265796220ecff33c12e7007330a4d8de3691735faa7d9301b0e5005ddaffa704806a1
|
data/lib/datadog_proxy/app.rb
CHANGED
@@ -0,0 +1,32 @@
|
|
1
|
+
<html>
|
2
|
+
<body>
|
3
|
+
<form id="form">
|
4
|
+
<input type="text" placeholder="query" name="query" value="system.load.1{*}">
|
5
|
+
<input type="text" placeholder="start" name="start">
|
6
|
+
<input type="text" placeholder="end" name="end" value="now">
|
7
|
+
<input type="text" placeholder="duration" name="duration" value="3600">
|
8
|
+
<input type="submit">
|
9
|
+
</form>
|
10
|
+
|
11
|
+
<img id="graph" src="">
|
12
|
+
|
13
|
+
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
14
|
+
<script>
|
15
|
+
$(function() {
|
16
|
+
$("#form").bind("submit", function() {
|
17
|
+
var url = "/graphs/snapshot?";
|
18
|
+
var names = ["query", "start", "end", "duration"];
|
19
|
+
for (var i = 0; i < names.length; i++) {
|
20
|
+
var name = names[i];
|
21
|
+
var value = $("#form input[name=" + name + "]").val();
|
22
|
+
if (value != "") {
|
23
|
+
url += name + "=" + encodeURIComponent(value) + "&";
|
24
|
+
}
|
25
|
+
}
|
26
|
+
$("#graph").attr("src", url);
|
27
|
+
return false;
|
28
|
+
});
|
29
|
+
});
|
30
|
+
</script>
|
31
|
+
</body>
|
32
|
+
</html>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: datadog_proxy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryota Arai
|
@@ -142,6 +142,7 @@ files:
|
|
142
142
|
- lib/datadog_proxy/app.rb
|
143
143
|
- lib/datadog_proxy/datadog_client.rb
|
144
144
|
- lib/datadog_proxy/version.rb
|
145
|
+
- lib/datadog_proxy/views/snapshot.erb
|
145
146
|
- spec/app_spec.rb
|
146
147
|
- spec/spec_helper.rb
|
147
148
|
homepage: https://github.com/ryotarai/datadog_proxy
|