feat(micro/acid): 酸轧新增「模型」tab,对接六机架轧制模型服务
- 新增/mill-api代理(dev+nginx),指向klp-ml-mill FastAPI服务 - Model.vue:当前卷/下一卷,L2实测 vs 我们模型预测,逐机架对照 - 鉴权Key通过VUE_APP_MILL_API_KEY环境变量注入,不写死在源码里
This commit is contained in:
26
klp-ui/src/api/l2/mill.js
Normal file
26
klp-ui/src/api/l2/mill.js
Normal file
@@ -0,0 +1,26 @@
|
||||
import request from '@/utils/millRequest'
|
||||
|
||||
// 当前卷 + 下一卷:L2真实数据 与 我们模型预测数据,四组一起返回
|
||||
export function getLatestMillData() {
|
||||
return request({
|
||||
url: '/latest',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 单次预测(静态/序贯两种模式,见klp-ml-mill/api.py PredictRequest)
|
||||
export function predictMill(data) {
|
||||
return request({
|
||||
url: '/predict',
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
|
||||
// 服务健康检查 + 数据库摘要
|
||||
export function getMillHealth() {
|
||||
return request({
|
||||
url: '/health',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user