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(); // await transaction.commit();
} catch (error) { } catch (error) {
// await transaction.rollback(); // await transaction.rollback();
ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`); ctx.fs.logger.error(`path: ${ctx.path}, error: ${error}`)
ctx.status = 400; ctx.status = 400
let message = typeof error == 'string' ? error let message = typeof error == 'string' ? error
: error.response.body.message || "登录失败" : error.response.body.message || "登录失败"
if (message == '账号或密码错误') { if (message == '账号或密码错误') {

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

@ -28,14 +28,14 @@ const Server = (props) => {
backgroundRepeat: 'no-repeat', backgroundRepeat: 'no-repeat',
}}> }}>
<a target='_blank' href={pomsMonitor} <a target='_blank' href={pomsMonitor}
style={{width:'100%',height:'100%',display: 'block'}} style={{ width: '100%', height: '100%', display: 'block' }}
> 进入Grafana</a> > 进入Grafana</a>
</div> </div>
<div style={{ width: 679, height: 40, fontSize: 28, fontWeight: 400, color: '#146AD7', lineHeight: '40px', marginTop: 40 }}> <div style={{ width: 679, height: 40, fontSize: 28, fontWeight: 400, color: '#146AD7', lineHeight: '40px', marginTop: 40 }}>
点击可跳转服务器监控网站Grafana</div> 点击可跳转服务器监控网站Grafana</div>
</div> </div>
{/* <iframe frameBorder="0" src={pomsMonitor} style={{height: 'calc(100vh - 80px)', width: 'calc(100%)'}} /> */}
</div> </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 => { u.factor?.map(v => {
v.item.map(vv => factorItem.push(vv.name)) v.item.map(vv => factorItem.push(vv.name))
}) })
factorItem = [...new Set(factorItem)]
return <Form.CheckboxGroup return <Form.CheckboxGroup
label={u.name + ':'} label={u.name + ':'}
key={u.name + index} key={u.name + index}
field={'factor' + u.id} field={'factor' + u.id}
style={{ width: 695 }} style={{ width: 695 }}
initValue={editObj?.pomsStrucFactorId ? editObj?.pomsStrucFactorId[u.id] : []} initValue={editObj?.pomsStrucFactorId ? editObj?.pomsStrucFactorId[u.id] : (factorItem || [])}
direction='horizontal' direction='horizontal'
showClear showClear
> >
{ {
[...new Set(factorItem)].map((v, index) => factorItem?.map((v, index) =>
<Form.Checkbox value={v} key={v} style={{ width: 150 }}>{v}</Form.Checkbox>) <Form.Checkbox value={v} key={v} style={{ width: 150 }}>{v}</Form.Checkbox>)
} }
</Form.CheckboxGroup> </Form.CheckboxGroup>

Loading…
Cancel
Save