# -*- coding: utf-8 -*- """ indico_payment_stripe.blueprint ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The plugin blueprint. """ from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_payment_stripe.controllers import RHStripe blueprint = IndicoPluginBlueprint( 'payment_stripe', __name__, url_prefix=('/event/<confId>/registrations/' '<int:reg_form_id>/payment/response/stripe')) blueprint.add_url_rule('/handler', 'handler', RHStripe, methods=['GET'])
from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_chat.controllers.event import RHChatEventPage from indico_chat.controllers.logs import RHChatManageEventLogs, RHChatManageEventShowLogs, RHChatManageEventAttachLogs from indico_chat.controllers.management import ( RHChatManageEvent, RHChatManageEventModify, RHChatManageEventRefresh, RHChatManageEventRemove, RHChatManageEventCreate, RHChatManageEventAttach) blueprint = IndicoPluginBlueprint('chat', 'indico_chat', url_prefix='/event/<confId>') # Event blueprint.add_url_rule('/chat', 'event_page', RHChatEventPage) # Event management blueprint.add_url_rule('/manage/chat/', 'manage_rooms', RHChatManageEvent) blueprint.add_url_rule('/manage/chat/<int:chatroom_id>/', 'manage_rooms_modify', RHChatManageEventModify, methods=('GET', 'POST')) blueprint.add_url_rule('/manage/chat/<int:chatroom_id>/logs/', 'manage_rooms_logs', RHChatManageEventLogs) blueprint.add_url_rule('/manage/chat/<int:chatroom_id>/logs/show', 'manage_rooms_show_logs', RHChatManageEventShowLogs) blueprint.add_url_rule('/manage/chat/<int:chatroom_id>/logs/attach', 'manage_rooms_attach_logs', RHChatManageEventAttachLogs, methods=('POST', ))
# This file is part of the CERN Indico plugins. # Copyright (C) 2014 - 2021 CERN # # The CERN Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; see # the LICENSE file for more details. from indico.core.plugins import IndicoPluginBlueprint from indico_audiovisual.controllers import RHRequestList blueprint = IndicoPluginBlueprint('audiovisual', __name__, url_prefix='/service/audiovisual') blueprint.add_url_rule('/', 'request_list', RHRequestList)
cid = (contribution.legacy_mapping.legacy_contribution_id if contribution.legacy_mapping else contribution.id) params['contrib_id'] = '{}t{}'.format( contribution.event_id, cid) return params def _get_tracking_url(self): url = self.settings.get('server_url') url = url if url.endswith('/') else url + '/' url = urlparse.urlparse(url) return url.netloc + url.path blueprint = IndicoPluginBlueprint( 'piwik', __name__, url_prefix='/event/<confId>/manage/statistics') blueprint.add_url_rule('/', 'view', RHStatistics) blueprint.add_url_rule('/material', 'material', RHApiMaterial, methods=('GET', 'POST')) blueprint.add_url_rule('/data/downloads', 'data_downloads', RHApiDownloads, methods=('GET', 'POST')) blueprint.add_url_rule('/data/visits', 'data_visits', RHApiEventVisitsPerDay, methods=('GET', 'POST')) blueprint.add_url_rule('/graph/countries', 'graph_countries', RHApiEventGraphCountries,
# This file is part of Indico. # Copyright (C) 2002 - 2018 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # Indico is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Indico; if not, see <http://www.gnu.org/licenses/>. from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_search.controllers import RHSearch, RHSearchCategoryTitles blueprint = IndicoPluginBlueprint('search', 'indico_search') blueprint.add_url_rule('/search', 'search', RHSearch) blueprint.add_url_rule('/category/<int:category_id>/search', 'search', RHSearch) blueprint.add_url_rule('/event/<confId>/search', 'search', RHSearch) blueprint.add_url_rule('/category/search-titles', 'category_names', RHSearchCategoryTitles)
# Indico is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Indico; if not, see <http://www.gnu.org/licenses/>. from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_livesync.controllers import RHAddAgent, RHDeleteAgent, RHEditAgent blueprint = IndicoPluginBlueprint('livesync', 'indico_livesync', url_prefix='/admin/plugins/livesync') blueprint.add_url_rule('/agents/create/<backend>', 'add_agent', RHAddAgent, methods=('GET', 'POST')) blueprint.add_url_rule('/agents/<int:agent_id>', 'edit_agent', RHEditAgent, methods=('GET', 'POST')) blueprint.add_url_rule('/agents/<int:agent_id>', 'delete_agent', RHDeleteAgent, methods=('DELETE', ))
from indico.core.plugins import IndicoPluginBlueprint from indico_cern_access.controllers import ( RHExportCERNAccessCSV, RHExportCERNAccessExcel, RHRegistrationAccessIdentityData, RHRegistrationEnterIdentityData, RHRegistrationGrantCERNAccess, RHRegistrationPreviewCERNAccessEmail, RHRegistrationRevokeCERNAccess) blueprint = IndicoPluginBlueprint('cern_access', __name__, url_prefix='/event/<confId>') blueprint.add_url_rule( '/manage/registration/<int:reg_form_id>/registrations/cern-access/grant', 'registrations_grant_cern_access', RHRegistrationGrantCERNAccess, methods=('POST', )) blueprint.add_url_rule( '/manage/registration/<int:reg_form_id>/registrations/cern-access/revoke', 'registrations_revoke_cern_access', RHRegistrationRevokeCERNAccess, methods=('POST', )) blueprint.add_url_rule( '/manage/registration/<int:reg_form_id>/registrations/cern-access/email-preview', 'registrations_preview_cern_access_email', RHRegistrationPreviewCERNAccessEmail, methods=('POST', )) blueprint.add_url_rule( '/manage/registration/<int:reg_form_id>/registrations/cern-access.csv', 'registrations_cern_access_csv',
# This file is part of Indico. # Copyright (C) 2002 - 2018 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # Indico is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Indico; if not, see <http://www.gnu.org/licenses/>. from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_payment_paypal.controllers import RHPaypalCancel, RHPaypalIPN, RHPaypalSuccess blueprint = IndicoPluginBlueprint('payment_paypal', __name__, url_prefix='/event/<confId>/registrations/<int:reg_form_id>/payment/response/paypal') blueprint.add_url_rule('/cancel', 'cancel', RHPaypalCancel, methods=('GET', 'POST')) blueprint.add_url_rule('/success', 'success', RHPaypalSuccess, methods=('GET', 'POST')) # Used by PayPal to send an asynchronous notification for the transaction (pending, successful, etc) blueprint.add_url_rule('/ipn', 'notify', RHPaypalIPN, methods=('POST',))
# This file is part of the Indico plugins. # Copyright (C) 2017 - 2022 Max Fischer, Martin Claus, CERN # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from indico.core.plugins import IndicoPluginBlueprint from indico_payment_sixpay.controllers import (RHInitSixpayPayment, SixpayNotificationHandler, UserCancelHandler, UserFailureHandler, UserSuccessHandler) blueprint = IndicoPluginBlueprint( 'payment_sixpay', __name__, url_prefix='/event/<int:event_id>/registrations/<int:reg_form_id>/payment/sixpay' ) blueprint.add_url_rule('/init', 'init', RHInitSixpayPayment, methods=('GET', 'POST')) blueprint.add_url_rule('/failure', 'failure', UserCancelHandler, methods=('GET', 'POST')) blueprint.add_url_rule('/cancel', 'cancel', UserFailureHandler, methods=('GET', 'POST')) blueprint.add_url_rule('/success', 'success', UserSuccessHandler, methods=('GET', 'POST')) blueprint.add_url_rule('/notify', 'notify', SixpayNotificationHandler, methods=('Get', 'POST'))
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. # Created on Mar 9, 2018 # # @author: pedersen from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_mlz_export.controller import RHExportRegistrations, RHExportRegistration, RHExportRegistrationsFlat, RHExportRegistrationFlat blueprint = IndicoPluginBlueprint('mlzexport', __name__, url_prefix='/mlz/export') # API blueprint.add_url_rule('/<int:event_id>/registrants/<int:registrant_id>', 'api_registrant', RHExportRegistration, methods=('GET', )) blueprint.add_url_rule('/<int:event_id>/registrants', 'api_registrants', RHExportRegistrations) blueprint.add_url_rule('/<int:event_id>/registrants_flat/<int:registrant_id>', 'api_registrant_flat', RHExportRegistrationFlat, methods=('GET', )) blueprint.add_url_rule('/<int:event_id>/registrants_flat', 'api_registrants_flat', RHExportRegistrationsFlat)
# This file is part of the Indico plugins. # Copyright (C) 2002 - 2020 CERN # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_payment_touchnet.controllers import TouchnetPost, TouchnetSuccess, TouchnetCancel blueprint = IndicoPluginBlueprint('payment_touchnet', __name__, url_prefix='/event/<confId>/registrations/<int:reg_form_id>/payment/response/touchnet') blueprint.add_url_rule('/cancel', 'cancel', TouchnetCancel, methods=('GET', 'POST')) blueprint.add_url_rule('/success', 'success', TouchnetSuccess, methods=('GET', 'POST')) # Used by TouchNet to send an asynchronous notification for the transaction (pending, successful, etc) blueprint.add_url_rule('/tnp', 'notify', TouchnetPost, methods=('POST',))
# This file is part of the CERN Indico plugins. # Copyright (C) 2014 - 2019 CERN # # The CERN Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; see # the LICENSE file for more details. from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_burotel.controllers import RHUserExperiment blueprint = IndicoPluginBlueprint('burotel', __name__, url_prefix='/rooms-new') blueprint.add_url_rule('/api/user/experiment', 'user_experiment', RHUserExperiment, methods=('GET', 'POST')) # XXX: RHLanding is not handled here on purpose!
class UHSignInNoUI(SecureURLHandler): _endpoint = "user.signIn-noui" class UHPrebind(SecureURLHandler): _endpoint = "user.prebind" class UHExists(SecureURLHandler): _endpoint = "user.exists" # XMPP Prebind support blueprint.add_url_rule('/prebind', 'prebind', RHPrebind) # Exists blueprint.add_url_rule('/exists', 'exists', RHExists,methods=('GET', 'POST')) # Sign in blueprint.add_url_rule('/login/noui', 'signIn-noui', RHSignInNoUI, methods=('POST',)) def boshInitConnection(_login,_password): plugin = plugin_engine.get_plugin("indicoxmpp") base_host = plugin.settings.get("base_host") base_port = plugin.settings.get("base_port") jid = _login + "@" + base_host service = "http://{0}:{1}/http-bind".format(base_host, base_port) cli = BOSHClient(service, jid, _password)
if not self.settings.get('enabled_for_events') or not site_id_events: return {} params = {'site_id_events': site_id_events} if request.blueprint in ('event', 'events', 'contributions') and 'confId' in request.view_args: if not unicode(request.view_args['confId']).isdigit(): return {} params['event_id'] = request.view_args['confId'] contrib_id = request.view_args.get('contrib_id') if contrib_id is not None and unicode(contrib_id).isdigit(): contribution = Contribution.find_first(event_id=params['event_id'], id=contrib_id) if contribution: cid = (contribution.legacy_mapping.legacy_contribution_id if contribution.legacy_mapping else contribution.id) params['contrib_id'] = '{}t{}'.format(contribution.event_id, cid) return params def _get_tracking_url(self): url = self.settings.get('server_url') url = url if url.endswith('/') else url + '/' url = urlparse.urlparse(url) return url.netloc + url.path blueprint = IndicoPluginBlueprint('piwik', __name__, url_prefix='/event/<confId>/manage/statistics') blueprint.add_url_rule('/', 'view', RHStatistics) blueprint.add_url_rule('/material', 'material', RHApiMaterial, methods=('GET', 'POST')) blueprint.add_url_rule('/data/downloads', 'data_downloads', RHApiDownloads, methods=('GET', 'POST')) blueprint.add_url_rule('/data/visits', 'data_visits', RHApiEventVisitsPerDay, methods=('GET', 'POST')) blueprint.add_url_rule('/graph/countries', 'graph_countries', RHApiEventGraphCountries, methods=('GET', 'POST')) blueprint.add_url_rule('/graph/devices', 'graph_devices', RHApiEventGraphDevices, methods=('GET', 'POST'))
# This file is part of the Indico plugins. # Copyright (C) 2002 - 2021 CERN # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from indico.core.plugins import IndicoPluginBlueprint from indico_storage_s3.controllers import RHBuckets blueprint = IndicoPluginBlueprint('storage_s3', __name__, url_prefix='/api/plugin/s3') blueprint.add_url_rule('/buckets', 'buckets', RHBuckets)
# This file is part of the Indico plugins. # Copyright (C) 2002 - 2022 CERN # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from indico.core.plugins import IndicoPluginBlueprint from indico_payment_touchnet.controllers import RHTouchNetCancel, RHTouchNetIPN, RHTouchNetSuccess blueprint = IndicoPluginBlueprint( 'payment_touchnet', __name__, url_prefix= '/event/<int:event_id>/registrations/<int:reg_form_id>/payment/response/touchnet' ) blueprint.add_url_rule('/cancel', 'cancel', RHTouchNetCancel, methods=('GET', 'POST')) blueprint.add_url_rule('/success', 'success', RHTouchNetSuccess, methods=('GET', 'POST')) # Used by TouchNet to send an asynchronous notification for the transaction (pending, successful, etc) blueprint.add_url_rule('/ipn', 'notify', RHTouchNetIPN, methods=('POST', ))
# This file is part of the CERN Indico plugins. # Copyright (C) 2014 - 2017 CERN # # The CERN Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; see # the LICENSE file for more details. from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_conversion.conversion import RHConversionCheck, RHConversionFinished blueprint = IndicoPluginBlueprint('conversion', __name__) blueprint.add_url_rule('/conversion/finished', 'callback', RHConversionFinished, methods=('POST',)) blueprint.add_url_rule('/conversion/check', 'check', RHConversionCheck)
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # Indico is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Indico; if not, see <http://www.gnu.org/licenses/>. from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_vc_vidyo.controllers import RHVidyoRoomOwner blueprint = IndicoPluginBlueprint('vc_vidyo', 'indico_vc_vidyo') # Room management # using any(vidyo) instead of defaults since the event vc room locator # includes the service and normalization skips values provided in 'defaults' blueprint.add_url_rule('/event/<confId>/manage/videoconference/<any(vidyo):service>/<int:event_vc_room_id>/room-owner', 'set_room_owner', RHVidyoRoomOwner, methods=('POST',))
# This file is part of Indico. # Copyright (C) 2002 - 2018 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # Indico is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Indico; if not, see <http://www.gnu.org/licenses/>. from indico.core.plugins import IndicoPluginBlueprint from indico_previewer_jupyter.controllers import RHEventPreviewIPyNB blueprint = IndicoPluginBlueprint('previewer_jupyter', __name__) blueprint.add_url_rule('/preview/ipynb/<int:attachment_id>', 'preview_ipynb', RHEventPreviewIPyNB)
class UHSignInNoUI(SecureURLHandler): _endpoint = "user.signIn-noui" class UHPrebind(SecureURLHandler): _endpoint = "user.prebind" class UHExists(SecureURLHandler): _endpoint = "user.exists" # XMPP Prebind support blueprint.add_url_rule('/prebind', 'prebind', RHPrebind) # Exists blueprint.add_url_rule('/exists', 'exists', RHExists, methods=('GET', 'POST')) # Sign in blueprint.add_url_rule('/login/noui', 'signIn-noui', RHSignInNoUI, methods=('POST', )) def boshInitConnection(_login, _password): plugin = plugin_engine.get_plugin("indicoxmpp") base_host = plugin.settings.get("base_host") base_port = plugin.settings.get("base_port")
def get_timetable_buttons(self, *args, **kwargs): yield (_('Importer'), 'create-importer-dialog') def get_vars_js(self): return {'urls': {'import_data': plugin_url_rule_to_js('importer.import_data'), 'importers': plugin_url_rule_to_js('importer.importers'), 'day_end_date': plugin_url_rule_to_js('importer.day_end_date'), 'block_end_date': plugin_url_rule_to_js('importer.block_end_date'), 'add_contrib': url_rule_to_js('timetable.add_contribution'), 'create_subcontrib_rest': url_rule_to_js('contributions.create_subcontrib_rest'), 'create_contrib_reference_rest': url_rule_to_js('contributions.create_contrib_reference_rest'), 'create_subcontrib_reference_rest': url_rule_to_js('contributions' '.create_subcontrib_reference_rest'), 'add_link': url_rule_to_js('attachments.add_link')}} def register_assets(self): self.register_js_bundle('importer_js', 'js/importer.js') self.register_css_bundle('importer_css', 'css/importer.css') def register_importer_engine(self, importer_engine, plugin): self.importer_engines[importer_engine._id] = (importer_engine, plugin) blueprint = IndicoPluginBlueprint('importer', __name__) blueprint.add_url_rule('/importers/<importer_name>/search', 'import_data', RHImportData, methods=('POST',)) blueprint.add_url_rule('/importers/', 'importers', RHGetImporters) blueprint.add_url_rule('/importers/<importer_name>/event/<confId>/day-end-date', 'day_end_date', RHDayEndTime) blueprint.add_url_rule('/importers/<importer_name>/event/<confId>/entry/<entry_id>/block-end-date', 'block_end_date', RHBlockEndTime)
add_to_context('bar', name='foo', doc='foobar from example plugin', color='magenta!') class SettingsForm(IndicoForm): dummy_message = StringField('Dummy Message') show_message = BooleanField('Show Message') class WPExample(WPDecorated): def _get_body(self, params): return render_plugin_template('example.html', **params) class RHExample(RH): def _process(self): return WPExample(self, foo=u'bar').display() class RHTest(RH): def _process(self): return render_plugin_template('test.html') blueprint = IndicoPluginBlueprint('example', __name__) blueprint.add_url_rule('/example', 'example', view_func=RHExample) blueprint.add_url_rule('/example/x', 'example', view_func=RHExample) blueprint.add_url_rule('/test', 'test', view_func=RHTest)
# This file is part of the CERN Indico plugins. # Copyright (C) 2014 - 2017 CERN # # The CERN Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; see # the LICENSE file for more details. from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_ravem.controllers import RHRavemConnectRoom, RHRavemDisconnectRoom, RHRavemRoomStatus blueprint = IndicoPluginBlueprint( 'ravem', 'indico_ravem', url_prefix='/event/<confId>/videoconference/ravem') blueprint.add_url_rule('/room-status/<int:event_vc_room_id>/', 'room_status', RHRavemRoomStatus) blueprint.add_url_rule('/connect-room/<int:event_vc_room_id>/', 'connect_room', RHRavemConnectRoom, methods=('POST', )) blueprint.add_url_rule('/disconnect-room/<int:event_vc_room_id>/', 'disconnect_room', RHRavemDisconnectRoom, methods=('POST', ))
break else: raise BadRequest(response=redirect(event.url)) if vca.data.get('only_registered_users') and \ not any([x[1] for x in get_event_regforms(event, session.user)]): flash(_("The vc link is only available to registered users."), 'error') raise BadRequest(response=redirect(event.url)) vcroom = vca.vc_room url = vcroom.data['room_url_base'] data = {'id': contrib.friendly_id, 'username': session.user.name} req = requests.post(url, json=data) if req.status_code != 200: flash('Error: The redirector did not succeed!', 'error') raise BadRequest(response=redirect(event.url)) res = req.json() if res['status'] != 'success': flash(_("Videoconference link:") + ' ' + res['message'], 'error') raise BadRequest(response=redirect(event.url)) return redirect(res['url']) _bp = IndicoPluginBlueprint('vc_redirector', __name__) _bp.add_url_rule('/redirectVC/<contrib_id>', 'vc_redirect', view_func=RHredirectToExternal)
# This file is part of Indico. # Copyright (C) 2002 - 2018 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # Indico is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Indico; if not, see <http://www.gnu.org/licenses/>. from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_livesync.controllers import RHAddAgent, RHDeleteAgent, RHEditAgent blueprint = IndicoPluginBlueprint('livesync', 'indico_livesync', url_prefix='/admin/plugins/livesync') blueprint.add_url_rule('/agents/create/<backend>', 'add_agent', RHAddAgent, methods=('GET', 'POST')) blueprint.add_url_rule('/agents/<int:agent_id>', 'edit_agent', RHEditAgent, methods=('GET', 'POST')) blueprint.add_url_rule('/agents/<int:agent_id>', 'delete_agent', RHDeleteAgent, methods=('DELETE',))
# This file is part of the CERN Indico plugins. # Copyright (C) 2014 - 2020 CERN # # The CERN Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; see # the LICENSE file for more details. from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_livesync_cern.controllers import RHCategoriesJSON blueprint = IndicoPluginBlueprint('livesync_cern', __name__) blueprint.add_url_rule('/livesync/cernsearch/categories.json', 'categories_json', RHCategoriesJSON)
# This file is part of the Indico plugins. # Copyright (C) 2002 - 2020 CERN # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_search.controllers import RHSearch, RHSearchCategoryTitles blueprint = IndicoPluginBlueprint('search', 'indico_search') blueprint.add_url_rule('/search', 'search', RHSearch) blueprint.add_url_rule('/category/<int:category_id>/search', 'search', RHSearch) blueprint.add_url_rule('/event/<confId>/search', 'search', RHSearch) blueprint.add_url_rule('/category/search-titles', 'category_names', RHSearchCategoryTitles)
from indico.core.plugins import IndicoPluginBlueprint from indico_cern_access.controllers import (RHExportCERNAccessCSV, RHExportCERNAccessExcel, RHRegistrationAccessIdentityData, RHRegistrationBulkCERNAccess, RHRegistrationEnterIdentityData) blueprint = IndicoPluginBlueprint('cern_access', __name__, url_prefix='/event/<confId>') blueprint.add_url_rule( '/manage/registration/<int:reg_form_id>/registrations/cern-access', 'registrations_cern_access', RHRegistrationBulkCERNAccess, methods=('POST', )) blueprint.add_url_rule( '/manage/registration/<int:reg_form_id>/registrations/cern-access.csv', 'registrations_cern_access_csv', RHExportCERNAccessCSV, defaults={'type': 'cern-access'}) blueprint.add_url_rule( '/manage/registration/<int:reg_form_id>/registrations/cern-access.xlsx', 'registrations_cern_access_excel', RHExportCERNAccessExcel, defaults={'type': 'cern-access'}) blueprint.add_url_rule( '/manage/registration/<int:reg_form_id>/registrations/<int:registration_id>/cern-access-data', 'enter_identity_data',
# Indico is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Indico; if not, see <http://www.gnu.org/licenses/>. from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_payment_paypal.controllers import RHPaypalCancel, RHPaypalIPN, RHPaypalSuccess blueprint = IndicoPluginBlueprint( 'payment_paypal', __name__, url_prefix= '/event/<confId>/registrations/<int:reg_form_id>/payment/response/paypal') blueprint.add_url_rule('/cancel', 'cancel', RHPaypalCancel, methods=('GET', 'POST')) blueprint.add_url_rule('/success', 'success', RHPaypalSuccess, methods=('GET', 'POST')) # Used by PayPal to send an asynchronous notification for the transaction (pending, successful, etc) blueprint.add_url_rule('/ipn', 'notify', RHPaypalIPN, methods=('POST', ))
self.register_js_bundle('global_js', 'js/global.js') self.register_css_bundle('example_css', 'css/example.scss') self.register_css_bundle('global_css', 'css/global.scss') blueprint = IndicoPluginBlueprint('example', __name__) class WPExample(WPDecorated): def _getBody(self, params): locale = get_current_locale() params['language'] = IndicoLocale.parse('en').languages[locale.language] params['python_msg_core_i18n'] = core_gettext('Hello world!') params['python_msg_plugin_i18n'] = _('Hello world!') return render_plugin_template('example:example.html', **params) class RHExample(RH): def _process(self): return WPExample(self, foo=u'bar').display() class RHTest(RH): def _process(self): return render_plugin_template('test.html') blueprint.add_url_rule('/example', 'example', view_func=RHExample) blueprint.add_url_rule('/example/x', 'example', view_func=RHExample) blueprint.add_url_rule('/test', 'test', view_func=RHTest)
# along with Indico; if not, see <http://www.gnu.org/licenses/>. from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_chat.controllers.event import RHChatEventPage from indico_chat.controllers.logs import RHChatManageEventLogs, RHChatManageEventShowLogs, RHChatManageEventAttachLogs from indico_chat.controllers.management import (RHChatManageEvent, RHChatManageEventModify, RHChatManageEventRefresh, RHChatManageEventRemove, RHChatManageEventCreate, RHChatManageEventAttach) blueprint = IndicoPluginBlueprint('chat', 'indico_chat', url_prefix='/event/<confId>') # Event blueprint.add_url_rule('/chat', 'event_page', RHChatEventPage) # Event management blueprint.add_url_rule('/manage/chat/', 'manage_rooms', RHChatManageEvent) blueprint.add_url_rule('/manage/chat/<int:chatroom_id>/', 'manage_rooms_modify', RHChatManageEventModify, methods=('GET', 'POST')) blueprint.add_url_rule('/manage/chat/<int:chatroom_id>/logs/', 'manage_rooms_logs', RHChatManageEventLogs) blueprint.add_url_rule('/manage/chat/<int:chatroom_id>/logs/show', 'manage_rooms_show_logs', RHChatManageEventShowLogs) blueprint.add_url_rule('/manage/chat/<int:chatroom_id>/logs/attach', 'manage_rooms_attach_logs', RHChatManageEventAttachLogs, methods=('POST',)) blueprint.add_url_rule('/manage/chat/<int:chatroom_id>/refresh', 'manage_rooms_refresh', RHChatManageEventRefresh, methods=('POST',)) blueprint.add_url_rule('/manage/chat/<int:chatroom_id>/remove', 'manage_rooms_remove', RHChatManageEventRemove, methods=('POST',)) blueprint.add_url_rule('/manage/chat/create', 'manage_rooms_create', RHChatManageEventCreate,
# This file is part of the Indico plugins. # Copyright (C) 2002 - 2020 CERN # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_ursh.controllers import RHCustomShortURLPage, RHGetShortURL, RHShortURLPage blueprint = IndicoPluginBlueprint('ursh', 'indico_ursh') blueprint.add_url_rule('/ursh', 'get_short_url', RHGetShortURL, methods=('POST',)) blueprint.add_url_rule('/url-shortener', 'shorten_url', RHShortURLPage) blueprint.add_url_rule('/event/<confId>/manage/short-url', 'shorten_event_url', RHCustomShortURLPage, methods=('GET', 'POST'))
url_rule_to_js('contributions.create_contrib_reference_rest'), 'create_subcontrib_reference_rest': url_rule_to_js('contributions' '.create_subcontrib_reference_rest'), 'add_link': url_rule_to_js('attachments.add_link') } } def register_assets(self): self.register_js_bundle('importer_js', 'js/importer.js') self.register_css_bundle('importer_css', 'css/importer.css') def register_importer_engine(self, importer_engine, plugin): self.importer_engines[importer_engine._id] = (importer_engine, plugin) blueprint = IndicoPluginBlueprint('importer', __name__) blueprint.add_url_rule('/importers/<importer_name>/search', 'import_data', RHImportData, methods=('POST', )) blueprint.add_url_rule('/importers/', 'importers', RHGetImporters) blueprint.add_url_rule( '/importers/<importer_name>/event/<confId>/day-end-date', 'day_end_date', RHDayEndTime) blueprint.add_url_rule( '/importers/<importer_name>/event/<confId>/entry/<entry_id>/block-end-date', 'block_end_date', RHBlockEndTime)
# This file is part of Indico. # Copyright (C) 2017 Bjoern Pedersen. # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # Indico is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Indico; if not, see <http://www.gnu.org/licenses/>. from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_print_checkin.controllers import RHPrintBadgeManageEvent blueprint = IndicoPluginBlueprint('print_checkin', 'print_checkin', url_prefix='/event/<confId>') # Event management blueprint.add_url_rule('/manage/printbadge/', 'configure', RHPrintBadgeManageEvent, methods=('GET', 'POST'))
# This file is part of the Indico plugins. # Copyright (C) 2002 - 2020 CERN # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from indico.core.plugins import IndicoPluginBlueprint from indico_vc_bbb.controllers import RHStartAndJoin, RHVCManageEventSlides, RHVCManageEventRecordings, RHVCViewEventRecordings blueprint = IndicoPluginBlueprint('vc_bbb', 'indico_vc_bbb') blueprint.add_url_rule( '/event/<int:event_id>/videoconference/<any(bbb):service>/<int:event_vc_room_id>/start', 'start_and_join', RHStartAndJoin, methods=('POST', 'GET')) blueprint.add_url_rule( '/event/<int:event_id>/manage/videoconference/<any(bbb):service>/<int:event_vc_room_id>/slides', 'slides', RHVCManageEventSlides, methods=('POST', 'GET')) blueprint.add_url_rule( '/event/<int:event_id>/manage/videoconference/<any(bbb):service>/<int:event_vc_room_id>/recordings', 'recordings', RHVCManageEventRecordings) blueprint.add_url_rule( '/event/<int:event_id>/manage/videoconference/<any(bbb):service>/<int:event_vc_room_id>/view_recordings', 'view_recordings', RHVCViewEventRecordings)
from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_payment_cern.controllers import ( RHPaymentCancel, RHPaymentCancelBackground, RHPaymentDecline, RHPaymentSuccess, RHPaymentSuccessBackground, RHPaymentUncertain) blueprint = IndicoPluginBlueprint( 'payment_cern', __name__, url_prefix= '/event/<confId>/registrations/<int:reg_form_id>/payment/response/cern') blueprint.add_url_rule('/cancel', 'cancel', RHPaymentCancel, methods=('GET', 'POST')) blueprint.add_url_rule('/decline', 'decline', RHPaymentDecline, methods=('GET', 'POST')) blueprint.add_url_rule('/uncertain', 'uncertain', RHPaymentUncertain, methods=('GET', 'POST')) blueprint.add_url_rule('/success', 'success', RHPaymentSuccess, methods=('GET', 'POST')) # ID-less URL for the callback where we cannot customize anything besides a single variable blueprint.add_url_rule('!/payment/cern/success',
from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from .request_handlers import (SixPayResponseHandler, UserCancelHandler, UserFailureHandler, UserSuccessHandler) #: url mount points exposing callbacks blueprint = IndicoPluginBlueprint( 'payment_sixpay', __name__, url_prefix=('/event/<confId>/registrations/' '<int:reg_form_id>/payment/response/sixpay')) blueprint.add_url_rule('/failure', 'failure', UserCancelHandler, methods=('GET', 'POST')) blueprint.add_url_rule('/cancel', 'cancel', UserFailureHandler, methods=('GET', 'POST')) blueprint.add_url_rule('/success', 'success', UserSuccessHandler, methods=('GET', 'POST')) # Used by SixPay to send an asynchronous notification for the transaction blueprint.add_url_rule('/ipn', 'notify', SixPayResponseHandler, methods=('Get', 'POST'))
# This file is part of the Indico plugins. # Copyright (C) 2020 - 2021 CERN and ENEA # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from indico.core.plugins import IndicoPluginBlueprint from indico_vc_zoom.controllers import RHRoomAlternativeHost, RHWebhook blueprint = IndicoPluginBlueprint('vc_zoom', 'indico_vc_zoom') # Room management # using any(zoom) instead of defaults since the event vc room locator # includes the service and normalization skips values provided in 'defaults' blueprint.add_url_rule( '/event/<int:event_id>/manage/videoconference/<any(zoom):service>/<int:event_vc_room_id>/make-me-alt-host', 'make_me_alt_host', RHRoomAlternativeHost, methods=('POST', )) blueprint.add_url_rule('/api/plugin/zoom/webhook', 'webhook', RHWebhook, methods=('POST', ))
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # Indico is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Indico; if not, see <http://www.gnu.org/licenses/>. from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_search.controllers import RHSearch, RHSearchCategoryTitles blueprint = IndicoPluginBlueprint('search', 'indico_search') blueprint.add_url_rule('/search', 'search', RHSearch, methods=('GET', 'POST')) blueprint.add_url_rule('/category/<categId>/search', 'search', RHSearch, methods=('GET', 'POST')) blueprint.add_url_rule('/event/<confId>/search', 'search', RHSearch, methods=('GET', 'POST')) blueprint.add_url_rule('/category/search-titles', 'category_names', RHSearchCategoryTitles)
# This file is part of the Indico plugins. # Copyright (C) 2002 - 2021 CERN # # The Indico plugins are free software; you can redistribute # them and/or modify them under the terms of the MIT License; # see the LICENSE file for more details. from indico.core.plugins import IndicoPluginBlueprint from indico_vc_vidyo.controllers import RHVidyoRoomOwner blueprint = IndicoPluginBlueprint('vc_vidyo', 'indico_vc_vidyo') # Room management # using any(vidyo) instead of defaults since the event vc room locator # includes the service and normalization skips values provided in 'defaults' blueprint.add_url_rule( '/event/<int:event_id>/manage/videoconference/<any(vidyo):service>/<int:event_vc_room_id>/room-owner', 'set_room_owner', RHVidyoRoomOwner, methods=('POST', ))
# This file is part of Indico. # Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # Indico is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Indico; if not, see <http://www.gnu.org/licenses/>. from indico.core.plugins import IndicoPluginBlueprint from indico_previewer_jupyter.controllers import RHEventPreviewIPyNB blueprint = IndicoPluginBlueprint('previewer_jupyter', __name__) blueprint.add_url_rule('/preview/ipynb/<int:attachment_id>', 'preview_ipynb', RHEventPreviewIPyNB)
# This file is part of Indico. # Copyright (C) 2002 - 2018 European Organization for Nuclear Research (CERN). # # Indico is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # Indico is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Indico; if not, see <http://www.gnu.org/licenses/>. from __future__ import unicode_literals from indico.core.plugins import IndicoPluginBlueprint from indico_storage_s3.controllers import RHBuckets blueprint = IndicoPluginBlueprint('storage_s3', __name__, url_prefix='/api/plugin/s3') blueprint.add_url_rule('/buckets', 'buckets', RHBuckets)