Merge ~deadlight/maas:action-error-messages into maas:master

Proposed by Karl Williams
Status: Merged
Approved by: Anthony Dillon
Approved revision: c0bb516a2fa373f9a52acb0b3b7166a41701d356
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~deadlight/maas:action-error-messages
Merge into: maas:master
Diff against target: 157 lines (+35/-35)
5 files modified
src/maasserver/static/partials/domain-details.html (+0/-1)
src/maasserver/static/partials/node-details.html (+15/-11)
src/maasserver/static/partials/nodes-list.html (+13/-18)
src/maasserver/static/partials/pod-details.html (+6/-4)
src/maasserver/static/partials/zone-details.html (+1/-1)
Reviewer Review Type Date Requested Status
Anthony Dillon Approve
MAAS Maintainers Pending
Review via email: mp+343030@code.launchpad.net

Commit message

LP: #1761768 - Format error messages in the notification style.

Description of the change

Format error messages in the notification style.

QA:

If you have the sample data installed, you can view the errors by trying to do something like commissioning a machine, which should fail.

To post a comment you must log in.
Revision history for this message
Anthony Dillon (ya-bo-ng) wrote :

LGTM +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/src/maasserver/static/partials/domain-details.html b/src/maasserver/static/partials/domain-details.html
index 2444901..88e2884 100644
--- a/src/maasserver/static/partials/domain-details.html
+++ b/src/maasserver/static/partials/domain-details.html
@@ -300,4 +300,3 @@
300 </table>300 </table>
301 </div>301 </div>
302</section>302</section>
303
diff --git a/src/maasserver/static/partials/node-details.html b/src/maasserver/static/partials/node-details.html
index e938a2c..81ee924 100755
--- a/src/maasserver/static/partials/node-details.html
+++ b/src/maasserver/static/partials/node-details.html
@@ -188,9 +188,11 @@
188 <div class="row ng-hide" data-ng-show="isActionError()">188 <div class="row ng-hide" data-ng-show="isActionError()">
189 <!-- XXX blake_r 2015-02-19 - Need to add e2e test. -->189 <!-- XXX blake_r 2015-02-19 - Need to add e2e test. -->
190 <div class="col-12">190 <div class="col-12">
191 <p>191 <div class="p-notification--negative">
192 <i class="p-icon--error">Error:</i> Node failed to be {$ action.option.sentence $}, because of the following error: {$ action.error $}192 <p class="p-notification__response">
193 </p>193 <span class="p-notification__status">Error:</span>Node failed to be {$ action.option.sentence $}, because of the following error: {$ action.error $}
194 </p>
195 </div>
194 <div class="u-align--right">196 <div class="u-align--right">
195 <button class="p-button--base" data-ng-click="actionCancel()">Cancel</button>197 <button class="p-button--base" data-ng-click="actionCancel()">Cancel</button>
196 <button class="p-button--neutral" data-ng-click="actionGo()">Retry</button>198 <button class="p-button--neutral" data-ng-click="actionGo()">Retry</button>
@@ -200,9 +202,11 @@
200 <div class="row ng-hide" data-ng-show="isDeployError()">202 <div class="row ng-hide" data-ng-show="isDeployError()">
201 <!-- XXX blake_r 2015-02-19 - Need to add e2e test. -->203 <!-- XXX blake_r 2015-02-19 - Need to add e2e test. -->
202 <div class="col-8">204 <div class="col-8">
203 <p>205 <div class="p-notification--negative">
204 <i class="p-icon--error">Error:</i> Node cannot be {$ action.option.sentence $}, because the required boot images have not been imported. To import boot images, visit the <a href="images/">images page</a>.206 <p class="p-notification__response">
205 </p>207 <span class="p-notification__status">Error:</span> Node cannot be {$ action.option.sentence $}, because the required boot images have not been imported. To import boot images, visit the <a href="images/">images page</a>.
208 </p>
209 </div>
206 </div>210 </div>
207 <div class="col-4 u-align--right">211 <div class="col-4 u-align--right">
208 <button class="p-button--base" data-ng-click="actionCancel()">Cancel</button>212 <button class="p-button--base" data-ng-click="actionCancel()">Cancel</button>
@@ -210,11 +214,11 @@
210 </div>214 </div>
211 <div class="row ng-hide" data-ng-show="hasActionPowerError(action.option.name)">215 <div class="row ng-hide" data-ng-show="hasActionPowerError(action.option.name)">
212 <div class="col-8">216 <div class="col-8">
213 <p>217 <div class="p-notification--negative">
214 <i class="p-icon--error">Error:</i> Node cannot be {$ action.option.sentence $}, because power control software for the218 <p class="p-notification__response">
215 node is missing from its rack controller. To proceed, install the219 <span class="p-notification__status">Error:</span> Node cannot be {$ action.option.sentence $}, because power control software for the node is missing from its rack controller. To proceed, install the {$ getPowerErrors() $} on the rack controller.
216 {$ getPowerErrors() $} on the rack controller.220 </p>
217 </p>221 </div>
218 </div>222 </div>
219 <div class="col-4 u-align--right">223 <div class="col-4 u-align--right">
220 <button class="p-button--base" data-ng-click="actionCancel()">Cancel</button>224 <button class="p-button--base" data-ng-click="actionCancel()">Cancel</button>
diff --git a/src/maasserver/static/partials/nodes-list.html b/src/maasserver/static/partials/nodes-list.html
index a7a6447..0cd4e0a 100644
--- a/src/maasserver/static/partials/nodes-list.html
+++ b/src/maasserver/static/partials/nodes-list.html
@@ -285,12 +285,9 @@
285 {$ tabs[tab].actionProgress.completed $} of {$ tabs[tab].actionProgress.total $}285 {$ tabs[tab].actionProgress.completed $} of {$ tabs[tab].actionProgress.total $}
286 nodes are transitioning to {$ tabs[tab].actionOption.sentence $}.286 nodes are transitioning to {$ tabs[tab].actionOption.sentence $}.
287 </p>287 </p>
288 <p class="page-header__message page-header__message--error"288 <div class="p-notification--negative" data-ng-repeat="(error, machines) in tabs[tab].actionProgress.errors">
289 data-ng-repeat="(error, nodes) in tabs[tab].actionProgress.errors">289 <p class="p-notification__response"><span class="p-notification__status">Error: </span> The {$ tabs[tab].actionOption.title.toLowerCase() $} action for {$ nodes.length $} <span data-ng-pluralize count="nodes.length" when="{'one': 'node', 'other': 'nodes'}"></span> failed with error: {$ error $}</p>
290 The {$ tabs[tab].actionOption.title.toLowerCase() $} action for {$ nodes.length $}290 </div>
291 <span data-ng-pluralize count="nodes.length" when="{'one': 'node', 'other': 'nodes'}"></span>
292 failed with error: {$ error $}
293 </p>
294 </div>291 </div>
295 </section>292 </section>
296 </div>293 </div>
@@ -479,12 +476,11 @@
479 {$ tabs.devices.actionProgress.completed $} of {$ tabs.devices.actionProgress.total $}476 {$ tabs.devices.actionProgress.completed $} of {$ tabs.devices.actionProgress.total $}
480 devices have been {$ tabs.devices.actionOption.sentence $}.477 devices have been {$ tabs.devices.actionOption.sentence $}.
481 </p>478 </p>
482 <p class="page-header__message page-header__message--error"479 <div class="p-notification--negative" data-ng-repeat="(error, devices) in tabs.devices.actionProgress.errors">
483 data-ng-repeat="(error, devices) in tabs.devices.actionProgress.errors">480 <p class="p-notification__response">
484 The {$ tabs.devices.actionOption.title.toLowerCase() $} action for {$ devices.length $}481 <span class="p-notification__status">Error: </span>The {$ tabs.devices.actionOption.title.toLowerCase() $} action for {$ devices.length $} <span data-ng-pluralize count="devices.length" when="{'one': 'device', 'other': 'devices'}"></span> failed with error: {$ error $}
485 <span data-ng-pluralize count="devices.length" when="{'one': 'device', 'other': 'devices'}"></span>482 </p>
486 failed with error: {$ error $}483 </div>
487 </p>
488 </div>484 </div>
489 </div>485 </div>
490486
@@ -688,12 +684,11 @@
688 {$ tabs.controllers.actionProgress.completed $} of {$ tabs.controllers.actionProgress.total $}684 {$ tabs.controllers.actionProgress.completed $} of {$ tabs.controllers.actionProgress.total $}
689 controllers have been {$ tabs.controllers.actionOption.sentence $}.685 controllers have been {$ tabs.controllers.actionOption.sentence $}.
690 </p>686 </p>
691 <p class="page-header__message page-header__message--error"687 <div class="p-notification--negative" data-ng-repeat="(error, controllers) in tabs.controllers.actionProgress.errors">
692 data-ng-repeat="(error, controllers) in tabs.controllers.actionProgress.errors">688 <p class="p-notification__response">
693 The {$ tabs.controllers.actionOption.title.toLowerCase() $} action for {$ controllers.length $}689 <span class="p-notification__status">Error:</span> The {$ tabs.controllers.actionOption.title.toLowerCase() $} action for {$ controllers.length $} <span data-ng-pluralize count="controllers.length" when="{'one': 'controller', 'other': 'controllers'}"></span> failed with error: {$ error $}
694 <span data-ng-pluralize count="controllers.length" when="{'one': 'controller', 'other': 'controllers'}"></span>690 </p>
695 failed with error: {$ error $}691 </div>
696 </p>
697 </form>692 </form>
698 </div>693 </div>
699 </div>694 </div>
diff --git a/src/maasserver/static/partials/pod-details.html b/src/maasserver/static/partials/pod-details.html
index f8dc201..01eac28 100644
--- a/src/maasserver/static/partials/pod-details.html
+++ b/src/maasserver/static/partials/pod-details.html
@@ -122,9 +122,11 @@
122 <div class="row" data-ng-if="action.option && !action.inProgress">122 <div class="row" data-ng-if="action.option && !action.inProgress">
123 <form class="p-form p-form--inline u-align--right">123 <form class="p-form p-form--inline u-align--right">
124 <div class="col-8">124 <div class="col-8">
125 <p data-ng-if="action.error">125 <div class="p-notification--negative" data-ng-if="action.error">
126 <i class="p-icon--error">Error:</i> Performing {$ action.option.sentence $} failed: {$ action.error $}126 <p class="p-notification__response">
127 </p>127 <span class="p-notification__status">Error:</span> Performing {$ action.option.sentence $} failed: {$ action.error $}
128 </p>
129 </div>
128 </div>130 </div>
129 <div class="col-4 u-align--right">131 <div class="col-4 u-align--right">
130 <button class="p-button--base" type="button" data-ng-click="actionCancel()">Cancel</button>132 <button class="p-button--base" type="button" data-ng-click="actionCancel()">Cancel</button>
@@ -224,7 +226,7 @@
224 <maas-obj-field type="options" key="zone" label="Zone" subtle="false" placeholder="Choose a zone"226 <maas-obj-field type="options" key="zone" label="Zone" subtle="false" placeholder="Choose a zone"
225 options="zone.id as zone.name for zone in zones"></maas-obj-field>227 options="zone.id as zone.name for zone in zones"></maas-obj-field>
226 <maas-obj-field type="tags" key="tags" label="Tags" label-width="2" input-width="5"228 <maas-obj-field type="tags" key="tags" label="Tags" label-width="2" input-width="5"
227 disable-label="false" placeholder="Add a tag"></maas-obj-field> 229 disable-label="false" placeholder="Add a tag"></maas-obj-field>
228 </div>230 </div>
229 </div>231 </div>
230 <div class="col-6">232 <div class="col-6">
diff --git a/src/maasserver/static/partials/zone-details.html b/src/maasserver/static/partials/zone-details.html
index 79f100e..84209c4 100644
--- a/src/maasserver/static/partials/zone-details.html
+++ b/src/maasserver/static/partials/zone-details.html
@@ -27,7 +27,7 @@
27 <p><i class="p-icon--error">Error:</i> AZ cannot be deleted because it is the default AZ.</p>27 <p><i class="p-icon--error">Error:</i> AZ cannot be deleted because it is the default AZ.</p>
28 </div>28 </div>
29 <div class="col-6 u-align--right">29 <div class="col-6 u-align--right">
30 <button class="p-button--base" type="button"data-ng-click="cancelDeleteButton()">Cancel</button>30 <button class="p-button--base" type="button" data-ng-click="cancelDeleteButton()">Cancel</button>
31 </div>31 </div>
32 </section>32 </section>
33 <section class="row ng-hide" data-ng-show="canBeDeleted() && !error">33 <section class="row ng-hide" data-ng-show="canBeDeleted() && !error">

Subscribers

People subscribed via source and target branches