Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenShift on cloud: settings navigation link #216

Closed
dlabrecq opened this issue Mar 28, 2019 · 12 comments
Closed

OpenShift on cloud: settings navigation link #216

dlabrecq opened this issue Mar 28, 2019 · 12 comments

Comments

@dlabrecq
Copy link
Contributor

Per the recent sources meeting (on 3/27), the Cost Management needs a new navigation link, under the bundle 'settings' area. The new page will allow users add and remove sources unique to Cost Management. This link should be named 'Cost Management Sources' and route to /cost-management/sources.

For summit, the left hand nav is expected to look something like this:

Catalog
Cost Management
Settings
 > Catalog Sources
 > Cost Management Sources

Note that the Catalog team will have their own page for sources, with a similar link under the bundle 'settings'. Post summit, it's expected that the Catalog team will combine sources onto one page.

@dlabrecq dlabrecq changed the title OpenShift on Cloud settings navigation link OpenShift on cloud: settings navigation link Apr 1, 2019
@iphands
Copy link
Contributor

iphands commented Apr 2, 2019

Hi Dan, back when things were flat just needed the app id and we could get rolling.
Now that things are in sections and apps are more intertwined its complicated.

I want to ask here so I dont make assumptions and have to follow up again.
Can you take a look at the guesses I made and correct me if Im wrong?

Settings

Catalog Sources

href = /hybrid/settings/catalog-sources
app = the sources application?

Cost Management Sources

href = /hybrid/settings/cost-management-sources
app = cost-management aka koku-ui?

@dlabrecq
Copy link
Contributor Author

dlabrecq commented Apr 3, 2019

That looks good to me. Will update our router to match. Thank you!

@chargio
Copy link

chargio commented Apr 5, 2019

We really need this. Can we please speed this up?

@iphands
Copy link
Contributor

iphands commented Apr 5, 2019

Sergio, please be patient. This is on our radar, but not in the current sprint.
We are working hard to get production working.

@dlabrecq
Copy link
Contributor Author

dlabrecq commented Apr 5, 2019

Looking at index_map.json and hybrid/settings/cost-management-sources has the same "real_path" as hybrid/cost-management. Shouldn't the "real_path" be cost-management/sources?

    { "req_path": "hybrid/settings/cost-management-sources", "real_path": "cost-management" },
    ...
    { "req_path": "hybrid/cost-management", "real_path": "cost-management" },

@iphands
Copy link
Contributor

iphands commented Apr 6, 2019

I don't think so real_path is really synonymous with appid at the moment. It's possible that there would be a reason to not have it this way. If some repo housed two apps. With two separate entry point index.htmls... did you all specifically setup cost this way?

@iphands
Copy link
Contributor

iphands commented Apr 6, 2019

Just looked at the koku-ui source and it doesn't seem to be setup as two different apps with two different index.htmls.... thus I think this config is correct. Happy to change if I am wrong but it will break things if we do it and we don't need to

@dlabrecq
Copy link
Contributor Author

dlabrecq commented Apr 6, 2019

Currently, the route in the Cost management is /sources, but should that be /cost-management-sources? It's not clear how hybrid/settings/cost-management-sources maps to any page in Cost management

@iphands
Copy link
Contributor

iphands commented Apr 6, 2019

Cost Management Sources
href = /hybrid/settings/cost-management-sources
app = cost-management aka koku-ui?

That looks good to me. Will update our router to match. Thank you!

I dont get it. I asked, you acked. What do you want the public URL to be?
/hybrid/settings/_____

I would persuade you away from choosing
/hybrid/settings/sources as there are multiple applications at /hybrid/settings that let you configure sources.

@chargio can you please choose a public URL at which you wish for this application to be exposed? It seems like there is some debate here as to what it should be.

@dlabrecq
Copy link
Contributor Author

dlabrecq commented Apr 6, 2019

Sorry, I'm not necessarily concerned with the name of the public URL. I'm just trying to figure out what our router path needs to be in order for that link to land on the Cost Management sources page?

I have tried changing our router to match /cost-management-sources. For kicks, I also tried other combinations, like /settings/cost-management-sources -- not that I expected that to work.

Maybe there is a misunderstanding on my end? However, I don't see my router break point being hit at all when clicking that link.

Could this just be an issue with our spandx config?

@iphands
Copy link
Contributor

iphands commented Apr 7, 2019

Sorry, I'm not necessarily concerned with the name of the public URL. I'm just trying to figure out what our router path needs to be in order for that link to land on the Cost Management sources page?

I understand but we (my team) absolutely needs to know these details.

I have tried changing our router to match /cost-management-sources. For kicks, I also tried other combinations, like /settings/cost-management-sources -- not that I expected that to work.

Maybe there is a misunderstanding on my end? However, I don't see my router break point being hit at all when clicking that link.

So the way this stuff works is your index.html is basically the loader and thus entry point for your entire application. All of an applications resources exist in /apps/$appname/* and we configure proxy "magic" to ensure that the human usable paths (like /hybrid/foo/bar/*) always serve up your apps entry point or index.html.

Could this just be an issue with our spandx config?

In development insights-proxy is your proxy to the app so yeah you have to configure net new paths there ... if they are not a subpath of an existing path you'll need to add it.

The best example of this stuff is here:
https://github.com/RedHatInsights/insights-frontend-starter-app/blob/master/profiles/local-frontend.js

In the starter app example for a new path like /hybrid/settings/foo-bar-baz ... you can just add:

routes[`/beta/${SECTION}/settings/foo-bar-baz`] = { host: 'http://localhost:8002' };
routes[`/${SECTION}/settings/foo-bar-baz`] = { host: 'http://localhost:8002' };

I strongly recommend getting a few of these config that do various things - one for local frontend, one for local frontend and api, etc - and committing them to your repo so other team members to share.

I have some time booked for us Monday, if there is still any confusion lets chat about it there. Should be super simple once you've seen it once.

@ryelo
Copy link
Member

ryelo commented Oct 29, 2019

Closing due to staleness, if you have another issue with nav, please open it in cloud-services-config

@ryelo ryelo closed this as completed Oct 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants