Merge ~blr/maas:pod-configuration-type-styling-lp1773387 into maas:master

Proposed by Kit Randel
Status: Merged
Approved by: Blake Rouse
Approved revision: a303a5b62612df1e05991de23d7bfdd8eaed23da
Merge reported by: MAAS Lander
Merged at revision: not available
Proposed branch: ~blr/maas:pod-configuration-type-styling-lp1773387
Merge into: maas:master
Diff against target: 66 lines (+25/-25)
1 file modified
src/maasserver/static/partials/pod-details.html (+25/-25)
Reviewer Review Type Date Requested Status
Anthony Dillon Approve
MAAS Lander Approve
MAAS Maintainers Pending
Review via email: mp+347487@code.launchpad.net

Commit message

LP: #1773387 - Improve styling of Pod Configuration form.

Description of the change

Pods always have one 'Type', hence the value can be rendered in a disabled input, rather than a list. This branch also makes a few tweaks to the form to improve the rendering of the leftmost label column (previously too small, and wrapping).

# Screenshots
https://drive.google.com/open?id=1-EGIMxjzqzgCHsOZglfHHIO-A_zYpK3l (default state)
https://drive.google.com/open?id=1F1rSZnGrT_mYoa4JYlaZDHxu7PQVFngA (edit state)

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

UNIT TESTS
-b pod-configuration-type-styling-lp1773387 lp:~blr/maas/+git/maas into -b master lp:~maas-committers/maas

STATUS: SUCCESS
COMMIT: a303a5b62612df1e05991de23d7bfdd8eaed23da

review: Approve
Revision history for this message
Anthony Dillon (ya-bo-ng) wrote :

Look good +1

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/pod-details.html b/src/maasserver/static/partials/pod-details.html
2index a6a7167..4e07590 100644
3--- a/src/maasserver/static/partials/pod-details.html
4+++ b/src/maasserver/static/partials/pod-details.html
5@@ -212,36 +212,36 @@
6 </div>
7 </section>
8 <section class="p-strip" data-ng-if="pod && section.area === 'configuration'">
9- <div class="row">
10- <div class="col-10">
11- <h2>Pod configuration</h2>
12- </div>
13- <div class="col-2">
14- <button class="p-button--neutral u-float--right"
15- data-ng-if="canEdit() && !editing"
16- data-ng-click="editPodConfiguration()">Edit</button>
17+ <div class="row">
18+ <div class="col-10">
19+ <h2>Pod configuration</h2>
20+ </div>
21+ <div class="col-2">
22+ <button class="p-button--neutral u-float--right"
23+ data-ng-if="canEdit() && !editing"
24+ data-ng-click="editPodConfiguration()">Edit</button>
25+ </div>
26 </div>
27- </div>
28- <div class="row">
29+ <div class="row">
30 <maas-obj-form obj="pod" manager="podManager" manager-method="updateItem"
31 table-form="true" save-on-blur="false" after-save="exitEditPodConfiguration" data-ng-disabled="!editing">
32 <div class="col-6">
33- <div class="col-6">
34- <dl>
35- <dt>Type</dt>
36- <dd>{$ getPodTypeTitle() $}</dd>
37- </dl>
38- <maas-obj-field type="options" key="zone" label="Zone"
39- subtle="false" placeholder="Choose a zone"
40- options="zone.id as zone.name for zone in zones"></maas-obj-field>
41- <maas-obj-field type="options" key="default_pool"
42- label="Resource pool" subtle="false"
43- placeholder="Choose a pool"
44- options="pool.id as pool.name for pool in pools"></maas-obj-field>
45- <maas-obj-field type="tags" key="tags" label="Tags"
46- label-width="2" input-width="5"
47- disable-label="false" placeholder="Add a tag"></maas-obj-field>
48+ <div class="p-form__group">
49+ <label for="type" class="p-form__label col-2">Type</label>
50+ <div class="p-form__control u-no-margin--top col-5">
51+ <input type="text" id="type" disabled="disabled" value="{$ getPodTypeTitle() $}" />
52+ </div>
53 </div>
54+ <maas-obj-field type="options" key="zone" label="Zone"
55+ subtle="false" placeholder="Choose a zone"
56+ options="zone.id as zone.name for zone in zones"></maas-obj-field>
57+ <maas-obj-field type="options" key="default_pool"
58+ label="Resource pool" subtle="false"
59+ placeholder="Choose a pool"
60+ options="pool.id as pool.name for pool in pools"></maas-obj-field>
61+ <maas-obj-field type="tags" key="tags" label="Tags"
62+ label-width="2" input-width="5"
63+ disable-label="false" placeholder="Add a tag"></maas-obj-field>
64 </div>
65 <div class="col-6">
66 <maas-pod-parameters hide-type="true"></maas-pod-parameters>

Subscribers

People subscribed via source and target branches