Skip to content

Commit cd394e5

Browse files
author
Dnyaneshwari
committed
mgr/dashboard: SMB - Edit Share.
Fixes: https://tracker.ceph.com/issues/70094 Signed-off-by: Dnyaneshwari Talwekar <[email protected]>
1 parent d6cdf3c commit cd394e5

File tree

9 files changed

+399
-213
lines changed

9 files changed

+399
-213
lines changed

src/pybind/mgr/dashboard/controllers/smb.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,19 @@ def create(self, share_resource: Share) -> Simplified:
254254
except RuntimeError as e:
255255
raise DashboardException(e, component='smb')
256256

257+
@ReadPermission
258+
@EndpointDoc("Get an smb share",
259+
parameters={
260+
'cluster_id': (str, 'Unique identifier for the cluster'),
261+
'share_id': (str, 'Unique identifier for the share')
262+
},
263+
responses={200: SHARE_SCHEMA})
264+
def get(self, cluster_id: str, share_id: str) -> Share:
265+
"""
266+
Get an smb share by cluster and share id
267+
"""
268+
return mgr.remote('smb', 'show', [f'{self._resource}.{cluster_id}.{share_id}'])
269+
257270
@raise_on_failure
258271
@DeletePermission
259272
@EndpointDoc("Remove an smb share",

src/pybind/mgr/dashboard/frontend/src/app/app-routing.module.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -477,7 +477,11 @@ const routes: Routes = [
477477
},
478478
{
479479
path: `standalone/${URLVerbs.EDIT}/:usersGroupsId`,
480-
component: SmbUsersgroupsFormComponent,
480+
component: SmbUsersgroupsFormComponent
481+
},
482+
{
483+
path: `share/${URLVerbs.EDIT}/:clusterId/:shareId`,
484+
component: SmbShareFormComponent,
481485
data: { breadcrumbs: ActionLabels.EDIT }
482486
}
483487
]

0 commit comments

Comments
 (0)