|
|
@ -1,56 +1,20 @@ |
|
|
|
{ |
|
|
|
{ |
|
|
|
"title": "MegaCorp acceptance jobs", |
|
|
|
"title": "MegaCorp acceptance jobs", |
|
|
|
"forms": { |
|
|
|
"users": { |
|
|
|
"enable_firewall": { |
|
|
|
"jjohnson": "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8", |
|
|
|
"title": "Enable firewall", |
|
|
|
"admin": "5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8" |
|
|
|
"description": "Enable access to the acceptance environment from the entered IP", |
|
|
|
}, |
|
|
|
"submit_title": "Enable access", |
|
|
|
"forms": [ |
|
|
|
"script": "job_clean_database.sh", |
|
|
|
{ |
|
|
|
"fields": [ |
|
|
|
"name": "clean_database", |
|
|
|
{ |
|
|
|
|
|
|
|
"name": "ip_address", |
|
|
|
|
|
|
|
"title": "IP Address", |
|
|
|
|
|
|
|
"type": "string", |
|
|
|
|
|
|
|
"required": true |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
"name": "expire_days", |
|
|
|
|
|
|
|
"title": "Expire (days)", |
|
|
|
|
|
|
|
"type": "integer", |
|
|
|
|
|
|
|
"max": 31, |
|
|
|
|
|
|
|
"min": 2 |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
"name": "expire_date", |
|
|
|
|
|
|
|
"title": "Expire (date)", |
|
|
|
|
|
|
|
"type": "date", |
|
|
|
|
|
|
|
"required": true |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
"name": "network", |
|
|
|
|
|
|
|
"title": "Which network", |
|
|
|
|
|
|
|
"type": "radio", |
|
|
|
|
|
|
|
"options": [ |
|
|
|
|
|
|
|
["intra", "Whole intranet"], |
|
|
|
|
|
|
|
["machine", "Acceptance machine"] |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
"name": "comment", |
|
|
|
|
|
|
|
"title": "Comment", |
|
|
|
|
|
|
|
"type": "text" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
"clean_database": { |
|
|
|
|
|
|
|
"title": "Load clean database", |
|
|
|
"title": "Load clean database", |
|
|
|
"description": "Recreate the acceptance database from scratch. This deletes all the information in the database", |
|
|
|
"description": "Recreate the acceptance database from scratch. This deletes all the information in the database", |
|
|
|
"submit_title": "Run", |
|
|
|
"submit_title": "Run", |
|
|
|
"script": "job_clean_database.sh", |
|
|
|
"script": "job_clean_database.sh", |
|
|
|
"fields": [ |
|
|
|
"fields": [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
"name": "sample_db", |
|
|
|
"name": "source_sql", |
|
|
|
"title": "Sample database", |
|
|
|
"title": "Database type", |
|
|
|
"type": "select", |
|
|
|
"type": "select", |
|
|
|
"options": [ |
|
|
|
"options": [ |
|
|
|
["empty", "Empty database"], |
|
|
|
["empty", "Empty database"], |
|
|
@ -60,11 +24,12 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
] |
|
|
|
}, |
|
|
|
}, |
|
|
|
"import_csv": { |
|
|
|
{ |
|
|
|
"title": "Import CSV data into database", |
|
|
|
"name": "import_employees", |
|
|
|
"description": "Load a CSV with test data into the database", |
|
|
|
"title": "Import employee data from CSV", |
|
|
|
|
|
|
|
"description": "Load a CSV with employee data into the database. The employee table MUST be empty.", |
|
|
|
"submit_title": "Import CSV", |
|
|
|
"submit_title": "Import CSV", |
|
|
|
"script": "job_restart_acc.sh", |
|
|
|
"script": "job_import_employees.sh", |
|
|
|
"fields": [ |
|
|
|
"fields": [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
"name": "csv_file", |
|
|
|
"name": "csv_file", |
|
|
@ -73,18 +38,78 @@ |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
] |
|
|
|
}, |
|
|
|
}, |
|
|
|
"restart_services": { |
|
|
|
{ |
|
|
|
|
|
|
|
"name": "list_employees", |
|
|
|
|
|
|
|
"title": "List employees", |
|
|
|
|
|
|
|
"description": "List the employees currently in the database", |
|
|
|
|
|
|
|
"submit_title": "List", |
|
|
|
|
|
|
|
"script": "job_list_employees.sh", |
|
|
|
|
|
|
|
"output": "html", |
|
|
|
|
|
|
|
"fields": [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
"name": "download_db", |
|
|
|
|
|
|
|
"title": "Download database", |
|
|
|
|
|
|
|
"description": "Download the full binary database", |
|
|
|
|
|
|
|
"submit_title": "Download", |
|
|
|
|
|
|
|
"script": "job_download_db.sh", |
|
|
|
|
|
|
|
"output": "raw", |
|
|
|
|
|
|
|
"fields": [ |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
"name": "restart_services", |
|
|
|
"title": "Restart Acceptance services", |
|
|
|
"title": "Restart Acceptance services", |
|
|
|
"description": "Restarts the acceptance services (web, db, cache). Consult with <a href='foo@example.com'>John Foo</a> first!", |
|
|
|
"description": "Restarts the acceptance services (web, db, cache). Consult with <a href='mailto:k.karlson@megacorp.com'>Karl Karlsön</a> first!", |
|
|
|
"submit_title": "Restart", |
|
|
|
"submit_title": "Restart", |
|
|
|
"script": "job_restart_acc.sh", |
|
|
|
"script": "job_restart_acc.sh", |
|
|
|
"fields": [ |
|
|
|
"fields": [ |
|
|
|
{ |
|
|
|
{ |
|
|
|
"name": "passwd", |
|
|
|
"name": "passwd", |
|
|
|
"title": "John Foo gave you a password. What is it?", |
|
|
|
"title": "Karl Karlsön gave you a password. What is it?", |
|
|
|
"type": "password" |
|
|
|
"type": "password", |
|
|
|
|
|
|
|
"required": true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
"name": "enable_firewall", |
|
|
|
|
|
|
|
"allowed_users": ["admin"], |
|
|
|
|
|
|
|
"title": "Enable firewall", |
|
|
|
|
|
|
|
"description": "Enable access to the acceptance environment from the entered IP", |
|
|
|
|
|
|
|
"submit_title": "Enable access", |
|
|
|
|
|
|
|
"script": "job_enable_firewall.sh", |
|
|
|
|
|
|
|
"fields": [ |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
"name": "ip_address", |
|
|
|
|
|
|
|
"title": "From IP Address", |
|
|
|
|
|
|
|
"type": "string", |
|
|
|
|
|
|
|
"required": true, |
|
|
|
|
|
|
|
"min_length": 7 |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
"name": "expire_days", |
|
|
|
|
|
|
|
"title": "Expire (days)", |
|
|
|
|
|
|
|
"type": "integer", |
|
|
|
|
|
|
|
"max": 31, |
|
|
|
|
|
|
|
"min": 2 |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
"name": "network", |
|
|
|
|
|
|
|
"title": "To which network", |
|
|
|
|
|
|
|
"type": "radio", |
|
|
|
|
|
|
|
"options": [ |
|
|
|
|
|
|
|
["intra", "Whole intranet"], |
|
|
|
|
|
|
|
["machine", "Acceptance machine"] |
|
|
|
|
|
|
|
] |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
"name": "comment", |
|
|
|
|
|
|
|
"title": "Comment", |
|
|
|
|
|
|
|
"type": "text" |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
] |
|
|
|
} |
|
|
|
} |
|
|
|