-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(web): merge the master branch into
storage-typescript
(#1579)
Let's merge `master` into the `storage-typescript` branch to avoid potential conflicts.
- Loading branch information
Showing
23 changed files
with
847 additions
and
639 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
------------------------------------------------------------------- | ||
Wed Sep 4 21:00:34 UTC 2024 - Knut Anderssen <[email protected]> | ||
|
||
- Bring back DASD management support (gh#openSUSE/agama#1549). | ||
|
||
------------------------------------------------------------------- | ||
Tue Aug 13 14:57:21 UTC 2024 - David Diaz <[email protected]> | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
/* | ||
* Copyright (c) [2024] SUSE LLC | ||
* | ||
* All Rights Reserved. | ||
* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of version 2 of the GNU General Public License as published | ||
* by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, but WITHOUT | ||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
* more details. | ||
* | ||
* You should have received a copy of the GNU General Public License along | ||
* with this program; if not, contact SUSE LLC. | ||
* | ||
* To contact SUSE LLC about this file by physical or electronic mail, you may | ||
* find current contact information at www.suse.com. | ||
*/ | ||
|
||
import { post, get, put } from "~/api/http"; | ||
import { DASDDevice } from "~/types/dasd"; | ||
|
||
/** | ||
* Returns the list of DASD devices | ||
*/ | ||
const fetchDASDDevices = (): Promise<DASDDevice[]> => get("/api/storage/dasd/devices"); | ||
|
||
/** | ||
* Returns if DASD is supported at all | ||
*/ | ||
const DASDSupported = (): Promise<boolean> => get("/api/storage/dasd/supported"); | ||
|
||
/** | ||
* probes DASD devices | ||
*/ | ||
const probeDASD = () => post("/api/storage/dasd/probe"); | ||
|
||
/** | ||
* Start format job for given list of DASD devices | ||
* @param devicesIDs - array of DASD device ids | ||
* @return id of format job | ||
*/ | ||
const formatDASD = (devicesIDs: string[]): Promise<string> => | ||
post("/api/storage/dasd/format", { devices: devicesIDs }).then(({ data }) => data); | ||
|
||
/** | ||
* Enable given list of DASD devices | ||
* | ||
* @param devicesIDs - array of DASD device ids | ||
*/ | ||
const enableDASD = (devicesIDs: string[]) => | ||
post("/api/storage/dasd/enable", { devices: devicesIDs }); | ||
|
||
/** | ||
* Disable given list of DASD devices | ||
* | ||
* @param devicesIDs - array of DASD device ids | ||
*/ | ||
const disableDASD = (devicesIDs: string[]) => | ||
post("/api/storage/dasd/disable", { devices: devicesIDs }); | ||
|
||
/** | ||
* Enables diag on given list of DASD devices | ||
* | ||
* @param devicesIDs - array of DASD device ids | ||
*/ | ||
const enableDiag = (devicesIDs: string[]) => | ||
put("/api/storage/dasd/diag", { devices: devicesIDs, diag: true }); | ||
|
||
/** | ||
* Disables diag on given list of DASD devices | ||
* | ||
* @param devicesIDs - array of DASD device ids | ||
*/ | ||
const disableDiag = (devicesIDs: string[]) => | ||
put("/api/storage/dasd/diag", { devices: devicesIDs, diag: false }); | ||
|
||
export { | ||
fetchDASDDevices, | ||
DASDSupported, | ||
formatDASD, | ||
probeDASD, | ||
enableDASD, | ||
disableDASD, | ||
enableDiag, | ||
disableDiag, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.