Browse Source

监测项全选

dev
wenlele 2 years ago
parent
commit
e889e8f4f6
  1. 4
      api/app/lib/controllers/auth/index.js
  2. 4
      web/client/src/sections/facility/containers/monitor.jsx
  3. 5
      web/client/src/sections/service/components/pushModal.jsx

4
api/app/lib/controllers/auth/index.js

@ -88,8 +88,8 @@ async function login (ctx, next) {
// await transaction.commit();
} catch (error) {
// await transaction.rollback();
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`);
ctx.status = 400;
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`)
ctx.status = 400
let message = typeof error == 'string' ? error
: error.response.body.message || "登录失败"
if (message == '账号或密码错误') {

4
web/client/src/sections/facility/containers/monitor.jsx

@ -28,14 +28,14 @@ const Server = (props) => {
backgroundRepeat: 'no-repeat',
}}>
<a target='_blank' href={pomsMonitor}
style={{width:'100%',height:'100%',display: 'block'}}
style={{ width: '100%', height: '100%', display: 'block' }}
> 进入Grafana</a>
</div>
<div style={{ width: 679, height: 40, fontSize: 28, fontWeight: 400, color: '#146AD7', lineHeight: '40px', marginTop: 40 }}>
点击可跳转服务器监控网站Grafana</div>
</div>
{/* <iframe frameBorder="0" src={pomsMonitor} style={{height: 'calc(100vh - 80px)', width: 'calc(100%)'}} /> */}
</div>
{/* <iframe frameBorder="0" src={pomsMonitor} style={{height: 'calc(100vh - 80px)', width: 'calc(100%)'}} /> */}
</>
)
}

5
web/client/src/sections/service/components/pushModal.jsx

@ -331,17 +331,18 @@ function pushModal (props) {
u.factor?.map(v => {
v.item.map(vv => factorItem.push(vv.name))
})
factorItem = [...new Set(factorItem)]
return <Form.CheckboxGroup
label={u.name + ':'}
key={u.name + index}
field={'factor' + u.id}
style={{ width: 695 }}
initValue={editObj?.pomsStrucFactorId ? editObj?.pomsStrucFactorId[u.id] : []}
initValue={editObj?.pomsStrucFactorId ? editObj?.pomsStrucFactorId[u.id] : (factorItem || [])}
direction='horizontal'
showClear
>
{
[...new Set(factorItem)].map((v, index) =>
factorItem?.map((v, index) =>
<Form.Checkbox value={v} key={v} style={{ width: 150 }}>{v}</Form.Checkbox>)
}
</Form.CheckboxGroup>

Loading…
Cancel
Save