Hi Belén,

This commit "dreyna/hardcoded_submit_7246_7371" fixes these items:

  7246 "Hardcoded variables in /configuration page"
  7371 "Toaster managed mode: configuration variables page allows empty inputs 
into database"

Notes:

1)  7246 "Hardcoded variables in /configuration page"

  * I tested this by going into the admin page 
("http://127.0.0.1:8000/admin/orm/toastersetting/";) and putting "_X" (so that I 
would not lose them) after the five core values that the configuration variable 
page has special code for, and created a new project.

  * The 'new' values appeared as regular custom values with the regular 
handling. They are deletable even though they came from the admin page, but we 
decided that this was acceptable for now until the admin page gets redone.

The hardcoded special handlers are indeed not rendered as per the defect 
request.

  * An interesting consequence is that if the user manually adds back in one or 
more of those 5 core values, the hardcoded special handlers do reappear when 
the page is refreshed, again because the view class cannot tell if these are 
admin values or not.

This seems to be an expected and natural consequence, so my patch goes ahead 
and forces a refresh when one of those variables are added back in, so that the 
page is consistent. One thing the code does not do here is pre-validate the 
inputs, but I think this is ok to let go since we are already at the edge of 
supported workflows, plus the interface will enforce the value ranges when they 
are re-edited. BTW, once you add back in one of these variables they are no 
longer deletable.

2)  7371 "Toaster managed mode: configuration variables page allows empty 
inputs into database"

  * When you add a variable, the "Add" button does now disable itself.

  * After testing, I also added code to disable "Add" when the variable name is 
set to empty.

  * Finally, I added/fixed code to enforced the blocking of the variables that 
are managed outside this page, specifically BBLAYERS and MACHINE which are 
handled by the project detail page.

- David


-- 
_______________________________________________
toaster mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/toaster

Reply via email to