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 #151

Merged
merged 11 commits into from Mar 21, 2020
12 changes: 12 additions & 0 deletions mercury/forms.py
Expand Up @@ -3,6 +3,7 @@
from django import forms
from mercury.models import (
AGEvent,
GFConfig,
TemperatureSensor,
AccelerationSensor,
WheelSpeedSensor,
Expand Down Expand Up @@ -34,6 +35,17 @@ class Meta:
}


class GFConfigForm(forms.ModelForm):
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)',
}


class TemperatureForm(forms.ModelForm):
class Meta:
model = TemperatureSensor
Expand Down