-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: adding functionality to upload ini File * feat: ini file * chore: moved files
- Loading branch information
Showing
40 changed files
with
424 additions
and
99 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import axios from 'axios'; | ||
import { OpenAPI } from '../generated'; | ||
import type { UploadIniFileCommandResponse } from '../generated/models/UploadIniFileCommandResponse'; | ||
|
||
export const postIniFile = async ( | ||
modelId: string, | ||
formData: FormData, | ||
): Promise<UploadIniFileCommandResponse> => { | ||
const token = OpenAPI.TOKEN; // replace with your bearer token | ||
const base = OpenAPI.BASE; | ||
|
||
const response = await axios.post( | ||
`/api/uploads/models/${modelId}/ini-file`, | ||
formData, | ||
{ | ||
headers: { | ||
Authorization: `Bearer ${token}`, | ||
'Content-Type': 'multipart/form-data', | ||
}, | ||
baseURL: base, | ||
}, | ||
); | ||
|
||
// create an object URL for the image blob and return it | ||
return response; | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* generated using openapi-typescript-codegen -- do no edit */ | ||
/* istanbul ignore file */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
|
||
import type { ConfigurationParameterDto } from './ConfigurationParameterDto'; | ||
|
||
export type AnalogueModelConfigurationDto = { | ||
analogueModelConfigurationId?: string; | ||
analogueModelId?: string; | ||
template?: ConfigurationParameterDto; | ||
simStopTime?: ConfigurationParameterDto; | ||
outputInterval?: ConfigurationParameterDto; | ||
basinSlope?: ConfigurationParameterDto; | ||
channelWidth?: ConfigurationParameterDto; | ||
riverLength?: ConfigurationParameterDto; | ||
riverDischargeIni?: ConfigurationParameterDto; | ||
riverDischargeFin?: ConfigurationParameterDto; | ||
tidalAmplitude?: ConfigurationParameterDto; | ||
waveHeightIni?: ConfigurationParameterDto; | ||
waveHeightFin?: ConfigurationParameterDto; | ||
waveDirection?: ConfigurationParameterDto; | ||
subsidenceLand?: ConfigurationParameterDto; | ||
subsidenceSea?: ConfigurationParameterDto; | ||
composition?: ConfigurationParameterDto; | ||
}; | ||
|
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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* generated using openapi-typescript-codegen -- do no edit */ | ||
/* istanbul ignore file */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
|
||
export type ConfigurationParameterDto = { | ||
name?: string | null; | ||
value?: string | null; | ||
description?: string | null; | ||
}; | ||
|
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* generated using openapi-typescript-codegen -- do no edit */ | ||
/* istanbul ignore file */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
|
||
import type { UploadIniFileDto } from './UploadIniFileDto'; | ||
|
||
export type UploadIniFileCommandResponse = { | ||
success?: boolean; | ||
count?: number | null; | ||
message?: string | null; | ||
validationErrors?: Array<string> | null; | ||
data: UploadIniFileDto; | ||
}; | ||
|
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,17 @@ | ||
/* generated using openapi-typescript-codegen -- do no edit */ | ||
/* istanbul ignore file */ | ||
/* tslint:disable */ | ||
/* eslint-disable */ | ||
|
||
import type { UploadFileCategory } from './UploadFileCategory'; | ||
import type { UploadFileType } from './UploadFileType'; | ||
import type { UploadStatus } from './UploadStatus'; | ||
|
||
export type UploadIniFileDto = { | ||
uploadId: string; | ||
originalFileName: string; | ||
uploadStatus: UploadStatus; | ||
uploadFileType: UploadFileType; | ||
uploadFileCategory: UploadFileCategory; | ||
}; | ||
|
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
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/components/ErrorMessage/ErrorMessage.tsx → ...Coordinates/ErrorMessage/ErrorMessage.tsx
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
4 changes: 2 additions & 2 deletions
4
...ageView/AnalogueModelImageView.styled.tsx → ...ageView/AnalogueModelImageView.styled.tsx
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
4 changes: 2 additions & 2 deletions
4
...ents/ImageView/AnalogueModelImageView.tsx → ...ates/ImageView/AnalogueModelImageView.tsx
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
4 changes: 2 additions & 2 deletions
4
...iew/ModelImageCanvas/ModelImageCanvas.tsx → ...iew/ModelImageCanvas/ModelImageCanvas.tsx
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
Oops, something went wrong.