blob: 45ef681cde523c1e974beeee69085853958a7a3f [file] [log] [blame]
Gunnar Millsff64c542018-08-24 15:49:09 -05001<loader loading="loading"></loader>
2<div id="configuration-snmp">
Gunnar Mills5f0b7762018-09-25 14:10:45 -05003 <div class="row column">
4 <h1>SNMP settings</h1>
beccabroekddda4de2019-01-28 15:17:44 -06005 <div class="small-12 snmp_description">
6 Set the Simple Network Management Protocol (SNMP) with a host name or IP address and a port.
7 </div>
8 <div class="page-header">
9 <h2>Managers</h2>
10 </div>
Gunnar Mills5f0b7762018-09-25 14:10:45 -050011 </div>
beccabroekddda4de2019-01-28 15:17:44 -060012 <div class="row column">
13 <div class="small-8">
14 <div class="row column manager_group">
15 <div class="small-5 snmp__address">
Derick Montague1ffa2092019-04-01 17:57:27 -050016 <h3 id="host-name-ip-label">Host name or IP Address</h3>
Gunnar Mills5f0b7762018-09-25 14:10:45 -050017 </div>
beccabroekddda4de2019-01-28 15:17:44 -060018 <div class="small-5 snmp__port label">
Derick Montague1ffa2092019-04-01 17:57:27 -050019 <h3 id="port-label">Port</h3>
beccabroekddda4de2019-01-28 15:17:44 -060020 </div>
21 </div>
Derick Montague1ffa2092019-04-01 17:57:27 -050022 <div class="row column manager_group empty" ng-if="managers.length < 1">
beccabroekddda4de2019-01-28 15:17:44 -060023 No managers have been added yet.
24 </div>
25 <form id="snmp__form" name="snmp__form" novalidate>
26 <div class="row column manager_group" ng-form="manager_group" ng-repeat="manager in managers track by $index">
27 <div class="small-11 snmp__fields">
28 <div class="row column">
29 <div class="small-10">
30 <div class="row column">
Derick Montague1ffa2092019-04-01 17:57:27 -050031 <div id="snmp-manager{{$index+1}}-port-description" class="small-offset-6 small-6 help__text snmp__port">
beccabroekddda4de2019-01-28 15:17:44 -060032 Value must be between 0-65,535
33 </div>
34 </div>
Derick Montague1ffa2092019-04-01 17:57:27 -050035 <fieldset>
36 <div class="row column" ng-class="{'submitted':submitted}">
37 <div class="small-6 snmp__address">
38 <input id="snmp-manager{{$index+1}}-address"
39 name="snmp-manager{{$index+1}}-address"
40 type="text"
41 ng-change="manager.updateAddress=true"
42 ng-model="manager.address"
43 required
44 aria-labeledby="host-name-ip-label"/>
45 <div ng-messages="manager_group['snmp-manager'+($index+1)+'-address'].$error" class="form-error" ng-class="{'visible': manager_group['snmp-manager'+($index+1)+'-address'].$touched || submitted}">
46 <p ng-message="required" role="alert">Field is required</p>
beccabroekddda4de2019-01-28 15:17:44 -060047 </div>
Derick Montague1ffa2092019-04-01 17:57:27 -050048 </div>
49 <div class="small-6 snmp__port">
50 <input id="snmp-manager{{$index+1}}-port"
51 name="snmp-manager{{$index+1}}-port"
52 type="number"
53 min="0"
54 max="65535"
55 step="1"
56 ng-change="manager.updatePort=true"
57 ng-model="manager.port"
58 required
59 aria-labeledby="port-label"
60 aria-describedby="snmp-manager{{$index+1}}-port-description"/>
61 <div ng-messages="manager_group['snmp-manager'+($index+1)+'-port'].$error" class="form-error" ng-class="{'visible': manager_group['snmp-manager'+($index+1)+'-port'].$touched || submitted}">
62 <div ng-message-exp="['min', 'max', 'number', 'step']">
63 Invalid format
64 </div>
65 <p ng-message="required" role="alert">Field is required</p>
66 </div>
beccabroekddda4de2019-01-28 15:17:44 -060067 </div>
68 </div>
Derick Montague1ffa2092019-04-01 17:57:27 -050069 </fieldset>
beccabroekddda4de2019-01-28 15:17:44 -060070 </div>
Dixsie Wolmers57ed98e2019-09-06 10:36:25 -050071 <div class="small-1 align-self-center snmp__buttons trash">
72 <button
73 class="btn trash_button"
74 type="button"
75 ng-click="removeSNMPManager($index)"
76 aria-label="Remove">
77 <icon file="icon-trashcan.svg" aria-hidden="true"></icon>
beccabroekddda4de2019-01-28 15:17:44 -060078 </button>
79 </div>
80 </div>
81 </div>
beccabroekddda4de2019-01-28 15:17:44 -060082 </div>
83 <div class="row column">
Yoshie Muranakac86ce3c2019-06-05 12:30:30 -050084 <button class="btn btn-tertiary btn-add" type="button" ng-click="submitted=false; addNewSNMPManager();">
85 <icon file="icon-plus.svg"></icon>Add manager</button>
beccabroekddda4de2019-01-28 15:17:44 -060086 </div>
87 </form>
88 </div>
89 </div>
90 <div class="row column">
Gunnar Mills854fbba2018-09-13 15:41:30 -050091 <div class="snmp__submit-wrapper">
Yoshie Muranakac86ce3c2019-06-05 12:30:30 -050092 <button type="button" ng-click="submitted=true; snmp__form.$valid && setSNMP();" class="btn btn-primary">Save settings</button>
93 <button type="button" class="btn btn-secondary" ng-click="refresh()">Cancel</button>
Gunnar Mills854fbba2018-09-13 15:41:30 -050094 </div>
beccabroekddda4de2019-01-28 15:17:44 -060095 </div>
96</div>