mirror of
https://github.com/hanzo-io/cloud.git
synced 2026-10-30 18:57:42 +00:00
* feat: performance reports * fix: sort option * fix: path of component * fix: sort in request logs * fix(SiteBinaryLogs): filters * fix(SIteDeadlockReport): filters * fix: open plan change dialog when required * chore: remove unneeded code * chore: remove unneeded code * chore: hide deadlock reports for now * fix: use date and datetime filter from frappe-ui * refactor: use `Report` component * fix(ProcessList): remove user column since it'll be the same * fix: revert unintended changes * chore: rename `Report` to `PerformanceReport` due to conflict with report from old src
31 lines
1002 B
JavaScript
31 lines
1002 B
JavaScript
import dayjs from 'dayjs/esm';
|
|
import relativeTime from 'dayjs/esm/plugin/relativeTime';
|
|
import localizedFormat from 'dayjs/esm/plugin/localizedFormat';
|
|
import updateLocale from 'dayjs/esm/plugin/updateLocale';
|
|
import isToday from 'dayjs/esm/plugin/isToday';
|
|
import duration from 'dayjs/esm/plugin/duration';
|
|
import utc from 'dayjs/esm/plugin/utc';
|
|
import timezone from 'dayjs/esm/plugin/timezone';
|
|
import advancedFormat from 'dayjs/plugin/advancedFormat';
|
|
|
|
dayjs.extend(updateLocale);
|
|
dayjs.extend(relativeTime);
|
|
dayjs.extend(localizedFormat);
|
|
dayjs.extend(isToday);
|
|
dayjs.extend(duration);
|
|
dayjs.extend(utc);
|
|
dayjs.extend(timezone);
|
|
dayjs.extend(advancedFormat);
|
|
|
|
export function dayjsLocal(dateTimeString) {
|
|
let localTimezone = dayjs.tz.guess();
|
|
// dates are stored in Asia/Calcutta timezone on the server
|
|
return dayjs.tz(dateTimeString, 'Asia/Calcutta').tz(localTimezone);
|
|
}
|
|
|
|
export function dayjsIST(dateTimeString) {
|
|
return dayjs(dateTimeString).tz('Asia/Calcutta');
|
|
}
|
|
|
|
export default dayjs;
|