import moment from 'moment-timezone' ; import { Storage } from '../../shared_imports' ; const SETTING_ID = 'kibana.upgradeAssistant.lastCheckpoint' ; const localStorage = new Storage ( window . localStorage ) ; export const loadLogsCheckpoint = ( ) => { const storedValue = moment ( localStorage . get ( SETTING_ID ) ) ; if ( storedValue . isValid ( ) ) { return storedValue . toISOString ( ) ; } const now = moment ( ) . toISOString ( ) ; localStorage . set ( SETTING_ID , now ) ; return now ; } ; export const saveLogsCheckpoint = ( value ) => { localStorage . set ( SETTING_ID , value ) ; } ;