import json import requests from urlparse import urlparse from flask_menu.classy import register_flaskview from flask_menu.classy import classy_menu_item from wazo_admin_ui.helpers.plugin import create_blueprint from wazo_admin_ui.helpers.classful import BaseView from wazo_admin_ui.helpers.form import BaseForm from wtforms.fields import SubmitField, StringField from wtforms.validators import InputRequired, Length, Regexp queuemetrics = create_blueprint('queuemetrics', __name__) configfile = '/etc/uniloader/uniloader.json' class Plugin(object): def load(self, dependencies): core = dependencies['flask'] QueuemetricsView.service = QueuemetricsService() QueuemetricsView.register(queuemetrics, route_base='/queuemetrics') register_flaskview(queuemetrics, QueuemetricsView) core.register_blueprint(queuemetrics) class QueuemetricsForm(BaseForm):
# Copyright 2017-2018 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from wazo_admin_ui.helpers.plugin import create_blueprint from .view import Login, Logout login = create_blueprint('login', __name__) logout = create_blueprint('logout', __name__) class Plugin(): def load(self, dependencies): core = dependencies['flask'] Login.babel = core.babel_instance Login.register(login, route_base='/login', route_prefix='') core.register_blueprint(login) Logout.register(logout, route_base='/logout', route_prefix='') core.register_blueprint(logout)
# Copyright 2017 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_babel import lazy_gettext as l_ from flask_menu.classy import register_flaskview from wazo_admin_ui.helpers.plugin import create_blueprint from wazo_admin_ui.helpers.destination import register_destination_form, register_listing_url from wazo_admin_ui.helpers.funckey import register_funckey_destination_form from .service import UserService, CtiService from .view import UserView, UserDestinationView, CtiProfilesView from .form import UserDestinationForm, UserFuncKeyDestinationForm user = create_blueprint('user', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] UserView.service = UserService() UserView.register(user, route_base='/users') register_flaskview(user, UserView) UserDestinationView.service = UserService() UserDestinationView.register(user, route_base='/users_listing') register_destination_form('user', l_('User'), UserDestinationForm) register_funckey_destination_form('user', l_('User'), UserFuncKeyDestinationForm)
# Copyright 2017 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_admin_ui.helpers.plugin import create_blueprint from .service import PagingService from .view import PagingView paging = create_blueprint('paging', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] PagingView.service = PagingService() PagingView.register(paging, route_base='/pagings') register_flaskview(paging, PagingView) core.register_blueprint(paging)
# Copyright 2018 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_admin_ui.helpers.plugin import create_blueprint from wazo_admin_ui.helpers.destination import register_listing_url from .service import CallFilterService from .view import CallFilterView, CallFilterListingView, CallFilterListingUserSurrogatesView call_filter = create_blueprint('call_filter', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] CallFilterView.service = CallFilterService() CallFilterView.register(call_filter, route_base='/callfilters') register_flaskview(call_filter, CallFilterView) CallFilterListingView.service = CallFilterService() CallFilterListingView.register(call_filter, route_base='/callfilters_listing') CallFilterListingUserSurrogatesView.service = CallFilterService() CallFilterListingUserSurrogatesView.register( call_filter, route_base='/callfilters_listing_surrogates') register_listing_url('call_filter',
# Copyright 2017 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_admin_ui.helpers.plugin import create_blueprint from .service import WebhookService from .view import WebhookView webhook = create_blueprint('webhook', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] WebhookView.service = WebhookService() WebhookView.register(webhook, route_base='/webhooks') register_flaskview(webhook, WebhookView) core.register_blueprint(webhook)
# Copyright 2017 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from wazo_admin_ui.helpers.plugin import create_blueprint from wazo_admin_ui.helpers.destination import register_listing_url from .service import EntityService from .view import EntityListingView entity = create_blueprint('entity', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] EntityListingView.service = EntityService() EntityListingView.register(entity, route_base='/entities_listing') register_listing_url('available_entity', 'entity.EntityListingView:list_entities') core.register_blueprint(entity)
# Copyright 2017-2018 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from wazo_admin_ui.helpers.plugin import create_blueprint from .view import Index index = create_blueprint('index', __name__) class Plugin(): def load(self, dependencies): core = dependencies['flask'] Index.register(index, route_base='/', route_prefix='') core.register_blueprint(index)
# Copyright 2017 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_admin_ui.helpers.plugin import create_blueprint from wazo_admin_ui.helpers.destination import register_listing_url from .service import LineService from .view import LineView, LineListingView line = create_blueprint('line', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] LineView.service = LineService() LineView.register(line, route_base='/lines') register_flaskview(line, LineView) LineListingView.service = LineService() LineListingView.register(line, route_base='/lines_listing') register_listing_url('line', 'line.LineListingView:list_json') core.register_blueprint(line)
# Copyright 2018 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_admin_ui.helpers.plugin import create_blueprint from wazo_admin_ui.helpers.destination import register_listing_url from .service import CallPermissionService from .view import CallPermissionView, CallPermissionListingView call_permission = create_blueprint('call_permission', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] CallPermissionView.service = CallPermissionService() CallPermissionView.register(call_permission, route_base='/callpermissions') register_flaskview(call_permission, CallPermissionView) CallPermissionListingView.service = CallPermissionService() CallPermissionListingView.register( call_permission, route_base='/callpermissions_listing') register_listing_url( 'callpermission', 'call_permission.CallPermissionListingView:list_json')
# Copyright 2017-2018 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_babel import lazy_gettext as l_ from flask_menu.classy import register_flaskview from wazo_admin_ui.helpers.plugin import create_blueprint from wazo_admin_ui.helpers.destination import register_destination_form, register_listing_url from .service import VoicemailService from .view import VoicemailView, VoicemailDestinationView from .form import VoicemailDestinationForm voicemail = create_blueprint('voicemail', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] VoicemailView.service = VoicemailService() VoicemailView.register(voicemail, route_base='/voicemails') register_flaskview(voicemail, VoicemailView) VoicemailDestinationView.service = VoicemailService() VoicemailDestinationView.register(voicemail, route_base='/voicemails_listing') register_destination_form('voicemail', l_('Voicemail'), VoicemailDestinationForm)
# -*- coding: utf-8 -*- # Copyright 2017 HUBERT Mickael (see the AUTHORS file) # SPDX-License-Identifier: MIT from flask_menu.classy import register_flaskview from wazo_admin_ui.helpers.plugin import create_blueprint from .service import JitsiMeetService from .view import JitsiMeetView jitsi_meet = create_blueprint('jitsi_meet', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] JitsiMeetView.service = JitsiMeetService() JitsiMeetView.register(jitsi_meet, route_base='/jitsimeet') register_flaskview(jitsi_meet, JitsiMeetView) core.register_blueprint(jitsi_meet)
# Copyright 2017-2018 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_admin_ui.helpers.plugin import create_blueprint from wazo_admin_ui.helpers.destination import register_listing_url from .service import ScheduleService from .view import ScheduleView, ScheduleListingView schedule = create_blueprint('schedule', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] ScheduleView.service = ScheduleService() ScheduleView.register(schedule, route_base='/schedules') register_flaskview(schedule, ScheduleView) ScheduleListingView.service = ScheduleService() ScheduleListingView.register(schedule, route_base='/schedules_listing') register_listing_url('schedule', 'schedule.ScheduleListingView:list_json') core.register_blueprint(schedule)
import requests import uuid from urllib.parse import urlparse from flask_menu.classy import register_flaskview from flask_menu.classy import classy_menu_item from wazo_admin_ui.helpers.plugin import create_blueprint from wazo_admin_ui.helpers.classful import BaseView from wazo_admin_ui.helpers.form import BaseForm from wtforms.fields import SubmitField, StringField from wtforms.validators import InputRequired, Length, Regexp facebook = create_blueprint('facebook', __name__) configfile = '/etc/facebook/config.json' class Plugin(object): def load(self, dependencies): core = dependencies['flask'] FBView.service = FBService() FBView.register(facebook, route_base='/facebook') register_flaskview(facebook, FBView) core.register_blueprint(facebook) class FBForm(BaseForm):
# Copyright 2017-2018 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_babel import lazy_gettext as l_ from flask_menu.classy import register_flaskview from wazo_admin_ui.helpers.plugin import create_blueprint from wazo_admin_ui.helpers.destination import register_destination_form, register_listing_url from .form import ExtensionDestinationForm from .service import ExtensionService, ExtensionFeaturesService from .view import ExtensionView, ExtensionListingView, ExtensionFeaturesView extension = create_blueprint('extension', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] ExtensionView.service = ExtensionService() ExtensionView.register(extension, route_base='/extensions') register_flaskview(extension, ExtensionView) ExtensionFeaturesView.service = ExtensionFeaturesService() ExtensionFeaturesView.register(extension, route_base='/extensions_features') register_flaskview(extension, ExtensionFeaturesView) ExtensionListingView.service = ExtensionService()
# Copyright 2017 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_babel import lazy_gettext as l_ from flask_menu.classy import register_flaskview from wazo_admin_ui.helpers.plugin import create_blueprint from wazo_admin_ui.helpers.destination import register_destination_form, register_listing_url from wazo_admin_ui.helpers.funckey import register_funckey_destination_form from .service import GroupService from .view import GroupView, GroupDestinationView from .form import GroupDestinationForm, GroupFuncKeyDestinationForm group = create_blueprint('group', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] GroupView.service = GroupService() GroupView.register(group, route_base='/groups') register_flaskview(group, GroupView) GroupDestinationView.service = GroupService() GroupDestinationView.register(group, route_base='/group_destination') register_destination_form('group', 'Group', GroupDestinationForm) register_funckey_destination_form('group', l_('Group'), GroupFuncKeyDestinationForm)
# Copyright 2017 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_admin_ui.helpers.plugin import create_blueprint from wazo_admin_ui.helpers.destination import register_listing_url from .service import OutcallService from .view import OutcallView, OutcallDestinationView outcall = create_blueprint('outcall', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] OutcallView.service = OutcallService() OutcallView.register(outcall, route_base='/outcalls') register_flaskview(outcall, OutcallView) OutcallDestinationView.service = OutcallService() OutcallDestinationView.register(outcall, route_base='/outcall_destination') register_listing_url('outcall', 'outcall.OutcallDestinationView:list_json') core.register_blueprint(outcall)
# Copyright 2017-2018 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_babel import lazy_gettext as l_ from flask_menu.classy import register_flaskview from wazo_admin_ui.helpers.plugin import create_blueprint from wazo_admin_ui.helpers.destination import register_destination_form, register_listing_url from .form import SoundDestinationForm from .service import SoundService from .view import SoundView, SoundListingView, SoundFileView sound = create_blueprint('sound', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] SoundView.service = SoundService() SoundView.register(sound, route_base='/sound') register_flaskview(sound, SoundView) SoundFileView.service = SoundService() SoundFileView.register(sound, route_base='/sound_files') register_flaskview(sound, SoundFileView) SoundListingView.service = SoundService() SoundListingView.register(sound, route_base='/sound_listing')