apache / apache/kvrocks-controller
Add Rename Functionality to Sidebar Items
- Dominant language
- Go
- Stars
- 141
- Forks
- 76
- PR merge metrics
- No merged PRs in 30d
Description
# Add Rename Functionality to Sidebar Items✍🏻
### After adding rename
https://github.com/user-attachments/assets/4eaecfcb-e68c-4a03-b07d-b69c8069b975
before
https://github.com/user-attachments/assets/a32a02c0-3b1f-45a0-b2db-08528faee3b2
## Description
Currently, the sidebar items (namespaces and clusters) only have a delete option when clicking on the three dots menu. We need to add a rename capability to allow users to change the names of namespaces and clusters directly from the sidebar.
## Requirements
- Add a rename/edit option to the sidebar item context menu for namespaces and clusters
- Create a dialog to input the new name
- Implement API calls to handle the renaming on the backend
- Add proper error handling and user feedback
## Implementation Details
### UI Changes
- Add an edit icon to the context menu next to the delete icon
- Create a rename dialog with a text field for the new name
- Show success/error messages after rename attempts
### API Endpoints
Need to implement these endpoints on the backend:
- `/api/namespaces/{oldName}/rename` - For renaming namespaces
- `/api/namespaces/{namespace}/clusters/{oldName}/rename` - For renaming clusters
### Files to Modify
1. `/Users/jitmisra/Desktop/kvrocks-controller/webui/src/app/ui/sidebarItem.tsx`
2. `/Users/jitmisra/Desktop/kvrocks-controller/webui/src/app/lib/api.ts`
## Acceptance Criteria
- Users can rename namespaces and clusters from the sidebar
- UI provides clear feedback on success or failure
- After successful rename, the user is redirected to the renamed resource
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.