Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open history with open end date by default #329

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

evgeny-boger
Copy link
Member

also refactor chunk splitting

also refactor chunk splitting
@evgeny-boger evgeny-boger requested a review from KraPete June 4, 2022 12:22
Copy link
Contributor

@KraPete KraPete left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Было бы отлично в интерфейсе, если конечное время не установлено, писать 'Текущее время' или 'Сейчас'. Иначе не ясно сходу, что означает пустая дата. Кстати, если задать время конца без даты, оно фактически сбрасывается. Тогда уж не давать задавать время, если дата не задана.

params.timestamp.lt = endDate.getTime() / 1000/// + 86400;
var intervalMs = endDate - startDate; // duration of requested interval, in ms
} else {
console.log(new Date());
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Это от отладки осталось?

@@ -1,3 +1,9 @@
wb-mqtt-homeui (2.37.3) stable; urgency=medium
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2.37.1 ?
Но вообще это же новая фича. Я бы сделал 2.38.0

if (diffDays <= days) return [_start, end];
var ret = [_start];
var iter = Math.floor(diffDays / days) + 1;
console.log(iter);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Debug?

if (diffDates <= days) return [start,end];
var ret = [start];
var iter = Math.floor(diffDates / days) + 1;
var _start = start ? start : new Date(+_end - 24 * 60 * 60 * 1000 * rangInterval);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

24 * 60 * 60 * 1000 стоит в константу обернуть, а то оно в 3-х местах используется

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants