Merge ~caleb-ellis/maas:action-notification-deploy into maas:master

Proposed by Caleb Ellis
Status: Merged
Approved by: Andres Rodriguez
Approved revision: 9d8ced67eb5dd5ca019f37e1e2c4736126f1f98e
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~caleb-ellis/maas:action-notification-deploy
Merge into: maas:master
Diff against target: 21 lines (+2/-2)
1 file modified
src/maasserver/static/partials/nodes-list.html (+2/-2)
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
MAAS Lander Approve
Martin Storey (community) Needs Fixing
Lilyana Videnova (community) Approve
Review via email: mp+358561@code.launchpad.net

Commit message

LP: #1797896 - Hide action notification warning if actions are in progress

Description of the change

## Done

- Hide actionError warning if actions are currently in progress (e.g. deploying/commissioning etc.)

## QA

- Deploy/commission a few machines
- Check that the warning does not appear

## Screenshots
https://user-images.githubusercontent.com/25733845/48562424-11988680-e8ea-11e8-90a1-b8ebf063bcf3.png

To post a comment you must log in.
Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b action-notification-deploy lp:~caleb-ellis/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: 8fa7c34e2cb1e45b1fe35aa6803e13b5ed4ee95e

review: Approve
Revision history for this message
Lilyana Videnova (lilyanavidenova) :
review: Approve
Revision history for this message
Martin Storey (cassiocassio) wrote :

How about:

```
16 nodes could not be deployed, and 4 nodes are already being deployed.<br>
To proceed, <a>refine your selection</a> to the 7 deployable nodes.
```

tricky plurals:

```
16 nodes could not be deployed, and 4 nodes are already being deployed.<br>
To proceed, <a>refine your selection</a> to the deployable node.
```

```
1 node could not be deployed, and 1 node is already being deployed.<br>
To proceed, <a>refine your selection</a> to the 7 deployable nodes.
```

review: Needs Fixing
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Please, read my last comment in https://bugs.launchpad.net/maas/+bug/1797896/comments/4

That said, I think we are over complicating the message. In my opinion, it is better to keep the message more high level. E.g. machines can be in New, Commissioning, Testing, Broken, Ready and the user can select and try to deploy them. Representing messages for each of these things is difficult and doesn't really provide any real benefit.

I think we should re-think this in the future and address the more immediate issue first, having a high level meessage.

Revision history for this message
Andres Rodriguez (andreserl) :
review: Needs Information
9d8ced6... by Caleb Ellis

LP: #1797896 - Hide action notification warning if actions are in progress

Revision history for this message
MAAS Lander (maas-lander) wrote :

UNIT TESTS
-b action-notification-deploy lp:~caleb-ellis/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: 9d8ced67eb5dd5ca019f37e1e2c4736126f1f98e

review: Approve
Revision history for this message
Caleb Ellis (caleb-ellis) wrote :

MP updated to simply hide warning notification if actions are currently in progress

Revision history for this message
Andres Rodriguez (andreserl) wrote :

lgtm!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/src/maasserver/static/partials/nodes-list.html b/src/maasserver/static/partials/nodes-list.html
2index d24c208..3fdfe9b 100644
3--- a/src/maasserver/static/partials/nodes-list.html
4+++ b/src/maasserver/static/partials/nodes-list.html
5@@ -349,14 +349,14 @@
6 </section>
7
8 <!-- XXX ricgard 2016-06-16 - Need to add e2e test. -->
9- <section class="page-header__section row u-no-margin--top ng-hide" data-ng-show="isActionError(tab)">
10+ <section class="page-header__section row u-no-margin--top" data-ng-hide="!isActionError(tab) || hasActionsInProgress(tab)">
11 <div class="col-12">
12 <div class="row">
13 <p data-ng-hide="isDeployError(tab) || isSSHKeyError(tab)"
14 class="page-header__message page-header__message--error ng-hide">
15 <i class="p-icon--warning">Warning</i>
16 {$ tabs[tab].actionErrorCount $}
17- <span data-ng-pluralize count="tabs[tab].selectedItems.length" when="{'one': 'node', 'other': 'nodes'}"></span>
18+ <span data-ng-pluralize count="tabs[tab].actionErrorCount" when="{'1': 'node', 'other': 'nodes'}"></span>
19 cannot be {$ tabs[tab].actionOption.sentence $}. To proceed, <a data-ng-click="unselectImpossibleNodes(tab)">update your selection</a>.
20 </p>
21 <p class="page-header__message page-header__message--error ng-hide" data-ng-show="isDeployError(tab)">

Subscribers

People subscribed via source and target branches