|
|
|
@ -3,6 +3,8 @@ from typing import Dict, List, Optional
|
|
|
|
from fastapi import APIRouter, HTTPException, status
|
|
|
|
from fastapi import APIRouter, HTTPException, status
|
|
|
|
from fastapi.params import Query
|
|
|
|
from fastapi.params import Query
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from src.auth.service import Token
|
|
|
|
|
|
|
|
from src.calculation_target_reliability.service import get_simulation_results
|
|
|
|
from src.database.core import DbSession
|
|
|
|
from src.database.core import DbSession
|
|
|
|
from src.models import StandardResponse
|
|
|
|
from src.models import StandardResponse
|
|
|
|
|
|
|
|
|
|
|
|
@ -14,10 +16,17 @@ router = APIRouter()
|
|
|
|
@router.get("/{session_id}", response_model=StandardResponse[Dict])
|
|
|
|
@router.get("/{session_id}", response_model=StandardResponse[Dict])
|
|
|
|
async def get_target_reliability(
|
|
|
|
async def get_target_reliability(
|
|
|
|
db_session: DbSession,
|
|
|
|
db_session: DbSession,
|
|
|
|
|
|
|
|
token: Token,
|
|
|
|
session_id: str,
|
|
|
|
session_id: str,
|
|
|
|
cost_threshold: float = Query(100),
|
|
|
|
cost_threshold: float = Query(100),
|
|
|
|
):
|
|
|
|
):
|
|
|
|
"""Get all scope pagination."""
|
|
|
|
"""Get all scope pagination."""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
results = await get_simulation_results(
|
|
|
|
|
|
|
|
simulation_id="083a0936-37f8-4fe4-844e-a9002dd26d61",
|
|
|
|
|
|
|
|
token=token
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
results, consequesce = await get_all_budget_constrains(
|
|
|
|
results, consequesce = await get_all_budget_constrains(
|
|
|
|
db_session=db_session, session_id=session_id, cost_threshold=cost_threshold
|
|
|
|
db_session=db_session, session_id=session_id, cost_threshold=cost_threshold
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|