mirror of https://github.com/openspug/spug
fix bug
parent
7156d1a0da
commit
d076c51c3d
|
@ -23,7 +23,7 @@ class Action extends React.Component {
|
|||
|
||||
_handle = (data, el) => {
|
||||
const length = data.length;
|
||||
if (canVisible(el.props.auth)) {
|
||||
if (el && canVisible(el.props.auth)) {
|
||||
if (length !== 0) data.push(<Divider key={length} type="vertical"/>)
|
||||
data.push(el)
|
||||
}
|
||||
|
|
|
@ -25,7 +25,7 @@ export default function () {
|
|||
const data = {};
|
||||
http.get('/api/monitor/')
|
||||
.then(res => {
|
||||
for (let item of res) {
|
||||
for (let item of res.detections) {
|
||||
if (!data[item.type]) {
|
||||
data[item.type] = {value: item.type_alias, label: item.type_alias, children: []}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue