Bug 1505281

Summary: Message is confused to user when resource created by importing template on console
Product: OpenShift Container Platform Reporter: XiaochuanWang <xiaocwan>
Component: Management ConsoleAssignee: Samuel Padgett <spadgett>
Status: CLOSED CURRENTRELEASE QA Contact: Yadan Pei <yapei>
Severity: low Docs Contact:
Priority: low    
Version: 3.7.0CC: aos-bugs, jhadvig, jokerman, mmccomas, xiaocwan, yapei
Target Milestone: ---   
Target Release: 3.7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-11-08 13:12:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
missleading message none

Description XiaochuanWang 2017-10-23 08:19:04 UTC
Created attachment 1342041 [details]
missleading message

Description of problem:
Import yaml or json from console, create the resource and check console message.

Version-Release number of selected component (if applicable):
v3.7.0-0.158.0

How reproducible:
Always

Steps to Reproduce:
1. Login on console, create a project and open the "Import YAML/JSON" overlay pane
2. Attach a valid template and hit "Create"
3. check the message on console.

Actual results:
message is "YAML / JSON completed." which confuses user.
Please refer to screenshot.

Expected results:
Should be clear to user

Additional info:

Comment 1 Jakub Hadvig 2017-10-31 10:04:54 UTC
Trying to reproduce the issue but without luck. Could you please provide the template you are submitting for creation.
Thanks

Comment 3 openshift-github-bot 2017-11-01 19:53:09 UTC
Commits pushed to master at https://github.com/openshift/origin-web-console

https://github.com/openshift/origin-web-console/commit/136dd4b28ebd64ca352d9f01fc79a9b40b963968
Bug 1505281 - Improve import YAML results message

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1505281

https://github.com/openshift/origin-web-console/commit/84d6d04a95cb19d4e0501ac32a326c12a3e04336
Merge pull request #2426 from spadgett/fix-import-yaml-msg

Automatic merge from submit-queue.

Bug 1505281 - Improve import YAML results message

Fixes https://bugzilla.redhat.com/show_bug.cgi?id=1505281
See also #2217 

List:

![openshift web console 2017-11-01 13-30-16](https://user-images.githubusercontent.com/1167259/32288915-bafbb06c-bf0b-11e7-9322-50c6b252f44c.png)

Single resource:

![openshift web console 2017-11-01 13-46-08](https://user-images.githubusercontent.com/1167259/32288894-b2e9ef10-bf0b-11e7-816b-bce315c1b036.png)

/kind bug

cc @rhamilto @jwforres

Comment 4 Samuel Padgett 2017-11-01 20:06:59 UTC
We'll now show the kind and name when importing a single resource. Note that when a list is imported, you see "YAML / JSON has been imported."

Comment 6 Yadan Pei 2017-11-03 03:37:29 UTC
Message for list resources is "YAML / JSON has been imported in <project> successfully"

Message for single resource is "<resource_type> <resource_name> has been imported in <project> successfully"

Comment 7 XiaochuanWang 2017-11-03 05:49:26 UTC
On latest ocp v3.7.0-0.190.0

For template:
Processing template displays "Template ruby-helloworld-sample has been imported."
Creating template displays "ruby-helloworld-sample has been created."

This is correct. Because: 1) on old version (v3.7.0-0.189.0), creating template displays "ruby-helloworld-sample has been created." 2) Actual created list of resources is same as 'oc process -f <template json> | oc create -f -' 3) Processing template of resources now is same as comment 4

For single resource:
v3.7.0-0.190.0 displays "Pod hello-pod has been imported.", so here it needs to be "Pod hello-pod has been created."

Comment 8 Samuel Padgett 2017-11-07 17:54:43 UTC
The behavior you describe in comment #7 is working as designed. I think the wording is reasonable.

Comment 9 Yadan Pei 2017-11-08 07:27:20 UTC
Move to VERIFIED

Comment 10 Yadan Pei 2017-11-08 07:28:02 UTC
Agree that the message is reasonable and acceptable