blob: dc81ed3777e8b120ded18d58171dca35669a2152 [file] [log] [blame]
Gunnar Mills84981f02018-05-31 15:19:01 -05001<loader loading="loading"></loader>
Iftekharul Islamcd789502017-04-19 14:37:55 -05002<div id="configuration-network">
Michael Davisa960c8c2017-05-01 10:30:38 -05003 <div class="row column">
Michael Davis51946552017-05-01 10:30:38 -05004 <h1>BMC network settings</h1>
Michael Davisa960c8c2017-05-01 10:30:38 -05005 </div>
6 <form class="net-config__form" role="form" action="">
7 <section class="row column">
8 <div class="column small-12 page-header">
9 <h2 class="inline h4">Common settings</h2>
10 </div>
11 <fieldset>
Michael Davis51946552017-05-01 10:30:38 -050012 <div class="column small-12 large-3">
Iftekharul Islam2a489552017-11-02 13:23:08 -050013 <label for="net-config__mac">Hostname</label>
Gunnar Mills309e06a2018-05-30 13:18:10 -050014 <input id="net-config__mac" type="text" ng-model="hostname"/>
Iftekharul Islam2a489552017-11-02 13:23:08 -050015 </div>
16 <div class="column small-12 large-3">
Michael Davis51946552017-05-01 10:30:38 -050017 <label for="netinterface-select">Network interface</label>
Michael Davisa960c8c2017-05-01 10:30:38 -050018 <div id="netinterface-select" class="dropdown__wrapper">
Iftekharul Islam2a489552017-11-02 13:23:08 -050019 <button type="button" class="dropdown__button" ng-click="networkDevice = !networkDevice">{{selectedInterface}}</button>
Michael Davisa960c8c2017-05-01 10:30:38 -050020 <ul class="dropdown__list inline" ng-show="networkDevice">
Iftekharul Islam2a489552017-11-02 13:23:08 -050021 <li ng-repeat="interface_id in network.interface_ids">
22 <button type="button" ng-click="selectInterface(interface_id);">{{interface_id}}</button>
Michael Davisa960c8c2017-05-01 10:30:38 -050023 </li>
24 </ul>
25 </div>
26 </div>
Michael Davis51946552017-05-01 10:30:38 -050027 <div class="column small-12 large-3">
Iftekharul Islam2a489552017-11-02 13:23:08 -050028 <label for="net-config__host">MAC address</label>
29 <input id="net-config__host" type="text" ng-model="interface.MACAddress"/>
Michael Davisa960c8c2017-05-01 10:30:38 -050030 </div>
Michael Davis51946552017-05-01 10:30:38 -050031 <div class="column small-12 large-3">
Gunnar Millse9f5fe72018-05-04 13:43:10 -050032 <label for="net-config__domain">Default Gateway</label>
33 <input id="net-config__domain" type="text" ng-model="defaultgateway"/>
Michael Davisa960c8c2017-05-01 10:30:38 -050034 </div>
35 </fieldset>
36 </section>
37 <section class="row column">
Michael Davis51946552017-05-01 10:30:38 -050038 <div class="column small-12 page-header">
Michael Davisa960c8c2017-05-01 10:30:38 -050039 <h2 class="inline h4">IPV4 settings</h2>
40 </div>
41 <fieldset>
42 <div class="row column">
43 <label class="control-radio" for="dhcp-address">Obtain an IP address automatically using DHCP
Gunnar Millscb2c3062018-05-31 13:13:30 -050044 <!-- TODO: openbmc/openbmc#3154 Rest server should return a proper JSON bool instead of "0" or "1"-->
45 <input type="radio" name="ip-address" id="dhcp-address" ng-checked="true" ng-model="interface.DHCPEnabled" ng-value="1">
Michael Davisa960c8c2017-05-01 10:30:38 -050046 <span class="control__indicator control__indicator-on"></span>
47 </label>
48 </div>
49 <div class="row column">
50 <label class="control-radio" for="static-ip-address">Assign a static IP address
Gunnar Millscb2c3062018-05-31 13:13:30 -050051 <input type="radio" name="ip-address" id="static-ip-address" ng-model="interface.DHCPEnabled" ng-value="0"/>
Michael Davisa960c8c2017-05-01 10:30:38 -050052 <span class="control__indicator control__indicator-on"></span>
53 </label>
54 </div>
Iftekharul Islam2a489552017-11-02 13:23:08 -050055 <fieldset class="net-config__static-ip-wrap" ng-repeat="ipv4 in interface.ipv4.values">
Michael Davis51946552017-05-01 10:30:38 -050056 <div class="column small-12 large-4">
Michael Davisa960c8c2017-05-01 10:30:38 -050057 <label for="net-config__ipv4-address" class="inline">IPV4 address</label>
Iftekharul Islam2a489552017-11-02 13:23:08 -050058 <input id="net-config__ipv4-address" type="text" ng-disabled="interface.DHCPEnabled" ng-model="ipv4.Address"/>
Michael Davisa960c8c2017-05-01 10:30:38 -050059 </div>
Michael Davis51946552017-05-01 10:30:38 -050060 <div class="column small-12 large-4">
Iftekharul Islam2a489552017-11-02 13:23:08 -050061 <label for="net-config__subnet" class="inline">Gateway</label>
62 <input id="net-config__subnet" type="text" ng-disabled="interface.DHCPEnabled" value="" ng-model="ipv4.Gateway"/>
Michael Davisa960c8c2017-05-01 10:30:38 -050063 </div>
Gunnar Mills65491142018-06-04 14:23:33 -050064 <!-- This netmask prefix length max only works with IPV4 -->
Michael Davis51946552017-05-01 10:30:38 -050065 <div class="column small-12 large-4">
Gunnar Mills47db9cb2018-05-04 13:16:52 -050066 <label for="net-config__default-gateway" class="inline">Netmask Prefix Length</label>
Gunnar Mills65491142018-06-04 14:23:33 -050067 <input id="net-config__default-gateway" type="number" min="1" max="32" step="1" ng-disabled="interface.DHCPEnabled" ng-model="ipv4.PrefixLength"/>
Michael Davisa960c8c2017-05-01 10:30:38 -050068 </div>
69 </fieldset>
70 </fieldset>
Michael Davis51946552017-05-01 10:30:38 -050071 </section>
72 <section class="row column">
73 <div class="column small-12 page-header">
74 <h2 class="inline h4">DNS settings</h2>
75 </div>
76 <fieldset>
77 <div class="column small-12 large-4">
Gunnar Mills06467822018-06-06 15:43:18 -050078 <!-- Call Nameservers "DNS Servers" on the GUI -->
79 <fieldset class="net-config__static-ip-wrap" ng-repeat="dns in interface.Nameservers track by $index">
80 <label for="net-config__prime-dns">DNS Server {{$index+1}}</label>
81 <input id="net-config__prime-dns" type="text" ng-model="dns" ng-blur="interface.Nameservers[$index] = dns"/>
82 </fieldset>
Michael Davis51946552017-05-01 10:30:38 -050083 </div>
84 </fieldset>
85 <div class="network-config__submit-wrapper">
Gunnar Millsd01504c2018-05-03 13:01:51 -050086 <button type="button" class="btn-primary inline" ng-click="confirm_settings=true;">Save settings</button>
Gunnar Mills9a0094d2018-05-02 21:50:56 -050087 <button type="button" class="btn-secondary inline" ng-click="refresh()">Cancel</button>
Michael Davisa960c8c2017-05-01 10:30:38 -050088 </div>
Gunnar Mills7ddc7272018-04-12 16:12:03 -050089 <p class="success-msg set_network_success" ng-show="set_network_success" role="alert">Success! Network settings changed!</p>
90 <p class="set_network_error error-msg" ng-show="set_network_error" role="alert">Error setting {{set_network_error}}!</p>
Michael Davisa960c8c2017-05-01 10:30:38 -050091 </section>
92 </form>
Gunnar Mills7ddc7272018-04-12 16:12:03 -050093</div>
Gunnar Millsd01504c2018-05-03 13:01:51 -050094<section class="modal" aria-hidden="true" aria-labelledby="modalTitle" aria-describedby="modalDescription" role="dialog" ng-class="{'active': confirm_settings}">
95 <div class="modal__tftp-unreachable" role="document">
96 <div class="screen-reader-offscreen modal-description">Change network settings</div><!-- accessibility only; used for screen readers -->
97 <div class="page-header ">
98 <span class="icon icon__warning inline"><span class="accessible-text" role="alert">Warning</span></span>
99 <h1 class="modal-title h4 inline">Change network settings</h1>
100 </div>
101 <div class="modal__content">
102 <p>Changing network settings may cause the system to become unavailable (e.g. changing the BMC IP address).
103 Proceed with caution and make note of any new settings that may affect connectivity.</p>
104 </div>
105 <div class="modal__button-wrapper">
106 <button class="inline btn-secondary" ng-click="confirm_settings=false;">Cancel</button>
107 <button class="inline btn-primary" ng-click="setNetworkSettings()">Continue</button>
108 </div>
109 </div>
110</section>