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

Feat: Add stat_hourly & min. max. ping #4267

Merged
merged 8 commits into from
Jan 5, 2024

Conversation

chakflying
Copy link
Collaborator

@chakflying chakflying commented Dec 22, 2023

⚠️⚠️⚠️ Since we do not accept all types of pull requests and do not want to waste your time. Please be sure that you have read pull request rules:
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma

Tick the checkbox if you understand [x]:

  • I have read and understand the pull request rules.

Description

Decided to break out database and UptimeCalculator changes from #4264.

  • Add stat_hourly table
  • Add ping_min and ping_max columns to the stat tables
  • Update UptimeCalculator to store these values
  • Fix small typo in the original update() function if (dailyData.up === 1) {

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (a fix or feature that would cause existing functionality to not work as expected)

Checklist

  • My code follows the style guidelines of this project
  • I ran ESLint and other linters for modified files
  • I have performed a self-review of my own code and tested it
  • I have commented my code, particularly in hard-to-understand areas (including JSDoc for methods)
  • My changes generates no new warnings
  • My code needed automated testing. I have added them (this is optional task)

Screenshots (if any)

@chakflying chakflying changed the title Feat: Add stat_hourly & min. max. ping Feat: Add stat_hourly & min. max. ping Dec 22, 2023
@chakflying chakflying added area:metrics related to monitoring metrics area:core issues describing changes to the core of uptime kuma labels Dec 22, 2023
@louislam louislam added this to the 2.0.0 milestone Dec 22, 2023
@chakflying chakflying marked this pull request as ready for review December 23, 2023 07:50
Copy link
Collaborator

@CommanderStorm CommanderStorm left a comment

Choose a reason for hiding this comment

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

LGTM. The switching is a bit messy but there is no good way to solve this other than the current solution afaik

server/uptime-calculator.js Outdated Show resolved Hide resolved
Co-authored-by: Frank Elsinga <frank@elsinga.de>
Copy link
Contributor

@golibnarzullayev golibnarzullayev left a comment

Choose a reason for hiding this comment

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

if check should be written short

@louislam louislam merged commit bf1e3a3 into louislam:master Jan 5, 2024
17 checks passed
@chakflying chakflying deleted the feat/stat-hourly branch April 30, 2024 20:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:core issues describing changes to the core of uptime kuma area:metrics related to monitoring metrics
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants