/**
 * A module for the serverControl
 *
 * @module app/server-control/index
 * @exports app/server-control/index
 * @version 0.0.1
 */

window.angular && (function (angular) {
    'use strict';

    angular
        .module('app.serverControl', [
            'ngRoute',
            'app.constants',
            'app.common.services'
        ])
        // Route configuration
        .config(['$routeProvider', function ($routeProvider) {
            $routeProvider
                .when('/server-control/bmc-reboot', {
                    'template': require('./controllers/bmc-reboot-controller.html'),
                    'controller': 'bmcRebootController',
                    authenticated: true
                })
                .when('/server-control/server-led', {
                    'template': require('../server-health/controllers/unit-id-controller.html'),
                    'controller': 'unitIdController',
                    authenticated: true
                })
                .when('/server-control/power-operations', {
                    'template': require('./controllers/power-operations-controller.html'),
                    'controller': 'powerOperationsController',
                    authenticated: true
                })
                .when('/server-control/remote-console', {
                    'template': require('./controllers/remote-console-controller.html'),
                    'controller': 'remoteConsoleController',
                    authenticated: true
                })
                .when('/server-control/remote-console-window', {
                    'template': require('./controllers/remote-console-window-controller.html'),
                    'controller': 'remoteConsoleWindowController',
                    authenticated: true
                })
                .when('/server-control', {
                    'template': require('./controllers/power-operations-controller.html'),
                    'controller': 'powerOperationsController',
                    authenticated: true
                });
        }]);

})(window.angular);
