Add seed code for sdnr app based on ONF Centennial
[ccsdk/apps.git] / sdnr / wireless-transport / code-Carbon-SR1 / ux / mwtnEvents / mwtnEvents-module / src / main / resources / mwtnEvents / mwtnEvents.module.js
1 /*
2  * Copyright (c) 2016 Tech Mahindra Ltd. and others. All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8
9 define([ 'angularAMD', 'app/routingConfig', 'app/core/core.services',
10     'common/config/env.module' ,
11     'app/mwtnCommons/mwtnCommons.module'], function(ng) {
12   var mwtnEventsApp = angular.module('app.mwtnEvents', [ 'app.core',
13       'ui.router.state', 'config' ]);
14
15   mwtnEventsApp.config(function($stateProvider, $compileProvider,
16       $controllerProvider, $provide, NavHelperProvider, $translateProvider) {
17     mwtnEventsApp.register = {
18       controller : $controllerProvider.register,
19       directive : $compileProvider.directive,
20       factory : $provide.factory,
21       service : $provide.service
22
23     };
24
25     NavHelperProvider.addControllerUrl('app/mwtnEvents/mwtnEvents.controller');
26     NavHelperProvider.addToMenu('mwtnEvents', {
27       "link" : "#/pnfEvents",
28       "active" : "main.mwtnEvents",
29       "title" : "pnf Events",
30       "icon" : "fa fa-bolt", // Add navigation icon css class here
31       "page" : {
32         "title" : "pnf Events",
33         "description" : "Events"
34       }
35     });
36
37     var access = routingConfig.accessLevels;
38
39     $stateProvider.state('main.mwtnEvents', {
40       url : 'mwtnEvents',
41       access : access.admin,
42       views : {
43         'content' : {
44           templateUrl : 'src/app/mwtnEvents/mwtnEvents.tpl.html',
45           controller : 'mwtnEventsCtrl'
46         }
47       }
48     });
49
50   });
51
52   return mwtnEventsApp;
53 });