diff --git a/app/components/dashboard/job_last_10.jsx b/app/components/dashboard/job_last_10.jsx index 7b6a9ab..93b100e 100644 --- a/app/components/dashboard/job_last_10.jsx +++ b/app/components/dashboard/job_last_10.jsx @@ -4,6 +4,7 @@ import _ from 'lodash'; import JobsStoreHEC from '../../jobs/hec' import moment from 'moment'; import gen_path from '../../path_utils'; +import store from '../../store'; class JobGroupItem extends React.Component { @@ -11,9 +12,10 @@ class JobGroupItem extends React.Component { let job_id = this.props.job_id; let job = this.props.job; let link = `/job_result/${job_id}`; + let settings = store.get('settings') return (
  • - {moment.unix(job.StartTime).fromNow()} + {moment.unix(job.StartTime - settings.OFFSET).fromNow()} [{job_id}] {job.Function} on "{job.Target}"
  • ) diff --git a/app/components/job_history.jsx b/app/components/job_history.jsx index 0528f33..2d9d750 100644 --- a/app/components/job_history.jsx +++ b/app/components/job_history.jsx @@ -6,6 +6,7 @@ import {ReactBootstrapTableStyle} from '../../node_modules/react-bootstrap-table import moment from 'moment'; import { Link } from 'react-router'; import gen_path from '../path_utils'; +import store from '../store'; class JobHistory extends React.Component { render() { @@ -19,7 +20,8 @@ class JobHistory extends React.Component { } function DateFormatter(job_start_time, job){ - return moment.unix(job_start_time).calendar(); + let settings = store.get('settings') + return moment.unix(job_start_time - settings.OFFSET).calendar(); } function JidOutputLink(jid, job){ diff --git a/settings.json.sample b/settings.json.sample index 5fe74b7..98913e6 100644 --- a/settings.json.sample +++ b/settings.json.sample @@ -1,6 +1,7 @@ { "API_URL": "localhost:5417", # The API URL "SECURE_HTTP": false, # Is the API protected by HTTPS? + "OFFSET": 0, # This is the offset in epoch(seconds) "templates": { # Templates sample "basic": { # Template name "description": "Basic template", # Template description