pull/5686/head
innerpeacez 2025-03-10 14:46:33 +08:00
parent efbfc11c39
commit ea77747ff6
2 changed files with 12 additions and 17 deletions

View File

@ -1,10 +1,13 @@
const NotificationProvider = require("./notification-provider");
const {DOWN, UP} = require("../../src/util");
const {default: axios} = require("axios");
const { DOWN, UP } = require("../../src/util");
const { default: axios } = require("axios");
class YZJ extends NotificationProvider {
name = "YZJ";
/**
* @inheritdoc
*/
async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
let okMsg = "Sent Successfully.";
@ -31,8 +34,8 @@ class YZJ extends NotificationProvider {
/**
* Send message to YZJ
* @param {BeanModel} notification
* @param {Object} params Parameters of message
* @param {object} notification Notification
* @param {object} params Parameters of message
* @returns {boolean} True if successful else false
*/
async sendToYZJ(notification, params) {
@ -56,7 +59,7 @@ class YZJ extends NotificationProvider {
/**
* Convert status constant to string
* @param {string} status The status constant
* @returns {string}
* @returns {string} status
*/
statusToString(status) {
switch (status) {

View File

@ -1,21 +1,13 @@
<template>
<div class="mb-3">
<label for="yzjWebHookUrl" class="form-label">{{ $t("YZJ Webhook URL") }}<span style="color: red;"><sup>*</sup></span></label>
<input id="yzjWebHookUrl" v-model="$parent.notification.yzjWebHookUrl" type="text" class="form-control"
required>
<input id="yzjWebHookUrl" v-model="$parent.notification.yzjWebHookUrl" type="text" class="form-control" required />
<label for="yzjType" class="form-label">{{ $t("YZJ Robot Type") }}<span style="color: red;"><sup>*</sup></span></label>
<input id="yzjType" v-model="$parent.notification.yzjType" type="text" class="form-control" required>
<label for="yzjToken" class="form-label">{{ $t("YZJ Robot Token") }}<span
style="color: red;"><sup>*</sup></span></label>
<input id="yzjType" v-model="$parent.notification.yzjType" type="text" class="form-control" required />
<label for="yzjToken" class="form-label">{{ $t("YZJ Robot Token") }}<span style="color: red;"><sup>*</sup></span></label>
<hidden-input id="yzjToken" v-model="$parent.notification.yzjToken" type="text" class="form-control" required />
<i18n-t class="form-text" keypath="wayToGetTeamsURL">
<a
href="https://www.yunzhijia.com/opendocs/docs.html#/tutorial/index/robot" target="_blank">
{{ $t("here") }}
</a>
<a href="https://www.yunzhijia.com/opendocs/docs.html#/tutorial/index/robot" target="_blank">{{ $t("here") }}</a>
</i18n-t>
</div>
</template>