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) => {
|
_handle = (data, el) => {
|
||||||
const length = data.length;
|
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"/>)
|
if (length !== 0) data.push(<Divider key={length} type="vertical"/>)
|
||||||
data.push(el)
|
data.push(el)
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ export default function () {
|
||||||
const data = {};
|
const data = {};
|
||||||
http.get('/api/monitor/')
|
http.get('/api/monitor/')
|
||||||
.then(res => {
|
.then(res => {
|
||||||
for (let item of res) {
|
for (let item of res.detections) {
|
||||||
if (!data[item.type]) {
|
if (!data[item.type]) {
|
||||||
data[item.type] = {value: item.type_alias, label: item.type_alias, children: []}
|
data[item.type] = {value: item.type_alias, label: item.type_alias, children: []}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue