Bug 1251423 - Should add asterisk to all required fields on creation page.
Summary: Should add asterisk to all required fields on creation page.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Management Console
Version: 3.x
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ---
: ---
Assignee: Samuel Padgett
QA Contact: Wei Sun
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-08-07 09:35 UTC by Yanping Zhang
Modified: 2015-11-23 21:15 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-23 21:15:55 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Modified ruby hello world template (14.16 KB, text/plain)
2015-08-10 11:51 UTC, Samuel Padgett
no flags Details

Description Yanping Zhang 2015-08-07 09:35:43 UTC
Description of problem:
When create app from source code or from template, on creation page, there is no asterisk to highlight the parameter that must be defined. Such as the app name is required but not highlighted on creation page from source code.

Version-Release number of selected component (if applicable):
devenv_fedora_2115
$ oc version
oc v1.0.4-88-ga2ad7d7
kubernetes v1.0.0


How reproducible:
Always

Steps to Reproduce:
1.Create images in openshift project
$ oc create -f /data/src/github.com/openshift/origin/examples/image-streams/image-streams-centos7.json -n openshift

2.Create templates in project.
$ oc create -f /data/src/github.com/openshift/origin/examples/sample-app/application-template-stibuild.json -n protest

3.On web console, when create app using the template, check the creation page.
4.On web console, when create app using source code, check the creation page.

Actual results:
3.On the creation page, there are many parameters required, but no asterisk to highlight them. User would forget to define some parameters.
4 On the creation page, there is no asterisk to prompt the parameter is required.

Expected results:
3,4.Should have asterisk to prompt user the parameter is required.

Additional info:

Comment 1 Samuel Padgett 2015-08-07 14:49:21 UTC
We've previously added an asterisk for required template parameters:

https://github.com/openshift/origin/issues/3984
https://github.com/openshift/origin/pull/3986

Can you try in a newer build?

Comment 2 Samuel Padgett 2015-08-07 18:18:38 UTC
Required template parameters are done.

Name and Replicas are not yet marked as required on the last create from source page.

Comment 3 Yanping Zhang 2015-08-10 03:10:47 UTC
Checked on devenv_fedora_2129, the code from pull 3986 has been merged on the test env, but still no asterisk found on creation page. Could you help check what's the issue, Samuel?

Comment 4 Samuel Padgett 2015-08-10 11:51:04 UTC
Created attachment 1061015 [details]
Modified ruby hello world template

Comment 5 Samuel Padgett 2015-08-10 11:52:01 UTC
The parameter needs to be marked as required in the template. Can you check?

A required parameter looks like

    {
      "name": "MYSQL_DATABASE",
      "description": "database name",
      "value": "",
      "required": true
    }

You can see with the command

    oc get template <name> -o json -n <namespace>

I've also attached a template with required parameters.

Comment 6 Yanping Zhang 2015-08-11 03:54:14 UTC
Test with the template with required parameters, and there are asterisks on creation page now. So example templates under origin/example/ need to be updated accordingly.

Comment 7 Samuel Padgett 2015-08-11 17:34:27 UTC
(In reply to Yanping Zhang from comment #6)
> Test with the template with required parameters, and there are asterisks on
> creation page now. So example templates under origin/example/ need to be
> updated accordingly.

Ben ^^

Comment 8 Ben Parees 2015-08-11 18:05:03 UTC
Sam are you just asking that i go update fields in the existing templates to add the "required=true" flag?

Comment 9 Samuel Padgett 2015-08-11 19:12:30 UTC
Ben, not necessarily. Just making you aware of this bug and seeing if we plan to add required to those templates.

Comment 10 Ben Parees 2015-08-11 21:38:23 UTC
I didn't have any plans to do so..  not that it would be necessarily wrong to, but the real use case for "required" is a field that is by default empty, but needs a value to be provided.

in our db templates, the fields need a value, but we provide a default one.  So unless the user goes in and explicitly deletes/overrides the default value with an empty string, they won't have problems.

Comment 11 Samuel Padgett 2015-08-11 22:02:10 UTC
I'm concerned about the user experience when you do happen to remove that value, though. Only some of the template resources are created, and you have to figure out how to delete things and start over. It's very easy to catch before submit if required is set.

Comment 12 Ben Parees 2015-08-11 22:05:20 UTC
The resources all get created.  but the DB pod (for example) will fail to start citing the lack of a DB_NAME/USER/PASSWORD.

Comment 13 Samuel Padgett 2015-08-11 22:17:19 UTC
In a way that's worse because it looks like everything succeeded. Would a user know what's wrong and how to fix it?

It just seems like it could be easily avoided.

Comment 14 Samuel Padgett 2015-10-21 11:57:08 UTC
I believe the all required fields now have the asterisk.

Comment 15 Yanping Zhang 2015-10-22 03:14:10 UTC
Checked on devenv-fedora_2517.
openshift v1.0.6-833-ga7032bc
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4
etcd 2.1.2

When create app on web console, on creation page, all required fields now have the asterisk.
Move the bug to Verified.


Note You need to log in before you can comment on or make changes to this bug.