mirror of
https://github.com/portainer/portainer.git
synced 2025-08-08 07:15:23 +02:00
refactor(edge/updates): sync changes from EE [EE-4288] (#7726)
This commit is contained in:
parent
4fee359247
commit
82e9e2a895
80 changed files with 1099 additions and 1892 deletions
|
@ -37,13 +37,18 @@ export function humanize(bytes, round, base) {
|
|||
return filesize(bytes, { base: base, round: round });
|
||||
}
|
||||
}
|
||||
export const TIME_FORMAT = 'YYYY-MM-DD HH:mm:ss';
|
||||
|
||||
export function isoDateFromTimestamp(timestamp) {
|
||||
return moment.unix(timestamp).format('YYYY-MM-DD HH:mm:ss');
|
||||
return moment.unix(timestamp).format(TIME_FORMAT);
|
||||
}
|
||||
|
||||
export function isoDate(date) {
|
||||
return moment(date).format('YYYY-MM-DD HH:mm:ss');
|
||||
return moment(date).format(TIME_FORMAT);
|
||||
}
|
||||
|
||||
export function parseIsoDate(date) {
|
||||
return moment(date, TIME_FORMAT).toDate();
|
||||
}
|
||||
|
||||
export function getPairKey(pair, separator) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue