vigiboard / dashboard / widgets / edit_event.py @ 70c5f034
History | View | Annotate | Download (1.06 KB)
1 | 805cc54a | Thomas ANDREJAK | from tw.api import WidgetsList |
---|---|---|---|
2 | from tw.forms import TableForm, CalendarDatePicker, SingleSelectField, TextField, TextArea, CheckBox, Spacer, Label, HiddenField |
||
3 | |||
4 | edit_event_status_options = [['None','Change to None'],['Acknowledged','Change to Acknowledged'],['AAClosed','Change to Closed']] |
||
5 | |||
6 | class Edit_Event_Form(TableForm): |
||
7 | |||
8 | treatments_options = enumerate((
|
||
9 | 'Change to None', 'Change to Acknowledged', 'Change to Closed')) |
||
10 | fields = [ |
||
11 | HiddenField('id'),
|
||
12 | #TextArea('comment',label_text='Comment: (Please add your initials)',attrs=dict(rows=5 , cols=25)),
|
||
13 | TextField('tt',label_text='Touble Ticket'), |
||
14 | #CheckBox('tt_create',label_text='Create'),
|
||
15 | SingleSelectField('status',options=edit_event_status_options),
|
||
16 | Spacer(),Spacer() |
||
17 | ] |
||
18 | |||
19 | submit_text='Apply'
|
||
20 | |||
21 | class Search_Form(TableForm): |
||
22 | |||
23 | fields = [ |
||
24 | TextField('host',label_text='Host'), |
||
25 | TextField('service',label_text='Service'), |
||
26 | TextField('output',label_text='Output'), |
||
27 | TextField('trouble_ticket',label_text='Trouble Ticket'), |
||
28 | Spacer(),Spacer() |
||
29 | ] |
||
30 | |||
31 | submit_text='Search'
|
||
32 |