mirror of
https://git.rwth-aachen.de/acs/public/villas/web/
synced 2025-03-09 00:00:01 +01:00
Fix an issue showing update time of IC in table, backend update required
This commit is contained in:
parent
84ba31bd35
commit
ceadb07485
3 changed files with 12 additions and 5 deletions
5
package-lock.json
generated
5
package-lock.json
generated
|
@ -8870,6 +8870,11 @@
|
|||
"minimist": "^1.2.5"
|
||||
}
|
||||
},
|
||||
"moment": {
|
||||
"version": "2.27.0",
|
||||
"resolved": "https://registry.npmjs.org/moment/-/moment-2.27.0.tgz",
|
||||
"integrity": "sha512-al0MUK7cpIcglMv3YF13qSgdAIqxHTO7brRtaz3DlSULbqfazqkc5kEjNrLDOM7fsjshoFIihnU8snrP7zUvhQ=="
|
||||
},
|
||||
"move-concurrently": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/move-concurrently/-/move-concurrently-1.0.1.tgz",
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
"jszip": "^3.5.0",
|
||||
"libcimsvg": "git+https://git.rwth-aachen.de/acs/public/cim/pintura-npm-package.git",
|
||||
"lodash": "^4.17.15",
|
||||
"moment": "^2.27.0",
|
||||
"multiselect-react-dropdown": "^1.5.7",
|
||||
"node-sass": "^4.14.1",
|
||||
"popper.js": "^1.16.1",
|
||||
|
|
|
@ -20,6 +20,7 @@ import { Container } from 'flux/utils';
|
|||
import { Button } from 'react-bootstrap';
|
||||
import FileSaver from 'file-saver';
|
||||
import _ from 'lodash';
|
||||
import moment from 'moment'
|
||||
|
||||
import AppDispatcher from '../common/app-dispatcher';
|
||||
import InfrastructureComponentStore from './ic-store';
|
||||
|
@ -256,10 +257,10 @@ class InfrastructureComponents extends Component {
|
|||
return style.join(' ')
|
||||
}
|
||||
|
||||
static stateUpdateModifier(updatedAt) {
|
||||
const date = new Date(updatedAt);
|
||||
|
||||
return date.toLocaleString('de-DE');
|
||||
stateUpdateModifier(updatedAt) {
|
||||
let dateFormat = 'ddd, DD MMM YYYY HH:mm:ss';
|
||||
let dateTime = moment.utc(updatedAt, dateFormat);
|
||||
return dateTime.toLocaleString('de-DE');
|
||||
}
|
||||
|
||||
render() {
|
||||
|
@ -280,7 +281,7 @@ class InfrastructureComponents extends Component {
|
|||
<TableColumn title='Location' dataKeys={['properties.location', 'rawProperties.location']} />
|
||||
{/* <TableColumn title='Realm' dataKeys={['properties.realm', 'rawProperties.realm']} /> */}
|
||||
<TableColumn title='WebSocket Endpoint' dataKey='host' />
|
||||
<TableColumn title='Last Update' dataKey='stateUpdatedAt' modifier={InfrastructureComponents.stateUpdateModifier} />
|
||||
<TableColumn title='Last Update' dataKey='stateUpdateAt' modifier={(stateUpdateAt) => this.stateUpdateModifier(stateUpdateAt)} />
|
||||
<TableColumn
|
||||
width='200'
|
||||
editButton
|
||||
|
|
Loading…
Add table
Reference in a new issue