diff --git a/atst/forms/org.py b/atst/forms/org.py index 80bb5722..b2bad0ee 100644 --- a/atst/forms/org.py +++ b/atst/forms/org.py @@ -8,14 +8,30 @@ from .validators import DateRange, PhoneNumber, Alphabet class OrgForm(ValidatedForm): - fname_request = StringField("First Name", validators=[Required(), Alphabet()]) - lname_request = StringField("Last Name", validators=[Required(), Alphabet()]) + fname_request = StringField( + "First Name", + validators=[Required(), Alphabet()] + ) - email_request = EmailField("Email Address", validators=[Required(), Email()]) + lname_request = StringField( + "Last Name", + validators=[Required(), Alphabet()] + ) - phone_number = TelField("Phone Number", validators=[Required(), PhoneNumber()]) + email_request = EmailField( + "Email Address", + validators=[Required(), Email()] + ) - service_branch = StringField("Service Branch or Agency", validators=[Required()]) + phone_number = TelField( + "Phone Number", + validators=[Required(), PhoneNumber()] + ) + + service_branch = StringField( + "Service Branch or Agency", + validators=[Required()] + ) citizenship = RadioField( choices=[ @@ -37,7 +53,7 @@ class OrgForm(ValidatedForm): ) date_latest_training = DateField( - "Latest Information Assurance (IA) Training completion date.", + "Latest Information Assurance (IA) Training completion date", validators=[ Required(), DateRange( diff --git a/atst/forms/poc.py b/atst/forms/poc.py index cd57add1..24ce108b 100644 --- a/atst/forms/poc.py +++ b/atst/forms/poc.py @@ -1,15 +1,27 @@ from wtforms.fields import StringField +from wtforms.fields.html5 import EmailField from wtforms.validators import Required, Email, Length from .forms import ValidatedForm from .validators import IsNumber, Alphabet class POCForm(ValidatedForm): - fname_poc = StringField("POC First Name", validators=[Required(), Alphabet()]) - lname_poc = StringField("POC Last Name", validators=[Required(), Alphabet()]) + fname_poc = StringField( + "POC First Name", + validators=[Required()] + ) - email_poc = StringField("POC Email Address", validators=[Required(), Email()]) + lname_poc = StringField( + "POC Last Name", + validators=[Required()] + ) + + email_poc = EmailField( + "POC Email Address", + validators=[Required(), Email()] + ) dodid_poc = StringField( - "DOD ID", validators=[Required(), Length(min=10), IsNumber()] + "DOD ID", + validators=[Required(), Length(min=10), IsNumber()] ) diff --git a/atst/forms/request.py b/atst/forms/request.py index 6c89aeb2..48f128d1 100644 --- a/atst/forms/request.py +++ b/atst/forms/request.py @@ -1,5 +1,5 @@ from wtforms.fields.html5 import IntegerField -from wtforms.fields import RadioField, StringField, TextAreaField +from wtforms.fields import RadioField, StringField, TextAreaField, SelectField from wtforms.validators import NumberRange, InputRequired from .fields import DateField from .forms import ValidatedForm @@ -9,74 +9,113 @@ import pendulum class RequestForm(ValidatedForm): - # Details of Use: Overall Request Details + # Details of Use: General + dod_component = SelectField( + "DoD Component", + description="Identify the DoD component that is requesting access to the JEDI Cloud", + choices=[ + ("null","Select an option"), + ("us_air_force","US Air Force"), + ("us_army","US Army"), + ("us_navy","US Navy"), + ("us_marine_corps","US Marine Corps"), + ("joint_chiefs_of_staff","Joint Chiefs of Staff")], + ) + + jedi_usage = TextAreaField( + "JEDI Usage", + description="Briefly describe how you are expecting to use the JEDI Cloud", + render_kw={"placeholder": "e.g. We are migrating XYZ application to the cloud so that..."}, + ) + + # Details of Use: Cloud Readiness + num_software_systems = IntegerField( + "Number of Software System", + description="Estimate the number of software systems that will be supported by this JEDI Cloud access request", + ) + + jedi_migration = RadioField( + "Are you using the JEDI Cloud to migrate existing systems?", + choices=[("yes", "Yes"), ("no", "No")], + ) + + rationalization_software_systems = RadioField( + "Have you completed a “rationalization” of your software systems to move to the cloud?", + choices=[("yes", "Yes"), ("no", "No"), ("in_progress","In Progress")], + ) + + technical_support_team = RadioField( + "Are you working with a technical support team experienced in cloud migrations?", + choices=[("yes", "Yes"), ("no", "No")], + ) + + organization_providing_assistance = RadioField( # this needs to be updated to use checkboxes instead of radio + "If you are receiving migration assistance, indicate the type of organization providing assistance below:", + choices=[ + ("in_house_staff","In-house staff"), + ("contractor","Contractor"), + ("other_dod_organization","Other DoD organization")], + ) + + engineering_assessment = RadioField( + description="Have you completed an engineering assessment of your software systems for cloud readiness?", + choices=[("yes", "Yes"), ("no", "No"), ("in_progress","In Progress")], + ) + + data_transfers = SelectField( + description="How much data is being transferred to the cloud?", + choices=[ + ("null","Select an option"), + ("less_than_100gb","Less than 100GB"), + ("100gb-500gb","100GB-500GB"), + ("500gb-1tb","500GB-1TB"), + ("1tb-50tb","1TB-50TB"), + ("50tb-100tb","50TB-100TB"), + ("100tb-500tb","100TB-500TB"), + ("500tb-1pb","500TB-1PB"), + ("1pb-5pb","1PB-5PB"), + ("5pb-10pb","5PB-10PB"), + ("above_10pb","Above 10PB")], + ) + + expected_completion_date = SelectField( + description="When do you expect to complete your migration to the JEDI Cloud?", + choices=[ + ("null","Select an option"), + ("less_than_1_month","Less than 1 month"), + ("1_to_3_months","1-3 months"), + ("3_to_6_months","3-6 months"), + ("above_12_months","Above 12 months")], + ) + + cloud_native = RadioField( + "Are your software systems being developed cloud native?", + choices=[("yes", "Yes"), ("no", "No")], + ) + + # Details of Use: Financial Usage + estimated_monthly_spend = IntegerField( + "Estimated monthly spend", + description="Use the JEDI CSP Calculator to estimate your monthly cloud resource usage and enter the dollar amount below. Note these estimates are for initial approval only. After the request is approved, you will be asked to provide a valid Task Order number with specific CLIN amounts for cloud services." + ) + dollar_value = IntegerField( - "What is the total estimated dollar value of the cloud resources you are requesting using the JEDI CSP Calculator?", - validators=[InputRequired(), NumberRange(min=1)], + "Total Spend", + description="What is your total expected budget for this JEDI Cloud Request?", ) - num_applications = IntegerField( - "Estimate the number of applications that might be supported by this request", - validators=[InputRequired(), NumberRange(min=1)], + number_user_sessions = IntegerField( + description="How many user sessions do you expect on these systems each day?", ) - date_start = DateField( - "Date you expect to start accessing this cloud resource.", - validators=[ - InputRequired(), - DateRange( - lower_bound=pendulum.duration(days=0), - message="Must be no earlier than today.", - ), - ], + average_daily_traffic = IntegerField( + description="What is the average daily traffic you expect the systems under this cloud contract to use?", ) - app_description = TextAreaField( - "Describe how your team is expecting to use the JEDI Cloud" + start_date = DateField( + description="When do you expect to start using the JEDI Cloud (not for billing purposes)?", ) - supported_organizations = StringField( - "What organizations are supported by these applications?", - validators=[InputRequired()], - ) - # Details of Use: Cloud Resources - total_cores = IntegerField( - "Total Number of vCPU cores", validators=[InputRequired(), NumberRange(min=0)] - ) - total_ram = IntegerField( - "Total RAM", validators=[InputRequired(), NumberRange(min=0)] - ) - total_object_storage = IntegerField( - "Total object storage", validators=[InputRequired(), NumberRange(min=0)] - ) - total_database_storage = IntegerField( - "Total database storage", validators=[InputRequired(), NumberRange(min=0)] - ) - total_server_storage = IntegerField( - "Total server storage", validators=[InputRequired(), NumberRange(min=0)] - ) - # Details of Use: Support Staff - has_contractor_advisor = RadioField( - "Do you have a contractor to advise and assist you with using cloud services?", - choices=[("yes", "Yes"), ("no", "No")], - validators=[InputRequired()], - ) - is_migrating_application = RadioField( - "Are you using the JEDI Cloud to migrate existing applications?", - choices=[("yes", "Yes"), ("no", "No")], - validators=[InputRequired()], - ) - - has_migration_office = RadioField( - "Do you have a migration office that you're working with to migrate to the cloud?", - choices=[("yes", "Yes"), ("no", "No")], - validators=[InputRequired()], - ) - - supporting_organization = StringField( - "Describe the organizations that are supporting you, include both government and contractor resources", - validators=[InputRequired()], - ) diff --git a/templates/components/options_input.html.to b/templates/components/options_input.html.to index ab296a5f..8a15e041 100644 --- a/templates/components/options_input.html.to +++ b/templates/components/options_input.html.to @@ -1,4 +1,5 @@