Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
8f7cfdb
Extract schema of DASD config
joseivanlopez Feb 11, 2026
3e38491
Add model and hooks for DASD
joseivanlopez Feb 11, 2026
e09f2b9
Merge branch 'master' into dasd-ui-api-v2
dgdavid Feb 14, 2026
04730e7
fix(web): please linter
dgdavid Feb 14, 2026
cbb7525
fix(web): fix and test model/config/dassd
dgdavid Feb 14, 2026
de7ce9f
fix(web): remove dead code and begin adapting existing UI
dgdavid Feb 14, 2026
24a522b
refactor(web): add tests for hooks/model/config/dasd
dgdavid Feb 15, 2026
e7a23a5
fix(web): please linter and add more tests and doc
dgdavid Feb 15, 2026
f20d62e
web: add test and doc for dasd#useSystem hook
dgdavid Feb 15, 2026
b4fc457
feat(web): add util for merging two collections
dgdavid Feb 18, 2026
aead77c
Merge branch 'master' into dasd-ui-api-v2
dgdavid Feb 18, 2026
a1ff7fb
refactor(web): return unmatched items from extendCollection
dgdavid Feb 18, 2026
66d88a6
refactor(web): simplify SelectableDataTable empty state rendering
dgdavid Feb 19, 2026
1893018
fix(web): add missing guard in SelectableDataTable
dgdavid Feb 19, 2026
f0fcc9d
web: add textStyle prop to Text component
dgdavid Feb 23, 2026
71faf42
web: start adapting storage DASD page
dgdavid Feb 23, 2026
13b3089
Merge branch 'master' into dasd-ui-api-v2
dgdavid Feb 23, 2026
cb03a7f
feat(web): add utility function for translating object entries
dgdavid Feb 24, 2026
105a6d2
feat(web): replace FormatFilter and StatusFilter with SimpleSelector
dgdavid Feb 24, 2026
fbccfcc
fix(web): uses channel instead of id
dgdavid Feb 24, 2026
996c18e
feat(dasd): adapt DASDTable to config API v2
dgdavid Feb 24, 2026
7910c55
fix(web): drop mokcing data
dgdavid Feb 24, 2026
68e3cdf
feat(web): add missing files
dgdavid Feb 24, 2026
3ee6281
Merge branch 'master' into dasd-ui-api-v2
dgdavid Feb 25, 2026
b8a72f0
fix(web): drop finally not used code
dgdavid Feb 25, 2026
ef92cd8
fix(web): drop dead code related to former DASD jobs
dgdavid Feb 25, 2026
a8f3155
Fix CI schema validation
dgdavid Feb 25, 2026
b20e400
feat(web): subscribe DASDPage to its progress
dgdavid Feb 25, 2026
9e2297d
fix(web): drop more Jobs dead code
dgdavid Feb 25, 2026
2b34520
Fix dasd schema
dgdavid Feb 25, 2026
ce81e48
Fix dasd schema
joseivanlopez Feb 25, 2026
8ca7ec9
Do not report partition info of disconnected DASD
joseivanlopez Feb 25, 2026
1f28a50
Allow activating DASD after failing diag activation
joseivanlopez Feb 25, 2026
a75a7e0
Enable button to configure DASD
joseivanlopez Feb 25, 2026
28fcd91
Add missing DASD status
joseivanlopez Feb 25, 2026
bb53732
Fix DASD configuration
joseivanlopez Feb 25, 2026
b83d94b
fix(web): enhance actions behavior
dgdavid Feb 25, 2026
a6f3542
web: fix small detail found during self review
dgdavid Feb 25, 2026
a954be1
Fix bulk selection
joseivanlopez Feb 26, 2026
699f47a
Fix DASD link in the empty state
joseivanlopez Feb 26, 2026
994b1aa
Fix tests
joseivanlopez Feb 26, 2026
687d9d5
Ensure issues is refetched
joseivanlopez Feb 26, 2026
635a5b0
Avoid rendering device editor if there is no device
joseivanlopez Feb 26, 2026
4a56d68
Do not use old progress
joseivanlopez Feb 26, 2026
846c64f
refactor(web): revert hiding per-row actions on selection
dgdavid Feb 26, 2026
6d2584d
fix(web): improve bulk toolbar announcements for screen reader users
dgdavid Feb 26, 2026
70b0bd7
feat(web): add and use SimpleDropdown
dgdavid Feb 26, 2026
9bfe4e1
fix(web): drop fixmes and return null insteaed of undefined
dgdavid Feb 26, 2026
9d0bf37
Merge branch 'master' into dasd-ui-api-v2
dgdavid Feb 26, 2026
d4201f5
fix(web): drop passive voice
dgdavid Feb 26, 2026
af83e3a
doc: update changes files
dgdavid Feb 26, 2026
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
1 change: 1 addition & 0 deletions rust/agama-lib/share/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ The Agama autoinstallation profile JSON schema is defined in these files:
- [profile.schema.json](./profile.schema.json) (the main definition)
- [storage.schema.json](./storage.schema.json) (referenced from the main definition)
- [iscsi.schema.json](./iscsi.schema.json) (referenced from the main definition)
- [dasd.schema.json](./dasd.schema.json) (referenced from the main definition)

## Agama REST API

Expand Down
41 changes: 41 additions & 0 deletions rust/agama-lib/share/dasd.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://github.com/agama-project/agama/blob/master/rust/agama-lib/share/dasd.schema.json",
"title": "Config",
"description": "DASD config.",
"type": "object",
"additionalProperties": false,
"properties": {
"devices": {
"description": "List of DASD devices.",
"type": "array",
"items": { "$ref": "#/$defs/device" }
}
},
"$defs": {
"device": {
"type": "object",
"additionalProperties": false,
"required": ["channel"],
"properties": {
"channel": {
"description": "DASD device channel.",
"type": "string"
},
"state": {
"description": "Specify target state of device. Either activate it or deactivate it.",
"enum": ["active", "offline"],
"default": "active"
},
"format": {
"description": "If device should be formatted. If not specified then it format device only if not already formatted.",
"type": "boolean"
},
"diag": {
"description": "If device have set diag flag. If not specified then it keep what device has before.",
"type": "boolean"
}
}
}
}
}
2 changes: 1 addition & 1 deletion rust/agama-lib/share/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"scripts": {
"validate": "ajv compile --spec=draft2019 --verbose --all-errors -r storage.schema.json -r iscsi.schema.json -r software.schema.json -s profile.schema.json && ajv compile --spec=draft2019 --verbose --all-errors -s storage.model.schema.json"
"validate": "ajv compile --spec=draft2019 --verbose --all-errors -r storage.schema.json -r iscsi.schema.json -r dasd.schema.json -r software.schema.json -s profile.schema.json && ajv compile --spec=draft2019 --verbose --all-errors -s storage.model.schema.json"
},
"dependencies": {
"ajv-cli": "^5.0.0"
Expand Down
35 changes: 1 addition & 34 deletions rust/agama-lib/share/profile.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,40 +98,7 @@
}
]
},
"dasd": {
"title": "DASD device activation (s390x only)",
"type": "object",
"properties": {
"devices": {
"title": "List of DASD devices",
"type": "array",
"items": {
"type": "object",
"properties": {
"channel": {
"title": "DASD device channel",
"type": "string"
},
"state": {
"title": "Specify target state of device. Either activate it or deactivate it.",
"type": "string",
"enum": ["active", "offline"],
"default": "active"
},
"format": {
"title": "If device should be formatted. If not specified then it format device only if not already formatted.",
"type": "boolean"
},
"diag": {
"title": "If device have set diag flag. If not specified then it keep what device has before.",
"type": "boolean"
}
},
"required": ["channel"]
}
}
}
},
"dasd": { "$ref": "dasd.schema.json" },
"zfcp": {
"title": "zFCP device activation (s390x only)",
"type": "object",
Expand Down
5 changes: 5 additions & 0 deletions rust/package/agama.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu Feb 26 16:44:32 UTC 2026 - David Diaz <dgonzalez@suse.com>

- Add schema for DASD config (gh#agama-project/agama#3143).

-------------------------------------------------------------------
Wed Feb 25 08:13:55 UTC 2026 - Josef Reidinger <jreidinger@suse.com>

Expand Down
1 change: 1 addition & 0 deletions rust/package/agama.spec
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,7 @@ echo $PATH
%dir %{_datadir}/agama/jsonnet
%{_datadir}/agama/jsonnet/agama.libsonnet
%dir %{_datadir}/agama/schema
%{_datadir}/agama/schema/dasd.schema.json
%{_datadir}/agama/schema/iscsi.schema.json
%{_datadir}/agama/schema/profile.schema.json
%{_datadir}/agama/schema/software.schema.json
Expand Down
2 changes: 1 addition & 1 deletion rust/share/system.dasd.schema.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$id": "https://github.com/openSUSE/agama/blob/master/rust/share/system.storage.schema.json",
"$id": "https://github.com/openSUSE/agama/blob/master/rust/share/system.dasd.schema.json",
"title": "System",
"description": "API description of the DASD system",
"type": "object",
Expand Down
2 changes: 1 addition & 1 deletion service/lib/agama/dbus/storage/dasd.rb
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ def device_json(dasd)
type: manager.device_type(dasd),
diag: dasd.use_diag,
accessType: dasd.access_type || "",
partitionInfo: dasd.partition_info || "",
partitionInfo: dasd.offline? ? "" : dasd.partition_info.to_s,
status: dasd.status.to_s,
active: !dasd.offline?,
formatted: dasd.formatted?
Expand Down
3 changes: 3 additions & 0 deletions service/lib/agama/storage/dasd/enable_operation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ class EnableOperation < SequentialOperation
private

def process_dasd(dasd)
# Reset #diag_wanted, otherwise the device cannot be enabled again if a {DiagOperation}
# for enabling diag failed.
dasd.diag_wanted = dasd.use_diag
# We considered to stop using dasd_configure in favor of directly calling "chzdev -e".
# That would allow us, for example, to enable all the devices with a single command.
# But dasd_configure does a couple of extra things we still find valuable:
Expand Down
6 changes: 6 additions & 0 deletions service/package/rubygem-agama-yast.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Feb 26 16:47:39 UTC 2026 - David Diaz <dgonzalez@suse.com>

- Allow reactivating a DASD if enabling DIAG failed
(gh#agama-project/agama#3143).

-------------------------------------------------------------------
Wed Feb 18 20:28:02 UTC 2026 - Josef Reidinger <jreidinger@suse.com>

Expand Down
6 changes: 6 additions & 0 deletions web/package/agama-web-ui.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Feb 26 16:43:44 UTC 2026 - David Diaz <dgonzalez@suse.com>

- Restore the interface for managing DASD in the web client
(gh#agama-project/agama#3143).

-------------------------------------------------------------------
Fri Feb 20 15:00:44 UTC 2026 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

Expand Down
3 changes: 2 additions & 1 deletion web/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import { Outlet, useLocation } from "react-router";
import { useStatusChanges, useStatus } from "~/hooks/model/status";
import { useSystemChanges } from "~/hooks/model/system";
import { useProposal, useProposalChanges } from "~/hooks/model/proposal";
import { useIssuesChanges } from "~/hooks/model/issue";
import { useIssues, useIssuesChanges } from "~/hooks/model/issue";
import { useProductInfo } from "~/hooks/model/config/product";
import { useQueryClient } from "@tanstack/react-query";
import { InstallationFinished, InstallationProgress } from "./components/core";
Expand All @@ -44,6 +44,7 @@ const Content = () => {
//
// https://tanstack.com/query/latest/docs/framework/react/guides/query-invalidation
useProposal();
useIssues();

const location = useLocation();
const product = useProductInfo();
Expand Down
7 changes: 0 additions & 7 deletions web/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ import type { Status } from "~/model/status";
import type { System } from "~/model/system";
import type { Action, L10nSystemConfig, DiscoverISCSIConfig } from "~/model/action";
import type { AxiosResponse } from "axios";
import type { Job } from "~/types/job";

type Response = Promise<AxiosResponse>;

Expand Down Expand Up @@ -82,11 +81,6 @@ const discoverISCSIAction = (config: DiscoverISCSIConfig) => postAction({ discov

const finishInstallation = () => postAction({ finish: "reboot" });

/**
* @todo Adapt jobs to the new API.
*/
const getStorageJobs = (): Promise<Job[]> => get("/api/storage/jobs");

export {
getStatus,
getConfig,
Expand All @@ -106,7 +100,6 @@ export {
probeStorageAction,
discoverISCSIAction,
finishInstallation,
getStorageJobs,
};

export type { Response };
31 changes: 29 additions & 2 deletions web/src/components/core/SelectableDataTable.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,21 @@ describe("SelectableDataTable", () => {
expect(editFn).toHaveBeenCalled();
});

it("uses itemActionsComponent when provided instead of the default ActionsColumn", async () => {
const CustomActions = ({ label }) => <span>Custom actions: {label}</span>;

plainRender(
<SelectableDataTable
{...props}
itemActions={(d) => [{ title: `Edit ${d.name}`, onClick: jest.fn() }]}
itemActionsLabel={(d) => `Actions for ${d.name}`}
itemActionsComponent={CustomActions}
/>,
);

screen.getByText("Custom actions: Actions for /dev/sda");
});

it("renders a expand toggler in items with children", () => {
plainRender(<SelectableDataTable {...props} />);
const table = screen.getByRole("grid");
Expand Down Expand Up @@ -287,8 +302,20 @@ describe("SelectableDataTable", () => {
expect(sdaChild).not.toBeNull();
});

it.todo("allows selectionMode#none");
it.todo("renders nothing for actions column if actions is an empty collection");
it("allows selectionMode#none", () => {
plainRender(<SelectableDataTable {...props} selectionMode="none" />);
const table = screen.getByRole("grid");
expect(within(table).queryAllByRole("radio")).toEqual([]);
expect(within(table).queryAllByRole("checkbox")).toEqual([]);
});

it.skip("renders nothing for actions column if actions is an empty collection", () => {
// TODO: requires a refactor to correctly hide the actions column header
// when no items have actions. Check TODO note in the component
plainRender(<SelectableDataTable {...props} itemActions={() => []} />);
const table = screen.getByRole("grid");
expect(within(table).queryByRole("columnheader", { name: "Row actions" })).toBeNull();
});

describe("when not providing a custom item equality function", () => {
const onSelectionChange = jest.fn();
Expand Down
Loading
Loading