diff --git a/web/package/agama-web-ui.changes b/web/package/agama-web-ui.changes index 996c716580..6a0e32a444 100644 --- a/web/package/agama-web-ui.changes +++ b/web/package/agama-web-ui.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Oct 14 14:01:15 UTC 2025 - Ancor Gonzalez Sosa + +- Fixed the check about which DASDs can be formatted (bsc#1243795). + ------------------------------------------------------------------- Tue Sep 16 09:20:40 UTC 2025 - David Diaz diff --git a/web/src/components/storage/dasd/DASDTable.tsx b/web/src/components/storage/dasd/DASDTable.tsx index 1698851c5a..2fafb4506f 100644 --- a/web/src/components/storage/dasd/DASDTable.tsx +++ b/web/src/components/storage/dasd/DASDTable.tsx @@ -366,7 +366,8 @@ type DASDTableAction = | { type: "REQUEST_FORMAT"; payload: DASDTableState["devicesToFormat"] } | { type: "CANCEL_FORMAT_REQUEST" } | { type: "START_WAITING"; payload: DASDDevice["id"][] } - | { type: "UPDATE_WAITING"; payload: DASDDevice["id"] }; + | { type: "UPDATE_WAITING"; payload: DASDDevice["id"] } + | { type: "UPDATE_DEVICE"; payload: DASDDevice }; /** * Reducer function that handles all DASD table state transitions. @@ -410,6 +411,16 @@ const reducer = (state: DASDTableState, action: DASDTableAction): DASDTableState const waitingFor = prev.filter((id) => action.payload !== id); return { ...state, waitingFor }; } + + case "UPDATE_DEVICE": { + const selectedDevices = state.selectedDevices.map((dev) => + action.payload.id === dev.id ? action.payload : dev, + ); + const devicesToFormat = state.devicesToFormat.map((dev) => + action.payload.id === dev.id ? action.payload : dev, + ); + return { ...state, selectedDevices, devicesToFormat }; + } } }; @@ -488,6 +499,7 @@ export default function DASDTable() { return client.onEvent((event) => { if (event.type === "DASDDeviceChanged") { + dispatch({ type: "UPDATE_DEVICE", payload: event.device }); dispatch({ type: "UPDATE_WAITING", payload: event.device.id }); } });