-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: persist model time intervals in the backend
- New Django model, `TimeInterval`, representing time intervals for secondary parameters. - Update the combined model serialiser so that it can save `model.time_intervals`. - Update the OpenAPI schema in the backend and frontend. - Update the React app to use the new OpenAPI models.
- Loading branch information
1 parent
8fc81d6
commit 3f21aee
Showing
19 changed files
with
355 additions
and
93 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
import { createContext } from "react"; | ||
import { SimulateResponse } from "../app/backendApi"; | ||
import { TimeInterval, Thresholds } from "../App"; | ||
import { SimulateResponse, TimeIntervalRead } from "../app/backendApi"; | ||
import { Thresholds } from "../App"; | ||
|
||
export const SimulationContext = createContext({ | ||
simulations: [] as SimulateResponse[], | ||
setSimulations: (simulations: SimulateResponse[]) => {}, | ||
intervals: [] as TimeInterval[], | ||
setIntervals: (intervals: TimeInterval[]) => {}, | ||
thresholds: {} as Thresholds, | ||
setThresholds: (thresholds: Thresholds) => {}, | ||
}); |
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
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.