Merge lp:~blake-rouse/maas/fix-broken-ui into lp:~maas-committers/maas/trunk
- fix-broken-ui
- Merge into trunk
Proposed by
Blake Rouse
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Blake Rouse | ||||
Approved revision: | no longer in the source branch. | ||||
Merged at revision: | 5686 | ||||
Proposed branch: | lp:~blake-rouse/maas/fix-broken-ui | ||||
Merge into: | lp:~maas-committers/maas/trunk | ||||
Diff against target: |
430 lines (+184/-219) 2 files modified
src/maasserver/static/partials/dashboard.html (+180/-216) src/maasserver/static/partials/nodes-list.html (+4/-3) |
||||
To merge this branch: | bzr merge lp:~blake-rouse/maas/fix-broken-ui | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Andres Rodriguez (community) | Approve | ||
Review via email:
|
Commit message
Fix maas-notification directive to render correctly with angular from Xenial. Fix dashboard to show the loading of discovered items.
Description of the change
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'src/maasserver/static/partials/dashboard.html' | |||
2 | --- src/maasserver/static/partials/dashboard.html 2017-02-01 18:13:33 +0000 | |||
3 | +++ src/maasserver/static/partials/dashboard.html 2017-02-02 20:26:39 +0000 | |||
4 | @@ -1,224 +1,188 @@ | |||
12 | 1 | <div data-ng-hide="loaded"> | 1 | <header class="page-header" sticky media-query="min-width: 769px"> |
13 | 2 | <header class="page-header" sticky media-query="min-width: 769px"> | 2 | <div class="wrapper--inner"> |
14 | 3 | <div class="wrapper--inner"> | 3 | <h1 class="page-header__title">Device discovery</h1> |
15 | 4 | <h1 class="page-header__title">Device discovery</h1> | 4 | <p class="page-header__status">{$ discoveredDevices.length $} items discovered <span class="u-text--loading" data-ng-if="!loaded"><i class="icon icon--loading u-animation--spin"></i> Loading...</span></p> |
16 | 5 | <p class="page-header__status"> | 5 | <div class="page-header__controls" data-ng-if="networkDiscovery"> |
17 | 6 | <span class="u-text--loading"><i class="icon u-margin--right-tiny icon--loading u-animation--spin"></i>Searching network for devices…</span> | 6 | <maas-obj-form obj="networkDiscovery" manager="configManager" inline="true"> |
18 | 7 | </p> | 7 | <maas-obj-field type="onoffswitch" key="value" label="Discovery enabled" |
19 | 8 | on-value="enabled" off-value="disabled" subtle="true" label-left="true" | ||
20 | 9 | label-info="When enabled, MAAS will use passive techniques, such as listening to
 ARP requests and DNS advertisements, to observe networks attached
 to rack controllers. Active subnet mapping can also be enabled in the
 Device Discovery section of the Settings page."></maas-obj-field> | ||
21 | 10 | </maas-obj-form> | ||
22 | 8 | </div> | 11 | </div> |
23 | 9 | </header> | ||
24 | 10 | <section class="row"> | ||
25 | 11 | <div class="wrapper--inner"> | ||
26 | 12 | <div class="twelve-col"> | ||
27 | 13 | <table> | ||
28 | 14 | <thead> | ||
29 | 15 | <tr> | ||
30 | 16 | <th class="table-col--37">Name</th> | ||
31 | 17 | <th class="table-col--15">Mac address</th> | ||
32 | 18 | <th class="table-col--13">IP</th> | ||
33 | 19 | <th class="table-col--15">Rack</th> | ||
34 | 20 | <th class="table-col--20">Last seen</th> | ||
35 | 21 | </tr> | ||
36 | 22 | </thead> | ||
37 | 23 | <tbody> | ||
38 | 24 | <tr> | ||
39 | 25 | <td colspan="5"> | ||
40 | 26 | No new discoveries | ||
41 | 27 | </td> | ||
42 | 28 | </tr> | ||
43 | 29 | </tbody> | ||
44 | 30 | </table> | ||
45 | 31 | </div> | ||
46 | 32 | </div> | 12 | </div> |
48 | 33 | </section> | 13 | </header> |
49 | 14 | <div class="wrapper--inner"> | ||
50 | 15 | <maas-notifications></maas-notifications> | ||
51 | 34 | </div> | 16 | </div> |
93 | 35 | 17 | <section class="row"> | |
94 | 36 | <maas-notifications /> | 18 | <div class="wrapper--inner"> |
95 | 37 | 19 | <div class="p-notification--warning" data-ng-if="networkDiscovery.value === 'disabled'"> | |
96 | 38 | <div class="ng-hide" data-ng-show="loaded"> | 20 | <p class="p-notification__response"> |
97 | 39 | <header class="page-header" sticky media-query="min-width: 769px"> | 21 | <span class="p-notification__status">Warning:</span>List of devices will not update as discovery is turned off</p> |
98 | 40 | <div class="wrapper--inner"> | 22 | </div> |
99 | 41 | <h1 class="page-header__title">Device discovery</h1> | 23 | <div class="twelve-col"> |
100 | 42 | <p class="page-header__status" >{$ discoveredDevices.length $} items discovered</p> | 24 | <div class="table" > |
101 | 43 | <div class="page-header__controls" data-ng-if="networkDiscovery"> | 25 | <header class="table__head u-display--desktop" sticky sticky-class="table__head--sticky" offset="116" media-query="min-width: 768px"> |
102 | 44 | <maas-obj-form obj="networkDiscovery" manager="configManager" inline="true"> | 26 | <div class="table__row"> |
103 | 45 | <maas-obj-field type="onoffswitch" key="value" label="Discovery enabled" | 27 | <div class="table__header table-col--37">Name</div> |
104 | 46 | on-value="enabled" off-value="disabled" subtle="true" label-left="true" | 28 | <div class="table__header table-col--15">Mac address</div> |
105 | 47 | label-info="When enabled, MAAS will use passive techniques, such as listening to
 ARP requests and DNS advertisements, to observe networks attached
 to rack controllers. Active subnet mapping can also be enabled in the
 Device Discovery section of the Settings page."></maas-obj-field> | 29 | <div class="table__header table-col--13">IP</div> |
106 | 48 | </maas-obj-form> | 30 | <div class="table__header table-col--15">Rack</div> |
107 | 49 | </div> | 31 | <div class="table__header table-col--20">Last seen</div> |
108 | 50 | </div> | 32 | </div> |
109 | 51 | </header> | 33 | </header> |
110 | 52 | <section class="row"> | 34 | <div class="table__body"> |
111 | 53 | <div class="wrapper--inner"> | 35 | <div class="table__row table--success" data-ng-if="convertTo.saved"> |
112 | 54 | <div class="p-notification--warning" data-ng-if="networkDiscovery.value === 'disabled'"> | 36 | <div class="table__data table-col--97"> |
113 | 55 | <p class="p-notification__response"> | 37 | <i class="icon icon--success"></i> {$ convertTo.hostname $} has been add to {$ site $}. |
114 | 56 | <span class="p-notification__status">Warning:</span>List of devices will not update as discovery is turned off</p> | 38 | <a href="#/node/{$ convertTo.parent $}" data-ng-if="convertTo.parent">Go to the machine devices page.</a> |
115 | 57 | </div> | 39 | <a href="#/nodes/?tab=devices" data-ng-if="!convertTo.parent">Go to the device listing.</a> |
116 | 58 | <div class="twelve-col"> | 40 | </div> |
117 | 59 | <div class="table" > | 41 | <div class="table__data table-col--3"> |
118 | 60 | <header class="table__head u-display--desktop" sticky sticky-class="table__head--sticky" offset="116" media-query="min-width: 768px"> | 42 | <i class="icon icon--cross tooltip" aria-label="Clear" |
119 | 61 | <div class="table__row"> | 43 | data-ng-click="convertTo.saved = false">Clear</i> |
120 | 62 | <div class="table__header table-col--37">Name</div> | 44 | </div> |
121 | 63 | <div class="table__header table-col--15">Mac address</div> | 45 | </div> |
122 | 64 | <div class="table__header table-col--13">IP</div> | 46 | <div class="table__row" data-ng-if="!discoveredDevices.length"> |
123 | 65 | <div class="table__header table-col--15">Rack</div> | 47 | <div class="table__data table-col--100"> |
124 | 66 | <div class="table__header table-col--20">Last seen</div> | 48 | No new discoveries |
125 | 67 | </div> | 49 | </div> |
126 | 68 | </header> | 50 | </div> |
127 | 69 | <div class="table__body"> | 51 | <div class="table__row" |
128 | 70 | <div class="table__row table--success" data-ng-if="convertTo.saved"> | 52 | data-ng-repeat="discovery in discoveredDevices | orderBy:'-last_seen' track by discovery.first_seen" |
129 | 71 | <div class="table__data table-col--97"> | 53 | data-ng-class="{'is-active' : discovery.first_seen === selectedDevice}"> |
130 | 72 | <i class="icon icon--success"></i> {$ convertTo.hostname $} has been add to {$ site $}. | 54 | <div data-ng-if="discovery.first_seen !== selectedDevice" |
131 | 73 | <a href="#/node/{$ convertTo.parent $}" data-ng-if="convertTo.parent">Go to the machine devices page.</a> | 55 | data-ng-dblclick="toggleSelected(discovery.first_seen)"> |
132 | 74 | <a href="#/nodes/?tab=devices" data-ng-if="!convertTo.parent">Go to the device listing.</a> | 56 | <div class="table__data table-col--37" aria-label="Name"> |
133 | 75 | </div> | 57 | {$ getDiscoveryName(discovery) $} |
134 | 58 | <i data-ng-show="discovery.is_external_dhcp === true" class="icon icon--info tooltip u-margin--left-tiny ng-hide" aria-label="This device is providing DHCP."></i> | ||
135 | 59 | </div> | ||
136 | 60 | <div class="table__data table-col--15" aria-label="MAC"> | ||
137 | 61 | {$ discovery.mac_address $}<br/> | ||
138 | 62 | <small class="u-text--subtle u-display--desktop">{$ discovery.mac_organization || 'Unknown' $}</small> | ||
139 | 63 | </div> | ||
140 | 64 | <div class="table__data table-col--13 u-text--truncate" aria-label="IP Address"> | ||
141 | 65 | {$ discovery.ip $} | ||
142 | 66 | </div> | ||
143 | 67 | <div class="table__data table-col--15" aria-label="Rack"> | ||
144 | 68 | {$ discovery.observer_hostname $} | ||
145 | 69 | </div> | ||
146 | 70 | <div class="table__data table-col--17" aria-label="Last seen"> | ||
147 | 71 | <time>{$ discovery.last_seen $}</time> | ||
148 | 72 | </div> | ||
149 | 73 | <div class="table__data table--mobile-controls table-col--3"> | ||
150 | 74 | <div class="table__controls u-align--right"> | ||
151 | 75 | <i class="icon icon--open tooltip u-display--desktop" aria-label="Open" | ||
152 | 76 | data-ng-click="toggleSelected(discovery.first_seen)">Open</i> | ||
153 | 77 | <a class="button--secondary u-display--mobile" | ||
154 | 78 | data-ng-click="toggleSelected(discovery.first_seen)">Add device</a> | ||
155 | 79 | </div> | ||
156 | 80 | </div> | ||
157 | 81 | </div> | ||
158 | 82 | <maas-obj-form data-ng-if="discovery.first_seen === selectedDevice" | ||
159 | 83 | obj="convertTo" manager="proxyManager" pre-process="preProcess" | ||
160 | 84 | after-save="afterSave" table-form="true" save-on-blur="false"> | ||
161 | 85 | <div class="table__data table-col--20"> | ||
162 | 86 | <maas-obj-field class="u-margin--bottom-none" type="text" key="hostname" | ||
163 | 87 | disable-label="true" placeholder="Hostname (optional)"></maas-obj-field> | ||
164 | 88 | </div> | ||
165 | 89 | <div class="table__data table-col--77"></div> | ||
166 | 76 | <div class="table__data table-col--3"> | 90 | <div class="table__data table-col--3"> |
309 | 77 | <i class="icon icon--cross tooltip" aria-label="Clear" | 91 | <i class="icon icon--close tooltip u-display--desktop" aria-label="Close" |
310 | 78 | data-ng-click="convertTo.saved = false">Clear</i> | 92 | data-ng-click="toggleSelected(discovery.first_seen)">Close</i> |
311 | 79 | </div> | 93 | </div> |
312 | 80 | </div> | 94 | <div class="table__dropdown"> |
313 | 81 | <div class="table__row" data-ng-if="!discoveredDevices.length"> | 95 | <div class="table__dropdown-title"> |
314 | 82 | <div class="table__data table-col--100"> | 96 | <h2 data-ng-click="toggleSelected(selectedDevice)" class="u-float--left">Adding {$ getDiscoveryName(discovery) $}</h2> |
315 | 83 | No new discoveries | 97 | <i data-ng-click="toggleSelected(selectedDevice)" class="icon icon--remove u-float--right u-margin--top-small u-margin--right-small"></i> |
316 | 84 | </div> | 98 | </div> |
317 | 85 | </div> | 99 | <div class="table__row is-active"> |
318 | 86 | <div class="table__row" | 100 | <div class="table__data table-col--100"> |
319 | 87 | data-ng-repeat="discovery in discoveredDevices | orderBy:'-last_seen' track by discovery.first_seen" | 101 | <div class="six-col"> |
320 | 88 | data-ng-class="{'is-active' : discovery.first_seen === selectedDevice}"> | 102 | <dl> |
321 | 89 | <div data-ng-if="discovery.first_seen !== selectedDevice" | 103 | <dt class="two-col">Mac</dt> |
322 | 90 | data-ng-dblclick="toggleSelected(discovery.first_seen)"> | 104 | <dd class="four-col last-col">{$ discovery.mac_address $}</dd> |
323 | 91 | <div class="table__data table-col--37" aria-label="Name"> | 105 | <dt class="two-col">IP</dt> |
324 | 92 | {$ getDiscoveryName(discovery) $} | 106 | <dd class="four-col last-col">{$ discovery.ip $}</dd> |
325 | 93 | <i data-ng-show="discovery.is_external_dhcp === true" class="icon icon--info tooltip u-margin--left-tiny ng-hide" aria-label="This device is providing DHCP."></i> | 107 | <dt class="two-col">Rack</dt> |
326 | 94 | </div> | 108 | <dd class="four-col last-col">{$ discovery.observer_hostname $}</dd> |
327 | 95 | <div class="table__data table-col--15" aria-label="MAC"> | 109 | <dt class="two-col">Last seen</dt> |
328 | 96 | {$ discovery.mac_address $}<br/> | 110 | <dd class="four-col last-col"><time>{$ discovery.last_seen $}</time></dd> |
329 | 97 | <small class="u-text--subtle u-display--desktop">{$ discovery.mac_organization || 'Unknown' $}</small> | 111 | </dl> |
330 | 98 | </div> | 112 | </div> |
331 | 99 | <div class="table__data table-col--13 u-text--truncate" aria-label="IP Address"> | 113 | <div class="six-col last-col"> |
332 | 100 | {$ discovery.ip $} | 114 | <dl> |
333 | 101 | </div> | 115 | <dt class="two-col">Fabric</dt> |
334 | 102 | <div class="table__data table-col--15" aria-label="Rack"> | 116 | <dd class="four-col last-col">{$ discovery.fabric_name $}</dd> |
335 | 103 | {$ discovery.observer_hostname $} | 117 | <dt class="two-col">VLAN</dt> |
336 | 104 | </div> | 118 | <dd class="four-col last-col">{$ getVLANName(discovery.vlan) $}</dd> |
337 | 105 | <div class="table__data table-col--17" aria-label="Last seen"> | 119 | <dt class="two-col">Subnet</dt> |
338 | 106 | <time>{$ discovery.last_seen $}</time> | 120 | <dd class="four-col last-col">{$ getSubnetName(discovery.subnet) $}</dd> |
339 | 107 | </div> | 121 | </dl> |
340 | 108 | <div class="table__data table--mobile-controls table-col--3"> | 122 | </div> |
341 | 109 | <div class="table__controls u-align--right"> | 123 | </div> |
342 | 110 | <i class="icon icon--open tooltip u-display--desktop" aria-label="Open" | 124 | </div> |
343 | 111 | data-ng-click="toggleSelected(discovery.first_seen)">Open</i> | 125 | <div class="table__row is-active u-padding--top-small"> |
344 | 112 | <a class="button--secondary u-display--mobile" | 126 | <div class="table__data table-col--100"> |
345 | 113 | data-ng-click="toggleSelected(discovery.first_seen)">Add device</a> | 127 | <fieldset class="form__fieldset six-col"> |
346 | 114 | </div> | 128 | <div class="form__group u-display--mobile"> |
347 | 115 | </div> | 129 | <label for="Name" class="form__group-label two-col">Name</label> |
348 | 116 | </div> | 130 | <div class="form__group-input three-col"> |
349 | 117 | <maas-obj-form data-ng-if="discovery.first_seen === selectedDevice" | 131 | <maas-obj-field type="text" key="hostname" |
350 | 118 | obj="convertTo" manager="proxyManager" pre-process="preProcess" | 132 | disable-label="true" placeholder="Hostname (optional)"></maas-obj-field> |
351 | 119 | after-save="afterSave" table-form="true" save-on-blur="false"> | 133 | </div> |
352 | 120 | <div class="table__data table-col--20"> | 134 | </div> |
353 | 121 | <maas-obj-field class="u-margin--bottom-none" type="text" key="hostname" | 135 | <div class="form__group"> |
354 | 122 | disable-label="true" placeholder="Hostname (optional)"></maas-obj-field> | 136 | <label class="form__group-label two-col u-margin--bottom-small">Type</label> |
355 | 123 | </div> | 137 | <div class="form__group-input three-col"> |
356 | 124 | <div class="table__data table-col--77"></div> | 138 | <select name="type" ng-model="convertTo.type"> |
357 | 125 | <div class="table__data table-col--3"> | 139 | <option value="" disabled>Choose type</option> |
358 | 126 | <i class="icon icon--close tooltip u-display--desktop" aria-label="Close" | 140 | <option value="device">Device</option> |
359 | 127 | data-ng-click="toggleSelected(discovery.first_seen)">Close</i> | 141 | <option value="interface">Interface</option> |
360 | 128 | </div> | 142 | </select> |
361 | 129 | <div class="table__dropdown"> | 143 | </div> |
362 | 130 | <div class="table__dropdown-title"> | 144 | </div> |
363 | 131 | <h2 data-ng-click="toggleSelected(selectedDevice)" class="u-float--left">Adding {$ getDiscoveryName(discovery) $}</h2> | 145 | <maas-obj-field type="options" key="domain" label="Domain" placeholder="Choose domain" |
364 | 132 | <i data-ng-click="toggleSelected(selectedDevice)" class="icon icon--remove u-float--right u-margin--top-small u-margin--right-small"></i> | 146 | label-width="two" input-width="three" subtle="false" |
365 | 133 | </div> | 147 | options="domain as domain.name for domain in domains" |
366 | 134 | <div class="table__row is-active"> | 148 | data-ng-if="convertTo.type === 'device'"></maas-obj-field> |
367 | 135 | <div class="table__data table-col--100"> | 149 | <maas-obj-field type="options" subtle="false" key="system_id" label="Device name" placeholder="Select device name" |
368 | 136 | <div class="six-col"> | 150 | options="device.system_id as device.fqdn for device in devices | orderBy:'fqdn'" |
369 | 137 | <dl> | 151 | label-width="two" label-info="Create as an interface on the selected device." input-width="three" |
370 | 138 | <dt class="two-col">Mac</dt> | 152 | data-ng-if="convertTo.type === 'interface'"></maas-obj-field> |
371 | 139 | <dd class="four-col last-col">{$ discovery.mac_address $}</dd> | 153 | </fieldset> |
372 | 140 | <dt class="two-col">IP</dt> | 154 | <fieldset class="form__fieldset six-col last-col"> |
373 | 141 | <dd class="four-col last-col">{$ discovery.ip $}</dd> | 155 | <maas-obj-field type="options" subtle="false" key="parent" label="Parent" placeholder="Select parent (optional)" placeholder-enabled="true" |
374 | 142 | <dt class="two-col">Rack</dt> | 156 | options="machine.system_id as machine.fqdn for machine in machines | filter:{status_code: 6} | orderBy:'fqdn'" |
375 | 143 | <dd class="four-col last-col">{$ discovery.observer_hostname $}</dd> | 157 | label-width="two" label-info="Assign this device as a child of the parent machine." input-width="three" |
376 | 144 | <dt class="two-col">Last seen</dt> | 158 | data-ng-if="convertTo.type === 'device'"></maas-obj-field> |
377 | 145 | <dd class="four-col last-col"><time>{$ discovery.last_seen $}</time></dd> | 159 | <maas-obj-field type="options" subtle="false" key="ip_assignment" label="IP assignment" placeholder="Select IP assignment" |
378 | 146 | </dl> | 160 | options="option[0] as option[1] for option in convertTo.deviceIPOptions" label-width="two" input-width="three"></maas-obj-field> |
379 | 147 | </div> | 161 | </fieldset> |
380 | 148 | <div class="six-col last-col"> | 162 | </div> |
381 | 149 | <dl> | 163 | </div> |
382 | 150 | <dt class="two-col">Fabric</dt> | 164 | <div class="table__row is-active"> |
383 | 151 | <dd class="four-col last-col">{$ discovery.fabric_name $}</dd> | 165 | <div class="table__data u-float--left"> |
384 | 152 | <dt class="two-col">VLAN</dt> | 166 | <maas-obj-errors></maas-obj-errors> |
385 | 153 | <dd class="four-col last-col">{$ getVLANName(discovery.vlan) $}</dd> | 167 | </div> |
386 | 154 | <dt class="two-col">Subnet</dt> | 168 | <div class="table__data u-float--right"> |
387 | 155 | <dd class="four-col last-col">{$ getSubnetName(discovery.subnet) $}</dd> | 169 | <a class="button--base button--inline u-display--desktop" data-ng-click="toggleSelected(selectedDevice)">Cancel</a> |
388 | 156 | </dl> | 170 | <button class="button--secondary button--inline" |
389 | 157 | </div> | 171 | data-ng-click="convertTo.goTo = true" |
390 | 158 | </div> | 172 | data-ng-if="!convertTo.$maasForm.getValue('parent')" |
391 | 159 | </div> | 173 | maas-obj-save>Save and go to device listing</button> |
392 | 160 | <div class="table__row is-active u-padding--top-small"> | 174 | <button class="button--secondary button--inline" |
393 | 161 | <div class="table__data table-col--100"> | 175 | data-ng-click="convertTo.goTo = true" |
394 | 162 | <fieldset class="form__fieldset six-col"> | 176 | data-ng-if="convertTo.$maasForm.getValue('parent')" |
395 | 163 | <div class="form__group u-display--mobile"> | 177 | maas-obj-save>Save and go to machine details</button> |
396 | 164 | <label for="Name" class="form__group-label two-col">Name</label> | 178 | <button class="button--positive button--inline" maas-obj-save>Save</button> |
397 | 165 | <div class="form__group-input three-col"> | 179 | </div> |
398 | 166 | <maas-obj-field type="text" key="hostname" | 180 | </div> |
399 | 167 | disable-label="true" placeholder="Hostname (optional)"></maas-obj-field> | 181 | </div> |
400 | 168 | </div> | 182 | </maas-obj-form> |
259 | 169 | </div> | ||
260 | 170 | <div class="form__group"> | ||
261 | 171 | <label class="form__group-label two-col u-margin--bottom-small">Type</label> | ||
262 | 172 | <div class="form__group-input three-col"> | ||
263 | 173 | <select name="type" ng-model="convertTo.type"> | ||
264 | 174 | <option value="" disabled>Choose type</option> | ||
265 | 175 | <option value="device">Device</option> | ||
266 | 176 | <option value="interface">Interface</option> | ||
267 | 177 | </select> | ||
268 | 178 | </div> | ||
269 | 179 | </div> | ||
270 | 180 | <maas-obj-field type="options" key="domain" label="Domain" placeholder="Choose domain" | ||
271 | 181 | label-width="two" input-width="three" subtle="false" | ||
272 | 182 | options="domain as domain.name for domain in domains" | ||
273 | 183 | data-ng-if="convertTo.type === 'device'"></maas-obj-field> | ||
274 | 184 | <maas-obj-field type="options" subtle="false" key="system_id" label="Device name" placeholder="Select device name" | ||
275 | 185 | options="device.system_id as device.fqdn for device in devices | orderBy:'fqdn'" | ||
276 | 186 | label-width="two" label-info="Create as an interface on the selected device." input-width="three" | ||
277 | 187 | data-ng-if="convertTo.type === 'interface'"></maas-obj-field> | ||
278 | 188 | </fieldset> | ||
279 | 189 | <fieldset class="form__fieldset six-col last-col"> | ||
280 | 190 | <maas-obj-field type="options" subtle="false" key="parent" label="Parent" placeholder="Select parent (optional)" placeholder-enabled="true" | ||
281 | 191 | options="machine.system_id as machine.fqdn for machine in machines | filter:{status_code: 6} | orderBy:'fqdn'" | ||
282 | 192 | label-width="two" label-info="Assign this device as a child of the parent machine." input-width="three" | ||
283 | 193 | data-ng-if="convertTo.type === 'device'"></maas-obj-field> | ||
284 | 194 | <maas-obj-field type="options" subtle="false" key="ip_assignment" label="IP assignment" placeholder="Select IP assignment" | ||
285 | 195 | options="option[0] as option[1] for option in convertTo.deviceIPOptions" label-width="two" input-width="three"></maas-obj-field> | ||
286 | 196 | </fieldset> | ||
287 | 197 | </div> | ||
288 | 198 | </div> | ||
289 | 199 | <div class="table__row is-active"> | ||
290 | 200 | <div class="table__data u-float--left"> | ||
291 | 201 | <maas-obj-errors></maas-obj-errors> | ||
292 | 202 | </div> | ||
293 | 203 | <div class="table__data u-float--right"> | ||
294 | 204 | <a class="button--base button--inline u-display--desktop" data-ng-click="toggleSelected(selectedDevice)">Cancel</a> | ||
295 | 205 | <button class="button--secondary button--inline" | ||
296 | 206 | data-ng-click="convertTo.goTo = true" | ||
297 | 207 | data-ng-if="!convertTo.$maasForm.getValue('parent')" | ||
298 | 208 | maas-obj-save>Save and go to device listing</button> | ||
299 | 209 | <button class="button--secondary button--inline" | ||
300 | 210 | data-ng-click="convertTo.goTo = true" | ||
301 | 211 | data-ng-if="convertTo.$maasForm.getValue('parent')" | ||
302 | 212 | maas-obj-save>Save and go to machine details</button> | ||
303 | 213 | <button class="button--positive button--inline" maas-obj-save>Save</button> | ||
304 | 214 | </div> | ||
305 | 215 | </div> | ||
306 | 216 | </div> | ||
307 | 217 | </maas-obj-form> | ||
308 | 218 | </div> | ||
401 | 219 | </div> | 183 | </div> |
402 | 220 | </div> | 184 | </div> |
403 | 221 | </div> | 185 | </div> |
404 | 222 | </div> | 186 | </div> |
407 | 223 | </section> | 187 | </div> |
408 | 224 | </div> | 188 | </section> |
409 | 225 | 189 | ||
410 | === modified file 'src/maasserver/static/partials/nodes-list.html' | |||
411 | --- src/maasserver/static/partials/nodes-list.html 2017-02-01 18:13:33 +0000 | |||
412 | +++ src/maasserver/static/partials/nodes-list.html 2017-02-02 20:26:39 +0000 | |||
413 | @@ -1,5 +1,3 @@ | |||
414 | 1 | <maas-notifications /> | ||
415 | 2 | |||
416 | 3 | <header class="page-header" sticky media-query="min-width: 769px"> | 1 | <header class="page-header" sticky media-query="min-width: 769px"> |
417 | 4 | <div class="wrapper--inner"> | 2 | <div class="wrapper--inner"> |
418 | 5 | <!-- XXX ricgard 2016-06-16 - Need to add e2e test. --> | 3 | <!-- XXX ricgard 2016-06-16 - Need to add e2e test. --> |
419 | @@ -610,7 +608,10 @@ | |||
420 | 610 | </div> | 608 | </div> |
421 | 611 | </div> | 609 | </div> |
422 | 612 | </header> | 610 | </header> |
424 | 613 | <div class="row u-padding--top-none"> | 611 | <div class="wrapper--inner"> |
425 | 612 | <maas-notifications></maas-notifications> | ||
426 | 613 | </div> | ||
427 | 614 | <div class="u-padding--top-none"> | ||
428 | 614 | <div class="wrapper--inner"> | 615 | <div class="wrapper--inner"> |
429 | 615 | <aside class="three-col"> | 616 | <aside class="three-col"> |
430 | 616 | <div class="accordion maas-accordion ng-hide" data-ng-show="currentpage === 'nodes'" | 617 | <div class="accordion maas-accordion ng-hide" data-ng-show="currentpage === 'nodes'" |
lgtm! just make sure it gets attached to a bug.