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

Add WPush Notification Provider #4603

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

Add WPush Notification Provider #4603

wants to merge 6 commits into from

Conversation

anhao
Copy link

@anhao anhao commented Mar 20, 2024

⚠️⚠️⚠️ 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

Add WPush Notification Provider

Type of change

Please delete any options that are not relevant.

  • New feature (non-breaking change which adds functionality)

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)

image

Event Before After
UP - paste-image-here
DOWN - paste-image-here
Certificate-expiry - paste-image-here
Testing - paste-image-here

"channel": notification.wpushChannel
});
if (ret.data.code !== 0) {
return ret.data.message;
Copy link
Collaborator

Choose a reason for hiding this comment

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

If this is an error condition, maybe we should do throw new Error(ret.data.message) instead.

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.

Overall, this looks good.
I have left some inline comments below.

I have added a table to the PR-description. Could you fill it with the requisite screnshots?

Explanation on the second one:

Offering notifications is close to the core of what we are as an uptime monitor. Therefore, making sure that they work is also really important. Because testing notification providers is quite time intensive, we mostly offload this onto the person contributing a notification provider.

To make shure you have tested the notification provider, please include screenshots of the following events in the pull-request description:

server/notification-providers/wpush.js Outdated Show resolved Hide resolved
src/components/notifications/WPush.vue Outdated Show resolved Hide resolved
src/components/notifications/WPush.vue Outdated Show resolved Hide resolved
server/notification-providers/wpush.js Show resolved Hide resolved
</div>

<div class="mb-3">
<label for="wpush-channel" class="form-label">发送通道</label>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I have not used said notification provider:
Is this option clear enough for the users?
Do they need an helptext on how to find this?

Copy link
Author

Choose a reason for hiding this comment

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

Think , Detailed channel descriptions can be viewed at the link below

image

anhao and others added 4 commits March 21, 2024 13:22
Co-authored-by: Frank Elsinga <frank@elsinga.de>
Co-authored-by: Frank Elsinga <frank@elsinga.de>
Co-authored-by: Frank Elsinga <frank@elsinga.de>
@CommanderStorm CommanderStorm marked this pull request as draft March 26, 2024 13:01
@CommanderStorm CommanderStorm added the question Further information is requested label Mar 26, 2024
@CommanderStorm CommanderStorm added area:notifications Everything related to notifications type:new proposing to add a new monitor labels May 19, 2024
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.

Please refer to above review. I think you missed this paragraph:

I have added a table to the PR-description. Could you fill it with the requisite screnshots?

Explanation on the second one:

Offering notifications is close to the core of what we are as an uptime monitor. Therefore, making sure that they work is also really important. Because testing notification providers is quite time intensive, we mostly offload this onto the person contributing a notification provider.

To make shure you have tested the notification provider, please include screenshots of the following events in the pull-request description:

@CommanderStorm CommanderStorm added needs:work this PR needs work and removed question Further information is requested labels May 19, 2024
@github-actions github-actions bot added needs:resolve-merge-conflict A merge-conflict needs to be addressed before reviewing makes sense again and removed needs:resolve-merge-conflict A merge-conflict needs to be addressed before reviewing makes sense again labels May 19, 2024
@github-actions github-actions bot added needs:resolve-merge-conflict A merge-conflict needs to be addressed before reviewing makes sense again and removed needs:resolve-merge-conflict A merge-conflict needs to be addressed before reviewing makes sense again labels May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:notifications Everything related to notifications needs:resolve-merge-conflict A merge-conflict needs to be addressed before reviewing makes sense again needs:work this PR needs work type:new proposing to add a new monitor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants