Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Grafana - add dedicated grafana instance for tests #161

Merged
merged 8 commits into from Mar 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions mercury/forms.py
Expand Up @@ -40,9 +40,9 @@ class Meta:
model = GFConfig
fields = ["gf_name", "gf_host", "gf_token"]
labels = {
"gf_name": "Host Label",
"gf_host": "Host Address",
"gf_token": 'API Token (Without "Bearer" prefix)',
"gf_name": "Label (e.g. remote, local)",
"gf_host": "Hostname (e.g. https://abc123.grafana.net, localhost:3000)",
"gf_token": "API Token",
}


Expand Down
2 changes: 1 addition & 1 deletion mercury/templates/gf_configs.html
Expand Up @@ -32,7 +32,7 @@ <h2>Existing Grafana Hosts</h2>
{% for item in configs %}
<tr>
<th>{{ item.gf_name }}</th>
<td>{{ item.gf_host }}</td>
<td><a href="{{ item.gf_host }}">{{ item.gf_host }}</a></td>
<td>{{ item.gf_current }}</td>
<td><a href="update/{{ item.id }}">Set as current</a></td>
<td><a href="delete/{{ item.id }}">Delete</a></td>
Expand Down
7 changes: 5 additions & 2 deletions mercury/tests/test_grafana.py
Expand Up @@ -8,8 +8,11 @@
import os

# default host and token, use this if user did not provide anything
HOST = "https://dbc291.grafana.net"
TOKEN = "eyJrIjoiRTQ0cmNGcXRybkZlUUNZWmRvdFI0UlMwdFVYVUt3bzgiLCJuIjoia2V5IiwiaWQiOjF9"
HOST = "https://mercurytests.grafana.net"
TOKEN = (
"eyJrIjoiUm81MzlOUlRhalhGUFJ5OVVMNTZGTTZIdT"
"dvVURDSzIiLCJuIjoiYXBpX2tleSIsImlkIjoxfQ=="
)


# This test needs to have access to a test deployment of grafana, otherwise
Expand Down