Skip to content

Commit

Permalink
Merge branch 'master' into remove_snmp_getnext_multi
Browse files Browse the repository at this point in the history
  • Loading branch information
murrant authored Jan 24, 2025
2 parents f72f155 + bf34be6 commit f382b05
Show file tree
Hide file tree
Showing 8 changed files with 1,969 additions and 1,929 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/announcements.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Notify Discord on PR Merge with Specific Tag

on:
pull_request:
types:
- closed

jobs:
notify-discord:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
- name: Check Out Repository
uses: actions/checkout@v3

- name: Check for Specific Label
id: check_label
run: |
LABEL_FOUND=false
for label in "${{ github.event.pull_request.labels[*].name }}"; do
if [[ "$label" == "Breaking-Change" ]]; then
LABEL_FOUND=true
break
fi
done
if [[ "$LABEL_FOUND" != "true" ]]; then
echo "PR does not contain the specific label. Skipping."
exit 0
fi
- name: Send Notification to Discord
env:
DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL_ANNOUNCEMENT }}
run: |
PR_TITLE=${{ github.event.pull_request.title }}
PR_MESSAGE=${{ github.event.pull_request.body }}
PR_URL=${{ github.event.pull_request.html_url }}
curl -X POST -H "Content-Type: application/json" \
-d "{
\"content\": \":rotating_light: A breaking change pull request has been merged! :rotating_light: \n\n**Title**: $PR_TITLE\n[View PR]($PR_URL)\n\n$PR_MESSAGE\"
}" \
$DISCORD_WEBHOOK_URL
2 changes: 1 addition & 1 deletion app/Observers/QosObserver.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public function updating(Qos $qos)
{
if ($qos->isDirty('last_polled')) {
$poll_interval = $qos->last_polled - $qos->getOriginal('last_polled');
if ($poll_interval > 0) {
if ($poll_interval > 0 && $qos->getOriginal('last_polled') > 0) {
$qos->bytes_out_rate = $this->calcRate($qos->last_bytes_out, $qos->getOriginal('last_bytes_out'), $poll_interval);
$qos->bytes_in_rate = $this->calcRate($qos->last_bytes_in, $qos->getOriginal('last_bytes_in'), $poll_interval);
$qos->bytes_drop_out_rate = $this->calcRate($qos->last_bytes_drop_out, $qos->getOriginal('last_bytes_drop_out'), $poll_interval);
Expand Down
1,819 changes: 0 additions & 1,819 deletions doc/General/Changelog.md

Large diffs are not rendered by default.

1,822 changes: 1,822 additions & 0 deletions doc/General/Changelogs/2024.md

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ plugins:
- include_dir_to_nav
- exclude:
glob:
- "General/Changelogs/*"
- "Dockerfile"
- redirects:
redirect_maps:
Expand Down Expand Up @@ -143,7 +142,9 @@ nav:
- General:
- Home: index.md
- Features: Support/Features.md
- Changelog: General/Changelog.md
- Changelog:
- Current Changelog: General/Changelog.md
- Historical: General/Changelogs
- Welcome to Observium users: General/Welcome-to-Observium-users.md
- 3rd Party Libraries: General/Acknowledgement.md

Expand Down
12 changes: 1 addition & 11 deletions tests/DocsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,6 @@
class DocsTest extends TestCase
{
private $hidden_pages = [
'General/Changelogs/2013.md',
'General/Changelogs/2014.md',
'General/Changelogs/2015.md',
'General/Changelogs/2016.md',
'General/Changelogs/2017.md',
'General/Changelogs/2018.md',
'General/Changelogs/2019.md',
'General/Changelogs/2020.md',
'General/Changelogs/2021.md',
'General/Changelogs/2022.md',
'General/Changelogs/2023.md',
];

/**
Expand All @@ -54,6 +43,7 @@ public function testDocExist(): void
// Define paths to exclude
$exclude_paths = [
'*/Extensions/Applications/*',
'*/General/Changelogs/*',
];

// Build the exclusion part of the find command
Expand Down
Loading

0 comments on commit f382b05

Please sign in to comment.