Skip to content

Commit

Permalink
Updated displayed datetime format
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Brazhenko committed May 28, 2020
1 parent aa784a6 commit a432546
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
5 changes: 5 additions & 0 deletions ui/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
"bson": "^4.0.2",
"classnames": "^2.2.6",
"cryptiles": "^4.1.3",
"dateformat": "^3.0.3",
"deep-extend": "^0.6.0",
"eslint-config-airbnb-base": "^13.2.0",
"eslint-import-resolver-webpack": "^0.11.1",
Expand Down
6 changes: 3 additions & 3 deletions ui/src/components/Node/NodeProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { NODE_STATUS, COLLECTIONS } from '../../constants';
import ParameterItem from '../Common/ParameterItem';
import makePropertiesBox from '../Common/makePropertiesBox';
import './NodeProperties.css';

var dateFormat = require('dateformat');

function makeKeyValueRow(name, value, key) {
return (
Expand Down Expand Up @@ -79,8 +79,8 @@ export default class NodeProperties extends Component {

const statePropertiesItems = [
makeKeyValueRow('Node Status', <i>{this.state.nodeStatus}</i>, 'node_status'),
makeKeyValueRow('Created', <i>{this.props.created}</i>, 'created'),
makeKeyValueRow('Updated', <i>{this.props.updated}</i>, 'updated'),
makeKeyValueRow('Created', <i>{dateFormat(Date.parse(this.props.created), "yyyy-mm-dd HH:MM:ss")}</i>, 'created'),
makeKeyValueRow('Updated', <i>{dateFormat(Date.parse(this.props.created), "yyyy-mm-dd HH:MM:ss")}</i>, 'updated'),
];

const inheritancePropertiesItems = [
Expand Down

0 comments on commit a432546

Please sign in to comment.