Create new SNMP Settings page
Created new page to display SNMP Managers.
Display the SNMP Manager's IP and port.
https://github.com/openbmc/phosphor-snmp/blob/master/docs/snmp-configuration.md
Future commits will allow the user to add and delete SNMP
managers.
Change-Id: Ia5d633c11728a580c06b25c412e8673925cdc597
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
diff --git a/app/configuration/controllers/snmp-controller.js b/app/configuration/controllers/snmp-controller.js
new file mode 100644
index 0000000..4b82334
--- /dev/null
+++ b/app/configuration/controllers/snmp-controller.js
@@ -0,0 +1,31 @@
+/**
+ * Controller for SNMP
+ *
+ * @module app/configuration
+ * @exports snmpController
+ * @name snmpController
+ */
+
+window.angular && (function(angular) {
+ 'use strict';
+
+ angular.module('app.configuration').controller('snmpController', [
+ '$scope', '$window', 'APIUtils',
+ function($scope, $window, APIUtils) {
+ $scope.managers = {};
+ $scope.loading = true;
+
+ var getSNMPManagers = APIUtils.getSNMPManagers().then(
+ function(data) {
+ $scope.managers = data.data;
+ },
+ function(error) {
+ console.log(JSON.stringify(error));
+ });
+
+ getSNMPManagers.finally(function() {
+ $scope.loading = false;
+ });
+ }
+ ]);
+})(angular);