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/common/directives/app-navigation.html b/app/common/directives/app-navigation.html
index 36a57d5..32797c0 100644
--- a/app/common/directives/app-navigation.html
+++ b/app/common/directives/app-navigation.html
@@ -101,13 +101,15 @@
<ul class="nav__second-level btn-firmware" ng-style="navStyle" ng-class="{opened: (showSubMenu && firstLevel == 'configuration')}">
<li ng-class="{'active': (path == '/configuration' || path == '/configuration/network')}">
<a href="#/configuration/network" tabindex="14" ng-click="closeSubnav()">Network settings</a></li>
+ <li ng-class="{'active': (path == '/configuration' || path == '/configuration/snmp')}">
+ <a href="#/configuration/snmp" tabindex="15" ng-click="closeSubnav()">SNMP settings</a></li>
<li ng-class="{'active': (path == '/configuration' || path == '/configuration/firmware')}">
- <a href="#/configuration/firmware" tabindex="15" ng-click="closeSubnav()">Firmware</a></li>
+ <a href="#/configuration/firmware" tabindex="16" ng-click="closeSubnav()">Firmware</a></li>
<li ng-class="{'active': (path == '/configuration' || path == '/configuration/date-time')}">
- <a href="#/configuration/date-time" tabindex="16" ng-click="closeSubnav()">Date and time settings</a></li>
+ <a href="#/configuration/date-time" tabindex="17" ng-click="closeSubnav()">Date and time settings</a></li>
</ul>
<ul class="nav__second-level btn-users" ng-style="navStyle" ng-class="{opened: (showSubMenu && firstLevel == 'users')}">
<li ng-class="{'active': (path == '/users' || path == '/users/manage-accounts')}">
- <a href="#/users/manage-accounts" tabindex="17" ng-click="closeSubnav()">Manage user account</a></li>
+ <a href="#/users/manage-accounts" tabindex="18" ng-click="closeSubnav()">Manage user account</a></li>
</ul>
</nav>
diff --git a/app/common/services/api-utils.js b/app/common/services/api-utils.js
index 284d54e..7f2fe7f 100644
--- a/app/common/services/api-utils.js
+++ b/app/common/services/api-utils.js
@@ -85,6 +85,21 @@
});
return deferred.promise;
},
+ getSNMPManagers: function() {
+ return $http({
+ method: 'GET',
+ url: DataService.getHost() +
+ '/xyz/openbmc_project/network/snmp/manager/enumerate',
+ headers: {
+ 'Accept': 'application/json',
+ 'Content-Type': 'application/json'
+ },
+ withCredentials: true
+ })
+ .then(function(response) {
+ return response.data;
+ });
+ },
getNetworkInfo: function() {
var deferred = $q.defer();
$http({