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:
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
Fixed
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
There is no link to structured view. but the message should not say that that you are viewing this in structured view.
This happens also for structured only If you navigate to the structured only server config from a raw view for another resource.
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.
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.
This verified in raw-config branch. moving to on-qa http://10.16.120.187:7080
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/
Mass-closure of verified bugs against JON.