Bug 537824

Summary: [raw-config] switch to structured mode link is displayed for raw only config
Product: [Other] RHQ Project Reporter: Preethi Thomas <pthomas>
Component: ConfigurationAssignee: Adam Young <ayoung>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: low    
Version: unspecifiedCC: ayoung, jsanda
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 2.4 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 538835 (view as bug list) Environment:
Last Closed: 2010-08-12 16:50:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 538114    
Attachments:
Description Flags
Structured only server config none

Description Preethi Thomas 2009-11-16 13:46:00 UTC
Description of problem:
Resource which supports only raw config has the links to switch to structured mode.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.login to the rhqserver with agent running
2.Read the first line 
3.Click on files mode link
4. Click on structured mode link
5. Now click on edit files
  
Actual results:
First line reads You are viewing this in structured mode with files mode beside it
clicking on files mode in both view only and edit mode has the structured link

Expected results:
Switch to structured only mode should not be present for resources that support only raw config.


Additional info:

Comment 1 Preethi Thomas 2009-11-19 14:36:11 UTC
Steps needs to be a bit more refined
1.login to the rhqserver with agent running
2. Click on a resource that supports only raw-config
3. Click on the configure tab
4.Read the first line 
5.Click on files mode link
6. Click on structured mode link
7. Now click on edit files

Comment 2 Adam Young 2009-11-23 16:18:19 UTC
Fixed

Comment 3 Preethi Thomas 2009-11-24 16:56:18 UTC
fails_qa
This seems to be fixed for the most part. But there is some edge cases that needs to be handled I think.

Scenario

1. Select a resource that support structured only or structured and raw first.
2. Now click on configure tab
3. Navigate to the Structured View for the config.
4. Now select the Raw only server
5. Navigate to the configure tab

The page says.

You are viewing this in structured mode. Switch to  files mode

This resource does not expose a configuration.
 

There is no link to

Comment 4 Preethi Thomas 2009-11-24 16:57:51 UTC
There is no link to structured view. but the message should not say that that you are viewing this in structured view.

Comment 5 Preethi Thomas 2009-11-24 17:02:46 UTC
This happens also for structured only

If you navigate to the structured only server config from a raw view for another resource.

Comment 6 Preethi Thomas 2009-11-24 17:10:19 UTC
Created attachment 373489 [details]
Structured only server config

Screen shot of page where you navigate to structured only config from another resource's raw view.

Comment 7 John Sanda 2009-12-20 21:16:37 UTC
I think the problem in comment 6 is due to a change that is/was needed in some of the resource navigation tree code. When you click on a resource in a tree, the class ResourceTreeStateAdvisor has logic to determine what page you should go to based on your current location. There was already logic to handle navigating away from the structured edit page, but none for the raw edit page. I have updated this code along with code affecting this bug. The commit hash is,

a8ff3e996cc73ed811d88127f8b34076a5ef1137

Moving this to ON_DEV for QA verification.

Comment 8 Preethi Thomas 2010-01-05 15:50:31 UTC
This verified in raw-config branch.
moving to on-qa
http://10.16.120.187:7080

Comment 9 Preethi Thomas 2010-01-07 13:12:01 UTC
verified in master. going back & forth between structured, raw and structured & raw server renders the correct message. 

server tested on
http://10.16.120.159:7080/

Comment 10 Corey Welton 2010-08-12 16:50:39 UTC
Mass-closure of verified bugs against JON.