1/**
2 * Controller for SNMP
3 *
4 * @module app/configuration
5 * @exports snmpController
6 * @name snmpController
7 */
8
9window.angular && (function(angular) {
10  'use strict';
11
12  angular.module('app.configuration').controller('snmpController', [
13    '$scope', '$window', 'APIUtils',
14    function($scope, $window, APIUtils) {
15      $scope.managers = {};
16      $scope.loading = true;
17
18      var getSNMPManagers = APIUtils.getSNMPManagers().then(
19          function(data) {
20            $scope.managers = data.data;
21          },
22          function(error) {
23            console.log(JSON.stringify(error));
24          });
25
26      getSNMPManagers.finally(function() {
27        $scope.loading = false;
28      });
29    }
30  ]);
31})(angular);
32