-
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.
fixes for black, flake8, isort, logging wording fix (#106)
- Loading branch information
1 parent
be920eb
commit 3566583
Showing
4 changed files
with
62 additions
and
30 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
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,29 +1,49 @@ | ||
from flask_wtf import FlaskForm | ||
from wtforms import StringField, URLField, SubmitField, TextAreaField, IntegerField | ||
from wtforms.validators import DataRequired, Optional | ||
from wtforms import IntegerField, StringField, SubmitField, TextAreaField, URLField | ||
from wtforms.validators import DataRequired, Optional | ||
|
||
|
||
class HTTPCheckForm(FlaskForm): | ||
""" | ||
Form for URL input and headers input | ||
""" | ||
url = URLField('URL Check', validators=[DataRequired()]) | ||
headers = TextAreaField('Optional Headers', render_kw={"placeholder": '{"Content-Type": "application/json"}'}, validators=[Optional()]) | ||
submit = SubmitField('Ping') | ||
|
||
url = URLField("URL Check", validators=[DataRequired()]) | ||
headers = TextAreaField( | ||
"Optional Headers", | ||
render_kw={"placeholder": '{"Content-Type": "application/json"}'}, | ||
validators=[Optional()], | ||
) | ||
submit = SubmitField("Ping") | ||
|
||
|
||
class TCPCheckForm(FlaskForm): | ||
""" | ||
Form for IP input and port input | ||
""" | ||
tcp_endpoint = StringField('TCP Endpoint Check', validators=[DataRequired()], render_kw={"placeholder": "domain"}) | ||
tcp_port = IntegerField('TCP Port', validators=[DataRequired()], render_kw={"placeholder": "3306"}) | ||
submit = SubmitField('Ping') | ||
|
||
tcp_endpoint = StringField( | ||
"TCP Endpoint Check", | ||
validators=[DataRequired()], | ||
render_kw={"placeholder": "domain"}, | ||
) | ||
tcp_port = IntegerField( | ||
"TCP Port", validators=[DataRequired()], render_kw={"placeholder": "3306"} | ||
) | ||
submit = SubmitField("Ping") | ||
|
||
|
||
class DNSCheckForm(FlaskForm): | ||
""" | ||
Form for domain input | ||
""" | ||
domain = StringField('Hostname', validators=[DataRequired()], render_kw={"placeholder": "domain"}) | ||
nameserver = StringField('Optional Nameserver Override', validators=[Optional()], render_kw={"placeholder": "10.96.0.10"}) | ||
submit = SubmitField('Ping') | ||
|
||
domain = StringField( | ||
"Hostname", validators=[DataRequired()], render_kw={"placeholder": "domain"} | ||
) | ||
nameserver = StringField( | ||
"Optional Nameserver Override", | ||
validators=[Optional()], | ||
render_kw={"placeholder": "10.96.0.10"}, | ||
) | ||
submit = SubmitField("Ping") |