Skip to content

Commit

Permalink
Try to not crash in auto... with storage section
Browse files Browse the repository at this point in the history
The UI is not ready for the new storage configuration loaded from the
profile. As the problem is reported just for AutoYaST and the
installation finished page we are trying to fix only there until the
new storage features PR is merged.
  • Loading branch information
teclator committed Nov 29, 2024
1 parent f85440d commit 593e521
Show file tree
Hide file tree
Showing 5 changed files with 413 additions and 9 deletions.
6 changes: 5 additions & 1 deletion web/src/api/storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import { get, post } from "~/api/http";
import { Job } from "~/types/job";
import { calculate, fetchSettings } from "~/api/storage/proposal";
import { config } from "~/api/storage/types";

/**
* Starts the storage probing process.
Expand All @@ -33,6 +34,9 @@ const probe = (): Promise<any> => post("/api/storage/probe");

export { probe };

const fetchConfig = (): Promise<config.Config | undefined> =>
get("/api/storage/config").then((config) => config.storage);

/**
* Returns the list of jobs
*/
Expand All @@ -57,4 +61,4 @@ const refresh = async (): Promise<void> => {
await calculate(settings);
};

export { fetchStorageJobs, findStorageJob, refresh };
export { fetchConfig, fetchStorageJobs, findStorageJob, refresh };
4 changes: 4 additions & 0 deletions web/src/api/storage/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -436,3 +436,7 @@ export type SetProposalSettingsResponse = boolean;
export type UsableDevicesResponse = Array<DeviceSid>;

export type PingResponse2 = PingResponse;

import * as config from "./types/config";

export { config };
Loading

0 comments on commit 593e521

Please sign in to comment.