ceph - ceph-dashboard - 2024-06-26

Timestamp (UTC)Message
2024-06-26T04:38:18.508Z
<Himanshu Agarkar> Hi @nizamial09,
I was trying to add the above feature.

I successfully replicated the current scenario on the localhost dashboard through Ubuntu WSL using [Quick Install](https://github.com/rhcs-dashboard/ceph-dev?tab=readme-ov-file#quick-install) commands.

I wrote the code for the enhancemet in a couple of files and wanted to test it.

I initialized an Angular app (on my **Windows** **system**) in the [frontend](https://github.com/ceph/ceph/tree/main/src/pybind/mgr/dashboard/frontend) directory, as I found a `package.json` file there.

I wanted to confirm if I can start the localhost and test the feature thoroughly, or if I need to start the Angular server in another directory (if so, please specify the directory). Also, do I need to start the server in a Linux system, or is there another way to test it?

I should be able to start the app locally to add and delete resources for testing. I am currently able to do that in my Docker-pulled localhost for Block -> Images.
2024-06-26T07:15:49.912Z
<nizamial09> if you start the ceph-dev, it should start the angular dev server in <https://127.0.0.1:4200> and <https://127.0.0.1:11000>. You can use either of these two to verify your code changes..
2024-06-26T07:16:27.168Z
<nizamial09> these are exposed on 0.0.0.0 so I expect this should work from your browser regardless of the wsl thingy
2024-06-26T12:05:48.972Z
<Himanshu Agarkar> I checked out the ceph-dev repository minutely

I didn't find any way to test the feature there as it is a docker image, and the frontend code (`package.json` file) doesn't actually exist there.

Could you please let me know **where** to actually make changes in the dashboard code (both frontend and backend) in the ceph-dev localhost which is hosted on the above URLs? or if there is any other way to test?
2024-06-26T15:05:40.579Z
<nizamial09> in ceph-dev, if you set the `CEPH_REPO_DIR` in the .env file with the directory of where your ceph repo is located locally then ceph-dev mounts this particular repository to the docker volume. so whatever changes you make locally gets reflected in the container and then later on the dev server through angular. that applies for both front-end and back-end. Although for the back-end changes to reflect, you'll need to restart the dashboard by going inside the container and doing
```ceph mgr module disable dashboard
ceph mgr module enable dashboard ```
or simply executing a script in the container
```/docker/restart-dashboard.sh```
and the changes are made in the path I sent previously
<https://github.com/ceph/ceph/tree/main/src/pybind/mgr/dashboard/frontend>

ceph-dev is just a deployment tool to deploy ceph. And ceph is where you need to be in to make the changes..

Any issue? please create an issue here and use the infra label.