This repository was archived by the owner on Feb 18, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +7
-2
lines changed
Expand file tree Collapse file tree 3 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -4,16 +4,18 @@ import _ from 'lodash';
44import JobsStoreHEC from '../../jobs/hec'
55import moment from 'moment' ;
66import gen_path from '../../path_utils' ;
7+ import store from '../store' ;
78
89
910class JobGroupItem extends React . Component {
1011 render ( ) {
1112 let job_id = this . props . job_id ;
1213 let job = this . props . job ;
1314 let link = `/job_result/${ job_id } ` ;
15+ let settings = store . get ( 'settings' )
1416 return (
1517 < li key = { job_id } className = "list-group-item" >
16- < span className = "badge" > { moment . unix ( job . StartTime ) . fromNow ( ) } </ span >
18+ < span className = "badge" > { moment . unix ( job . StartTime - settings . OFFSET ) . fromNow ( ) } </ span >
1719 < i className = "fa fa-calendar" /> < Link to = { gen_path ( link ) } > [{ job_id } ] { job . Function } on "{ job . Target } "</ Link >
1820 </ li >
1921 )
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ import {ReactBootstrapTableStyle} from '../../node_modules/react-bootstrap-table
66import moment from 'moment' ;
77import { Link } from 'react-router' ;
88import gen_path from '../path_utils' ;
9+ import store from '../store' ;
910
1011class JobHistory extends React . Component {
1112 render ( ) {
@@ -19,7 +20,8 @@ class JobHistory extends React.Component {
1920 }
2021
2122 function DateFormatter ( job_start_time , job ) {
22- return moment . unix ( job_start_time ) . calendar ( ) ;
23+ let settings = store . get ( 'settings' )
24+ return moment . unix ( job_start_time - settings . OFFSET ) . calendar ( ) ;
2325 }
2426
2527 function JidOutputLink ( jid , job ) {
Original file line number Diff line number Diff line change 11{
22 "API_URL": "localhost:5417", # The API URL
33 "SECURE_HTTP": false, # Is the API protected by HTTPS?
4+ "OFFSET": 0, # This is the offset in epoch(seconds)
45 "templates": { # Templates sample
56 "basic": { # Template name
67 "description": "Basic template", # Template description
You can’t perform that action at this time.
0 commit comments