b4f74e240dMaking catalog tables searchable7a8ddde6caNavbar style/naming simplificationse8fea997fdCreating Semantic UI Menu for environment switching instead of select menu
34 lines
1.0 KiB
Python
34 lines
1.0 KiB
Python
from __future__ import unicode_literals
|
|
from __future__ import absolute_import
|
|
|
|
from flask.ext.wtf import Form
|
|
from wtforms import (
|
|
HiddenField, RadioField, SelectField,
|
|
TextAreaField, validators
|
|
)
|
|
|
|
|
|
class QueryForm(Form):
|
|
"""The form used to allow freeform queries to be executed against
|
|
PuppetDB."""
|
|
query = TextAreaField('Query', [validators.Required(
|
|
message='A query is required.')])
|
|
endpoints = RadioField('API endpoint', choices=[
|
|
('nodes', 'Nodes'),
|
|
('resources', 'Resources'),
|
|
('facts', 'Facts'),
|
|
('factsets', 'Fact Sets'),
|
|
('fact-paths', 'Fact Paths'),
|
|
('fact-contents', 'Fact Contents'),
|
|
('reports', 'Reports'),
|
|
('events', 'Events'),
|
|
('catalogs', 'Catalogs'),
|
|
('edges', 'Edges'),
|
|
('environments', 'Environments'),
|
|
])
|
|
|
|
class CatalogForm(Form):
|
|
"""The form used to compare the catalogs of different nodes."""
|
|
compare = HiddenField('compare')
|
|
against = SelectField('against')
|