Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions web/package/agama-web-ui.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Tue Oct 14 14:01:15 UTC 2025 - Ancor Gonzalez Sosa <ancor@suse.com>

- Fixed the check about which DASDs can be formatted (bsc#1243795).

-------------------------------------------------------------------
Tue Sep 16 09:20:40 UTC 2025 - David Diaz <dgonzalez@suse.com>

Expand Down
14 changes: 13 additions & 1 deletion web/src/components/storage/dasd/DASDTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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 };
}
}
};

Expand Down Expand Up @@ -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 });
}
});
Expand Down