Skip to content

Commit

Permalink
feat(telephony.carrier.sip): add new module
Browse files Browse the repository at this point in the history
ref: MANAGER-3210

Co-authored-by: Marie JONES <[email protected]>
Co-authored-by: JeremyDec <[email protected]>
  • Loading branch information
3 people committed Oct 8, 2019
1 parent 1839842 commit 4d0ee68
Show file tree
Hide file tree
Showing 16 changed files with 322 additions and 80 deletions.
1 change: 1 addition & 0 deletions packages/manager/apps/telecom/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"dependencies": {
"@bower_components/angular-ui-utils": "angular-ui/ui-utils#0.2.3",
"@ovh-ux/manager-banner": "^1.1.0",
"@ovh-ux/manager-carrier-sip": "^0.0.0",
"@ovh-ux/manager-config": "^0.3.0",
"@ovh-ux/manager-core": "^7.1.3",
"@ovh-ux/manager-freefax": "^5.2.2",
Expand Down
4 changes: 3 additions & 1 deletion packages/manager/apps/telecom/src/app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import ngOvhLineDiagnostics from '@ovh-ux/ng-ovh-line-diagnostics';
import ngOvhContact from '@ovh-ux/ng-ovh-contact';

import TelecomAppCtrl from './app.controller';
import carrierSip from './telecom/telephony/carrierSip';
import navbar from '../components/navbar';

import 'ovh-ui-kit-bs/dist/ovh-ui-kit-bs.css';
Expand Down Expand Up @@ -103,6 +104,7 @@ angular.module('managerApp', [
'ui.sortable',
'ui.validate',
'validation.match',
carrierSip,
])

/*= ========= GLOBAL OPTIONS ========== */
Expand Down Expand Up @@ -210,7 +212,7 @@ angular.module('managerApp', [
$logProvider.debugEnabled(false);
})

.run((
.run(/* @ngInject */ (
$transitions,
$translate,
$translatePartialLoader,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import angular from 'angular';

// Module dependencies.
import uiRouter from '@uirouter/angularjs';
import ovhManagerCarrierSip from '@ovh-ux/manager-carrier-sip';

// Routing and configuration.
import routing from './cdr.routing';

const moduleName = 'ovhManagerTelecomCarrierSipDashboardCdr';

angular
.module(moduleName, [
ovhManagerCarrierSip,
uiRouter,
])
.config(routing);

export default moduleName;
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export default /* @ngInject */ ($stateProvider) => {
$stateProvider.state('telecom.telephony.carrierSip.cdr', {
url: '/cdr',
views: {
'@telecom.telephony.carrierSip': 'carrierSipCdr',
},
});
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import angular from 'angular';

// Module dependencies.
import uiRouter from '@uirouter/angularjs';
import oclazyload from 'oclazyload';

const moduleName = 'ovhManagerTelecomCarrierSipDashboardCdrLazyLoading';

angular
.module(moduleName, [
oclazyload,
uiRouter,
])
.config(/* @ngInject */($stateProvider) => {
$stateProvider.state('telecom.telephony.carrierSip.cdr.**', {
url: '/cdr',
lazyLoad: ($transition$) => {
const $ocLazyLoad = $transition$.injector().get('$ocLazyLoad');

return import('./cdr.module')
.then(mod => $ocLazyLoad.inject(mod.default || mod));
},
});
});
export default moduleName;
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import angular from 'angular';

// Module dependencies.
import uiRouter from '@uirouter/angularjs';

import cdr from './cdr';
import endpoints from './endpoints';

// Routing and configuration.
import routing from './dashboard.routing';

const moduleName = 'ovhManagerTelecomCarrierSipDashboard';

angular
.module(moduleName, [
cdr,
endpoints,
uiRouter,
])
.config(routing);

export default moduleName;
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
export default /* @ngInject */ ($stateProvider) => {
$stateProvider.state('telecom.telephony.carrierSip', {
url: '/carrierSip/:serviceName',
views: {
'[email protected]': 'carrierSipDashboard',
},
resolve: {
billingAccount: /* @ngInject */ $transition$ => $transition$.params().billingAccount,
billingLink: /* @ngInject */ (
$state,
billingAccount,
) => $state.href('telecom.telephony.billing', { billingAccount }),
carrierSip: /* @ngInject */ (
billingAccount,
CarrierSipService,
serviceName,
) => CarrierSipService.getCarrierSip(billingAccount, serviceName),
cdrsLink: /* @ngInject */ (
$state,
billingAccount,
serviceName,
) => $state.href('telecom.telephony.carrierSip.cdr', { billingAccount, serviceName }),
currentActiveLink: /* @ngInject */ ($transition$, $state) => () => $state
.href($state.current.name, $transition$.params()),
dashboardLink: /* @ngInject */ (
$state,
billingAccount,
serviceName,
) => $state.href('telecom.telephony.carrierSip', { billingAccount, serviceName }),
endpointsLink: /* @ngInject */ (
$state,
billingAccount,
serviceName,
) => $state.href('telecom.telephony.carrierSip.endpoints', { billingAccount, serviceName }),
serviceInfos: /* @ngInject */ (
CarrierSipService,
serviceName,
) => CarrierSipService.getServiceInfos(serviceName),
serviceName: /* @ngInject */ $transition$ => $transition$.params().serviceName,
settings: /* @ngInject */ (
billingAccount,
CarrierSipService,
serviceName,
) => CarrierSipService.getSettings(billingAccount, serviceName),
},
});
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import angular from 'angular';

// Module dependencies.
import uiRouter from '@uirouter/angularjs';
import ovhManagerCarrierSip from '@ovh-ux/manager-carrier-sip';

// Routing and configuration.
import routing from './endpoints.routing';

const moduleName = 'ovhManagerTelecomCarrierSipDashboardEndpoints';

angular
.module(moduleName, [
ovhManagerCarrierSip,
uiRouter,
])
.config(routing);

export default moduleName;
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
export default /* @ngInject */ ($stateProvider) => {
$stateProvider.state('telecom.telephony.carrierSip.endpoints', {
url: '/endpoints',
views: {
'@telecom.telephony.carrierSip': 'carrierSipEndpoints',
},
resolve: {
endpoints: /* @ngInject */ (
billingAccount,
CarrierSipService,
serviceName,
) => CarrierSipService.getEndpoints(billingAccount, serviceName),
},
});
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import angular from 'angular';

// Module dependencies.
import uiRouter from '@uirouter/angularjs';
import oclazyload from 'oclazyload';

const moduleName = 'ovhManagerTelecomCarrierSipDashboardEndpointsLazyLoading';

angular
.module(moduleName, [
oclazyload,
uiRouter,
])
.config(/* @ngInject */($stateProvider) => {
$stateProvider.state('telecom.telephony.carrierSip.endpoints.**', {
url: '/endpoints',
lazyLoad: ($transition$) => {
const $ocLazyLoad = $transition$.injector().get('$ocLazyLoad');

return import('./endpoints.module')
.then(mod => $ocLazyLoad.inject(mod.default || mod));
},
});
});

export default moduleName;
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import angular from 'angular';

// Module dependencies.
import uiRouter from '@uirouter/angularjs';
import oclazyload from 'oclazyload';

const moduleName = 'ovhManagerTelecomCarrierSipDashboardLazyLoading';

angular
.module(moduleName, [
oclazyload,
uiRouter,
])
.config(/* @ngInject */($stateProvider) => {
$stateProvider.state('telecom.telephony.carrierSip.**', {
url: '/carrierSip',
lazyLoad: ($transition$) => {
const $ocLazyLoad = $transition$.injector().get('$ocLazyLoad');

return import('./dashboard.module')
.then(mod => $ocLazyLoad.inject(mod.default || mod));
},
});
});
export default moduleName;
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import angular from 'angular';
import ovhManagerCarrierSip from '@ovh-ux/manager-carrier-sip';

// Module dependencies.
import dashboard from './dashboard';

const moduleName = 'ovhManagerTelecomCarrierSip';

angular
.module(moduleName, [
dashboard,
ovhManagerCarrierSip,
]);

export default moduleName;
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"telecom_sidebar_view_more": "Afficher plus de résultats",
"telecom_sidebar_dashboard": "Tableau de bord",
"telecom_sidebar_informations": "Informations Générales",
"telecom_sidebar_section_telephony_carrier_sip": "Carrier SIP",
"telecom_sidebar_section_telephony_number": "",
"telecom_sidebar_section_telephony_line": "SIP",
"telecom_sidebar_section_telephony_fax": "Fax",
Expand Down Expand Up @@ -44,4 +45,4 @@
"telecom_sidebar_actions_menu_sms_hlr": "HLR",
"telecom_sidebar_actions_menu_fax": "Fax",
"telecom_sidebar_load_error": "Oups, nous n'arrivons pas à charger vos services."
}
}
Loading

0 comments on commit 4d0ee68

Please sign in to comment.