mirror of https://github.com/openspug/spug
parent
96ac87a858
commit
21c284bbb5
|
@ -12,7 +12,6 @@ import http from 'libs/http';
|
||||||
import store from './store';
|
import store from './store';
|
||||||
import hostStore from '../host/store';
|
import hostStore from '../host/store';
|
||||||
import lds from 'lodash';
|
import lds from 'lodash';
|
||||||
import moment from "moment";
|
|
||||||
import groupStore from "pages/alarm/group/store";
|
import groupStore from "pages/alarm/group/store";
|
||||||
|
|
||||||
@observer
|
@observer
|
||||||
|
|
|
@ -22,7 +22,8 @@ class Store {
|
||||||
.then(res => {
|
.then(res => {
|
||||||
res.map(item => {
|
res.map(item => {
|
||||||
const value = item['latest_run_time'];
|
const value = item['latest_run_time'];
|
||||||
item['latest_run_time'] = value ? moment(value).fromNow() : null
|
item['latest_run_time'] = value ? moment(value).fromNow() : null;
|
||||||
|
return null
|
||||||
});
|
});
|
||||||
this.records = res
|
this.records = res
|
||||||
})
|
})
|
||||||
|
|
|
@ -11,7 +11,6 @@ import http from 'libs/http';
|
||||||
import store from './store';
|
import store from './store';
|
||||||
import { LinkButton } from "components";
|
import { LinkButton } from "components";
|
||||||
import Info from './Info';
|
import Info from './Info';
|
||||||
import moment from "moment";
|
|
||||||
|
|
||||||
@observer
|
@observer
|
||||||
class ComTable extends React.Component {
|
class ComTable extends React.Component {
|
||||||
|
|
|
@ -26,7 +26,8 @@ class Store {
|
||||||
.then(({types, tasks}) => {
|
.then(({types, tasks}) => {
|
||||||
tasks.map(item => {
|
tasks.map(item => {
|
||||||
const value = item['latest_run_time'];
|
const value = item['latest_run_time'];
|
||||||
item['latest_run_time'] = value ? moment(value).fromNow() : null
|
item['latest_run_time'] = value ? moment(value).fromNow() : null;
|
||||||
|
return null
|
||||||
});
|
});
|
||||||
this.records = tasks;
|
this.records = tasks;
|
||||||
this.types = types
|
this.types = types
|
||||||
|
|
Loading…
Reference in New Issue