feat: add log view auto refresh
This commit is contained in:
@@ -20,6 +20,18 @@ class CommonUtils {
|
||||
static formatWayName = (type) => {
|
||||
return CONSTANT.WAYS_DATA_MAP[type].label;
|
||||
}
|
||||
|
||||
static getCurrentTimeStr = () => {
|
||||
const currentDate = new Date();
|
||||
const year = currentDate.getFullYear();
|
||||
const month = String(currentDate.getMonth() + 1).padStart(2, '0');
|
||||
const day = String(currentDate.getDate()).padStart(2, '0');
|
||||
const hours = String(currentDate.getHours()).padStart(2, '0');
|
||||
const minutes = String(currentDate.getMinutes()).padStart(2, '0');
|
||||
const seconds = String(currentDate.getSeconds()).padStart(2, '0');
|
||||
const formattedDate = `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
|
||||
return formattedDate;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user