|
|
|
@ -2,7 +2,7 @@ |
|
|
|
|
import _ from 'lodash'; |
|
|
|
|
|
|
|
|
|
// Services & Utils
|
|
|
|
|
import { DataQuery, ExploreMode } from '@grafana/data'; |
|
|
|
|
import { DataQuery, ExploreMode, dateTime } from '@grafana/data'; |
|
|
|
|
import { renderUrl } from 'app/core/utils/url'; |
|
|
|
|
import store from 'app/core/store'; |
|
|
|
|
import { serializeStateToUrlParam, SortOrder } from './explore'; |
|
|
|
@ -212,10 +212,7 @@ export const createRetentionPeriodBoundary = (days: number, isLastTs: boolean) = |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
export function createDateStringFromTs(ts: number) { |
|
|
|
|
const date = new Date(ts); |
|
|
|
|
const month = date.toLocaleString('default', { month: 'long' }); |
|
|
|
|
const day = date.getDate(); |
|
|
|
|
return `${month} ${day}`; |
|
|
|
|
return dateTime(ts).format('MMMM D'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
export function getQueryDisplayText(query: DataQuery): string { |
|
|
|
|