generated from openmcp-project/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Feat/adding graph to mcp #210
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
Merged
Merged
Changes from 10 commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
78ee948
WiP
Hubert-Szczepanski-SAP a0d93b0
working graph
Hubert-Szczepanski-SAP c56bc06
adding missing references
Hubert-Szczepanski-SAP 822c966
Fixing according to copilot review
Hubert-Szczepanski-SAP 9669463
removing unused providers
Hubert-Szczepanski-SAP 940c0c5
linter issues + adding command to package.json
Hubert-Szczepanski-SAP 1b62db8
fixing tests after removing providers
Hubert-Szczepanski-SAP 25eb7d3
adding smaller yaml button
Hubert-Szczepanski-SAP 487c72a
temporary fix - can be deployed
Hubert-Szczepanski-SAP ce602d6
moving yalm viewer outside of Reactflow to fix bug
Hubert-Szczepanski-SAP 8933543
Merge branch 'main' into feat/adding-graphs-to-mcp
lucasgoral 10c515b
PR comments
Hubert-Szczepanski-SAP 6e1d5c5
linter
Hubert-Szczepanski-SAP 2531e39
Merge branch 'feat/adding-graphs-to-mcp' of https://github.com/openmc…
Hubert-Szczepanski-SAP 3fd97f2
react flow version upgrade + css changes
Hubert-Szczepanski-SAP 3c6d6e3
linting
Hubert-Szczepanski-SAP 0500962
Merge branch 'main' into feat/adding-graphs-to-mcp
Hubert-Szczepanski-SAP 39abbe5
moving logic to hook
Hubert-Szczepanski-SAP 45a61e9
Adding error handling for useGraph
Hubert-Szczepanski-SAP 2198689
Adding radio button from UI5 + linting
Hubert-Szczepanski-SAP 2315123
memo + removing as string
Hubert-Szczepanski-SAP 10e657f
PR changes
Hubert-Szczepanski-SAP cd52c2c
changing to Map from Record
Hubert-Szczepanski-SAP 833ea18
linter
Hubert-Szczepanski-SAP bcb8c6d
removing unused tests after removing configName check
Hubert-Szczepanski-SAP d9ab2b8
Merge branch 'main' into feat/adding-graphs-to-mcp
Hubert-Szczepanski-SAP File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| .nodeContainer { | ||
| display: flex; | ||
| align-items: center; | ||
| height: 100%; | ||
| padding: 0 10px; | ||
| box-sizing: border-box; | ||
| overflow: hidden; | ||
| justify-content: space-between; | ||
| position: relative; | ||
| font-family: var(--sapFontFamily); | ||
| pointer-events: auto; | ||
| } | ||
|
|
||
| .nodeContent { | ||
| display: flex; | ||
| align-items: center; | ||
| overflow: hidden; | ||
| } | ||
|
|
||
| .nodeTextContainer { | ||
| overflow: hidden; | ||
| } | ||
|
|
||
| .nodeLabel { | ||
| font-weight: 600; | ||
| font-size: 14px; | ||
| white-space: nowrap; | ||
| overflow: hidden; | ||
| text-overflow: ellipsis; | ||
| max-width: 180px; | ||
| } | ||
|
|
||
| .nodeType { | ||
| font-size: 12px; | ||
| color: #888; | ||
| margin-top: 2px; | ||
| } | ||
|
|
||
| .yamlButtonWrapper { | ||
| margin-left: 0px; | ||
| display: flex; | ||
| align-items: center; | ||
| } | ||
|
|
||
| .statusIcon { | ||
| margin-right: 6px; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| import React from 'react'; | ||
| import { Handle, Position } from 'reactflow'; | ||
| import { ThemingParameters } from '@ui5/webcomponents-react-base'; | ||
| import { Button, Icon } from '@ui5/webcomponents-react'; | ||
| import StatusIcon from './StatusIcon'; | ||
| import { CustomNodeProps, ManagedResourceItem } from './types'; | ||
| import styles from './CustomNode.module.css'; | ||
|
|
||
| const CustomNode: React.FC<CustomNodeProps & { onYamlClick: (item: ManagedResourceItem) => void }> = ({ | ||
| data, | ||
| onYamlClick, | ||
| }) => ( | ||
| <div className={styles.nodeContainer} style={{ fontFamily: ThemingParameters.sapFontFamily }}> | ||
| <Handle type="target" position={Position.Top} style={{ visibility: 'hidden' }} /> | ||
andreaskienle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| <Handle type="source" position={Position.Bottom} style={{ visibility: 'hidden' }} /> | ||
| <div className={styles.nodeContent}> | ||
| <div className={styles.statusIcon}> | ||
| <StatusIcon status={data.status} /> | ||
| </div> | ||
| <div className={styles.nodeTextContainer}> | ||
| <div className={styles.nodeLabel} title={data.label}> | ||
| {data.label} | ||
| </div> | ||
| {data.type && <div className={styles.nodeType}>{data.type}</div>} | ||
| </div> | ||
| </div> | ||
| <div className={styles.yamlButtonWrapper}> | ||
| <Button | ||
| className={styles.smallerIconButton} | ||
andreaskienle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| design="Transparent" | ||
| aria-label="YAML" | ||
| title="YAML" | ||
| onClick={() => onYamlClick(data.item)} | ||
andreaskienle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| > | ||
| <Icon name="document" style={{ color: 'rgb(0, 100, 217)' }} /> | ||
andreaskienle marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| </Button> | ||
| </div> | ||
| </div> | ||
| ); | ||
|
|
||
| export default CustomNode; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| .graphContainer { | ||
| display: flex; | ||
| height: 600px; | ||
| border: 1px solid #ddd; | ||
| border-radius: 8px; | ||
| overflow: hidden; | ||
| background-color: #fafafa; | ||
| font-family: var(--sapFontFamily); | ||
| } | ||
|
|
||
| .graphColumn { | ||
| flex: 1; | ||
| display: flex; | ||
| flex-direction: column; | ||
| } | ||
|
|
||
| .graphToolbar { | ||
| padding: 0.5rem; | ||
| display: flex; | ||
| gap: 1rem; | ||
| align-items: center; | ||
| } | ||
|
|
||
| .centeredMessage { | ||
| display: flex; | ||
| align-items: center; | ||
| justify-content: center; | ||
| height: 400px; | ||
| font-size: 18px; | ||
| color: #888; | ||
| } | ||
|
|
||
| .errorMessage { | ||
| color: #c00; | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.