Merge ~ya-bo-ng/maas:controllers-1.8-vanilla into maas:vanilla-1.7.1
- Git
- lp:~ya-bo-ng/maas
- controllers-1.8-vanilla
- Merge into vanilla-1.7.1
Proposed by
Anthony Dillon
Status: | Merged |
---|---|
Approved by: | Anthony Dillon |
Approved revision: | 4568fd73d304fc98591d59f38383fdbe60e6f51e |
Merge reported by: | MAAS Lander |
Merged at revision: | not available |
Proposed branch: | ~ya-bo-ng/maas:controllers-1.8-vanilla |
Merge into: | maas:vanilla-1.7.1 |
Diff against target: |
1070 lines (+441/-309) 10 files modified
src/maasserver/static/js/angular/directives/call_to_action.js (+2/-1) src/maasserver/static/js/angular/directives/maas_obj_form.js (+0/-3) src/maasserver/static/js/angular/directives/power_parameters.js (+11/-8) src/maasserver/static/partials/cards/services.html (+3/-3) src/maasserver/static/partials/node-details.html (+309/-279) src/maasserver/static/partials/script-results-list.html (+13/-13) src/maasserver/static/scss/_maas.scss (+1/-0) src/maasserver/static/scss/_patterns_table-expanding.scss (+2/-0) src/maasserver/static/scss/_patterns_tag-input.scss (+0/-2) src/maasserver/static/scss/_tables.scss (+100/-0) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
MAAS Lander | Approve | ||
Steve Rydz (community) | Approve | ||
MAAS Maintainers | Pending | ||
Review via email: mp+352113@code.launchpad.net |
Commit message
Apply mark up fixes for the controllers section to bring it inline with Vanilla 1.8
Description of the change
Apply mark up fixes for the controllers section to bring it inline with Vanilla 1.8
To post a comment you must log in.
Revision history for this message
MAAS Lander (maas-lander) wrote : | # |
UNIT TESTS
-b controllers-
STATUS: FAILED
LOG: http://
COMMIT: d624a851cf8bab6
review:
Needs Fixing
Revision history for this message
Steve Rydz (steverydz) wrote : | # |
Just one minor comment in the code
review:
Needs Fixing
- 1082963... by Anthony Dillon
-
Remove duplicate clearfixes
- 4568fd7... by Anthony Dillon
-
Fix lint issues
Revision history for this message
MAAS Lander (maas-lander) wrote : | # |
UNIT TESTS
-b controllers-
STATUS: SUCCESS
COMMIT: 4568fd73d304fc9
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | diff --git a/src/maasserver/static/js/angular/directives/call_to_action.js b/src/maasserver/static/js/angular/directives/call_to_action.js | |||
2 | index ff66f29..73b97b7 100644 | |||
3 | --- a/src/maasserver/static/js/angular/directives/call_to_action.js | |||
4 | +++ b/src/maasserver/static/js/angular/directives/call_to_action.js | |||
5 | @@ -9,7 +9,8 @@ angular.module('MAAS').run(['$templateCache', function ($templateCache) { | |||
6 | 9 | $templateCache.put('directive/templates/cta.html', [ | 9 | $templateCache.put('directive/templates/cta.html', [ |
7 | 10 | '<div class="p-contextual-menu">', | 10 | '<div class="p-contextual-menu">', |
8 | 11 | '<button ', | 11 | '<button ', |
10 | 12 | 'class="p-button p-contextual-menu__toggle" ', | 12 | 'class="p-button p-contextual-menu__toggle', |
11 | 13 | ' p-button--min-margin-bottom" ', | ||
12 | 13 | 'aria-controls="#cta-menu" ', | 14 | 'aria-controls="#cta-menu" ', |
13 | 14 | 'aria-expanded="false" ', | 15 | 'aria-expanded="false" ', |
14 | 15 | 'aria-haspopup="true" ', | 16 | 'aria-haspopup="true" ', |
15 | diff --git a/src/maasserver/static/js/angular/directives/maas_obj_form.js b/src/maasserver/static/js/angular/directives/maas_obj_form.js | |||
16 | index ef3cd60..b50b30b 100644 | |||
17 | --- a/src/maasserver/static/js/angular/directives/maas_obj_form.js | |||
18 | +++ b/src/maasserver/static/js/angular/directives/maas_obj_form.js | |||
19 | @@ -581,8 +581,6 @@ angular.module('MAAS').directive('maasObjField', ['$compile', | |||
20 | 581 | labelElement.addClass("tablet-col-" | 581 | labelElement.addClass("tablet-col-" |
21 | 582 | + attrs.labelWidthTablet); | 582 | + attrs.labelWidthTablet); |
22 | 583 | } | 583 | } |
23 | 584 | } else { | ||
24 | 585 | labelElement.addClass("u-margin--right"); | ||
25 | 586 | } | 584 | } |
26 | 587 | if(attrs.labelLeft === "true") { | 585 | if(attrs.labelLeft === "true") { |
27 | 588 | labelElement.addClass('u-padding--left'); | 586 | labelElement.addClass('u-padding--left'); |
28 | @@ -622,7 +620,6 @@ angular.module('MAAS').directive('maasObjField', ['$compile', | |||
29 | 622 | // Add the wrapper for the input. | 620 | // Add the wrapper for the input. |
30 | 623 | var inputWrapper = angular.element('<div></div>'); | 621 | var inputWrapper = angular.element('<div></div>'); |
31 | 624 | inputWrapper.addClass("p-form__control"); | 622 | inputWrapper.addClass("p-form__control"); |
32 | 625 | inputWrapper.addClass("u-no-margin--top"); | ||
33 | 626 | 623 | ||
34 | 627 | if(attrs.inputWidthMobile) { | 624 | if(attrs.inputWidthMobile) { |
35 | 628 | inputWrapper.addClass("mobile-col-" | 625 | inputWrapper.addClass("mobile-col-" |
36 | diff --git a/src/maasserver/static/js/angular/directives/power_parameters.js b/src/maasserver/static/js/angular/directives/power_parameters.js | |||
37 | index 7dfcaaa..435b5ed 100644 | |||
38 | --- a/src/maasserver/static/js/angular/directives/power_parameters.js | |||
39 | +++ b/src/maasserver/static/js/angular/directives/power_parameters.js | |||
40 | @@ -7,10 +7,12 @@ | |||
41 | 7 | angular.module('MAAS').run(['$templateCache', function ($templateCache) { | 7 | angular.module('MAAS').run(['$templateCache', function ($templateCache) { |
42 | 8 | // Inject the power-parameters.html into the template cache. | 8 | // Inject the power-parameters.html into the template cache. |
43 | 9 | $templateCache.put('directive/templates/power-parameters.html', [ | 9 | $templateCache.put('directive/templates/power-parameters.html', [ |
45 | 10 | '<div class="p-form__group">', | 10 | '<div class="p-form__group u-clearfix">', |
46 | 11 | '<label for="power-type" ', | 11 | '<label for="power-type" ', |
49 | 12 | 'class="form__group-label col-2">Power type</label>', | 12 | 'class="p-form__label col-2 mobile-col-2 tablet-col-2">', |
50 | 13 | '<div class="form__group-input col-3">', | 13 | 'Power type', |
51 | 14 | '</label>', | ||
52 | 15 | '<div class="p-form__control col-3 mobile-col-2 tablet-col-3">', | ||
53 | 14 | '<select name="power-type" id="power-type" ', | 16 | '<select name="power-type" id="power-type" ', |
54 | 15 | 'data-ng-disabled="ngDisabled || ngModel.in_pod" ', | 17 | 'data-ng-disabled="ngDisabled || ngModel.in_pod" ', |
55 | 16 | 'data-ng-class="{ invalid: !ngModel.type }" ', | 18 | 'data-ng-class="{ invalid: !ngModel.type }" ', |
56 | @@ -24,14 +26,15 @@ angular.module('MAAS').run(['$templateCache', function ($templateCache) { | |||
57 | 24 | '</select>', | 26 | '</select>', |
58 | 25 | '</div>', | 27 | '</div>', |
59 | 26 | '</div>', | 28 | '</div>', |
61 | 27 | '<div class="p-form__group" ', | 29 | '<div class="p-form__group u-clearfix" ', |
62 | 28 | 'data-ng-repeat="field in ngModel.type.fields">', | 30 | 'data-ng-repeat="field in ngModel.type.fields">', |
66 | 29 | '<label for="{$ field.name $}" class="form__group-label col-2" ', | 31 | '<label for="{$ field.name $}" ', |
67 | 30 | 'data-ng-if="field.name !== ' + "'default_storage_pool' && ", | 32 | 'class="p-form__label col-2 mobile-col-2 tablet-col-2" ', |
68 | 31 | "(field.scope !== 'bmc' || !ngModel.in_pod)" + '">', | 33 | 'data-ng-if="field.name !== ' + "'default_storage_pool' && ", |
69 | 34 | "(field.scope !== 'bmc' || !ngModel.in_pod)" + '">', | ||
70 | 32 | '{$ field.label $}', | 35 | '{$ field.label $}', |
71 | 33 | '</label>', | 36 | '</label>', |
73 | 34 | '<div class="form__group-input col-3">', | 37 | '<div class="p-form__control col-3 mobile-col-2 tablet-col-3">', |
74 | 35 | '<maas-power-input field="field" ', | 38 | '<maas-power-input field="field" ', |
75 | 36 | 'data-ng-disabled="ngDisabled || (field.scope === ', | 39 | 'data-ng-disabled="ngDisabled || (field.scope === ', |
76 | 37 | "'bmc' && ngModel.in_pod)" + '" ', | 40 | "'bmc' && ngModel.in_pod)" + '" ', |
77 | diff --git a/src/maasserver/static/partials/cards/services.html b/src/maasserver/static/partials/cards/services.html | |||
78 | index 080b39a..0b3ad9b 100644 | |||
79 | --- a/src/maasserver/static/partials/cards/services.html | |||
80 | +++ b/src/maasserver/static/partials/cards/services.html | |||
81 | @@ -1,9 +1,9 @@ | |||
82 | 1 | <header class="p-card__header"> | 1 | <header class="p-card__header"> |
83 | 2 | <h2 class="p-heading--four">Services</h2> | 2 | <h2 class="p-heading--four">Services</h2> |
85 | 3 | <div class="u-vertically-center u-no-margin--top"> | 3 | <h3 class="p-heading--four"> |
86 | 4 | <span data-maas-controller-status="node" data-maas-services="services" aria-label="Status" class="u-hide--small"></span> | 4 | <span data-maas-controller-status="node" data-maas-services="services" aria-label="Status" class="u-hide--small"></span> |
89 | 5 | <h3 class="p-heading--four u-no-margin--top"><span data-maas-controller-status="node" data-maas-services="services" data-maas-text-only="true"></span></h3> | 5 | <span data-maas-controller-status="node" data-maas-services="services" data-maas-text-only="true"></span> |
90 | 6 | </div> | 6 | </h3> |
91 | 7 | </header> | 7 | </header> |
92 | 8 | <div> | 8 | <div> |
93 | 9 | <ul class="p-list-tree" aria-multiselectable="true" role="tablist"> | 9 | <ul class="p-list-tree" aria-multiselectable="true" role="tablist"> |
94 | diff --git a/src/maasserver/static/partials/node-details.html b/src/maasserver/static/partials/node-details.html | |||
95 | index 0c397e2..bcb55a1 100755 | |||
96 | --- a/src/maasserver/static/partials/node-details.html | |||
97 | +++ b/src/maasserver/static/partials/node-details.html | |||
98 | @@ -453,165 +453,169 @@ | |||
99 | 453 | </table> | 453 | </table> |
100 | 454 | </div> | 454 | </div> |
101 | 455 | </section> | 455 | </section> |
115 | 456 | <section class="p-strip" data-ng-if="section.area === 'configuration'"> | 456 | <section data-ng-if="section.area === 'configuration'"> |
116 | 457 | <div class="row"> | 457 | <div class="p-strip"> |
104 | 458 | <div class="col-10"> | ||
105 | 459 | <h2 data-ng-if="!isController" class="p-heading--four">{$ node.node_type_display $} configuration</h2> | ||
106 | 460 | <h2 data-ng-if="isController" class="p-heading--four">Controller configuration</h2> | ||
107 | 461 | </div> | ||
108 | 462 | <div class="col-2" data-ng-if="!summary.editing"> | ||
109 | 463 | <button class="p-button--neutral u-float--right" | ||
110 | 464 | data-ng-if="canEdit()" | ||
111 | 465 | data-ng-click="editSummary()">Edit</button> | ||
112 | 466 | </div> | ||
113 | 467 | </div> | ||
114 | 468 | <form class="p-form p-form--stacked"> | ||
117 | 469 | <div class="row"> | 458 | <div class="row"> |
129 | 470 | <div class="col-6"> | 459 | <div class="col-10"> |
130 | 471 | <div class="p-form__group" data-ng-if="!isDevice && !isController" | 460 | <h2 data-ng-if="!isController" class="p-heading--four">{$ node.node_type_display $} configuration</h2> |
131 | 472 | data-ng-class="{ 'is-error': invalidArchitecture() }"> | 461 | <h2 data-ng-if="isController" class="p-heading--four">Controller configuration</h2> |
132 | 473 | <label for="architecture" class="p-form__label">Architecture</label> | 462 | </div> |
133 | 474 | <div class="p-form__control"> | 463 | <div class="col-2" data-ng-if="!summary.editing"> |
134 | 475 | <select name="architecture" id="architecture" class="p-form-validation__input" | 464 | <button class="p-button--neutral u-float--right u-no-margin--bottom" |
135 | 476 | data-ng-disabled="!summary.editing" | 465 | data-ng-if="canEdit()" |
136 | 477 | data-ng-model="summary.architecture.selected" | 466 | data-ng-click="editSummary()">Edit</button> |
137 | 478 | data-ng-options="arch for arch in summary.architecture.options"> | 467 | </div> |
138 | 479 | <option value="" disabled="disabled">{$ getArchitecturePlaceholder() $}</option> | 468 | </div> |
139 | 480 | </select> | 469 | <form class="p-form p-form--stacked"> |
140 | 470 | <div class="row"> | ||
141 | 471 | <div class="col-6"> | ||
142 | 472 | <div class="p-form__group u-clearfix" data-ng-if="!isDevice && !isController" | ||
143 | 473 | data-ng-class="{ 'is-error': invalidArchitecture() }"> | ||
144 | 474 | <label for="architecture" class="p-form__label col-2 mobile-col-2 tablet-col-2">Architecture</label> | ||
145 | 475 | <div class="p-form__control col-3 mobile-col-2 tablet-col-3"> | ||
146 | 476 | <select name="architecture" id="architecture" class="p-form-validation__input" | ||
147 | 477 | data-ng-disabled="!summary.editing" | ||
148 | 478 | data-ng-model="summary.architecture.selected" | ||
149 | 479 | data-ng-options="arch for arch in summary.architecture.options"> | ||
150 | 480 | <option value="" disabled="disabled">{$ getArchitecturePlaceholder() $}</option> | ||
151 | 481 | </select> | ||
152 | 482 | </div> | ||
153 | 481 | </div> | 483 | </div> |
164 | 482 | </div> | 484 | <div class="p-form__group u-clearfix" data-ng-if="!isDevice && !isController"> |
165 | 483 | <div class="p-form__group" data-ng-if="!isDevice && !isController"> | 485 | <label for="min_hwe_kernel" class="p-form__label col-2 mobile-col-2 tablet-col-2">Minimum Kernel</label> |
166 | 484 | <label for="min_hwe_kernel" class="p-form__label">Minimum Kernel</label> | 486 | <div class="p-form__control col-3 mobile-col-2 tablet-col-3"> |
167 | 485 | <div class="p-form__control"> | 487 | <select name="min_hwe_kernel" id="min_hwe_kernel" |
168 | 486 | <select name="min_hwe_kernel" id="min_hwe_kernel" | 488 | data-ng-disabled="!summary.editing" |
169 | 487 | data-ng-disabled="!summary.editing" | 489 | data-ng-model="summary.min_hwe_kernel.selected" |
170 | 488 | data-ng-model="summary.min_hwe_kernel.selected" | 490 | data-ng-options="hwe_kernel[0] as hwe_kernel[1] for hwe_kernel in summary.min_hwe_kernel.options"> |
171 | 489 | data-ng-options="hwe_kernel[0] as hwe_kernel[1] for hwe_kernel in summary.min_hwe_kernel.options"> | 491 | <option value="">No minimum kernel</option> |
172 | 490 | <option value="">No minimum kernel</option> | 492 | </select> |
173 | 491 | </select> | 493 | </div> |
174 | 492 | </div> | 494 | </div> |
185 | 493 | </div> | 495 | <div class="p-form__group u-clearfix"> |
186 | 494 | <div class="p-form__group"> | 496 | <label for="zone" class="p-form__label col-2 mobile-col-2 tablet-col-2">Zone</label> |
187 | 495 | <label for="zone" class="p-form__label">Zone</label> | 497 | <div class="p-form__control col-3 mobile-col-2 tablet-col-3"> |
188 | 496 | <div class="p-form__control"> | 498 | <select name="zone" id="zone" |
189 | 497 | <select name="zone" id="zone" | 499 | data-ng-disabled="!summary.editing" |
190 | 498 | data-ng-disabled="!summary.editing" | 500 | data-ng-model="summary.zone.selected" |
191 | 499 | data-ng-model="summary.zone.selected" | 501 | data-ng-options="zone as zone.name for zone in summary.zone.options"> |
192 | 500 | data-ng-options="zone as zone.name for zone in summary.zone.options"> | 502 | <option value="" disabled="disabled">Choose a zone</option> |
193 | 501 | <option value="" disabled="disabled">Choose a zone</option> | 503 | </select> |
194 | 502 | </select> | 504 | </div> |
195 | 503 | </div> | 505 | </div> |
206 | 504 | </div> | 506 | <div class="p-form__group u-clearfix" data-ng-if="!isDevice && !isController"> |
207 | 505 | <div class="p-form__group" data-ng-if="!isDevice && !isController"> | 507 | <label for="pool" class="p-form__label col-2 mobile-col-2 tablet-col-2">Resource pool</label> |
208 | 506 | <label for="pool" class="p-form__label">Resource pool</label> | 508 | <div class="p-form__control col-3 mobile-col-2 tablet-col-3"> |
209 | 507 | <div class="p-form__control"> | 509 | <select name="pool" id="pool" |
210 | 508 | <select name="pool" id="pool" | 510 | data-ng-disabled="!summary.editing" |
211 | 509 | data-ng-disabled="!summary.editing" | 511 | data-ng-model="summary.pool.selected" |
212 | 510 | data-ng-model="summary.pool.selected" | 512 | data-ng-options="pool as pool.name for pool in summary.pool.options"> |
213 | 511 | data-ng-options="pool as pool.name for pool in summary.pool.options"> | 513 | <option value="" disabled="disabled">Choose a resource pool</option> |
214 | 512 | <option value="" disabled="disabled">Choose a resource pool</option> | 514 | </select> |
215 | 513 | </select> | 515 | </div> |
216 | 514 | </div> | 516 | </div> |
228 | 515 | </div> | 517 | <div class="p-form__group u-clearfix"> |
229 | 516 | <div class="p-form__group"> | 518 | <label class="p-form__label col-2 mobile-col-2 tablet-col-2">Tags</label> |
230 | 517 | <label class="p-form__label">Tags</label> | 519 | <div class="p-form__control col-3 mobile-col-2 tablet-col-3 tags--inline"> |
231 | 518 | <div class="p-form__control tags--inline"> | 520 | <span data-ng-repeat="tag in node.tags" data-ng-hide="summary.editing"> |
232 | 519 | <span data-ng-repeat="tag in node.tags" data-ng-hide="summary.editing"> | 521 | <a href="#/machines/?query=tags:({$ tag $})">{$ tag $}</a> |
233 | 520 | <a href="#/machines/?query=tags:({$ tag $})">{$ tag $}</a> | 522 | </span> |
234 | 521 | </span> | 523 | <tags-input data-ng-model="summary.tags" |
235 | 522 | <tags-input data-ng-model="summary.tags" | 524 | data-ng-disabled="!summary.editing" allowed-tags-pattern="[\w-]+"> |
236 | 523 | data-ng-show="summary.editing" allowed-tags-pattern="[\w-]+"> | 525 | <auto-complete source="tagsAutocomplete($query)"></auto-complete> |
237 | 524 | <auto-complete source="tagsAutocomplete($query)"></auto-complete> | 526 | </tags-input> |
238 | 525 | </tags-input> | 527 | </div> |
239 | 526 | </div> | 528 | </div> |
240 | 527 | </div> | 529 | </div> |
241 | 528 | </div> | 530 | </div> |
250 | 529 | </div> | 531 | <div class="row"> |
251 | 530 | <div class="row"> | 532 | <div class="col-12 u-align--right" data-ng-if="summary.editing"> |
252 | 531 | <div class="col-12 u-align--right" data-ng-if="summary.editing"> | 533 | <button class="p-button--base" |
253 | 532 | <button class="p-button--base" | 534 | data-ng-click="cancelEditSummary()">Cancel</button> |
254 | 533 | data-ng-click="cancelEditSummary()">Cancel</button> | 535 | <button class="p-button--positive" |
255 | 534 | <button class="p-button--positive" | 536 | data-ng-class="{ secondary: invalidArchitecture() }" |
256 | 535 | data-ng-class="{ secondary: invalidArchitecture() }" | 537 | data-ng-click="saveEditSummary()">Save changes</button> |
257 | 536 | data-ng-click="saveEditSummary()">Save changes</button> | 538 | </div> |
258 | 537 | </div> | 539 | </div> |
271 | 538 | </div> | 540 | </form> |
260 | 539 | </form> | ||
261 | 540 | <div class="row" data-ng-if="!isDevice"> | ||
262 | 541 | <div class="col-10"> | ||
263 | 542 | <h2 class="p-heading--four">Power configuration</h2> | ||
264 | 543 | </div> | ||
265 | 544 | <div class="col-2"> | ||
266 | 545 | <button class="p-button--neutral u-float--right" | ||
267 | 546 | data-ng-show="canEdit() && power_types.length" | ||
268 | 547 | data-ng-click="editPower()" | ||
269 | 548 | data-ng-if="!power.editing">Edit</button> | ||
270 | 549 | </div> | ||
272 | 550 | </div> | 541 | </div> |
280 | 551 | <div class="row"> | 542 | <div class="p-strip"> |
281 | 552 | <div class="col-12" data-ng-if="!isDevice"> | 543 | <div class="row" data-ng-if="!isDevice"> |
282 | 553 | <div class="p-notification--negative" data-ng-if="!isRackControllerConnected()"> | 544 | <div class="col-10"> |
283 | 554 | <p class="p-notification__response"> | 545 | <h2 class="p-heading--four">Power configuration</h2> |
277 | 555 | <span class="p-notification__status">Error:</span> Editing is currently | ||
278 | 556 | disabled because no rack controller is currently | ||
279 | 557 | connected to the region.</p> | ||
284 | 558 | </div> | 546 | </div> |
319 | 559 | <div class="p-notification--negative" | 547 | <div class="col-2"> |
320 | 560 | data-ng-if="isRackControllerConnected() && node.power_type == '' && !isController"> | 548 | <button class="p-button--neutral u-float--right" |
321 | 561 | <p class="p-notification__response"> | 549 | data-ng-show="canEdit() && power_types.length" |
322 | 562 | <span class="p-notification__status">Error:</span> This node does not | 550 | data-ng-click="editPower()" |
323 | 563 | have a power type set and MAAS will be unable to | 551 | data-ng-if="!power.editing">Edit</button> |
290 | 564 | control it. Update the power information below.</p> | ||
291 | 565 | </div> | ||
292 | 566 | <div class="p-notification--warning" | ||
293 | 567 | data-ng-if="isRackControllerConnected() && node.power_type == '' && isController"> | ||
294 | 568 | <p class="p-notification__response"> | ||
295 | 569 | <span class="p-notification__status">Warning:</span> This node does not | ||
296 | 570 | have a power type set and MAAS will be unable to | ||
297 | 571 | control it. Update the power information below.</p> | ||
298 | 572 | </div> | ||
299 | 573 | <div class="p-notification--negative" data-ng-if="hasPowerError()"> | ||
300 | 574 | <p class="p-notification__response"> | ||
301 | 575 | <span class="p-notification__status">Error:</span> Power control | ||
302 | 576 | software for this power type is missing from the rack | ||
303 | 577 | controller. To proceed, install the | ||
304 | 578 | {$ getPowerErrors() $} on the rack controller.</p> | ||
305 | 579 | </div> | ||
306 | 580 | <div class="p-notification--negative" data-ng-if="hasPowerEventError()"> | ||
307 | 581 | <p class="p-notification__response"> | ||
308 | 582 | <span class="p-notification__status">Error:</span> {$ getPowerEventErrorText() $}</p> | ||
309 | 583 | </div> | ||
310 | 584 | <div class="p-notification" data-ng-if="power.type.name == 'manual'"> | ||
311 | 585 | <p class="p-notification__response">Power control for | ||
312 | 586 | this power type will need to be handled manually.</p> | ||
313 | 587 | </div> | ||
314 | 588 | <div class="p-notification" data-ng-if="power.editing && node.power_bmc_node_count > 1"> | ||
315 | 589 | <p class="p-notification__response">This power controller | ||
316 | 590 | manages {$ node.power_bmc_node_count - 1 $} other | ||
317 | 591 | {$ node.power_bmc_node_count > 3 ? "nodes" : "node" $}. | ||
318 | 592 | Changing power parameters will affect these nodes.</p> | ||
324 | 593 | </div> | 552 | </div> |
325 | 594 | </div> | 553 | </div> |
326 | 595 | </div> | ||
327 | 596 | <form class="p-form p-form--stacked" class="disabled" data-ng-if="!isDevice"> | ||
328 | 597 | <div class="row"> | 554 | <div class="row"> |
334 | 598 | <div class="col-6 ng-hide" | 555 | <div class="col-12" data-ng-if="!isDevice"> |
335 | 599 | data-ng-show="power_types.length" | 556 | <div class="p-notification--negative" data-ng-if="!isRackControllerConnected()"> |
336 | 600 | data-ng-disabled="!power.editing" | 557 | <p class="p-notification__response"> |
337 | 601 | data-maas-power-parameters="power_types" | 558 | <span class="p-notification__status">Error:</span> Editing is currently |
338 | 602 | data-ng-model="power"> | 559 | disabled because no rack controller is currently |
339 | 560 | connected to the region.</p> | ||
340 | 561 | </div> | ||
341 | 562 | <div class="p-notification--negative" | ||
342 | 563 | data-ng-if="isRackControllerConnected() && node.power_type == '' && !isController"> | ||
343 | 564 | <p class="p-notification__response"> | ||
344 | 565 | <span class="p-notification__status">Error:</span> This node does not | ||
345 | 566 | have a power type set and MAAS will be unable to | ||
346 | 567 | control it. Update the power information below.</p> | ||
347 | 568 | </div> | ||
348 | 569 | <div class="p-notification--warning" | ||
349 | 570 | data-ng-if="isRackControllerConnected() && node.power_type == '' && isController"> | ||
350 | 571 | <p class="p-notification__response"> | ||
351 | 572 | <span class="p-notification__status">Warning:</span> This node does not | ||
352 | 573 | have a power type set and MAAS will be unable to | ||
353 | 574 | control it. Update the power information below.</p> | ||
354 | 575 | </div> | ||
355 | 576 | <div class="p-notification--negative" data-ng-if="hasPowerError()"> | ||
356 | 577 | <p class="p-notification__response"> | ||
357 | 578 | <span class="p-notification__status">Error:</span> Power control | ||
358 | 579 | software for this power type is missing from the rack | ||
359 | 580 | controller. To proceed, install the | ||
360 | 581 | {$ getPowerErrors() $} on the rack controller.</p> | ||
361 | 582 | </div> | ||
362 | 583 | <div class="p-notification--negative" data-ng-if="hasPowerEventError()"> | ||
363 | 584 | <p class="p-notification__response"> | ||
364 | 585 | <span class="p-notification__status">Error:</span> {$ getPowerEventErrorText() $}</p> | ||
365 | 586 | </div> | ||
366 | 587 | <div class="p-notification" data-ng-if="power.type.name == 'manual'"> | ||
367 | 588 | <p class="p-notification__response">Power control for | ||
368 | 589 | this power type will need to be handled manually.</p> | ||
369 | 590 | </div> | ||
370 | 591 | <div class="p-notification" data-ng-if="power.editing && node.power_bmc_node_count > 1"> | ||
371 | 592 | <p class="p-notification__response">This power controller | ||
372 | 593 | manages {$ node.power_bmc_node_count - 1 $} other | ||
373 | 594 | {$ node.power_bmc_node_count > 3 ? "nodes" : "node" $}. | ||
374 | 595 | Changing power parameters will affect these nodes.</p> | ||
375 | 596 | </div> | ||
376 | 603 | </div> | 597 | </div> |
377 | 604 | </div> | 598 | </div> |
385 | 605 | <div class="row"> | 599 | <form class="p-form p-form--stacked" class="disabled" data-ng-if="!isDevice"> |
386 | 606 | <div class="col-12 u-align--right ng-hide" data-ng-show="power.editing"> | 600 | <div class="row"> |
387 | 607 | <button class="p-button--base" type="button" | 601 | <div class="col-6 ng-hide" |
388 | 608 | data-ng-click="cancelEditPower()">Cancel</button> | 602 | data-ng-show="power_types.length" |
389 | 609 | <button class="p-button--positive" | 603 | data-ng-disabled="!power.editing" |
390 | 610 | data-ng-class="{ secondary: invalidPowerType() }" | 604 | data-maas-power-parameters="power_types" |
391 | 611 | data-ng-click="saveEditPower()">Save changes</button> | 605 | data-ng-model="power"> |
392 | 606 | </div> | ||
393 | 612 | </div> | 607 | </div> |
396 | 613 | </div> | 608 | <div class="row"> |
397 | 614 | </form> | 609 | <div class="col-12 u-align--right ng-hide" data-ng-show="power.editing"> |
398 | 610 | <button class="p-button--base" type="button" | ||
399 | 611 | data-ng-click="cancelEditPower()">Cancel</button> | ||
400 | 612 | <button class="p-button--positive" | ||
401 | 613 | data-ng-class="{ secondary: invalidPowerType() }" | ||
402 | 614 | data-ng-click="saveEditPower()">Save changes</button> | ||
403 | 615 | </div> | ||
404 | 616 | </div> | ||
405 | 617 | </form> | ||
406 | 618 | </div> | ||
407 | 615 | </section> | 619 | </section> |
408 | 616 | <section class="p-strip" data-ng-if="section.area === 'services'"> | 620 | <section class="p-strip" data-ng-if="section.area === 'services'"> |
409 | 617 | <div class="row" data-ng-show="node.node_type == 3 || node.node_type == 4"> | 621 | <div class="row" data-ng-show="node.node_type == 3 || node.node_type == 4"> |
410 | @@ -717,38 +721,38 @@ | |||
411 | 717 | </div> | 721 | </div> |
412 | 718 | <div class="row"> | 722 | <div class="row"> |
413 | 719 | <form data-ng-if="loaded"> | 723 | <form data-ng-if="loaded"> |
415 | 720 | <table class="p-table-expanding"> | 724 | <table class="p-table-expanding p-table--controller-vlans"> |
416 | 721 | <thead> | 725 | <thead> |
424 | 722 | <tr> | 726 | <tr class="p-table__row"> |
425 | 723 | <th class="col-2" title="Fabric">Fabric</th> | 727 | <th title="Fabric">Fabric</th> |
426 | 724 | <th class="col-2" title="VLAN">VLAN</th> | 728 | <th title="VLAN">VLAN</th> |
427 | 725 | <th class="col-1" title="DHCP">DHCP</th> | 729 | <th title="DHCP">DHCP</th> |
428 | 726 | <th class="col-3" title="Subnets">Subnets</th> | 730 | <th title="Subnets">Subnets</th> |
429 | 727 | <th class="col-2" title="Primary rack">Primary rack</th> | 731 | <th title="Primary rack">Primary rack</th> |
430 | 728 | <th class="col-2" title="Secondary rack">Secondary rack</th> | 732 | <th title="Secondary rack">Secondary rack</th> |
431 | 729 | </tr> | 733 | </tr> |
432 | 730 | </thead> | 734 | </thead> |
433 | 731 | <tbody> | 735 | <tbody> |
436 | 732 | <tr class="table__row" data-ng-repeat="vlanRow in vlanTable"> | 736 | <tr class="p-table__row" data-ng-repeat="vlanRow in vlanTable"> |
437 | 733 | <td class="col-2" title="{$ vlanRow['fabric'].name $}"> | 737 | <td title="{$ vlanRow['fabric'].name $}"> |
438 | 734 | <a href="#/fabric/{$ vlanRow['fabric'].id $}">{$ vlanRow['fabric'].name $}</a> | 738 | <a href="#/fabric/{$ vlanRow['fabric'].id $}">{$ vlanRow['fabric'].name $}</a> |
439 | 735 | </td> | 739 | </td> |
441 | 736 | <td class="col-2" title="{$ vlanRow['fabric'].name $}"> | 740 | <td title="{$ getVLANText(vlanRow['vlan']) $}"> |
442 | 737 | <a href="#/vlan/{$ vlanRow['vlan'].id $}">{$ getVLANText(vlanRow['vlan']) $}</a> | 741 | <a href="#/vlan/{$ vlanRow['vlan'].id $}">{$ getVLANText(vlanRow['vlan']) $}</a> |
443 | 738 | </td> | 742 | </td> |
447 | 739 | <td class="col-1"> | 743 | <td> |
448 | 740 | <span data-ng-if="vlanRow.vlan.dhcp_on === true || vlanRow.vlan.relay_vlan !== null || vlanRow.vlan.external_dhcp === true">Enabled</span> | 744 | <span data-ng-if="vlanRow.vlan.dhcp_on === true || vlanRow.vlan.relay_vlan !== null || vlanRow.vlan.external_dhcp === true" title="Enabled">Enabled</span> |
449 | 741 | <span data-ng-if="vlanRow.vlan.dhcp_on !== true && vlanRow.vlan.relay_vlan === null">Disabled</span> | 745 | <span data-ng-if="vlanRow.vlan.dhcp_on !== true && vlanRow.vlan.relay_vlan === null" title="Disabled">Disabled</span> |
450 | 742 | </td> | 746 | </td> |
452 | 743 | <td class="col-3"> | 747 | <td> |
453 | 744 | <div class="u-no-margin--top" data-ng-repeat="subnet in vlanRow['subnets']"> | 748 | <div class="u-no-margin--top" data-ng-repeat="subnet in vlanRow['subnets']"> |
454 | 745 | <a href="#/subnet/{$ subnet.id $}" title="{$ getSubnetText(subnet) $}">{$ getSubnetText(subnet) $}</a> | 749 | <a href="#/subnet/{$ subnet.id $}" title="{$ getSubnetText(subnet) $}">{$ getSubnetText(subnet) $}</a> |
455 | 746 | </div> | 750 | </div> |
456 | 747 | </td> | 751 | </td> |
458 | 748 | <td class="col-2"> | 752 | <td> |
459 | 749 | <a href="#/controller/{$ vlanRow['primary_rack'].system_id $}" title="{$ vlanRow['primary_rack'].fqdn $}">{$ vlanRow['primary_rack'].fqdn $}</a> | 753 | <a href="#/controller/{$ vlanRow['primary_rack'].system_id $}" title="{$ vlanRow['primary_rack'].fqdn $}">{$ vlanRow['primary_rack'].fqdn $}</a> |
460 | 750 | </td> | 754 | </td> |
462 | 751 | <td class="col-2"> | 755 | <td> |
463 | 752 | <a href="#/controller/{$ vlanRow['secondary_rack'].system_id $}" title="{$ vlanRow['secondary_rack'].fqdn $}">{$ vlanRow['secondary_rack'].fqdn $}</a> | 756 | <a href="#/controller/{$ vlanRow['secondary_rack'].system_id $}" title="{$ vlanRow['secondary_rack'].fqdn $}">{$ vlanRow['secondary_rack'].fqdn $}</a> |
464 | 753 | </td> | 757 | </td> |
465 | 754 | </tr> | 758 | </tr> |
466 | @@ -785,17 +789,17 @@ | |||
467 | 785 | </div> | 789 | </div> |
468 | 786 | </div> | 790 | </div> |
469 | 787 | <div class="row"> | 791 | <div class="row"> |
471 | 788 | <table class="p-table-expanding"> | 792 | <table class="p-table-expanding p-table--controller-interfaces"> |
472 | 789 | <thead> | 793 | <thead> |
478 | 790 | <tr data-ng-if="isDevice"> | 794 | <tr data-ng-if="isDevice" class="p-table--is-device"> |
479 | 791 | <th class="table-col--30">MAC</th> | 795 | <th>MAC</th> |
480 | 792 | <th class="table-col--25">Subnet</th> | 796 | <th>Subnet</th> |
481 | 793 | <th class="table-col--25">IP Address</th> | 797 | <th>IP Address</th> |
482 | 794 | <th class="table-col--15"><div class="u-align--right">Actions</div></th> | 798 | <th><div class="u-align--right">Actions</div></th> |
483 | 795 | </tr> | 799 | </tr> |
484 | 796 | 800 | ||
487 | 797 | <tr data-ng-if="!isDevice"> | 801 | <tr data-ng-if="!isDevice" class="p-table--is-not-device"> |
488 | 798 | <th class="table-col--16"> | 802 | <th> |
489 | 799 | <a data-ng-class="{ 'p-link--strong': tableInfo.column == 'name' }" | 803 | <a data-ng-class="{ 'p-link--strong': tableInfo.column == 'name' }" |
490 | 800 | data-ng-click="tableInfo.column = 'name'"> | 804 | data-ng-click="tableInfo.column = 'name'"> |
491 | 801 | Name | 805 | Name |
492 | @@ -806,26 +810,26 @@ | |||
493 | 806 | MAC | 810 | MAC |
494 | 807 | </a> | 811 | </a> |
495 | 808 | </th> | 812 | </th> |
503 | 809 | <th class="table-col--7"><div data-ng-if="!isController" class="u-align--center">PXE</div></th> | 813 | <th><div data-ng-if="!isController" class="u-align--center">PXE</div></th> |
504 | 810 | <th class="table-col--9">Type</th> | 814 | <th>Type</th> |
505 | 811 | <th class="table-col--13">Fabric</th> | 815 | <th>Fabric</th> |
506 | 812 | <th class="table-col--13">VLAN</th> | 816 | <th>VLAN</th> |
507 | 813 | <th class="table-col--13">Subnet</th> | 817 | <th>Subnet</th> |
508 | 814 | <th class="table-col--19">IP Address</th> | 818 | <th>IP Address</th> |
509 | 815 | <th class="table-col--10"><div class="u-align--right">Actions</div></th> | 819 | <th><div class="u-align--right">Actions</div></th> |
510 | 816 | </tr> | 820 | </tr> |
511 | 817 | </thead> | 821 | </thead> |
512 | 818 | <tbody data-selected-rows> | 822 | <tbody data-selected-rows> |
516 | 819 | <tr data-ng-if="isDevice" data-ng-class="{ disabled: isDisabled(), 'is-active': isInterfaceSelected(interface) && (!isAllNetworkingDisabled() || isLimitedEditingAllowed(interface)), noEdit: cannotEditInterface(interface) }" data-ng-repeat="interface in interfaces | removeInterfaceParents:newBondInterface:isAllNetworkingDisabled() | removeInterfaceParents:newBridgeInterface:isAllNetworkingDisabled()"> | 823 | <tr data-ng-if="isDevice" class="p-table--is-device" data-ng-class="{ disabled: isDisabled(), 'is-active': isInterfaceSelected(interface) && (!isAllNetworkingDisabled() || isLimitedEditingAllowed(interface)), noEdit: cannotEditInterface(interface) }" data-ng-repeat="interface in interfaces | removeInterfaceParents:newBondInterface:isAllNetworkingDisabled() | removeInterfaceParents:newBridgeInterface:isAllNetworkingDisabled()"> |
517 | 820 | <td class="table-col--30">{$ interface.mac_address $}</td> | 824 | <td>{$ interface.mac_address $}</td> |
518 | 821 | <td class="table-col--25" aria-label="Subnet"> | 825 | <td aria-label="Subnet"> |
519 | 822 | <span data-ng-if="!isEditing(interface) && (interface.subnet || (interface.fabric && !interface.discovered[0].subnet_id))">{$ getSubnetText(interface.subnet) $}</span> | 826 | <span data-ng-if="!isEditing(interface) && (interface.subnet || (interface.fabric && !interface.discovered[0].subnet_id))">{$ getSubnetText(interface.subnet) $}</span> |
520 | 823 | <span data-ng-if="isAllNetworkingDisabled() && interface.discovered[0].subnet_id" title="{$ getSubnetText(getSubnet(interface.discovered[0].subnet_id)) $}"> | 827 | <span data-ng-if="isAllNetworkingDisabled() && interface.discovered[0].subnet_id" title="{$ getSubnetText(getSubnet(interface.discovered[0].subnet_id)) $}"> |
521 | 824 | {$ getSubnetText(getSubnet(interface.discovered[0].subnet_id)) $} | 828 | {$ getSubnetText(getSubnet(interface.discovered[0].subnet_id)) $} |
522 | 825 | </span> | 829 | </span> |
523 | 826 | </td> | 830 | </td> |
526 | 827 | <td class="table-col--25" aria-label="IP Address">{$ interface.ip_address $}</td> | 831 | <td aria-label="IP Address">{$ interface.ip_address $}</td> |
527 | 828 | <td class="table-col--15 p-table--action-cell"> | 832 | <td class="p-table--action-cell"> |
528 | 829 | <div class="u-align--right"> | 833 | <div class="u-align--right"> |
529 | 830 | <div class="p-contextual-menu" toggle-ctrl data-ng-if="!isAllNetworkingDisabled() || isLimitedEditingAllowed(interface)"> | 834 | <div class="p-contextual-menu" toggle-ctrl data-ng-if="!isAllNetworkingDisabled() || isLimitedEditingAllowed(interface)"> |
530 | 831 | <button class="p-button--base is-small p-contextual-menu__toggle" data-ng-click="toggleMenu()"><i class="p-icon--contextual-menu u-no-margin--right">Actions</i></button> | 835 | <button class="p-button--base is-small p-contextual-menu__toggle" data-ng-click="toggleMenu()"><i class="p-icon--contextual-menu u-no-margin--right">Actions</i></button> |
531 | @@ -855,14 +859,14 @@ | |||
532 | 855 | </td> | 859 | </td> |
533 | 856 | <td class="p-table-expanding__panel col-12" data-ng-if="isInterfaceSelected(interface)"> | 860 | <td class="p-table-expanding__panel col-12" data-ng-if="isInterfaceSelected(interface)"> |
534 | 857 | <div class="row" data-ng-if="isShowingAdd() || isEditing(interface) || isShowingDeleteConfirm() || isShowingAdd() && !newInterface.saving"> | 861 | <div class="row" data-ng-if="isShowingAdd() || isEditing(interface) || isShowingDeleteConfirm() || isShowingAdd() && !newInterface.saving"> |
536 | 858 | <div class="table__dropdown-title" data-ng-if="windowWidth <= 768"> | 862 | <div class="u-position-relative u-clearfix" data-ng-if="windowWidth <= 768"> |
537 | 859 | <h2 data-ng-click="cancel()" class="u-float--left p-heading--four"> | 863 | <h2 data-ng-click="cancel()" class="u-float--left p-heading--four"> |
538 | 860 | <span data-ng-if="canAddAlias(newInterface.parent)">Adding alias</span> | 864 | <span data-ng-if="canAddAlias(newInterface.parent)">Adding alias</span> |
539 | 861 | <span data-ng-if="canAddVLAN(newInterface.parent)">Adding VLAN</span> | 865 | <span data-ng-if="canAddVLAN(newInterface.parent)">Adding VLAN</span> |
540 | 862 | <span data-ng-if="isEditing(interface)">Editing {$ interface.name $}</span> | 866 | <span data-ng-if="isEditing(interface)">Editing {$ interface.name $}</span> |
541 | 863 | <span data-ng-if="isShowingDeleteConfirm()">Removing {$ interface.name $}</span> | 867 | <span data-ng-if="isShowingDeleteConfirm()">Removing {$ interface.name $}</span> |
542 | 864 | </h2> | 868 | </h2> |
544 | 865 | <button data-ng-click="cancel()" class="p-button u-float--right"> | 869 | <button data-ng-click="cancel()" class="p-button--base u-float--right p-button--close"> |
545 | 866 | <i class="p-icon--remove">Cancel</i> | 870 | <i class="p-icon--remove">Cancel</i> |
546 | 867 | </button> | 871 | </button> |
547 | 868 | </div> | 872 | </div> |
548 | @@ -956,10 +960,10 @@ | |||
549 | 956 | data-ng-if="isEditing(editInterface)"> | 960 | data-ng-if="isEditing(editInterface)"> |
550 | 957 | <div class="row"> | 961 | <div class="row"> |
551 | 958 | <div class="col-6"> | 962 | <div class="col-6"> |
553 | 959 | <maas-obj-field type="text" key="mac_address" label="MAC address" label-width="2" input-width="5" | 963 | <maas-obj-field type="text" key="mac_address" label="MAC address" |
554 | 960 | data-ng-if="interface.type !== 'alias' && interface.type !== 'vlan'" disable-label="false" | 964 | data-ng-if="interface.type !== 'alias' && interface.type !== 'vlan'" disable-label="false" |
557 | 961 | input-class="table__input u-margin--none" placeholder="00:00:00:00:00:00"></maas-obj-field> | 965 | input-class="table__input" placeholder="00:00:00:00:00:00"></maas-obj-field> |
558 | 962 | <maas-obj-field type="tags" key="tags" label="Tags" label-width="2" input-width="5" | 966 | <maas-obj-field type="tags" key="tags" label="Tags" |
559 | 963 | placeholder="Add a tag" | 967 | placeholder="Add a tag" |
560 | 964 | data-ng-if="!isAllNetworkingDisabled(interface) && interface.type !== 'alias'" | 968 | data-ng-if="!isAllNetworkingDisabled(interface) && interface.type !== 'alias'" |
561 | 965 | disable-label="false"></maas-obj-field> | 969 | disable-label="false"></maas-obj-field> |
562 | @@ -1030,25 +1034,23 @@ | |||
563 | 1030 | </td> | 1034 | </td> |
564 | 1031 | </tr> | 1035 | </tr> |
565 | 1032 | 1036 | ||
567 | 1033 | <tr data-ng-if="!isDevice" data-ng-class="{ disabled: isDisabled(), 'is-active': isInterfaceSelected(interface) && (!isAllNetworkingDisabled() || isLimitedEditingAllowed(interface)), noEdit: cannotEditInterface(interface) }" | 1037 | <tr data-ng-if="!isDevice" class="p-table--is-not-device" data-ng-class="{ disabled: isDisabled(), 'is-active': isInterfaceSelected(interface) && (!isAllNetworkingDisabled() || isLimitedEditingAllowed(interface)), noEdit: cannotEditInterface(interface) }" |
568 | 1034 | data-ng-repeat="interface in interfaces | removeInterfaceParents:newBondInterface:isAllNetworkingDisabled() | removeInterfaceParents:newBridgeInterface:isAllNetworkingDisabled()"> | 1038 | data-ng-repeat="interface in interfaces | removeInterfaceParents:newBondInterface:isAllNetworkingDisabled() | removeInterfaceParents:newBridgeInterface:isAllNetworkingDisabled()"> |
571 | 1035 | <td class="table-col--16" aria-label="Name" | 1039 | <td aria-label="Name" data-ng-class="{ 'is-error': isInterfaceNameInvalid(editInterface) }"> |
570 | 1036 | data-ng-class="{ 'is-error': isInterfaceNameInvalid(editInterface) }"> | ||
572 | 1037 | <span class="u-float--left" data-ng-if="!isController && !isAllNetworkingDisabled() && !isEditing(interface)"> | 1040 | <span class="u-float--left" data-ng-if="!isController && !isAllNetworkingDisabled() && !isEditing(interface)"> |
573 | 1038 | <input type="checkbox" class="checkbox" id="{$ getUniqueKey(interface) $}" | 1041 | <input type="checkbox" class="checkbox" id="{$ getUniqueKey(interface) $}" |
578 | 1039 | data-ng-hide="isAllNetworkingDisabled()" | 1042 | data-ng-hide="isAllNetworkingDisabled()" |
579 | 1040 | data-ng-checked="isInterfaceSelected(interface)" | 1043 | data-ng-checked="isInterfaceSelected(interface)" |
580 | 1041 | data-ng-click="toggleInterfaceSelect(interface)" | 1044 | data-ng-click="toggleInterfaceSelect(interface)" |
581 | 1042 | data-ng-disabled="isDisabled()"> | 1045 | data-ng-disabled="isDisabled()"> |
582 | 1043 | </span> | 1046 | </span> |
589 | 1044 | <span data-ng-if="!isEditing(interface) || interface.type === 'vlan'" data-ng-show="tableInfo.column == 'name'" title="{$ interface.name $}">{$ interface.name $}</span> | 1047 | <span data-ng-if="!isEditing(interface) || (!isEditing(interface) && interface.type === 'vlan')" |
590 | 1045 | <span class="ng-hide" data-ng-show="tableInfo.column == 'mac'" title="{$ interface.mac_address $}">{$ interface.mac_address $}</span> | 1048 | data-ng-show="tableInfo.column == 'name'" |
591 | 1046 | <input type="text" class="p-form-validation__input u-no-margin--top" | 1049 | title="{$ interface.name $}">{$ interface.name $}</span> |
592 | 1047 | data-ng-if="isEditing(interface) && interface.type !== 'vlan'" | 1050 | <span class="ng-hide" data-ng-show="tableInfo.column == 'mac'" |
593 | 1048 | data-ng-disabled="isController" | 1051 | title="{$ interface.mac_address $}">{$ interface.mac_address $}</span> |
588 | 1049 | data-ng-model="editInterface.name"> | ||
594 | 1050 | </td> | 1052 | </td> |
596 | 1051 | <td class="table-col--7" aria-label="Boot interface"> | 1053 | <td aria-label="Boot interface"> |
597 | 1052 | <span class="u-align--center u-hide u-show--large"> | 1054 | <span class="u-align--center u-hide u-show--large"> |
598 | 1053 | <input type="radio" name="bootInterface" id="{$ interface.name $}" checked | 1055 | <input type="radio" name="bootInterface" id="{$ interface.name $}" checked |
599 | 1054 | data-ng-if="!isController && isBootInterface(interface) && !isEditing(interface)" | 1056 | data-ng-if="!isController && isBootInterface(interface) && !isEditing(interface)" |
600 | @@ -1058,22 +1060,22 @@ | |||
601 | 1058 | <span class="u-hide--large" data-ng-if="!isController && isBootInterface(interface) && !isEditing(interface)">Yes</span> | 1060 | <span class="u-hide--large" data-ng-if="!isController && isBootInterface(interface) && !isEditing(interface)">Yes</span> |
602 | 1059 | <span class="u-hide--large" data-ng-if="!isController && !isBootInterface(interface) && !isEditing(interface)">No</span> | 1061 | <span class="u-hide--large" data-ng-if="!isController && !isBootInterface(interface) && !isEditing(interface)">No</span> |
603 | 1060 | </td> | 1062 | </td> |
605 | 1061 | <td class="table-col--9" aria-label="Type"> | 1063 | <td aria-label="Type"> |
606 | 1062 | <span data-ng-if="!isEditing(interface)" title="{$ getInterfaceTypeText(interface) $}">{$ getInterfaceTypeText(interface) $}</span> | 1064 | <span data-ng-if="!isEditing(interface)" title="{$ getInterfaceTypeText(interface) $}">{$ getInterfaceTypeText(interface) $}</span> |
607 | 1063 | </td> | 1065 | </td> |
609 | 1064 | <td class="table-col--13" aria-label="Fabric"> | 1066 | <td aria-label="Fabric"> |
610 | 1065 | <span data-ng-if="!isEditing(interface)" title="{$ interface.fabric.name || 'Disconnected' $}">{$ interface.fabric.name || "Disconnected" $}</span> | 1067 | <span data-ng-if="!isEditing(interface)" title="{$ interface.fabric.name || 'Disconnected' $}">{$ interface.fabric.name || "Disconnected" $}</span> |
611 | 1066 | </td> | 1068 | </td> |
613 | 1067 | <td class="table-col--13" aria-label="VLAN"> | 1069 | <td aria-label="VLAN"> |
614 | 1068 | <span data-ng-if="!isEditing(interface)" title="{$ getVLANText(interface.vlan) $}">{$ getVLANText(interface.vlan) $}</span> | 1070 | <span data-ng-if="!isEditing(interface)" title="{$ getVLANText(interface.vlan) $}">{$ getVLANText(interface.vlan) $}</span> |
615 | 1069 | </td> | 1071 | </td> |
617 | 1070 | <td class="table-col--13" aria-label="Subnet"> | 1072 | <td aria-label="Subnet"> |
618 | 1071 | <span data-ng-if="!isEditing(interface) && ((isDevice && interface.subnet) || (interface.fabric && !interface.discovered[0].subnet_id))" title="{$ getSubnetText(interface.subnet) $}">{$ getSubnetText(interface.subnet) $}</span> | 1073 | <span data-ng-if="!isEditing(interface) && ((isDevice && interface.subnet) || (interface.fabric && !interface.discovered[0].subnet_id))" title="{$ getSubnetText(interface.subnet) $}">{$ getSubnetText(interface.subnet) $}</span> |
619 | 1072 | <span data-ng-if="isAllNetworkingDisabled() && interface.discovered[0].subnet_id"> | 1074 | <span data-ng-if="isAllNetworkingDisabled() && interface.discovered[0].subnet_id"> |
620 | 1073 | {$ getSubnetText(getSubnet(interface.discovered[0].subnet_id)) $} | 1075 | {$ getSubnetText(getSubnet(interface.discovered[0].subnet_id)) $} |
621 | 1074 | </span> | 1076 | </span> |
622 | 1075 | </td> | 1077 | </td> |
624 | 1076 | <td class="table-col--19" aria-label="IP Address"> | 1078 | <td aria-label="IP Address"> |
625 | 1077 | <span data-ng-if="!isEditing(interface) && !interface.discovered[0].ip_address && interface.fabric" title="{$ interface.ip_address $} ({$ getLinkModeText(interface) $})"> | 1079 | <span data-ng-if="!isEditing(interface) && !interface.discovered[0].ip_address && interface.fabric" title="{$ interface.ip_address $} ({$ getLinkModeText(interface) $})"> |
626 | 1078 | {$ interface.ip_address $} ({$ getLinkModeText(interface) $}) | 1080 | {$ interface.ip_address $} ({$ getLinkModeText(interface) $}) |
627 | 1079 | </span> | 1081 | </span> |
628 | @@ -1081,9 +1083,9 @@ | |||
629 | 1081 | {$ interface.discovered[0].ip_address $} (DHCP) | 1083 | {$ interface.discovered[0].ip_address $} (DHCP) |
630 | 1082 | </span> | 1084 | </span> |
631 | 1083 | </td> | 1085 | </td> |
633 | 1084 | <td class="table-col--10 p-table--action-cell"> | 1086 | <td class="p-table--action-cell"> |
634 | 1085 | <div class="u-align--right"> | 1087 | <div class="u-align--right"> |
636 | 1086 | <div class="p-contextual-menu" toggle-ctrl data-ng-if="!isAllNetworkingDisabled() || isLimitedEditingAllowed(interface)"> | 1088 | <div class="p-contextual-menu" toggle-ctrl data-ng-if="(!isAllNetworkingDisabled() || isLimitedEditingAllowed(interface)) && !isEditing(interface)"> |
637 | 1087 | <button class="p-button--base is-small p-contextual-menu__toggle" data-ng-click="toggleMenu()"><i class="p-icon--contextual-menu u-no-margin--right">Actions</i></button> | 1089 | <button class="p-button--base is-small p-contextual-menu__toggle" data-ng-click="toggleMenu()"><i class="p-icon--contextual-menu u-no-margin--right">Actions</i></button> |
638 | 1088 | <div class="p-contextual-menu__dropdown" role="menu" data-ng-show="isToggled"> | 1090 | <div class="p-contextual-menu__dropdown" role="menu" data-ng-show="isToggled"> |
639 | 1089 | <button class="p-contextual-menu__link" | 1091 | <button class="p-contextual-menu__link" |
640 | @@ -1116,14 +1118,14 @@ | |||
641 | 1116 | 1118 | ||
642 | 1117 | <td class="p-table-expanding__panel col-12" data-ng-class="{ 'u-no-padding': !isShowingAdd() && !isEditing(interface) && !isShowingDeleteConfirm() && !isShowingAdd() || newInterface.saving }" data-ng-if="isInterfaceSelected(interface)"> | 1119 | <td class="p-table-expanding__panel col-12" data-ng-class="{ 'u-no-padding': !isShowingAdd() && !isEditing(interface) && !isShowingDeleteConfirm() && !isShowingAdd() || newInterface.saving }" data-ng-if="isInterfaceSelected(interface)"> |
643 | 1118 | <div class="row" data-ng-if="isShowingAdd() || isEditing(interface) || isShowingDeleteConfirm() || isShowingAdd() && !newInterface.saving"> | 1120 | <div class="row" data-ng-if="isShowingAdd() || isEditing(interface) || isShowingDeleteConfirm() || isShowingAdd() && !newInterface.saving"> |
645 | 1119 | <div class="table__dropdown-title" data-ng-if="windowWidth <= 768"> | 1121 | <div class="u-position-relative u-clearfix" data-ng-if="windowWidth <= 768"> |
646 | 1120 | <h2 data-ng-click="cancel()" class="u-float--left p-heading--four"> | 1122 | <h2 data-ng-click="cancel()" class="u-float--left p-heading--four"> |
647 | 1121 | <span data-ng-if="canAddAlias(newInterface.parent)">Adding alias</span> | 1123 | <span data-ng-if="canAddAlias(newInterface.parent)">Adding alias</span> |
648 | 1122 | <span data-ng-if="canAddVLAN(newInterface.parent)">Adding VLAN</span> | 1124 | <span data-ng-if="canAddVLAN(newInterface.parent)">Adding VLAN</span> |
649 | 1123 | <span data-ng-if="isEditing(interface)">Editing {$ interface.name $}</span> | 1125 | <span data-ng-if="isEditing(interface)">Editing {$ interface.name $}</span> |
650 | 1124 | <span data-ng-if="isShowingDeleteConfirm()">Removing {$ interface.name $}</span> | 1126 | <span data-ng-if="isShowingDeleteConfirm()">Removing {$ interface.name $}</span> |
651 | 1125 | </h2> | 1127 | </h2> |
653 | 1126 | <button data-ng-click="cancel()" class="p-button u-float--right"> | 1128 | <button data-ng-click="cancel()" class="p-button--base u-float--right p-button--close"> |
654 | 1127 | <i class="p-icon--remove">Cancel</i> | 1129 | <i class="p-icon--remove">Cancel</i> |
655 | 1128 | </button> | 1130 | </button> |
656 | 1129 | </div> | 1131 | </div> |
657 | @@ -1213,76 +1215,100 @@ | |||
658 | 1213 | </div> | 1215 | </div> |
659 | 1214 | </div> | 1216 | </div> |
660 | 1215 | </div> | 1217 | </div> |
664 | 1216 | <maas-obj-form obj="editInterface" manager="nodesManager" manager-method="updateInterfaceForm" | 1218 | <div class="row"> |
665 | 1217 | table-form="true" save-on-blur="false" after-save="editSave" pre-process="preProcessInterface" | 1219 | <div class="col-3 mobile-col-2 tablet-col-3" data-ng-if="windowWidth >= 768"> |
666 | 1218 | data-ng-if="isEditing(editInterface)"> | 1220 | <input type="text" class="p-form-validation__input" |
667 | 1221 | data-ng-if="isEditing(interface) && interface.type !== 'vlan'" | ||
668 | 1222 | data-ng-disabled="isController" | ||
669 | 1223 | data-ng-model="editInterface.name"> | ||
670 | 1224 | <span data-ng-if="!isEditing(interface) || interface.type === 'vlan'" | ||
671 | 1225 | data-ng-show="tableInfo.column == 'name'" | ||
672 | 1226 | title="{$ interface.name $}">{$ interface.name $}</span> | ||
673 | 1227 | </div> | ||
674 | 1228 | </div> | ||
675 | 1229 | <div class="row"> | ||
676 | 1230 | <hr /> | ||
677 | 1219 | <div class="row"> | 1231 | <div class="row"> |
683 | 1220 | <div class="col-6"> | 1232 | <maas-obj-form obj="editInterface" manager="nodesManager" manager-method="updateInterfaceForm" |
684 | 1221 | <div class="p-form__group"> | 1233 | table-form="true" save-on-blur="false" after-save="editSave" pre-process="preProcessInterface" |
685 | 1222 | <label class="p-form__label">Type</label> | 1234 | data-ng-if="isEditing(editInterface)"> |
686 | 1223 | <div class="p-form__control"> | 1235 | <div class="row"> |
687 | 1224 | <span>{$ getInterfaceTypeText(interface) $}</span> | 1236 | <div class="col-6"> |
688 | 1237 | <div class="p-form__group u-clearfix"> | ||
689 | 1238 | <label class="p-form__label col-2 mobile-col-2 tablet-col-2">Type</label> | ||
690 | 1239 | <div class="p-form__control col-3 mobile-col-2 tablet-col-3"> | ||
691 | 1240 | <span class="p-control-text">{$ getInterfaceTypeText(interface) $}</span> | ||
692 | 1241 | </div> | ||
693 | 1242 | </div> | ||
694 | 1243 | <maas-obj-field type="text" key="mac_address" label="MAC address" | ||
695 | 1244 | data-ng-if="interface.type !== 'alias' && interface.type !== 'vlan'" disable-label="false" | ||
696 | 1245 | disabled="isController" label-width="2" label-width-tablet="2" input-width="3" input-width-tablet="4" | ||
697 | 1246 | input-class="table__input" placeholder="00:00:00:00:00:00"></maas-obj-field> | ||
698 | 1247 | <div class="p-form__group u-clearfix" data-ng-if="!isAllNetworkingDisabled(interface)"> | ||
699 | 1248 | <label class="p-form__label col-2 mobile-col-2 tablet-col-2">Tags</label> | ||
700 | 1249 | <div class="p-form__control col-3 mobile-col-2 tablet-col-3 tags--inline"> | ||
701 | 1250 | <tags-input data-ng-model="interface.tags" allow-tags-pattern="[\w-]+"></tags-input> | ||
702 | 1251 | </div> | ||
703 | 1252 | </div> | ||
704 | 1253 | </div> | ||
705 | 1254 | <div class="col-6" data-ng-if="!isAllNetworkingDisabled(interface)"> | ||
706 | 1255 | <maas-obj-field type="options" key="fabric" label="Fabric" | ||
707 | 1256 | disable-label="false" | ||
708 | 1257 | placeholder="Disconnected" placeholder-enabled="true" | ||
709 | 1258 | on-change="fabricChangedForm" | ||
710 | 1259 | options="fabric as fabric.name for fabric in fabrics" | ||
711 | 1260 | label-width="2" label-width-tablet="2" input-width="3" input-width-tablet="4"></maas-obj-field> | ||
712 | 1261 | <maas-obj-field type="options" key="vlan" label="VLAN" | ||
713 | 1262 | disable-label="false" | ||
714 | 1263 | data-ng-show="!isController && editInterface.$maasForm.getValue('fabric')" | ||
715 | 1264 | on-change="vlanChangedForm" | ||
716 | 1265 | options="vlan as getVLANText(vlan) for vlan in vlans | removeDefaultVLANIfVLAN:interface.type | filterByFabric:editInterface.$maasForm.getValue('fabric')" | ||
717 | 1266 | label-width="2" label-width-tablet="2" input-width="3" input-width-tablet="4"> | ||
718 | 1267 | </maas-obj-field> | ||
719 | 1268 | <maas-obj-field type="options" key="subnet" label="Subnet" placeholder="Unconfigured" placeholder-enabled="true" | ||
720 | 1269 | disable-label="false" | ||
721 | 1270 | data-ng-show="!isController && editInterface.$maasForm.getValue('fabric')" | ||
722 | 1271 | on-change="subnetChangedForm" | ||
723 | 1272 | options="subnet as getSubnetText(subnet) for subnet in subnets | filterByVLAN:editInterface.$maasForm.getValue('vlan')" | ||
724 | 1273 | label-width="2" label-width-tablet="2" input-width="3" input-width-tablet="4"> | ||
725 | 1274 | </maas-obj-field> | ||
726 | 1275 | <maas-obj-field type="options" key="subnet" label="Subnet" placeholder="Unconfigured" placeholder-enabled="true" | ||
727 | 1276 | data-ng-init="editInterface.subnet = editInterface.defaultSubnet" | ||
728 | 1277 | data-ng-if="!isController && editInterface.$maasForm.getValue('ip_assignment') === 'static'" | ||
729 | 1278 | on-change="subnetChangedForm" | ||
730 | 1279 | disable-label="false" | ||
731 | 1280 | options="subnet as getSubnetText(subnet) for subnet in subnets" | ||
732 | 1281 | label-width="2" label-width-tablet="2" input-width="3" input-width-tablet="4"></maas-obj-field> | ||
733 | 1282 | <maas-obj-field type="options" key="mode" label="IP mode" | ||
734 | 1283 | disable-label="false" | ||
735 | 1284 | data-ng-if="!isController && editInterface.$maasForm.getValue('fabric') && !isLinkModeDisabled(editInterface.$maasForm)" | ||
736 | 1285 | options="mode.mode as mode.text for mode in modes | filterLinkModes:editInterface.$maasForm" | ||
737 | 1286 | on-change="modeChangedForm" | ||
738 | 1287 | label-width="2" label-width-tablet="2" input-width="3" input-width-tablet="4"> | ||
739 | 1288 | </maas-obj-field> | ||
740 | 1289 | <maas-obj-field type="text" key="ip_address" label="IP address" placeholder="IP Address" | ||
741 | 1290 | disable-label="false" input-class="table__input" | ||
742 | 1291 | data-ng-if="!isController && editInterface.$maasForm.getValue('fabric') && editInterface.$maasForm.getValue('mode') == 'static'" | ||
743 | 1292 | label-width="2" label-width-tablet="2" input-width="3" input-width-tablet="4"> | ||
744 | 1293 | </maas-obj-field> | ||
745 | 1225 | </div> | 1294 | </div> |
746 | 1226 | </div> | 1295 | </div> |
804 | 1227 | <maas-obj-field type="text" key="mac_address" label="MAC address" label-width="2" input-width="5" | 1296 | <div class="row"> |
805 | 1228 | data-ng-if="interface.type !== 'alias' && interface.type !== 'vlan'" disable-label="false" | 1297 | <hr /> |
806 | 1229 | disabled="isController" | 1298 | <div class="u-float--left"> |
807 | 1230 | input-class="table__input u-margin--none" placeholder="00:00:00:00:00:00"></maas-obj-field> | 1299 | <maas-obj-errors></maas-obj-errors> |
808 | 1231 | <maas-obj-field type="tags" key="tags" label="Tags" label-width="2" input-width="5" | 1300 | </div> |
809 | 1232 | placeholder="Add a tag" | 1301 | <div class="u-float--right"> |
810 | 1233 | data-ng-if="!isAllNetworkingDisabled(interface) && interface.type !== 'alias'" | 1302 | <button class="p-button--base" |
811 | 1234 | disable-label="false"></maas-obj-field> | 1303 | data-ng-click="editCancel()">Cancel</button> |
812 | 1235 | </div> | 1304 | <button class="p-button--positive" |
813 | 1236 | <div class="col-6" data-ng-if="!isAllNetworkingDisabled(interface)"> | 1305 | data-ng-disabled="(isInterfaceNameInvalid(editInterface)) || isIPAddressInvalid(editInterface) || isMACAddressInvalid(editInterface.mac_address, true)" |
814 | 1237 | <maas-obj-field type="options" key="fabric" label="Fabric" label-width="2" input-width="5" | 1306 | maas-obj-save>Save</button> |
815 | 1238 | disable-label="false" | 1307 | </div> |
816 | 1239 | placeholder="Disconnected" placeholder-enabled="true" | 1308 | </div> |
817 | 1240 | on-change="fabricChangedForm" | 1309 | </maas-obj-form> |
761 | 1241 | options="fabric as fabric.name for fabric in fabrics"></maas-obj-field> | ||
762 | 1242 | <maas-obj-field type="options" key="vlan" label="VLAN" label-width="2" input-width="5" | ||
763 | 1243 | disable-label="false" | ||
764 | 1244 | data-ng-show="!isController && editInterface.$maasForm.getValue('fabric')" | ||
765 | 1245 | on-change="vlanChangedForm" | ||
766 | 1246 | options="vlan as getVLANText(vlan) for vlan in vlans | removeDefaultVLANIfVLAN:interface.type | filterByFabric:editInterface.$maasForm.getValue('fabric')"> | ||
767 | 1247 | </maas-obj-field> | ||
768 | 1248 | <maas-obj-field type="options" key="subnet" label="Subnet" placeholder="Unconfigured" placeholder-enabled="true" | ||
769 | 1249 | disable-label="false" label-width="2" input-width="5" | ||
770 | 1250 | data-ng-show="!isController && editInterface.$maasForm.getValue('fabric')" | ||
771 | 1251 | on-change="subnetChangedForm" | ||
772 | 1252 | options="subnet as getSubnetText(subnet) for subnet in subnets | filterByVLAN:editInterface.$maasForm.getValue('vlan')"> | ||
773 | 1253 | </maas-obj-field> | ||
774 | 1254 | <maas-obj-field type="options" key="subnet" label="Subnet" placeholder="Unconfigured" placeholder-enabled="true" | ||
775 | 1255 | data-ng-init="editInterface.subnet = editInterface.defaultSubnet" label-width="2" input-width="5" | ||
776 | 1256 | data-ng-if="!isController && editInterface.$maasForm.getValue('ip_assignment') === 'static'" | ||
777 | 1257 | on-change="subnetChangedForm" | ||
778 | 1258 | disable-label="false" | ||
779 | 1259 | options="subnet as getSubnetText(subnet) for subnet in subnets"></maas-obj-field> | ||
780 | 1260 | <maas-obj-field type="options" key="mode" label="IP mode" label-width="2" input-width="5" | ||
781 | 1261 | disable-label="false" | ||
782 | 1262 | data-ng-if="!isController && editInterface.$maasForm.getValue('fabric') && !isLinkModeDisabled(editInterface.$maasForm)" | ||
783 | 1263 | options="mode.mode as mode.text for mode in modes | filterLinkModes:editInterface.$maasForm" | ||
784 | 1264 | on-change="modeChangedForm"> | ||
785 | 1265 | </maas-obj-field> | ||
786 | 1266 | <maas-obj-field type="text" key="ip_address" label="IP address" placeholder="IP Address" label-width="two" input-width="three" | ||
787 | 1267 | disable-label="false" input-class="table__input u-margin--none" | ||
788 | 1268 | data-ng-if="!isController && editInterface.$maasForm.getValue('fabric') && editInterface.$maasForm.getValue('mode') == 'static'"> | ||
789 | 1269 | </maas-obj-field> | ||
790 | 1270 | </div> | ||
791 | 1271 | </div> | ||
792 | 1272 | <div class="row u-no-margin--top"> | ||
793 | 1273 | <hr /> | ||
794 | 1274 | <div class="u-float--left"> | ||
795 | 1275 | <maas-obj-errors></maas-obj-errors> | ||
796 | 1276 | </div> | ||
797 | 1277 | <div class="u-float--right u-no-margin--top"> | ||
798 | 1278 | <button class="p-button--base" | ||
799 | 1279 | data-ng-click="editCancel()">Cancel</button> | ||
800 | 1280 | <button class="p-button--positive u-no-margin--top" | ||
801 | 1281 | data-ng-disabled="(isInterfaceNameInvalid(editInterface)) || isIPAddressInvalid(editInterface) || isMACAddressInvalid(editInterface.mac_address, true)" | ||
802 | 1282 | maas-obj-save>Save</button> | ||
803 | 1283 | </div> | ||
818 | 1284 | </div> | 1310 | </div> |
820 | 1285 | </maas-obj-form> | 1311 | </div> |
821 | 1286 | </div> | 1312 | </div> |
822 | 1287 | <div class="row is-active" data-ng-if="isShowingDeleteConfirm() && isInterfaceSelected(interface)"> | 1313 | <div class="row is-active" data-ng-if="isShowingDeleteConfirm() && isInterfaceSelected(interface)"> |
823 | 1288 | <div class="col-8"> | 1314 | <div class="col-8"> |
824 | @@ -1337,7 +1363,7 @@ | |||
825 | 1337 | </div> | 1363 | </div> |
826 | 1338 | <div class="row" data-ng-if="windowWidth <= 768"> | 1364 | <div class="row" data-ng-if="windowWidth <= 768"> |
827 | 1339 | <h2 class="u-float--left">Create bond</h2> | 1365 | <h2 class="u-float--left">Create bond</h2> |
829 | 1340 | <button data-ng-click="cancel()" class="p-button u-float--right u-no-margin--top"> | 1366 | <button data-ng-click="cancel()" class="p-button--base u-float--right p-button--close"> |
830 | 1341 | <i class="p-icon--close">Cancel</i> | 1367 | <i class="p-icon--close">Cancel</i> |
831 | 1342 | </button> | 1368 | </button> |
832 | 1343 | </div> | 1369 | </div> |
833 | @@ -1830,7 +1856,11 @@ | |||
834 | 1830 | </div> | 1856 | </div> |
835 | 1831 | <div class="row"> | 1857 | <div class="row"> |
836 | 1832 | <div class="col-12"> | 1858 | <div class="col-12"> |
838 | 1833 | <p data-ng-if="!node.events.length">No events.</p> | 1859 | <div class="p-notification" data-ng-if="!node.events.length"> |
839 | 1860 | <p class="p-notification__response"> | ||
840 | 1861 | No events found. | ||
841 | 1862 | </p> | ||
842 | 1863 | </div> | ||
843 | 1834 | <table data-ng-if="node.events.length"> | 1864 | <table data-ng-if="node.events.length"> |
844 | 1835 | <thead> | 1865 | <thead> |
845 | 1836 | <tr> | 1866 | <tr> |
846 | @@ -1853,9 +1883,7 @@ | |||
847 | 1853 | </div> | 1883 | </div> |
848 | 1854 | <div class="row"> | 1884 | <div class="row"> |
849 | 1855 | <div class="col-12 u-align--center"> | 1885 | <div class="col-12 u-align--center"> |
853 | 1856 | <p> | 1886 | <button class="p-button--neutral" data-ng-show="allowShowMoreEvents()" data-ng-click="showMoreEvents()">Load next 10 events</button> |
851 | 1857 | <button class="p-button--neutral" data-ng-show="allowShowMoreEvents()" data-ng-click="showMoreEvents()">Load next 10 events</button> | ||
852 | 1858 | </p> | ||
854 | 1859 | </div> | 1887 | </div> |
855 | 1860 | </div> | 1888 | </div> |
856 | 1861 | </section> | 1889 | </section> |
857 | @@ -1869,7 +1897,9 @@ | |||
858 | 1869 | <div data-ng-if="resultsLoaded"> | 1897 | <div data-ng-if="resultsLoaded"> |
859 | 1870 | <div class="row"> | 1898 | <div class="row"> |
860 | 1871 | <div class="col-12"> | 1899 | <div class="col-12"> |
862 | 1872 | <div data-maas-cta="logs.availableOptions" data-ng-model="logs.option" data-ng-change="updateLogOutput()"></div> | 1900 | <div class="u-sv2"> |
863 | 1901 | <div data-maas-cta="logs.availableOptions" data-ng-model="logs.option" data-ng-change="updateLogOutput()"></div> | ||
864 | 1902 | </div> | ||
865 | 1873 | </div> | 1903 | </div> |
866 | 1874 | </div> | 1904 | </div> |
867 | 1875 | <div class="row"> | 1905 | <div class="row"> |
868 | diff --git a/src/maasserver/static/partials/script-results-list.html b/src/maasserver/static/partials/script-results-list.html | |||
869 | index 08bc55f..9ff651f 100644 | |||
870 | --- a/src/maasserver/static/partials/script-results-list.html | |||
871 | +++ b/src/maasserver/static/partials/script-results-list.html | |||
872 | @@ -10,33 +10,33 @@ | |||
873 | 10 | <h2 class="p-heading--four" data-ng-if="hardware_type.title !== 'null'">{$ hardware_type.title $}</h2> | 10 | <h2 class="p-heading--four" data-ng-if="hardware_type.title !== 'null'">{$ hardware_type.title $}</h2> |
874 | 11 | <div data-ng-repeat="(title, results) in hardware_type.results"> | 11 | <div data-ng-repeat="(title, results) in hardware_type.results"> |
875 | 12 | <h3 class="p-heading--five" data-ng-if="title !== 'null'">{$ title $}</h3> | 12 | <h3 class="p-heading--five" data-ng-if="title !== 'null'">{$ title $}</h3> |
877 | 13 | <table class="p-table-expanding"> | 13 | <table class="p-table-expanding p-table--controllers-commissioning"> |
878 | 14 | <thead> | 14 | <thead> |
879 | 15 | <tr> | 15 | <tr> |
886 | 16 | <th class="table-col--15">Name</th> | 16 | <th class="col-3">Name</th> |
887 | 17 | <th class="table-col--15">Tags</th> | 17 | <th class="col-2">Tags</th> |
888 | 18 | <th class="table-col--20">Runtime</th> | 18 | <th class="col-1">Runtime</th> |
889 | 19 | <th class="table-col--20">Date</th> | 19 | <th class="col-3">Date</th> |
890 | 20 | <th class="table-col--25">Result</th> | 20 | <th class="col-2">Result</th> |
891 | 21 | <th class="table-col--5"><div class="u-align--right">Actions</div></th> | 21 | <th><div class="u-align--right">Actions</div></th> |
892 | 22 | </tr> | 22 | </tr> |
893 | 23 | </thead> | 23 | </thead> |
894 | 24 | <tbody> | 24 | <tbody> |
895 | 25 | <tr data-ng-repeat="result in results" data-ng-class="{'is-active': result.showing_results || result.showing_history}"> | 25 | <tr data-ng-repeat="result in results" data-ng-class="{'is-active': result.showing_results || result.showing_history}"> |
897 | 26 | <td class="table-col--15" data-ng-click="result.showing_results = !result.showing_results" aria-label="Name" title="{$ result.name $}"> | 26 | <td class="col-3" data-ng-click="result.showing_results = !result.showing_results" aria-label="Name" title="{$ result.name $}"> |
898 | 27 | <span data-maas-script-status="script-status" data-script-status="result.status"></span> | 27 | <span data-maas-script-status="script-status" data-script-status="result.status"></span> |
899 | 28 | {$ result.name $} | 28 | {$ result.name $} |
900 | 29 | </td> | 29 | </td> |
905 | 30 | <td class="table-col--15" aria-label="Tags"><span data-ng-hide="result.showing_history" title="{$ result.tags $}">{$ result.tags $}</span></td> | 30 | <td class="col-2" aria-label="Tags"><span data-ng-hide="result.showing_history" title="{$ result.tags $}">{$ result.tags $}</span></td> |
906 | 31 | <td class="table-col--20 p-table--action-cell u-wrap" aria-label="Runtime"><span data-ng-hide="result.showing_history" data-maas-script-run-time="script-runtime" data-start-time="result.starttime" data-run-time="{{result.runtime}}" data-estimated-run-time="{{result.estimated_runtime}}" data-script-status="result.status"></span></td> | 31 | <td class="col-1 p-table--action-cell u-wrap" aria-label="Runtime"><span data-ng-hide="result.showing_history" data-maas-script-run-time="script-runtime" data-start-time="result.starttime" data-run-time="{{result.runtime}}" data-estimated-run-time="{{result.estimated_runtime}}" data-script-status="result.status"></span></td> |
907 | 32 | <td class="table-col--20" aria-label="Date"><span data-ng-hide="result.showing_history" title="{$ result.updated $}">{$ result.updated $}</span></td> | 32 | <td class="col-3" aria-label="Date"><span data-ng-hide="result.showing_history" title="{$ result.updated $}">{$ result.updated $}</span></td> |
908 | 33 | <td class="table-col--25 p-table--action-cell u-wrap" aria-label="Result"> | 33 | <td class="col-2 p-table--action-cell u-wrap" aria-label="Result"> |
909 | 34 | <span data-ng-hide="result.showing_history"> | 34 | <span data-ng-hide="result.showing_history"> |
910 | 35 | <!-- Only link to the testing result when we've received it. This is indicated with status 2(passed), 3(failed), 4(timedout), 6(degraded), 8(failed installing), 9(skipped)--> | 35 | <!-- Only link to the testing result when we've received it. This is indicated with status 2(passed), 3(failed), 4(timedout), 6(degraded), 8(failed installing), 9(skipped)--> |
911 | 36 | {$ result.status_name $} <a data-ng-if="result.status === 2 || result.status === 3 || result.status === 4 || result.status === 6 || result.status === 8 || result.status === 9" href="#/{$ type_name $}/{$ node.system_id $}/{$ section.area $}/{$ result.id $}">View log</a> | 36 | {$ result.status_name $} <a data-ng-if="result.status === 2 || result.status === 3 || result.status === 4 || result.status === 6 || result.status === 8 || result.status === 9" href="#/{$ type_name $}/{$ node.system_id $}/{$ section.area $}/{$ result.id $}">View log</a> |
912 | 37 | </span> | 37 | </span> |
913 | 38 | </td> | 38 | </td> |
915 | 39 | <td class="table-col--5 p-table--action-cell"> | 39 | <td class="p-table--action-cell"> |
916 | 40 | <div class="u-align--right"> | 40 | <div class="u-align--right"> |
917 | 41 | <div class="p-contextual-menu" toggle-ctrl data-ng-hide="isShowingAdd() || isEditing(interface) || isShowingDeleteConfirm() || isShowingAdd()"> | 41 | <div class="p-contextual-menu" toggle-ctrl data-ng-hide="isShowingAdd() || isEditing(interface) || isShowingDeleteConfirm() || isShowingAdd()"> |
918 | 42 | <button class="p-button--base is-small p-contextual-menu__toggle" data-ng-click="toggleMenu()"> | 42 | <button class="p-button--base is-small p-contextual-menu__toggle" data-ng-click="toggleMenu()"> |
919 | diff --git a/src/maasserver/static/scss/_maas.scss b/src/maasserver/static/scss/_maas.scss | |||
920 | index 170d343..9f1ec21 100644 | |||
921 | --- a/src/maasserver/static/scss/_maas.scss | |||
922 | +++ b/src/maasserver/static/scss/_maas.scss | |||
923 | @@ -127,6 +127,7 @@ | |||
924 | 127 | 127 | ||
925 | 128 | .p-contextual-menu__dropdown { | 128 | .p-contextual-menu__dropdown { |
926 | 129 | display: block; | 129 | display: block; |
927 | 130 | z-index: 20; | ||
928 | 130 | } | 131 | } |
929 | 131 | 132 | ||
930 | 132 | .p-form__controls { | 133 | .p-form__controls { |
931 | diff --git a/src/maasserver/static/scss/_patterns_table-expanding.scss b/src/maasserver/static/scss/_patterns_table-expanding.scss | |||
932 | index 067f351..139947d 100644 | |||
933 | --- a/src/maasserver/static/scss/_patterns_table-expanding.scss | |||
934 | +++ b/src/maasserver/static/scss/_patterns_table-expanding.scss | |||
935 | @@ -6,10 +6,12 @@ | |||
936 | 6 | } | 6 | } |
937 | 7 | 7 | ||
938 | 8 | .p-table-expanding { | 8 | .p-table-expanding { |
939 | 9 | |||
940 | 9 | td.p-table-expanding__panel { | 10 | td.p-table-expanding__panel { |
941 | 10 | @extend %vf-card; | 11 | @extend %vf-card; |
942 | 11 | background-color: $color-x-light; | 12 | background-color: $color-x-light; |
943 | 12 | border-top: 0; | 13 | border-top: 0; |
944 | 14 | margin-bottom: 0; | ||
945 | 13 | margin-left: 0 !important; | 15 | margin-left: 0 !important; |
946 | 14 | width: 100%; // overrides mobile card-table width | 16 | width: 100%; // overrides mobile card-table width |
947 | 15 | 17 | ||
948 | diff --git a/src/maasserver/static/scss/_patterns_tag-input.scss b/src/maasserver/static/scss/_patterns_tag-input.scss | |||
949 | index 688d9d4..8460849 100644 | |||
950 | --- a/src/maasserver/static/scss/_patterns_tag-input.scss | |||
951 | +++ b/src/maasserver/static/scss/_patterns_tag-input.scss | |||
952 | @@ -96,9 +96,7 @@ | |||
953 | 96 | outline: 0; | 96 | outline: 0; |
954 | 97 | margin: 2px; | 97 | margin: 2px; |
955 | 98 | padding: 0 0 0 5px; | 98 | padding: 0 0 0 5px; |
956 | 99 | float: left; | ||
957 | 100 | height: 30px; | 99 | height: 30px; |
958 | 101 | width: auto !important; | ||
959 | 102 | box-shadow: none; | 100 | box-shadow: none; |
960 | 103 | 101 | ||
961 | 104 | &:placeholder { | 102 | &:placeholder { |
962 | diff --git a/src/maasserver/static/scss/_tables.scss b/src/maasserver/static/scss/_tables.scss | |||
963 | index 28e42e7..f534b9b 100644 | |||
964 | --- a/src/maasserver/static/scss/_tables.scss | |||
965 | +++ b/src/maasserver/static/scss/_tables.scss | |||
966 | @@ -260,4 +260,104 @@ | |||
967 | 260 | } | 260 | } |
968 | 261 | } | 261 | } |
969 | 262 | } | 262 | } |
970 | 263 | |||
971 | 264 | .p-table--controller-interfaces { | ||
972 | 265 | .p-table--is-device { | ||
973 | 266 | th, td { | ||
974 | 267 | &:nth-child(1) { | ||
975 | 268 | width: 30%; | ||
976 | 269 | } | ||
977 | 270 | &:nth-child(2) { | ||
978 | 271 | width: 25%; | ||
979 | 272 | } | ||
980 | 273 | &:nth-child(3) { | ||
981 | 274 | width: 25%; | ||
982 | 275 | } | ||
983 | 276 | &:nth-child(4) { | ||
984 | 277 | width: 15%; | ||
985 | 278 | } | ||
986 | 279 | } | ||
987 | 280 | } | ||
988 | 281 | |||
989 | 282 | .p-table--is-not-device { | ||
990 | 283 | th, td { | ||
991 | 284 | &:nth-child(1) { | ||
992 | 285 | width: 16%; | ||
993 | 286 | } | ||
994 | 287 | &:nth-child(2) { | ||
995 | 288 | width: 7%; | ||
996 | 289 | } | ||
997 | 290 | &:nth-child(3) { | ||
998 | 291 | width: 9%; | ||
999 | 292 | } | ||
1000 | 293 | &:nth-child(4) { | ||
1001 | 294 | width: 13%; | ||
1002 | 295 | } | ||
1003 | 296 | &:nth-child(5) { | ||
1004 | 297 | width: 13%; | ||
1005 | 298 | } | ||
1006 | 299 | &:nth-child(6) { | ||
1007 | 300 | width: 13%; | ||
1008 | 301 | } | ||
1009 | 302 | &:nth-child(7) { | ||
1010 | 303 | width: 19%; | ||
1011 | 304 | } | ||
1012 | 305 | &:nth-child(8) { | ||
1013 | 306 | width: 10%; | ||
1014 | 307 | } | ||
1015 | 308 | } | ||
1016 | 309 | } | ||
1017 | 310 | } | ||
1018 | 311 | |||
1019 | 312 | .p-table--controllers-commissioning { | ||
1020 | 313 | .p-table__row { | ||
1021 | 314 | th, td { | ||
1022 | 315 | &:nth-child(1) { | ||
1023 | 316 | width: 15%; | ||
1024 | 317 | } | ||
1025 | 318 | &:nth-child(2) { | ||
1026 | 319 | width: 15%; | ||
1027 | 320 | } | ||
1028 | 321 | &:nth-child(3) { | ||
1029 | 322 | width: 20%; | ||
1030 | 323 | } | ||
1031 | 324 | &:nth-child(4) { | ||
1032 | 325 | width: 20%; | ||
1033 | 326 | } | ||
1034 | 327 | &:nth-child(5) { | ||
1035 | 328 | width: 25%; | ||
1036 | 329 | } | ||
1037 | 330 | &:nth-child(6) { | ||
1038 | 331 | width: 5%; | ||
1039 | 332 | } | ||
1040 | 333 | } | ||
1041 | 334 | } | ||
1042 | 335 | } | ||
1043 | 336 | .p-table--controller-vlans { | ||
1044 | 337 | .p-table__row { | ||
1045 | 338 | @media (min-width: $breakpoint-small) { | ||
1046 | 339 | th, td { | ||
1047 | 340 | &:nth-child(1) { | ||
1048 | 341 | width: 15%; | ||
1049 | 342 | } | ||
1050 | 343 | &:nth-child(2) { | ||
1051 | 344 | width: 15%; | ||
1052 | 345 | } | ||
1053 | 346 | &:nth-child(3) { | ||
1054 | 347 | width: 10%; | ||
1055 | 348 | } | ||
1056 | 349 | &:nth-child(4) { | ||
1057 | 350 | width: 20%; | ||
1058 | 351 | } | ||
1059 | 352 | &:nth-child(5) { | ||
1060 | 353 | width: 20%; | ||
1061 | 354 | } | ||
1062 | 355 | &:nth-child(6) { | ||
1063 | 356 | width: 20%; | ||
1064 | 357 | } | ||
1065 | 358 | } | ||
1066 | 359 | } | ||
1067 | 360 | } | ||
1068 | 361 | } | ||
1069 | 263 | } | 362 | } |
1070 | 363 |
UNIT TESTS 1.8-vanilla lp:~ya-bo-ng/maas/+git/maas into -b vanilla-1.7.1 lp:~maas-committers/maas
-b controllers-
STATUS: FAILED maas-ci- jenkins. internal: 8080/job/ maas/job/ branch- tester/ 3495/console becc94eb015a0eb e22c27f4d6
LOG: http://
COMMIT: 6a3a10cd0a1dc07