184981f0aSGunnar Mills<loader loading="loading"></loader>
2cd789508SIftekharul Islam<div id="configuration-network">
3cd789508SIftekharul Islam  <div class="row column">
451946552SMichael Davis    <h1>BMC network settings</h1>
5cd789508SIftekharul Islam  </div>
6a960c8c7SMichael Davis  <form class="net-config__form" role="form" action="">
7a960c8c7SMichael Davis    <section class="row column">
8a960c8c7SMichael Davis      <div class="column small-12 page-header">
9a960c8c7SMichael Davis        <h2 class="inline h4">Common settings</h2>
10a960c8c7SMichael Davis      </div>
11a960c8c7SMichael Davis      <fieldset>
1251946552SMichael Davis        <div class="column small-12 large-3">
132a489554SIftekharul Islam          <label for="net-config__mac">Hostname</label>
14309e06abSGunnar Mills          <input id="net-config__mac" type="text" ng-model="hostname"/>
152a489554SIftekharul Islam        </div>
162a489554SIftekharul Islam        <div class="column small-12 large-3">
1751946552SMichael Davis          <label for="netinterface-select">Network interface</label>
18a960c8c7SMichael Davis          <div id="netinterface-select" class="dropdown__wrapper">
192a489554SIftekharul Islam            <button type="button" class="dropdown__button" ng-click="networkDevice = !networkDevice">{{selectedInterface}}</button>
20a960c8c7SMichael Davis            <ul class="dropdown__list inline" ng-show="networkDevice">
212a489554SIftekharul Islam              <li ng-repeat="interface_id in network.interface_ids">
222a489554SIftekharul Islam                <button type="button" ng-click="selectInterface(interface_id);">{{interface_id}}</button>
23a960c8c7SMichael Davis              </li>
24a960c8c7SMichael Davis            </ul>
25a960c8c7SMichael Davis          </div>
26a960c8c7SMichael Davis        </div>
2751946552SMichael Davis        <div class="column small-12 large-3">
282a489554SIftekharul Islam          <label for="net-config__host">MAC address</label>
292a489554SIftekharul Islam          <input id="net-config__host" type="text" ng-model="interface.MACAddress"/>
30a960c8c7SMichael Davis        </div>
3151946552SMichael Davis        <div class="column small-12 large-3">
32e9f5fe77SGunnar Mills          <label for="net-config__domain">Default Gateway</label>
33*067a1cd1Sbeccabroek          <input id="net-config__domain" type="text" ng-model="defaultGateway"/>
34a960c8c7SMichael Davis        </div>
35a960c8c7SMichael Davis      </fieldset>
36a960c8c7SMichael Davis    </section>
37a960c8c7SMichael Davis    <section class="row column">
3851946552SMichael Davis      <div class="column small-12 page-header">
39a960c8c7SMichael Davis        <h2 class="inline h4">IPV4 settings</h2>
40a960c8c7SMichael Davis      </div>
41a960c8c7SMichael Davis      <fieldset>
42a960c8c7SMichael Davis        <div class="row column">
43a960c8c7SMichael Davis          <label class="control-radio" for="dhcp-address">Obtain an IP address automatically using DHCP
44e364faa0SGunnar Mills            <input type="radio" name="ip-address" id="dhcp-address" ng-checked="true" ng-model="interface.DHCPEnabled" ng-value="true">
45a960c8c7SMichael Davis            <span class="control__indicator control__indicator-on"></span>
46a960c8c7SMichael Davis          </label>
47a960c8c7SMichael Davis        </div>
48a960c8c7SMichael Davis        <div class="row column">
49a960c8c7SMichael Davis          <label class="control-radio" for="static-ip-address">Assign a static IP address
50e364faa0SGunnar Mills            <input type="radio" name="ip-address" id="static-ip-address" ng-model="interface.DHCPEnabled" ng-value="false"/>
51a960c8c7SMichael Davis            <span class="control__indicator control__indicator-on"></span>
52a960c8c7SMichael Davis          </label>
53a960c8c7SMichael Davis        </div>
54971ac1aaSbeccabroek        <div class="row column network-config__ipv4-wrap">
55971ac1aaSbeccabroek          <fieldset class="net-config__static-ip-wrap" ng-repeat="ipv4 in interface.ipv4.values track by $index">
56971ac1aaSbeccabroek            <div class="column small-12 large-3">
571a0e7d06Sbeccabroek              <label>IPV4 address</label>
58*067a1cd1Sbeccabroek              <input id="ipv4-address-{{$index+1}}" ng-change="ipv4.updateAddress = true" type="text" ng-disabled="interface.DHCPEnabled" ng-model="ipv4.Address"/>
59a960c8c7SMichael Davis            </div>
60971ac1aaSbeccabroek            <div class="column small-12 large-3">
611a0e7d06Sbeccabroek              <label>Gateway</label>
62*067a1cd1Sbeccabroek              <input id="ipv4-gateway-{{$index+1}}" ng-change="ipv4.updateGateway = true" type="text" ng-disabled="interface.DHCPEnabled" value="" ng-model="ipv4.Gateway"/>
63a960c8c7SMichael Davis            </div>
646549114eSGunnar Mills            <!-- This netmask prefix length max only works with IPV4 -->
65971ac1aaSbeccabroek            <div class="column small-12 large-6">
661a0e7d06Sbeccabroek              <label>Netmask Prefix Length</label>
67*067a1cd1Sbeccabroek              <input id="ipv4-prefix-{{$index+1}}" class="column small-6" ng-change="ipv4.updatePrefix = true" type="number" min="1" max="32" step="1" ng-disabled="interface.DHCPEnabled"  ng-model="ipv4.PrefixLength"/>
68971ac1aaSbeccabroek              <button class="network-config_remove-button inline" ng-click="removeIpv4Address($index)">Remove</button>
69a960c8c7SMichael Davis            </div>
70a960c8c7SMichael Davis          </fieldset>
711a0e7d06Sbeccabroek          <div class="row column">
721a0e7d06Sbeccabroek            <div class="column small-12">
731a0e7d06Sbeccabroek              <button type="button" class="btn-primary inline" ng-click="addIpv4Field()">Add IPV4 address</button>
741a0e7d06Sbeccabroek            </div>
751a0e7d06Sbeccabroek          </div>
76971ac1aaSbeccabroek        </div>
77a960c8c7SMichael Davis      </fieldset>
7851946552SMichael Davis    </section>
7951946552SMichael Davis    <section class="row column">
8051946552SMichael Davis      <div class="column small-12 page-header">
8151946552SMichael Davis        <h2 class="inline h4">DNS settings</h2>
8251946552SMichael Davis      </div>
8351946552SMichael Davis      <fieldset>
840646782dSGunnar Mills        <!-- Call Nameservers "DNS Servers" on the GUI -->
850646782dSGunnar Mills        <fieldset class="net-config__static-ip-wrap" ng-repeat="dns in interface.Nameservers track by $index">
86cff61508Sbeccabroek          <div class="column small-12">
87bc3ab72cSGunnar Mills            <label for="net-config__prime-dns{{$index+1}}">DNS Server {{$index+1}}</label>
88971ac1aaSbeccabroek            <input id="net-config__prime-dns{{$index+1}}" class="network-input column small-6 large-4 inline" type="text" ng-model="dns" ng-blur="interface.Nameservers[$index] = dns" set-focus-on-new-input/>
89971ac1aaSbeccabroek            <button class="network-config_remove-button inline" ng-click="removeDNSField($index)">Remove</button>
90cff61508Sbeccabroek          </div>
910646782dSGunnar Mills        </fieldset>
92971ac1aaSbeccabroek        <div class="row column">
931a0e7d06Sbeccabroek          <div class="column small-12">
941a0e7d06Sbeccabroek            <button type="button" class="btn-primary inline dns_add" ng-click="addDNSField()">Add DNS server</button>
951a0e7d06Sbeccabroek          </div>
9651946552SMichael Davis        </div>
9751946552SMichael Davis      </fieldset>
9851946552SMichael Davis      <div class="network-config__submit-wrapper">
99*067a1cd1Sbeccabroek        <button type="button" class="btn-primary inline" ng-click="confirmSettings=true;">Save settings</button>
1009a0094dcSGunnar Mills        <button type="button" class="btn-secondary inline" ng-click="refresh()">Cancel</button>
101a960c8c7SMichael Davis      </div>
102*067a1cd1Sbeccabroek      <p class="success-msg set_network_success" ng-show="setNetworkSuccess" role="alert">Success! Network settings changed!</p>
103*067a1cd1Sbeccabroek      <p class="set_network_error error-msg" ng-show="setNetworkError" role="alert">Error setting {{setNetworkError}}!</p>
104a960c8c7SMichael Davis    </section>
105a960c8c7SMichael Davis  </form>
106cd789508SIftekharul Islam</div>
107*067a1cd1Sbeccabroek<section class="modal" aria-hidden="true" aria-labelledby="modalTitle" aria-describedby="modalDescription" role="dialog" ng-class="{'active': confirmSettings}">
108d01504cfSGunnar Mills  <div class="modal__tftp-unreachable" role="document">
109d01504cfSGunnar Mills    <div class="screen-reader-offscreen modal-description">Change network settings</div><!-- accessibility only; used for screen readers -->
110d01504cfSGunnar Mills    <div class="page-header ">
111d01504cfSGunnar Mills      <span class="icon icon__warning inline"><span class="accessible-text" role="alert">Warning</span></span>
112d01504cfSGunnar Mills      <h1 class="modal-title h4 inline">Change network settings</h1>
113d01504cfSGunnar Mills    </div>
114d01504cfSGunnar Mills    <div class="modal__content">
115d01504cfSGunnar Mills      <p>Changing network settings may cause the system to become unavailable (e.g. changing the BMC IP address).
116d01504cfSGunnar Mills        Proceed with caution and make note of any new settings that may affect connectivity.</p>
117d01504cfSGunnar Mills    </div>
118d01504cfSGunnar Mills    <div class="modal__button-wrapper">
119*067a1cd1Sbeccabroek      <button class="inline btn-secondary" ng-click="confirmSettings=false;">Cancel</button>
120d01504cfSGunnar Mills      <button class="inline btn-primary" ng-click="setNetworkSettings()">Continue</button>
121d01504cfSGunnar Mills    </div>
122d01504cfSGunnar Mills  </div>
123d01504cfSGunnar Mills</section>
124