Bug 1400775 - Better to disable the Create button when Configuration File field didn't pass the validation check
Summary: Better to disable the Create button when Configuration File field didn't pass...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Management Console
Version: 3.4.0
Hardware: Unspecified
OS: Unspecified
medium
low
Target Milestone: ---
: ---
Assignee: Jakub Hadvig
QA Contact: Yadan Pei
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-12-02 03:15 UTC by Yadan Pei
Modified: 2017-07-24 14:11 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: Putting a file invalid/unsupported format content in the Configuration File field. Consequence: User is able to hit the Create button, but gets error alert since the content is in invalid/unsupported format. Fix: Add validation for the Configuration File field. Result: If the field contains invalid/unsupported format, disable Create button.
Clone Of:
Environment:
Last Closed: 2017-04-12 19:17:39 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:0884 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.5 RPM Release Advisory 2017-04-12 22:50:07 UTC

Description Yadan Pei 2016-12-02 03:15:45 UTC
Description of problem:
On Create Secret page, when Configuration File is populated with non json format file, warning info will be printed but Create button is still enabled, it's better to disabled the Create button for such situation

Version-Release number of selected component (if applicable):
v3.4.0.32+d349492

How reproducible:
Always

Steps to Reproduce:
1.Visit Resources -> Secrets page, click "Create Secret"
2.Secret Type: Image Secret
  Secret Name: imagesecret
  Authetication Type: Configuration File
3.Upload non json format file to Configuration File field

Actual results:
3.Since file is in json format, there is warning message printed:
Configuration file should be in JSON format
But Create button is still enabled, clicking on Create button gave no response

Expected results:
3.It's better to disabled the Create button when Configuration File field didn't pass the validation check

Additional info:

Comment 1 openshift-github-bot 2016-12-02 14:03:06 UTC
Commit pushed to master at https://github.com/openshift/origin-web-console

https://github.com/openshift/origin-web-console/commit/1793f9b25440e35a6df9208a1c4389543965db77
Bug 1400775 - Disable the Create button when Configuration File field didn't pass the validation check

Comment 2 Yadan Pei 2016-12-05 00:31:45 UTC
Will check when new puddle is ready

Comment 3 Yadan Pei 2016-12-06 01:45:14 UTC
Change to MODIFIED because there is no new puddle now, please feel free to change back to ON_QA when it could be tested

Comment 4 Troy Dawson 2016-12-06 20:32:13 UTC
This has been merged into ocp and is in OCP v3.4.0.33 or newer.

Comment 6 Yadan Pei 2016-12-07 06:56:16 UTC
Checked on OCP v3.4.0.33, fix not merged yet, will check on next puddle

Comment 7 Troy Dawson 2016-12-09 18:48:49 UTC
OCP v3.4.0.34 is out and ready to be checked.
There was some management console changes with v3.4.0.34, but the pull request in Comment #1 is for Master, not for enterprise-3.4.  That doesn't mean the code hasn't made it in, just that it isn't for that pull request.

Comment 8 Yanping Zhang 2016-12-12 05:53:05 UTC
Checked on OCP 3.4 with version openshift v3.4.0.34+87d9d8d, the bug still exists. The bug's target release is 3.4.0, we can not test it if the fix for the bug is not in enterprise-3.4.

Comment 9 Jessica Forrester 2016-12-12 13:58:33 UTC
this fix was not targeted for 3.4, it should only be in 3.5

Comment 14 Troy Dawson 2017-01-20 23:30:50 UTC
This has been merged into ocp and is in OCP v3.5.0.7 or newer.

Comment 15 Yadan Pei 2017-01-22 01:10:42 UTC
Checked against v3.5.0.7 with steps:

1.Visit Resources -> Secrets page, click "Create Secret"
2.Secret Type: Image Secret
  Secret Name: imagesecret
  Authetication Type: Configuration File
3.Upload non json(like yaml) format file to Configuration File field, warning info "Configuration file should be in JSON format" is shown and Create button is disbaled
4.Upload a json format file but not in dockerConfig format, also prints "Configuration file should be in JSON format" warning and Create button is disabled
5.Only when configuration file is uploaded with correct dockerconfig format file, the secret could be created successfully

Move to VERIFIED

Comment 17 errata-xmlrpc 2017-04-12 19:17:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:0884


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