forked from ddrilling/asb_cloud_front
CF2-8: Hotfix. Исправлен IP сервера для подключения
This commit is contained in:
parent
df0a8b4003
commit
590a00ef8f
@ -32,7 +32,7 @@
|
|||||||
"react_test": "react-scripts test",
|
"react_test": "react-scripts test",
|
||||||
"eject": "react-scripts eject"
|
"eject": "react-scripts eject"
|
||||||
},
|
},
|
||||||
"proxy": "http://0.0.0.0:5000",
|
"proxy": "http://192.168.1.70:5000",
|
||||||
"eslintConfig": {
|
"eslintConfig": {
|
||||||
"extends": [
|
"extends": [
|
||||||
"react-app",
|
"react-app",
|
||||||
|
@ -111,7 +111,24 @@ export default function Report(props) {
|
|||||||
try {
|
try {
|
||||||
let approxPagesResponse = await ReportService.getReportSize(wellId, step, format, begin, end)
|
let approxPagesResponse = await ReportService.getReportSize(wellId, step, format, begin, end)
|
||||||
setPagesCount(approxPagesResponse)
|
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)
|
setLoader(true)
|
||||||
let suitableReportsResponse = await ReportService.getSuitableReportsNames(wellId, step, format, begin, end)
|
let suitableReportsResponse = await ReportService.getSuitableReportsNames(wellId, step, format, begin, end)
|
||||||
let suitableReports = suitableReportsResponse.map(value => {
|
let suitableReports = suitableReportsResponse.map(value => {
|
||||||
@ -127,7 +144,7 @@ export default function Report(props) {
|
|||||||
})
|
})
|
||||||
setSuitableReports(suitableReports)
|
setSuitableReports(suitableReports)
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
notify(`Не удалось загрузить данные по скважине (${wellId}) c
|
notify(`Не удалось получить подходящие по параметрам отчеты c
|
||||||
${rangeDate[0].format("DD.MM.YYYY hh:mm:ss")} по
|
${rangeDate[0].format("DD.MM.YYYY hh:mm:ss")} по
|
||||||
${rangeDate[1].format("DD.MM.YYYY hh:mm:ss")}`, 'error')
|
${rangeDate[1].format("DD.MM.YYYY hh:mm:ss")}`, 'error')
|
||||||
console.error(error)
|
console.error(error)
|
||||||
@ -136,7 +153,7 @@ export default function Report(props) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getRepostSizeAsync()
|
getSuitableReportsAsync()
|
||||||
},[rangeDate, step, format])
|
},[rangeDate, step, format])
|
||||||
|
|
||||||
useEffect(()=>{
|
useEffect(()=>{
|
||||||
|
@ -14,12 +14,12 @@ type ConnectionsDict = {
|
|||||||
|
|
||||||
const Connections: ConnectionsDict = {
|
const Connections: ConnectionsDict = {
|
||||||
'hubs/telemetry': new HubConnectionBuilder()
|
'hubs/telemetry': new HubConnectionBuilder()
|
||||||
.withUrl(`http://localhost:5000/hubs/telemetry`, ConnectionOptions)
|
.withUrl(`http://192.168.1.70:5000/hubs/telemetry`, ConnectionOptions)
|
||||||
.withAutomaticReconnect()
|
.withAutomaticReconnect()
|
||||||
.build(),
|
.build(),
|
||||||
|
|
||||||
'hubs/reports': new HubConnectionBuilder()
|
'hubs/reports': new HubConnectionBuilder()
|
||||||
.withUrl(`http://localhost:5000/hubs/reports`, ConnectionOptions)
|
.withUrl(`http://192.168.1.70:5000/hubs/reports`, ConnectionOptions)
|
||||||
.withAutomaticReconnect()
|
.withAutomaticReconnect()
|
||||||
.build()
|
.build()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user