generated from openmcp-project/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Create Managed Control Plane Wizard - MVP version #148
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 32 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
35bb5b3
initialize
lucasgoral 2009834
fix
lucasgoral eca41fb
refactor
lucasgoral b0d1067
fixes
lucasgoral 98f87e6
fix
lucasgoral 7d00e69
Update CreateManagedControlPlaneWizardContainer.tsx
lucasgoral b3f1927
Merge branch 'main' into feat/create-MCP-mvp
lucasgoral efb07fb
init
lucasgoral c036777
fixes
lucasgoral 1c71d7f
fixes
lucasgoral 80970fa
fixes
lucasgoral 64d8785
Update CreateManagedControlPlaneWizardContainer.tsx
lucasgoral f94c772
Update CreateManagedControlPlaneWizardContainer.tsx
lucasgoral a5a04bf
refactor
lucasgoral d2e5698
refactor
lucasgoral 4447695
Update CreateManagedControlPlaneWizardContainer.tsx
lucasgoral ae5bd0e
Update CreateManagedControlPlaneWizardContainer.tsx
lucasgoral 11a4344
Update CreateManagedControlPlaneWizardContainer.tsx
lucasgoral e3a2f4e
fixes
lucasgoral a4e1bbe
Update CreateManagedControlPlaneWizardContainer.tsx
lucasgoral fbb44aa
fixes
lucasgoral 529f458
fix
lucasgoral d3a30f6
refactor
lucasgoral f3561d1
fixes
lucasgoral 2be12b2
Merge branch 'main' into feat/create-MCP-mvp
lucasgoral 2016aa1
fixes
lucasgoral 24da70c
Update CreateManagedControlPlaneWizardContainer.tsx
lucasgoral 290c411
Update ControlPlanesListMenu.tsx
lucasgoral e3443ed
Update createManagedControlPlane.ts
lucasgoral 4245794
Update schemas.ts
lucasgoral 8d7b806
fixes
lucasgoral dfbe5fc
Update regex.ts
lucasgoral 368a951
Update WorkspacesList.module.css
lucasgoral 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
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,72 @@ | ||
import { | ||
Button, | ||
ButtonDomRef, | ||
Menu, | ||
MenuItem, | ||
Ui5CustomEvent, | ||
MenuDomRef, | ||
} from '@ui5/webcomponents-react'; | ||
import type { ButtonClickEventDetail } from '@ui5/webcomponents/dist/Button.js'; | ||
import { Dispatch, FC, SetStateAction, useRef, useState } from 'react'; | ||
import '@ui5/webcomponents-icons/dist/copy'; | ||
import '@ui5/webcomponents-icons/dist/accept'; | ||
|
||
import { useTranslation } from 'react-i18next'; | ||
|
||
type ControlPlanesListMenuProps = { | ||
setDialogDeleteWsIsOpen: Dispatch<SetStateAction<boolean>>; | ||
setIsCreateManagedControlPlaneWizardOpen: Dispatch<SetStateAction<boolean>>; | ||
}; | ||
|
||
export const ControlPlanesListMenu: FC<ControlPlanesListMenuProps> = ({ | ||
setDialogDeleteWsIsOpen, | ||
setIsCreateManagedControlPlaneWizardOpen, | ||
}) => { | ||
const popoverRef = useRef<MenuDomRef>(null); | ||
const [open, setOpen] = useState(false); | ||
|
||
const { t } = useTranslation(); | ||
|
||
const handleOpenerClick = ( | ||
e: Ui5CustomEvent<ButtonDomRef, ButtonClickEventDetail>, | ||
) => { | ||
if (popoverRef.current && e.currentTarget) { | ||
popoverRef.current.opener = e.currentTarget as HTMLElement; | ||
setOpen((prev) => !prev); | ||
} | ||
}; | ||
|
||
return ( | ||
<> | ||
<Button icon="overflow" icon-end onClick={handleOpenerClick} /> | ||
<Menu | ||
ref={popoverRef} | ||
open={open} | ||
onItemClick={(event) => { | ||
const action = (event.detail.item as HTMLElement).dataset.action; | ||
if (action === 'newManagedControlPlane') { | ||
setIsCreateManagedControlPlaneWizardOpen(true); | ||
} | ||
if (action === 'deleteWorkspace') { | ||
setDialogDeleteWsIsOpen(true); | ||
} | ||
|
||
setOpen(false); | ||
}} | ||
> | ||
<MenuItem | ||
key={'add'} | ||
text={t('ControlPlaneListToolbar.createNewManagedControlPlane')} | ||
data-action="newManagedControlPlane" | ||
icon="add" | ||
/> | ||
<MenuItem | ||
key={'delete'} | ||
text={t('ControlPlaneListToolbar.deleteWorkspace')} | ||
data-action="deleteWorkspace" | ||
icon="delete" | ||
/> | ||
</Menu> | ||
</> | ||
); | ||
}; |
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,4 @@ | ||
.createButton { | ||
margin-bottom: 2rem; | ||
|
||
} |
5 changes: 5 additions & 0 deletions
5
src/components/Dialogs/CreateProjectWorkspaceDialog.module.css
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,5 @@ | ||
.input { | ||
width: 100%; | ||
margin-bottom: 2rem; | ||
max-width: 40ch; | ||
} |
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
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.