Bug 1251423 - Should add asterisk to all required fields on creation page.
Should add asterisk to all required fields on creation page.
Product: OpenShift Origin
Classification: Red Hat
Component: Management Console (Show other bugs)
Unspecified Unspecified
low Severity low
: ---
: ---
Assigned To: Samuel Padgett
Wei Sun
Depends On:
  Show dependency treegraph
Reported: 2015-08-07 05:35 EDT by Yanping Zhang
Modified: 2015-11-23 16:15 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-11-23 16:15:55 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

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

  None (edit)
Description Yanping Zhang 2015-08-07 05:35:43 EDT
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):
$ oc version
oc v1.0.4-88-ga2ad7d7
kubernetes v1.0.0

How reproducible:

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 10:49:21 EDT
We've previously added an asterisk for required template parameters:


Can you try in a newer build?
Comment 2 Samuel Padgett 2015-08-07 14:18:38 EDT
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-09 23:10:47 EDT
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 07:51:04 EDT
Created attachment 1061015 [details]
Modified ruby hello world template
Comment 5 Samuel Padgett 2015-08-10 07:52:01 EDT
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-10 23:54:14 EDT
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 13:34:27 EDT
(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 14:05:03 EDT
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 15:12:30 EDT
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 17:38:23 EDT
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 18:02:10 EDT
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 18:05:20 EDT
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 18:17:19 EDT
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 07:57:08 EDT
I believe the all required fields now have the asterisk.
Comment 15 Yanping Zhang 2015-10-21 23:14:10 EDT
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.