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
@app.route('/') | |
def health_check(): | |
return 'This datasource is healthy.' |
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
@app.route('/search', methods=['POST']) | |
def search(): | |
return jsonify(['my_series', 'another_series']) |
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
@app.route('/query', methods=['POST']) | |
def query(): | |
req = request.get_json() | |
data = [ | |
{ | |
"target": req['targets'][0]['target'], | |
"datapoints": [ | |
[861, convert_to_time_ms(req['range']['from'])], | |
[767, convert_to_time_ms(req['range']['to'])] | |
] |
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
@app.route('/annotations', methods=['POST']) | |
def annotations(): | |
req = request.get_json() | |
data = [ | |
{ | |
"annotation": 'This is the annotation', | |
"time": (convert_to_time_ms(req['range']['from']) + | |
convert_to_time_ms(req['range']['to'])) / 2, | |
"title": 'Deployment notes', | |
"tags": ['tag1', 'tag2'], |
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
@app.route('/tag-keys', methods=['POST']) | |
def tag_keys(): | |
data = [ | |
{"type": "string", "text": "City"}, | |
{"type": "string", "text": "Country"} | |
] | |
return jsonify(data) |
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
@app.route('/tag-values', methods=['POST']) | |
def tag_values(): | |
req = request.get_json() | |
if req['key'] == 'City': | |
return jsonify([ | |
{'text': 'Tokyo'}, | |
{'text': 'São Paulo'}, | |
{'text': 'Jakarta'} | |
]) | |
elif req['key'] == 'Country': |
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
2019-10-22T14:06:59.385Z [DEBUG] plugin.terraform-provider-github_v2.2.1_x4: ---[ RESPONSE ]-------------------------------------- | |
2019-10-22T14:06:59.385Z [DEBUG] plugin.terraform-provider-github_v2.2.1_x4: HTTP/1.1 304 Not Modified | |
2019-10-22T14:06:59.385Z [DEBUG] plugin.terraform-provider-github_v2.2.1_x4: Access-Control-Allow-Origin: * | |
2019-10-22T14:06:59.385Z [DEBUG] plugin.terraform-provider-github_v2.2.1_x4: Access-Control-Expose-Headers: ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type | |
2019-10-22T14:06:59.385Z [DEBUG] plugin.terraform-provider-github_v2.2.1_x4: Cache-Control: private, max-age=60, s-maxage=60 | |
2019-10-22T14:06:59.385Z [DEBUG] plugin.terraform-provider-github_v2.2.1_x4: Content-Security-Policy: default-src 'none' | |
2019-10-22T14:06:59.385Z [DEBUG] plugin.terraform-provider-github_v2.2.1_x4: Date: Tue, 22 Oct 2019 14:06:59 GMT | |
2019-10-22T14:06:59.385Z [D |