def product_required_signoffs_history(): """GET /required_signoffs/product/history""" product_required_signoffs_history = { "product_required_signoffs": ProductRequiredSignoffsHistoryAPIView().get_all(), "sc_product_required_signoffs": ProductRequiredSignoffScheduledChangeHistoryView().get_all(), } histories = { "Product Required Signoffs": json.loads( product_required_signoffs_history["product_required_signoffs"].data ), "Product Required Signoffs Scheduled Change": json.loads( product_required_signoffs_history["sc_product_required_signoffs"]. data), } return histories
def product_required_signoffs_history(): """GET /required_signoffs/product/history""" product_required_signoffs_history = { 'product_required_signoffs': ProductRequiredSignoffsHistoryAPIView().get_all(), 'sc_product_required_signoffs': ProductRequiredSignoffScheduledChangeHistoryView().get_all() } histories = { 'Product Required Signoffs': json.loads( product_required_signoffs_history['product_required_signoffs'].data ), 'Product Required Signoffs Scheduled Change': json.loads( product_required_signoffs_history['sc_product_required_signoffs']. data) } return histories
Compress(app) # Endpoints required for the Balrog 2.0 UI. # In the Mozilla deployments of Balrog, both the the admin API (these endpoints) # and the static admin UI are hosted on the same domain. This API wsgi app is # hosted at "/api", which is stripped away by the web server before we see # these requests. app.add_url_rule("/scheduled_changes/rules/<int:sc_id>", view_func=RuleScheduledChangeView.as_view("scheduled_change_rules")) app.add_url_rule("/scheduled_changes/rules/<int:sc_id>/revisions", view_func=RuleScheduledChangeHistoryView.as_view("scheduled_change_rules_history")) app.add_url_rule("/scheduled_changes/permissions/<int:sc_id>", view_func=PermissionScheduledChangeView.as_view("scheduled_change_permissions")) app.add_url_rule("/scheduled_changes/permissions/<int:sc_id>/revisions", view_func=PermissionScheduledChangeHistoryView.as_view("scheduled_change_permissions_history")) app.add_url_rule("/scheduled_changes/releases/<int:sc_id>", view_func=ReleaseScheduledChangeView.as_view("scheduled_change_releases")) app.add_url_rule("/scheduled_changes/releases/<int:sc_id>/revisions", view_func=ReleaseScheduledChangeHistoryView.as_view("scheduled_change_releases_history")) app.add_url_rule("/scheduled_changes/required_signoffs/product/<int:sc_id>", view_func=ProductRequiredSignoffScheduledChangeView.as_view("scheduled_change_product_rs")) app.add_url_rule("/scheduled_changes/required_signoffs/product/<int:sc_id>/revisions", view_func=ProductRequiredSignoffScheduledChangeHistoryView.as_view("scheduled_change_product_rs_history")) app.add_url_rule("/scheduled_changes/required_signoffs/permissions/<int:sc_id>", view_func=PermissionsRequiredSignoffScheduledChangeView.as_view("scheduled_change_permissions_rs")) app.add_url_rule("/scheduled_changes/required_signoffs/permissions/<int:sc_id>/revisions", view_func=PermissionsRequiredSignoffScheduledChangeHistoryView.as_view("scheduled_change_permissions_rs_history"))
view_func=ProductRequiredSignoffsScheduledChangesView.as_view( "scheduled_changes_product_rs")) app.add_url_rule("/scheduled_changes/required_signoffs/product/<int:sc_id>", view_func=ProductRequiredSignoffScheduledChangeView.as_view( "scheduled_change_product_rs")) app.add_url_rule( "/scheduled_changes/required_signoffs/product/<int:sc_id>/enact", view_func=EnactProductRequiredSignoffScheduledChangeView.as_view( "enact_scheduled_change_product_rs")) app.add_url_rule( "/scheduled_changes/required_signoffs/product/<int:sc_id>/signoffs", view_func=ProductRequiredSignoffScheduledChangeSignoffsView.as_view( "scheduled_change_product_rs_signoffs")) app.add_url_rule( "/scheduled_changes/required_signoffs/product/<int:sc_id>/revisions", view_func=ProductRequiredSignoffScheduledChangeHistoryView.as_view( "scheduled_change_product_rs_history")) app.add_url_rule( "/scheduled_changes/required_signoffs/permissions", view_func=PermissionsRequiredSignoffsScheduledChangesView.as_view( "scheduled_changes_permissions_rs")) app.add_url_rule( "/scheduled_changes/required_signoffs/permissions/<int:sc_id>", view_func=PermissionsRequiredSignoffScheduledChangeView.as_view( "scheduled_change_permissions_rs")) app.add_url_rule( "/scheduled_changes/required_signoffs/permissions/<int:sc_id>/enact", view_func=EnactPermissionsRequiredSignoffScheduledChangeView.as_view( "enact_scheduled_change_permissions_rs")) app.add_url_rule( "/scheduled_changes/required_signoffs/permissions/<int:sc_id>/signoffs", view_func=PermissionsRequiredSignoffScheduledChangeSignoffsView.as_view(
def scheduled_change_product_rs_history_post(sc_id): """POST /scheduled_changes/required_signoffs/product/<int:sc_id>/revisions""" return ProductRequiredSignoffScheduledChangeHistoryView().post(sc_id)