diff --git a/src/api.js b/src/api.js index 4e24d4ddb..ab829b951 100644 --- a/src/api.js +++ b/src/api.js @@ -197,18 +197,18 @@ export function deleteImage(image) { } export function createSource(source) { - return post("/api/v0/projects/source/new", source); + return post("/api/v1/projects/source/new", source); } export function getAllSources() { - return get("/api/v0/projects/source/info/*").then( + return get("/api/v1/projects/source/info/*").then( (response) => response.sources ); } export function deleteSource(sourceName) { return _delete( - `/api/v0/projects/source/delete/${encodeURIComponent(sourceName)}` + `/api/v1/projects/source/delete/${encodeURIComponent(sourceName)}` ); } diff --git a/src/components/Modal/SourceCardModal.js b/src/components/Modal/SourceCardModal.js index af40919e7..05de08898 100644 --- a/src/components/Modal/SourceCardModal.js +++ b/src/components/Modal/SourceCardModal.js @@ -83,6 +83,22 @@ export const SourceCardModal = (props) => { const schema = { fields: [ + { + component: "text-field", + label: intl.formatMessage({ + defaultMessage: "ID", + }), + isRequired: true, + name: "id", + validate: [ + { + type: validatorTypes.REQUIRED, + }, + { + type: "custom", + }, + ], + }, { component: "text-field", label: intl.formatMessage({ @@ -189,7 +205,7 @@ export const SourceCardModal = (props) => { - {props.source?.name} + {props.source?.id} {props.isEditable && ( @@ -203,6 +219,12 @@ export const SourceCardModal = (props) => { + + Name + + {props.source?.name} + + Type diff --git a/translations/en.json b/translations/en.json index 2f4ba049d..6bb8f9f55 100644 --- a/translations/en.json +++ b/translations/en.json @@ -194,6 +194,7 @@ "q4qEK9": "OSBuild Composer is not started", "q5lNfF": "Alternatively, you may manually configure the file system of your image by adding, removing, and editing partitions.", "q96L4B": "DIUN Public Key Insecure", + "qlcuNQ": "ID", "r1lzNw": "Add ignition", "r6XTzy": "Stop image build", "rEQ/Rp": "Datastore",