[2.0b5] No form validation when adding a subnet, space, fabric or vlan
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Blake Rouse |
Bug Description
When adding or trying to add a space or subnet if there is a duplicated name there is no form validation similar to network details stating you were unsuccessful.
Current result:
Given I’m on networks listing page
When I try to add a space with a name that already exists in the table
Then I am able to add it, no error is generated
Expected/ correct result:
Given I’m on networks listing page
When I try to add a space with a name that already exists
Then I am unable to add it, I receive an error message and the form input field should outline in red
And disable “Add space” button in error mode
With the current behaviour it is unclear to the user if a space with duplicate name has been added as there’s no indication of otherwise but also there’s no record in the spaces table.
Related branches
- Mike Pontillo (community): Approve
-
Diff: 1825 lines (+544/-973)14 files modifiedsrc/maasserver/static/css/maas-styles.css (+1/-1)
src/maasserver/static/js/angular/controllers/networks_list.js (+60/-153)
src/maasserver/static/js/angular/controllers/tests/test_networks_list.js (+298/-224)
src/maasserver/static/js/angular/directives/maas_obj_form.js (+13/-5)
src/maasserver/static/js/angular/directives/model_field.js (+0/-159)
src/maasserver/static/js/angular/directives/tests/test_maas_obj_form.js (+37/-1)
src/maasserver/static/js/angular/directives/tests/test_model_field.js (+0/-331)
src/maasserver/static/partials/networks-list.html (+88/-89)
src/maasserver/static/partials/space-details.html (+2/-2)
src/maasserver/static/partials/subnet-details.html (+8/-6)
src/maasserver/static/scss/maas/components/_forms.scss (+4/-1)
src/maasserver/views/combo.py (+0/-1)
src/maasserver/websockets/handlers/tests/test_vlan.py (+20/-0)
src/maasserver/websockets/handlers/vlan.py (+13/-0)
summary: |
- No form validation when adding a subnet, space, fabric or vlan + [2.0b5] No form validation when adding a subnet, space, fabric or vlan |
Changed in maas: | |
assignee: | nobody → LaMont Jones (lamont) |
Changed in maas: | |
assignee: | LaMont Jones (lamont) → Blake Rouse (blake-rouse) |
Changed in maas: | |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
That's interesting. I tried to add "space-0" and observed that nothing seemed to happen. I switched the "Group by" box to "Spaces", then observed that there was a "space-1". I then added "space-1" and saw "space-2" sprint into existence.
So that's weird, but even worse: I then added a space called "puppies". It created "space-3". Likewise, creating a corresponding "kittens" space created "space-4".
So it seems this form isn't properly passing the name through, and a default name is being used instead.