1ff64c54aSGunnar Mills<loader loading="loading"></loader>
2*383591afSDixsie Wolmers<div id="configuration-snmp" class="page">
3*383591afSDixsie Wolmers  <h1 class="page-title">SNMP settings</h1>
4*383591afSDixsie Wolmers  <section class="section">
5*383591afSDixsie Wolmers    <p class="section-content">
6*383591afSDixsie Wolmers      Set the Simple Network Management Protocol (SNMP) with a host name or IP
7*383591afSDixsie Wolmers      address and a port.
8*383591afSDixsie Wolmers    </p>
9*383591afSDixsie Wolmers  </section>
10*383591afSDixsie Wolmers  <section class="section">
11*383591afSDixsie Wolmers    <div class="section-header">
12*383591afSDixsie Wolmers      <h2 class="section-title">Managers</h2>
13ff64c54aSGunnar Mills    </div>
14*383591afSDixsie Wolmers    <div class="section-content">
15*383591afSDixsie Wolmers      <p class="manager_group empty" ng-if="managers.length < 1">
16ddda4decSbeccabroek        No managers have been added yet.
17*383591afSDixsie Wolmers      </p>
18ddda4decSbeccabroek    </div>
19ddda4decSbeccabroek    <form id="snmp__form" name="snmp__form" novalidate>
20*383591afSDixsie Wolmers      <div class="section-content">
21*383591afSDixsie Wolmers        <div
22*383591afSDixsie Wolmers          class="row manager_group"
23*383591afSDixsie Wolmers          ng-form="manager_group"
24*383591afSDixsie Wolmers          ng-repeat="manager in managers track by $index">
25*383591afSDixsie Wolmers          <div class="small-12 medium-5 large-4 form__field snmp-field">
26*383591afSDixsie Wolmers            <label
27*383591afSDixsie Wolmers              for="snmp-manager{{ $index + 1 }}-address"
28*383591afSDixsie Wolmers              class="content-label">
29*383591afSDixsie Wolmers              Host name or IP Address
30*383591afSDixsie Wolmers            </label>
31*383591afSDixsie Wolmers            <input
32*383591afSDixsie Wolmers              id="snmp-manager{{ $index + 1 }}-address"
33ddda4decSbeccabroek              name="snmp-manager{{ $index + 1 }}-address"
34ddda4decSbeccabroek              type="text"
35ddda4decSbeccabroek              ng-change="manager.updateAddress=true"
36ddda4decSbeccabroek              ng-model="manager.address"
37*383591afSDixsie Wolmers              required/>
38*383591afSDixsie Wolmers            <div
39*383591afSDixsie Wolmers              ng-messages="manager_group['snmp-manager'+($index+1)+'-address'].$error"
40*383591afSDixsie Wolmers              class="form-error"
41*383591afSDixsie Wolmers              ng-class="{'visible': manager_group['snmp-manager'+($index+1)+'-address'].$touched || submitted}">
42ddda4decSbeccabroek              <p ng-message="required" role="alert">Field is required</p>
43ddda4decSbeccabroek            </div>
44ddda4decSbeccabroek          </div>
45*383591afSDixsie Wolmers          <div class="small-9 medium-5 large-4 form__field snmp-field">
46*383591afSDixsie Wolmers            <label for="snmp-manager{{ $index + 1 }}-port" class="content-label">Port</label>
47*383591afSDixsie Wolmers            <input
48*383591afSDixsie Wolmers              id="snmp-manager{{ $index + 1 }}-port"
49ddda4decSbeccabroek              name="snmp-manager{{ $index + 1 }}-port"
50ddda4decSbeccabroek              type="number"
51ddda4decSbeccabroek              min="0"
52ddda4decSbeccabroek              max="65535"
53ddda4decSbeccabroek              step="1"
54ddda4decSbeccabroek              ng-change="manager.updatePort=true"
55ddda4decSbeccabroek              ng-model="manager.port"
56*383591afSDixsie Wolmers              required/>
57*383591afSDixsie Wolmers            <div
58*383591afSDixsie Wolmers              ng-messages="manager_group['snmp-manager'+($index+1)+'-port'].$error"
59*383591afSDixsie Wolmers              class="form-error"
60*383591afSDixsie Wolmers              ng-class="{'visible': manager_group['snmp-manager'+($index+1)+'-port'].$touched || submitted}">
61*383591afSDixsie Wolmers              <p ng-message="required" role="alert">Value must be between 0 - 65,535</p>
62ddda4decSbeccabroek            </div>
63ddda4decSbeccabroek          </div>
64*383591afSDixsie Wolmers          <div class="small-3 medium-2 large-4 snmp-field">
6557ed98eeSDixsie Wolmers            <button
66*383591afSDixsie Wolmers              class="btn btn-tertiary trash_button"
6757ed98eeSDixsie Wolmers              type="button"
6857ed98eeSDixsie Wolmers              ng-click="removeSNMPManager($index)"
6957ed98eeSDixsie Wolmers              aria-label="Remove">
7057ed98eeSDixsie Wolmers              <icon file="icon-trashcan.svg" aria-hidden="true"></icon>
71ddda4decSbeccabroek            </button>
72ddda4decSbeccabroek          </div>
73ddda4decSbeccabroek        </div>
7457ed98eeSDixsie Wolmers      </div>
75*383591afSDixsie Wolmers      <div class="section-content">
76*383591afSDixsie Wolmers        <button
77*383591afSDixsie Wolmers          class="btn btn-tertiary btn-add-manager"
78*383591afSDixsie Wolmers          type="button"
79*383591afSDixsie Wolmers          ng-click="submitted=false; addNewSNMPManager();">
80*383591afSDixsie Wolmers          <icon file="icon-plus.svg" aria-hidden="true"></icon>Add manager
81*383591afSDixsie Wolmers        </button>
8257ed98eeSDixsie Wolmers      </div>
83*383591afSDixsie Wolmers      <div class="form__actions">
84*383591afSDixsie Wolmers        <button
85*383591afSDixsie Wolmers          type="submit"
86*383591afSDixsie Wolmers          class="btn btn-primary"
87*383591afSDixsie Wolmers          ng-click="submitted=true;  snmp__form.$valid && setSNMP();">
88*383591afSDixsie Wolmers          Save settings
89*383591afSDixsie Wolmers        </button>
90*383591afSDixsie Wolmers        <button type="button" class="btn btn-secondary" ng-click="refresh()">
91*383591afSDixsie Wolmers          Cancel
92*383591afSDixsie Wolmers        </button>
93854fbba1SGunnar Mills      </div>
94ff64c54aSGunnar Mills    </form>
95*383591afSDixsie Wolmers  </section>
96ddda4decSbeccabroek</div>
97