def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] IvrView.service = IvrService(clients['wazo_confd']) IvrView.register(ivr, route_base='/ivrs') register_flaskview(ivr, IvrView) IvrDestinationView.service = IvrService(clients['wazo_confd']) IvrDestinationView.register(ivr, route_base='/ivr_destination') register_destination_form('ivr', 'Ivr', IvrDestinationForm) register_listing_url('ivr', 'ivr.IvrDestinationView:list_json') core.register_blueprint(ivr)
def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] ConferenceView.service = ConferenceService(clients['wazo_confd']) ConferenceView.register(conference, route_base='/conferences') register_flaskview(conference, ConferenceView) ConferenceDestinationView.service = ConferenceService(clients['wazo_confd']) ConferenceDestinationView.register(conference, route_base='/conference_destination') register_destination_form('conference', l_('Conference'), ConferenceDestinationForm) register_funckey_destination_form('conference', l_('Conference'), ConferenceFuncKeyDestinationForm) register_listing_url('conference', 'conference.ConferenceDestinationView:list_json') core.register_blueprint(conference)
def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] VoicemailView.service = VoicemailService(clients['wazo_confd']) VoicemailView.register(voicemail, route_base='/voicemails') register_flaskview(voicemail, VoicemailView) VoicemailDestinationView.service = VoicemailService(clients['wazo_confd']) VoicemailDestinationView.register(voicemail, route_base='/voicemails_listing') register_destination_form('voicemail', l_('Voicemail'), VoicemailDestinationForm) register_listing_url('voicemail', 'voicemail.VoicemailDestinationView:list_json') core.register_blueprint(voicemail)
def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] SwitchboardView.service = SwitchboardService(clients['wazo_confd']) SwitchboardView.register(switchboard, route_base='/switchboards') register_flaskview(switchboard, SwitchboardView) SwitchboardDestinationView.service = SwitchboardService( clients['wazo_confd']) SwitchboardDestinationView.register( switchboard, route_base='/switchboard_destination') register_destination_form('switchboard', l_('Switchboard'), SwitchboardDestinationForm) register_listing_url( 'switchboard', 'switchboard.SwitchboardDestinationView:list_json') core.register_blueprint(switchboard)
def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] SoundView.service = SoundService(clients['wazo_confd']) SoundView.register(sound, route_base='/sound') register_flaskview(sound, SoundView) SoundFileView.service = SoundService(clients['wazo_confd']) SoundFileView.register(sound, route_base='/sound_files') register_flaskview(sound, SoundFileView) SoundListingView.service = SoundService(clients['wazo_confd']) SoundListingView.register(sound, route_base='/sound_listing') register_destination_form('sound', l_('Sound'), SoundDestinationForm) register_listing_url('sound', 'sound.SoundListingView:list_json') core.register_blueprint(sound)
def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] GroupView.service = GroupService(clients['wazo_confd']) GroupView.register(group, route_base='/groups') register_flaskview(group, GroupView) GroupDestinationView.service = GroupService(clients['wazo_confd']) GroupDestinationView.register(group, route_base='/group_destination') register_destination_form('group', 'Group', GroupDestinationForm) register_funckey_destination_form('group', l_('Group'), GroupFuncKeyDestinationForm) register_funckey_destination_form('groupmember', l_('Group Member'), GroupMemberFuncKeyDestinationForm) register_listing_url('group', 'group.GroupDestinationView:list_json') register_listing_url('groupmember', 'group.GroupDestinationView:list_json') core.register_blueprint(group)
def __init__(self, config): self.server = Server(config) plugin_helpers.load(namespace='wazo_ui.plugins', names=config['enabled_plugins'], dependencies={ 'config': config, 'flask': self.server.get_app(), 'clients': engine_clients }) ErrorExtractor.register_url_to_name_resources(URL_TO_NAME_RESOURCES) ErrorTranslator.register_resources(RESOURCES) ConfdErrorExtractor.register_generic_patterns(GENERIC_PATTERN_ERRORS) ConfdErrorExtractor.register_specific_patterns(SPECIFIC_PATTERN_ERRORS) register_destination_form('application', l_('Application'), ApplicationDestination) register_destination_form('hangup', l_('Hangup'), HangupDestination) register_destination_form('custom', l_('Custom'), CustomDestination) register_destination_form('none', l_('None'), NoneDestination, position=0) register_destination_form_application( 'callback_disa', l_('CallBack DISA'), ApplicationCallBackDISADestination, ) register_destination_form_application( 'directory', l_('Directory'), ApplicationDirectoryDestination, ) register_destination_form_application( 'disa', l_('DISA'), ApplicationDISADestination, ) register_destination_form_application( 'fax_to_mail', l_('Fax to Mail'), ApplicationFaxToMailDestination, ) register_destination_form_application( 'voicemail', l_('Voicemail'), ApplicationVoicemailDestination, )
def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] UserView.service = UserService(clients['wazo_confd'], clients['wazo_auth']) UserView.register(user, route_base='/users') register_flaskview(user, UserView) UserDestinationView.service = UserService(clients['wazo_confd'], clients['wazo_auth']) UserDestinationView.register(user, route_base='/users_listing') register_destination_form('user', l_('User'), UserDestinationForm) register_funckey_destination_form('user', l_('User'), UserFuncKeyDestinationForm) register_listing_url('user', 'user.UserDestinationView:list_json') register_listing_url('uuid_user', 'user.UserDestinationView:uuid_list_json') core.register_blueprint(user)
def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] ExtensionView.service = ExtensionService(clients['wazo_confd']) ExtensionView.register(extension, route_base='/extensions') register_flaskview(extension, ExtensionView) ExtensionFeaturesView.service = ExtensionFeaturesService( clients['wazo_confd']) ExtensionFeaturesView.register(extension, route_base='/extensions_features') register_flaskview(extension, ExtensionFeaturesView) ExtensionListingView.service = ExtensionService(clients['wazo_confd']) ExtensionListingView.register(extension, route_base='/extensions_listing') register_destination_form('extension', l_('Extension'), ExtensionDestinationForm) register_listing_url( 'available_extension_incall', 'extension.ExtensionListingView:list_available_exten_incall') register_listing_url( 'available_extension_group', 'extension.ExtensionListingView:list_available_exten_group') register_listing_url( 'available_extension_user', 'extension.ExtensionListingView:list_available_exten_user') register_listing_url( 'available_extension_queue', 'extension.ExtensionListingView:list_available_exten_queue') register_listing_url( 'available_extension_conference', 'extension.ExtensionListingView:list_available_exten_conference') core.register_blueprint(extension)