# Copyright 2017 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_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'] clients = dependencies['clients'] PagingView.service = PagingService(clients['wazo_confd']) PagingView.register(paging, route_base='/pagings') register_flaskview(paging, PagingView) core.register_blueprint(paging)
# Copyright 2019 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_ui.helpers.plugin import create_blueprint from .service import DhcpService from .view import DhcpView dhcp = create_blueprint('dhcp', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] DhcpView.service = DhcpService(clients['wazo_confd']) DhcpView.register(dhcp, route_base='/dhcp') register_flaskview(dhcp, DhcpView) core.register_blueprint(dhcp)
# 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_ui.helpers.destination import register_destination_form from wazo_ui.helpers.plugin import create_blueprint from wazo_ui.helpers.view import register_listing_url from .service import IvrService from .view import IvrView, IvrDestinationView from .form import IvrDestinationForm ivr = create_blueprint('ivr', __name__) class Plugin(object): 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')
# Copyright 2018 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0-or-later from flask_menu.classy import register_flaskview from wazo_ui.helpers.plugin import create_blueprint from .view import ExternalAuthView from .service import ExternalAuthService external_auth = create_blueprint('external_auth', __name__) class Plugin: def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] ExternalAuthView.service = ExternalAuthService(clients['wazo_auth']) ExternalAuthView.register(external_auth, route_base='/external_auths') register_flaskview(external_auth, ExternalAuthView) core.register_blueprint(external_auth)
# Copyright 2018-2019 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_ui.helpers.funckey import register_funckey_destination_form from wazo_ui.helpers.plugin import create_blueprint from wazo_ui.helpers.view import register_listing_url from .form import CallFilterFuncKeyDestinationForm from .service import CallFilterService from .view import CallFilterView, CallFilterMemberListingView call_filter = create_blueprint('call_filter', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] CallFilterView.service = CallFilterService(clients['wazo_confd']) CallFilterView.register(call_filter, route_base='/callfilters') register_flaskview(call_filter, CallFilterView) CallFilterMemberListingView.service = CallFilterService(clients['wazo_confd']) CallFilterMemberListingView.register(call_filter, route_base='/callfilters_listing') register_funckey_destination_form('bsfilter', l_('Call Filter'), CallFilterFuncKeyDestinationForm)
# Copyright 2018 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0-or-later from flask_menu.classy import register_flaskview from wazo_ui.helpers.plugin import create_blueprint_core as create_blueprint from .view import IndexView, WorkingTenantView index = create_blueprint('index', __name__) class Plugin(): def load(self, dependencies): core = dependencies['flask'] IndexView.register(index, route_base='/') register_flaskview(index, IndexView) WorkingTenantView.register(index, route_base='/set_working_tenant_uuid') register_flaskview(index, WorkingTenantView) core.register_blueprint(index)
# Copyright 2018 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_ui.helpers.plugin import create_blueprint from wazo_ui.helpers.view import register_listing_url from .service import AgentService from .view import AgentView, AgentListingView agent = create_blueprint('agent', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] AgentView.service = AgentService(clients['wazo_confd']) AgentView.register(agent, route_base='/agents') register_flaskview(agent, AgentView) AgentListingView.service = AgentService(clients['wazo_confd']) AgentListingView.register(agent, route_base='/agent_listing') register_listing_url('agent', 'agent.AgentListingView:list_json') core.register_blueprint(agent)
# 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_ui.helpers.destination import register_destination_form from wazo_ui.helpers.funckey import register_funckey_destination_form from wazo_ui.helpers.plugin import create_blueprint from wazo_ui.helpers.view import register_listing_url from .service import ConferenceService from .view import ConferenceView, ConferenceDestinationView from .form import ConferenceDestinationForm, ConferenceFuncKeyDestinationForm conference = create_blueprint('conference', __name__) class Plugin(object): 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')
# Copyright 2019 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_ui.helpers.plugin import create_blueprint from wazo_ui.helpers.view import register_listing_url from .service import AccessFeaturesService from .view import AccessFeatureView, AccessFeaturesListingView access_features = create_blueprint('access_features', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] service = AccessFeaturesService(clients['wazo_confd']) AccessFeatureView.service = service AccessFeatureView.register(access_features, route_base='/access_features') register_flaskview(access_features, AccessFeatureView) AccessFeaturesListingView.service = service AccessFeaturesListingView.register( access_features, route_base='/access_features_listing') register_listing_url( 'access_features_by_type',
# Copyright 2017 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_ui.helpers.plugin import create_blueprint from .service import CdrService from .view import CdrView cdr = create_blueprint('cdr', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] CdrView.service = CdrService(clients['wazo_call_logd']) CdrView.register(cdr, route_base='/cdrs') register_flaskview(cdr, CdrView) core.register_blueprint(cdr)
# Copyright 2020 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_ui.helpers.plugin import create_blueprint from wazo_ui.helpers.view import register_listing_url from .service import EndpointSIPTemplateService from .view import EndpointSIPTemplateView, SIPTemplateDestinationView sip_template = create_blueprint('sip_template', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] EndpointSIPTemplateView.service = EndpointSIPTemplateService( clients['wazo_confd']) EndpointSIPTemplateView.register(sip_template, route_base='/sip_templates') register_flaskview(sip_template, EndpointSIPTemplateView) SIPTemplateDestinationView.service = EndpointSIPTemplateService( clients['wazo_confd']) SIPTemplateDestinationView.register( sip_template, route_base='/sip_templates_listing') register_listing_url(
# Copyright 2018 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0-or-later from flask_menu.classy import register_flaskview from wazo_ui.helpers.plugin import create_blueprint from .view import DirdProfileView from .service import DirdProfileService from ..dird_source.service import DirdSourceService dird_profile = create_blueprint('dird_profile', __name__) class Plugin: def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] DirdProfileView.service = DirdProfileService(clients['wazo_dird']) DirdProfileView.source_service = DirdSourceService( clients['wazo_dird']) DirdProfileView.register(dird_profile, route_base='/dird_profiles') register_flaskview(dird_profile, DirdProfileView) core.register_blueprint(dird_profile)
# Copyright 2017 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_ui.helpers.plugin import create_blueprint from .service import IncallService from .view import IncallView incall = create_blueprint('incall', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] IncallView.service = IncallService(clients['wazo_confd']) IncallView.register(incall, route_base='/incalls') register_flaskview(incall, IncallView) core.register_blueprint(incall)
# Copyright 2020 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_ui.helpers.plugin import create_blueprint from wazo_ui.helpers.view import register_listing_url from .service import TransportService from .view import TransportView, TransportDestinationView transport = create_blueprint('transports', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] TransportView.service = TransportService(clients['wazo_confd']) TransportView.register(transport, route_base='/transports') register_flaskview(transport, TransportView) TransportDestinationView.service = TransportService( clients['wazo_confd']) TransportDestinationView.register(transport, route_base='/transports_listing') register_listing_url('transport', 'transports.TransportDestinationView:list_json')
# Copyright 2020 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_ui.helpers.plugin import create_blueprint from .view import GlobalSettingsView global_settings = create_blueprint('global_settings', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] GlobalSettingsView.register(global_settings, route_base='/global_settings') register_flaskview(global_settings, GlobalSettingsView) core.register_blueprint(global_settings)
# Copyright 2019 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_ui.helpers.plugin import create_blueprint from .service import HepService from .view import HepView hep = create_blueprint('hep', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] HepView.service = HepService(clients['wazo_confd']) HepView.register(hep, route_base='/hep') register_flaskview(hep, HepView) core.register_blueprint(hep)
# Copyright 2018 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_ui.helpers.plugin import create_blueprint from wazo_ui.helpers.view import register_listing_url from .service import SkillService from .view import SkillView, SkillListingView skill = create_blueprint('skill', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] SkillView.service = SkillService(clients['wazo_confd']) SkillView.register(skill, route_base='/skills') register_flaskview(skill, SkillView) SkillListingView.service = SkillService(clients['wazo_confd']) SkillListingView.register(skill, route_base='/skill_listing') register_listing_url('skill', 'skill.SkillListingView:list_json') core.register_blueprint(skill)
import json from flask import render_template from flask_menu.classy import register_flaskview from flask_babel import lazy_gettext as l_ from wazo_ui.helpers.plugin import create_blueprint from wazo_ui.helpers.form import BaseForm from wazo_ui.helpers.menu import menu_item from wazo_ui.helpers.view import BaseIPBXHelperView from wtforms.fields import SubmitField, StringField, SelectField from wtforms.fields.html5 import IntegerField from wtforms.validators import InputRequired, Length, NumberRange opus = create_blueprint('opus', __name__) config_file = '/etc/asterisk/codecs.d/opus_via_ui.conf' class Plugin(object): def load(self, dependencies): core = dependencies['flask'] OpusConfigurationView.service = OpusService() OpusConfigurationView.register(opus, route_base='/opus_configuration') register_flaskview(opus, OpusConfigurationView) core.register_blueprint(opus)
# Copyright 2017 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_ui.helpers.plugin import create_blueprint from wazo_ui.helpers.view import register_listing_url from .service import ContextService from .view import ContextView, ContextListingView context = create_blueprint('context', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] ContextView.service = ContextService(clients['wazo_confd']) ContextView.register(context, route_base='/contexts') register_flaskview(context, ContextView) ContextListingView.service = ContextService(clients['wazo_confd']) ContextListingView.register(context, route_base='/contexts_listing') register_listing_url('context_by_type', 'context.ContextListingView:list_json_by_type') register_listing_url('context', 'context.ContextListingView:list_json') register_listing_url('context_with_id', 'context.ContextListingView:list_json_with_id')
# Copyright 2018 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_ui.helpers.plugin import create_blueprint from wazo_ui.helpers.view 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'] clients = dependencies['clients'] CallPermissionView.service = CallPermissionService( clients['wazo_confd']) CallPermissionView.register(call_permission, route_base='/callpermissions') register_flaskview(call_permission, CallPermissionView) CallPermissionListingView.service = CallPermissionService( clients['wazo_confd']) CallPermissionListingView.register( call_permission, route_base='/callpermissions_listing') register_listing_url(
from flask_menu.classy import register_flaskview from wazo_ui.helpers.plugin import create_blueprint from wazo_ui.helpers.view import register_listing_url from .service import PluginService, ConfigService, ConfigurationService, RegistrarService from .view import ( PluginView, PluginListingView, ConfigRegistrarView, ConfigDeviceView, ConfigurationView, ConfigDeviceListingView, ConfigRegistrarListingView ) provisioning = create_blueprint('provisioning', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] PluginView.service = PluginService(clients['wazo_provd']) PluginView.register(provisioning, route_base='/provisioning/plugins') register_flaskview(provisioning, PluginView) ConfigRegistrarView.service = RegistrarService(clients['wazo_confd']) ConfigRegistrarView.register(provisioning, route_base='/provisioning/configs/registrar') register_flaskview(provisioning, ConfigRegistrarView)
# Copyright 2018-2019 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0-or-later from wazo_ui.helpers.plugin import create_blueprint_core as 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'] clients = dependencies['clients'] Login.babel = core.babel_instance Login.register(login, route_base='/login', route_prefix='') core.register_blueprint(login) Logout.auth_client = clients['wazo_auth'] Logout.register(logout, route_base='/logout', route_prefix='') core.register_blueprint(logout)
from wazo_ui.helpers.plugin import create_blueprint from wazo_ui.helpers.view import register_listing_url from .service import (PJSIPDocService, PJSIPGlobalSettingsService, PJSIPSystemSettingsService, IaxGeneralSettingsService, SccpGeneralSettingsService, VoicemailGeneralSettingsService, FeaturesGeneralSettingsService, ConfBridgeGeneralSettingsService) from .view import (PJSIPDocListingView, PJSIPGlobalSettingsView, PJSIPSystemSettingsView, IaxGeneralSettingsView, SccpGeneralSettingsView, VoicemailGeneralSettingsView, FeaturesGeneralSettingsView, ConfBridgeGeneralSettingsView) general_settings = create_blueprint('general_settings', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] PJSIPDocListingView.service = PJSIPDocService(clients['wazo_confd']) PJSIPDocListingView.register(general_settings, route_base='/list_json_by_section') PJSIPGlobalSettingsView.service = PJSIPGlobalSettingsService( clients['wazo_confd']) PJSIPGlobalSettingsView.register(general_settings, route_base='/pjsip_global_settings')
# 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_ui.helpers.destination import register_destination_form from wazo_ui.helpers.plugin import create_blueprint from wazo_ui.helpers.view import 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'] 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)
# Copyright 2018 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask import render_template from flask_menu.classy import register_flaskview from wtforms.fields import SubmitField, StringField from wtforms.validators import InputRequired, Length from wazo_ui.helpers.form import BaseForm from wazo_ui.helpers.menu import menu_item from wazo_ui.helpers.plugin import create_blueprint from wazo_ui.helpers.view import BaseIPBXHelperView asterisk_cli = create_blueprint('asterisk_cli', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] AsteriskCliView.service = AsteriskCliService(clients['wazo_amid']) AsteriskCliView.register(asterisk_cli, route_base='/asterisk_cli') register_flaskview(asterisk_cli, AsteriskCliView) core.register_blueprint(asterisk_cli) class AsteriskCliForm(BaseForm): command = StringField('Command', [InputRequired, Length(max=128)])
# 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_ui.helpers.plugin import create_blueprint from wazo_ui.helpers.view 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'] clients = dependencies['clients'] ScheduleView.service = ScheduleService(clients['wazo_confd']) ScheduleView.register(schedule, route_base='/schedules') register_flaskview(schedule, ScheduleView) ScheduleListingView.service = ScheduleService(clients['wazo_confd']) ScheduleListingView.register(schedule, route_base='/schedules_listing') register_listing_url('schedule', 'schedule.ScheduleListingView:list_json') core.register_blueprint(schedule)
# 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_ui.helpers.destination import register_destination_form from wazo_ui.helpers.plugin import create_blueprint from wazo_ui.helpers.view import register_listing_url from .service import SwitchboardService from .view import SwitchboardView, SwitchboardDestinationView from .form import SwitchboardDestinationForm switchboard = create_blueprint('switchboard', __name__) class Plugin(object): 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')
IdentityService, GroupService, TenantService, PolicyService) from .view import ( IdentityView, IdentityListingView, GroupView, GroupListingView, TenantView, TenantListingView, PolicyView, PolicyListingView, ) identity = create_blueprint('identity', __name__) identity_group = create_blueprint('identity_group', __name__) tenant = create_blueprint('tenant', __name__) policy = create_blueprint('policy', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] IdentityView.service = IdentityService(clients['wazo_auth']) IdentityView.register(identity, route_base='/identities') register_flaskview(identity, IdentityView)
# Copyright 2019 The Wazo Authors (see the AUTHORS file) # SPDX-License-Identifier: GPL-3.0+ from flask_menu.classy import register_flaskview from wazo_ui.helpers.plugin import create_blueprint from .service import HaService from .view import HaView ha = create_blueprint('ha', __name__) class Plugin(object): def load(self, dependencies): core = dependencies['flask'] clients = dependencies['clients'] HaView.service = HaService(clients['wazo_confd']) HaView.register(ha, route_base='/ha') register_flaskview(ha, HaView) core.register_blueprint(ha)
# 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_ui.helpers.destination import register_destination_form from wazo_ui.helpers.funckey import register_funckey_destination_form from wazo_ui.helpers.plugin import create_blueprint from wazo_ui.helpers.view import register_listing_url from .service import UserService from .view import UserView, UserDestinationView from .form import UserDestinationForm, UserFuncKeyDestinationForm user = create_blueprint('user', __name__) class Plugin(object): 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')