summaryrefslogtreecommitdiffstats
path: root/app/configuration/controllers/network-controller.html
blob: caa2913d7d0548e5296129cb1b0f41a278497285 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<div id="configuration-network">
	<div class="row column">
		<h1>BMC network settings</h1>
	</div>
	<form class="net-config__form" role="form" action="">
		<section class="row column">
			<div class="column small-12 page-header">
				<h2 class="inline h4">Common settings</h2>
			</div>
			<fieldset>
				<div class="column small-12 large-3">
					<label for="net-config__mac">Hostname</label>
					<input id="net-config__mac" type="text" readonly value="{{hostname}}"/>
				</div>
				<div class="column small-12 large-3">
					<label for="netinterface-select">Network interface</label>
					<div id="netinterface-select" class="dropdown__wrapper">
						<button type="button" class="dropdown__button" ng-click="networkDevice = !networkDevice">{{selectedInterface}}</button>
						<ul class="dropdown__list inline" ng-show="networkDevice">
							<li ng-repeat="interface_id in network.interface_ids">
								<button type="button" ng-click="selectInterface(interface_id);">{{interface_id}}</button>
							</li>
						</ul>
					</div>
				</div>
				<div class="column small-12 large-3">
					<label for="net-config__host">MAC address</label>
					<input id="net-config__host" type="text" ng-model="interface.MACAddress"/>
				</div>
				<div class="column small-12 large-3">
					<label for="net-config__domain">Domain name</label>
					<input id="net-config__domain" type="text" ng-model="interface.DomainName"/>
				</div>
			</fieldset>
		</section>
		<section class="row column">
			<div class="column small-12 page-header">
				<h2 class="inline h4">IPV4 settings</h2>
			</div>
			<fieldset>
				<div class="row column">
					<label class="control-radio" for="dhcp-address">Obtain an IP address automatically using DHCP
						<input type="radio" name="ip-address" id="dhcp-address" ng-checked="true" ng-model="interface.DHCPEnabled" ng-value="true">
						<span class="control__indicator control__indicator-on"></span>
					</label>
				</div>
				<div class="row column">
					<label class="control-radio" for="static-ip-address">Assign a static IP address
						<input type="radio" name="ip-address" id="static-ip-address" ng-model="interface.DHCPEnabled" ng-value="false"/>
						<span class="control__indicator control__indicator-on"></span>
					</label>
				</div>
				<fieldset class="net-config__static-ip-wrap" ng-repeat="ipv4 in interface.ipv4.values">
					<div class="column small-12 large-4">
						<label for="net-config__ipv4-address" class="inline">IPV4 address</label>
						<input id="net-config__ipv4-address" type="text" ng-disabled="interface.DHCPEnabled" ng-model="ipv4.Address"/>
					</div>
					<div class="column small-12 large-4">
						<label for="net-config__subnet" class="inline">Gateway</label>
						<input id="net-config__subnet" type="text" ng-disabled="interface.DHCPEnabled" value="" ng-model="ipv4.Gateway"/>
					</div>
					<div class="column small-12 large-4">
						<label for="net-config__default-gateway" class="inline">Origin</label>
						<input id="net-config__default-gateway" type="text" ng-disabled="interface.DHCPEnabled"  ng-model="ipv4.Origin"/>
					</div>
				</fieldset>
			</fieldset>
		</section>
		<section class="row column">
			<div class="column small-12 page-header">
				<h2 class="inline h4">DNS settings</h2>
			</div>
			<fieldset>
				<div class="column small-12 large-4">
					<ul>
						<li ng-repeat="dns in interface.Nameservers track by $index">
							<label for="net-config__prime-dns">DNS Server {{$index+1}}</label>{{dns}}
							<br/>
						</li>
					</ul>
				</div>
			</fieldset>
			<div class="network-config__submit-wrapper">
				<button class="btn-primary inline">Save settings</button>
				<button class="btn-secondary inline">Cancel</button>
			</div>
		</section>
	</form>
</div>
OpenPOWER on IntegriCloud