CF2-8: Hotfix. Исправлен IP сервера для подключения

This commit is contained in:
KharchenkoVV 2021-06-04 10:13:40 +05:00
parent df0a8b4003
commit 590a00ef8f
3 changed files with 22 additions and 5 deletions

View File

@ -32,7 +32,7 @@
"react_test": "react-scripts test",
"eject": "react-scripts eject"
},
"proxy": "http://0.0.0.0:5000",
"proxy": "http://192.168.1.70:5000",
"eslintConfig": {
"extends": [
"react-app",

View File

@ -111,7 +111,24 @@ export default function Report(props) {
try {
let approxPagesResponse = await ReportService.getReportSize(wellId, step, format, begin, end)
setPagesCount(approxPagesResponse)
} catch(error) {
notify(`Не удалось получить предварительный размер отчета c
${rangeDate[0].format("DD.MM.YYYY hh:mm:ss")} по
${rangeDate[1].format("DD.MM.YYYY hh:mm:ss")}`, 'error')
console.error(error)
} finally {
setLoader(false)
}
}
getRepostSizeAsync()
},[rangeDate, step, format])
useEffect(()=>{
async function getSuitableReportsAsync() {
let begin = rangeDate[0].toISOString()
let end = rangeDate[1].toISOString()
try {
setLoader(true)
let suitableReportsResponse = await ReportService.getSuitableReportsNames(wellId, step, format, begin, end)
let suitableReports = suitableReportsResponse.map(value => {
@ -127,7 +144,7 @@ export default function Report(props) {
})
setSuitableReports(suitableReports)
} catch(error) {
notify(`Не удалось загрузить данные по скважине (${wellId}) c
notify(`Не удалось получить подходящие по параметрам отчеты c
${rangeDate[0].format("DD.MM.YYYY hh:mm:ss")} по
${rangeDate[1].format("DD.MM.YYYY hh:mm:ss")}`, 'error')
console.error(error)
@ -136,7 +153,7 @@ export default function Report(props) {
}
}
getRepostSizeAsync()
getSuitableReportsAsync()
},[rangeDate, step, format])
useEffect(()=>{

View File

@ -14,12 +14,12 @@ type ConnectionsDict = {
const Connections: ConnectionsDict = {
'hubs/telemetry': new HubConnectionBuilder()
.withUrl(`http://localhost:5000/hubs/telemetry`, ConnectionOptions)
.withUrl(`http://192.168.1.70:5000/hubs/telemetry`, ConnectionOptions)
.withAutomaticReconnect()
.build(),
'hubs/reports': new HubConnectionBuilder()
.withUrl(`http://localhost:5000/hubs/reports`, ConnectionOptions)
.withUrl(`http://192.168.1.70:5000/hubs/reports`, ConnectionOptions)
.withAutomaticReconnect()
.build()
}