-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
138 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,31 @@ | ||
dist: focal | ||
language: ruby | ||
rvm: | ||
- 2.5.5 | ||
- 2.7.4 | ||
- 3.0.1 | ||
before_install: | ||
- export TZ=Europe/Berlin | ||
deploy: | ||
- provider: releases | ||
api_key: | ||
secure: lUCi8h+Qhp3UFCD3yxCGGb3PYk8krt442ehygHCxz/OVBeu/6LRPgMNpH7mmT99PFyw8au8EElyZ7GjG9pkfObzJYt5NBP+35f4WvWNcM2wSIFqAeCQKgrOHhTsFfCtPNfERi63kiiSeownA+8zrMmqy+Gshzym+JiCGiffepPwvQMtiSJ3pNolx4lsYLKVdTLHWsWCt+YVPX00bg14cKhLGJxF4+LeVEO83U2yLQTauRVDyzwC7xwcKNsLLdftILLtd020hsKx/DwlRjp/dqyJECmI1wHQ2rd0BVz+jw41X08533w1pevlje0SKWoJjsQBGqWqKbsdXGrZ2MlfPWTdFySfok+2DLCsZpbO57/txTuAGCIAjbHGIoMh8e/dYbqVEAAuEgYjcpe8nDL/fT22nH7HZFwALwZeTts002eBmEk6RjADq2OsR1ftYozuWOBVJNo+oFWxgBFODQhcmnDygnRYMCkqbGK/vc7qmMai+QUiB1dbOryLK71qodf1GBO8uG+8WydVjnOHET3p8vlF9dx2EF1m9pHVy26DxMCExDmPe4TKLIK2t1uOziaHFz1FZQSnjwXc8NnJpeMBE24xq34v17QcAZEfRfv5L/59CQ77FB1ZqM91tHBFYPRNfAQpKB+0X7VIhPBD3Z+uY0t+vgOspY4hpPt6Orf3VAB4= | ||
file_glob: true | ||
file: | ||
- "*.gem" | ||
- "ruby-grafana-reporter*.rb" | ||
on: | ||
branch: master | ||
tags: true | ||
repo: divinity666/ruby-grafana-reporter | ||
skip_cleanup: true | ||
draft: true | ||
|
||
- provider: rubygems | ||
api_key: | ||
secure: Vf6r7uC6B57yIqNCRtAWZI7BXzGKwpe5/CsxhL6giNlW0YMJLbvE50GdOveEyOSGwf4PTSWZSSP5ZRdpXYob9JVnUCBi2F+fuRnWxVZvxTrohSunUm7sbHGobrNd+vv01hgsIcgGZtPqquowYZ8y9lpQBfoXnDfMEyRACrvfDFol8Skb8vZxC/+ZPwF7NzC0SQQn+gbSQ49fYYnmqFTMIU1+Aj8CgzfGN//0kqO9U0TSwCfBesXewD/IEiBBOoZgiEP8XFwn+JCvHJnhHo0bS+71xKGZmTfhgN6Sw3IWD6fSX+yrbl0F61ycmIe0f+Hrr1ch7uybOINlakRuVGJ6PtH3fK/1air0k/IoGH+2muhnJFY28tHVJo56pKv4b8I9JrPUygV47PnDNiSTre4EcdETc3yYwgTs+u75NNO6PrW7hX3ySWZX9j5+mtldy8LR0KT9c5QsV9W0xZh4QloCnu0GFbQNgFssrbgKbsF0j+R/sLDjX+XkHGGaBSxhCsqBP0ZcYvhZQfQkaeFZGRx03qzRLFqaSPSmTANsmv4WTL32UpHLghGjg0wPnjegyjj5UgH1iaPse7avFm5YZVm2VW9pPqk/sxNUhWvFwGu3unKJpWwI7e2wGYwiSrZaEppFhAcMvCeiLU29X+2I0T+pXFpNBzuNr59XksjOppUqUcs= | ||
gem: ruby-grafana-reporter | ||
on: | ||
branch: master | ||
tags: true | ||
repo: divinity666/ruby-grafana-reporter | ||
skip_cleanup: true |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# frozen_string_literal: true | ||
|
||
# Version information | ||
GRAFANA_REPORTER_VERSION = [0, 6, 0].freeze | ||
GRAFANA_REPORTER_VERSION = [0, 6, 1].freeze | ||
# Release date | ||
GRAFANA_REPORTER_RELEASE_DATE = '2022-08-01' | ||
GRAFANA_REPORTER_RELEASE_DATE = '2022-08-30' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,15 @@ | ||
include Grafana | ||
|
||
require 'json' | ||
|
||
describe PrometheusDatasource do | ||
subject { PrometheusDatasource.new({}) } | ||
|
||
it 'raises an error if an improper response format is given' do | ||
expect { subject.send(:preformat_response, "wrong format") }.to raise_error(UnsupportedQueryResponseReceivedError) | ||
end | ||
|
||
it 'does handle the query results from bug #31' do | ||
expect { subject.send(:preformat_response, {"results":{"A":{"frames":[{"schema":{"name":"up{app=\"\", criticality=\"low\", env=\"production\", hostname=\"\", instance=\"9100\", job=\"node\", org=\"Root entity\"}","refId":"A","meta":{"custom":{"resultType":"matrix"}},"fields":[{"name":"Time","type":"time","typeInfo":{"frame":"time.Time"}},{"name":"Value","type":"number","typeInfo":{"frame":"float64","nullable":true},"labels":{"__name__":"up","app":"","criticality":"low","env":"production","hostname":"","instance":"9100","job":"node","org":"Root entity"},"config":{"displayNameFromDS":"your_name"}}]},"data":{"values":[[1660730100000,1660730400000,1660730700000,1660731000000,1660731300000,1660731600000,1660731900000,1660732200000,1660732500000,1660732800000,1660733100000,1660733400000,1660733700000,1660734000000,1660734300000,1660734600000,1660734900000,1660735200000,1660735500000,1660735800000,1660736100000,1660736400000,1660736700000,1660737000000,1660737300000,1660737600000,1660737900000,1660738200000,1660738500000,1660738800000,1660739100000,1660739400000,1660739700000,1660740000000,1660740300000,1660740600000,1660740900000,1660741200000,1660741500000,1660741800000,1660742100000,1660742400000,1660742700000,1660743000000,1660743300000,1660743600000,1660743900000,1660744200000,1660744500000,1660744800000,1660745100000,1660745400000,1660745700000,1660746000000,1660746300000,1660746600000,1660746900000,1660747200000,1660747500000,1660747800000,1660748100000,1660748400000,1660748700000,1660749000000,1660749300000,1660749600000,1660749900000,1660750200000,1660750500000,1660750800000,1660751100000,1660751400000,1660751700000],[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]}}]}}}.to_json) }.not_to raise_error() | ||
end | ||
end |