mgr/dashboard: expose image summary API
Introduce a new API for getting per image summary
```
╰─$ curl -kX GET "https://localhost:4200/api/block/mirroring/rbd/test/summary" \
-H "Accept: application/vnd.ceph.api.v1.0+json" \
-H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" | jq .
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 637 100 637 0 0 14597 0 --:--:-- --:--:-- --:--:-- 14813
{
"name": "test2",
"id": "
10d618ea1a58",
"info": {
"global_id": "
f25678be-64a2-481f-b96c-
9bcc566dcbfe",
"state": 1,
"primary": true
},
"remote_statuses": [
{
"state": "Replaying",
"description": {
"bytes_per_second": 0.0,
"bytes_per_snapshot": 0.0,
"last_snapshot_bytes": 0,
"last_snapshot_sync_seconds": 0,
"local_snapshot_timestamp":
1755579780,
"remote_snapshot_timestamp":
1755579780,
"replay_state": "idle"
},
"last_update": "2025-08-19T05:03:17Z",
"up": true,
"mirror_uuid": "
4d734616-5a38-4399-b743-
86bcd8c1ab8f"
}
],
"state": 6,
"description": "local image is primary",
"last_update": "2025-08-19T05:03:10Z",
"up": true
}
```
Also update the existing API to add the image syncing status. The
/summary API's `image_ready` will also have the `remote_status` which is
a list of dict to show the status of all the remote clusters (one image
can be mirrored to more than one cluster)
```
"image_ready": [
{
"pool_name": "rbd",
"name": "test2",
"state_color": "info",
"state": "Stopped",
"mirror_mode": "snapshot",
"description": "local image is primary",
"remote_status": [
{
"state": "Replaying",
"description": {
"bytes_per_second": 0.0,
"bytes_per_snapshot": 0.0,
"last_snapshot_bytes": 0,
"last_snapshot_sync_seconds": 0,
"local_snapshot_timestamp":
1755579780,
"remote_snapshot_timestamp":
1755579780,
"replay_state": "idle"
},
"last_update": "2025-08-19T05:03:47Z",
"up": true,
"mirror_uuid": "
4d734616-5a38-4399-b743-
86bcd8c1ab8f"
}
]
}
]
```
Fixes: https://tracker.ceph.com/issues/72520
Signed-off-by: Nizamudeen A <nia@redhat.com>
(cherry picked from commit
f4b09da1521684a4dbae2fe5929484fb74783559)