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
Add graph view to project overview workloads tab #6901
Add graph view to project overview workloads tab #6901
Conversation
FYI @alimobrem @beanh66 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeff-phillips-18 just to be sure, I'm going to include this as a Request for Change
If you are in the Project->Workloads(graph) tab and do an in-context add, you should be brought to a form, and then brought back to the Project->Workloads(graph) tab to see the results. I'm guessing right now it may navigate directly to the Topology page we use in Dev Perspective.
03d9698
to
2572999
Compare
@serenamarie125 currently it takes you back to the workloads tab but with the list view selected :( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jeff-phillips-18 Creating any resource from the catalog (operator backed, templates) using the Add to Project
context menu seems to redirect to the respective Admin page. This is happening because we have checks to redirect in the form based on the active perspective. Is this expected behavior?
2572999
to
79f5f26
Compare
@serenamarie125 fixed to redirect to the previous view for the workloads tab. |
@jeff-phillips-18 In the Project workloads page, I tried adding a database using the Add to Project context menu, on creation it took me to the Template Instance Details page. I was expecting that it would bring me back to the view from where I started |
@@ -125,11 +113,52 @@ export const TopologyPageContext: React.FC<TopologyPageProps> = observer(({ matc | |||
); | |||
}); | |||
|
|||
export const TopologyPage: React.FC<TopologyPageProps> = ({ match }) => { | |||
type TopologyWorkloadsPageProps = { | |||
match: any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
match: any; | |
match: RMatch<{ | |
name?: string; | |
}>; |
import { useParams } from 'react-router-dom'; | ||
import DataModelProvider from '@console/dev-console/src/components/topology/data-transforms/DataModelProvider'; | ||
import { TopologyDataRenderer } from '@console/dev-console/src/components/topology/TopologyDataRenderer'; | ||
import TopologyPage from '@console/dev-console/src/components/topology/TopologyPage'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This import looks bad. We shouldn't import the dev-console package in public.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is known and already existing. I believe the plan is move Topology out of dev-console and into its own mono repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are to share topology with admin console, we need to move it to a new package as a standalone tool.
edit: I'm not suggesting we do this now :)
</DataModelProvider> | ||
); | ||
type OverviewListPageProps = { | ||
match: any; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
match: any; | |
match: RMatch<{ | |
ns?: string; | |
}>; |
79f5f26
to
294f88c
Compare
@vikram-raj Updated PTAL. |
const setTopologyWorkloadsActiveView = (id: string) => { | ||
localStorage.setItem(LAST_TOPOLOGY_WORKLOADS_VIEW_LOCAL_STORAGE_KEY, id); | ||
}; | ||
|
||
const getTopologyWorkloadsActiveView = () => { | ||
return localStorage.getItem(LAST_TOPOLOGY_WORKLOADS_VIEW_LOCAL_STORAGE_KEY); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does UX want a separate setting for the topology page and for the workload page?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UX and PM agreed to using a single setting.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, missed the thought behind this. We are keeping view preference separate per sections (Workloads vs Topology). UX and PM agreed to that. The saved layout of the graph view is shared between the sections.
{workloadsPage ? ( | ||
<TopologyWorkloadsPage match={match} /> | ||
) : ( | ||
<TopologyPageContext match={match} /> | ||
)} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both views are exactly the same minus the project selector.
I think they should share a lot more in common between the two pages and come up with a common strategy for the URL handling.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
const next = | ||
activePerspective === 'dev' | ||
? '/topology' | ||
: `${resourcePathFromModel( | ||
ClusterServiceVersionModel, | ||
match.params.appName, | ||
match.params.ns, | ||
)}/${match.params.plural}`; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we can change the location we go to after creating an operand. The user who was in the installed operators
nav item will now be redirected to the workloads tab even though an operand may not result in a workload being created.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this change
20bc818
to
9498468
Compare
@alimobrem @beanh66 FYI |
9498468
to
2acd686
Compare
/retest |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this a while and it works great for me.
/lgtm
/retest Please review the full test history for this PR and help us cut down flakes. |
16 similar comments
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
/retest Please review the full test history for this PR and help us cut down flakes. |
d585481
to
e475203
Compare
e475203
to
df41a85
Compare
@jerolimov @christianvogt Updated |
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: bgliwa01, christianvogt, jeff-phillips-18, jerolimov The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Fixes
https://issues.redhat.com/browse/ODC-4925
Description
Adds the ability to switch to the graph view in the workloads tab for the project overview page.
Screen Shots:
Browser conformance:
@bgliwa01 @bmignano @serenamarie125