mirror of https://github.com/statping/statping
updates
parent
92184931a3
commit
1343bc6c19
|
@ -52,6 +52,10 @@ class Api {
|
|||
return axios.get('/api/messages').then(response => (response.data))
|
||||
}
|
||||
|
||||
async message_delete (id) {
|
||||
return axios.delete('/api/messages/'+id).then(response => (response.data))
|
||||
}
|
||||
|
||||
async group (id) {
|
||||
return axios.get('/api/groups/'+id).then(response => (response.data))
|
||||
}
|
||||
|
|
|
@ -1,20 +1,3 @@
|
|||
<!--
|
||||
- Statup
|
||||
- Copyright (C) 2020. Hunter Long and the project contributors
|
||||
- Written by Hunter Long <info@socialeck.com> and the project contributors
|
||||
-
|
||||
- https://github.com/hunterlong/statup
|
||||
-
|
||||
- The licenses for most software and other practical works are designed
|
||||
- to take away your freedom to share and change the works. By contrast,
|
||||
- the GNU General Public License is intended to guarantee your freedom to
|
||||
- share and change all versions of a program--to make sure it remains free
|
||||
- software for all its users.
|
||||
-
|
||||
- You should have received a copy of the GNU General Public License
|
||||
- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<template>
|
||||
<div>
|
||||
<div class="col-12">
|
||||
|
@ -39,7 +22,7 @@
|
|||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
<a href="message/1" class="btn btn-outline-secondary"><i class="fas fa-exclamation-triangle"></i> Edit</a>
|
||||
<a href="api/messages/1" class="ajax_delete btn btn-danger"><i class="fas fa-times"></i></a>
|
||||
<a @click="deleteMessage(message)" href="#" class="btn btn-danger"><font-awesome-icon icon="times" /></a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
@ -173,6 +156,14 @@
|
|||
methods: {
|
||||
service (id) {
|
||||
return this.$store.getters.serviceById(id)
|
||||
},
|
||||
async deleteMessage(m) {
|
||||
let c = confirm(`Are you sure you want to delete message '${m.title}'?`)
|
||||
if (c) {
|
||||
await Api.message_delete(m.id)
|
||||
const messages = await Api.messages()
|
||||
this.$store.commit('setMessages', messages)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
|
||||
<FormUser/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -34,10 +34,12 @@
|
|||
|
||||
<script>
|
||||
import Api from "../API"
|
||||
import FormUser from "../../forms/User";
|
||||
|
||||
export default {
|
||||
name: 'DashboardUsers',
|
||||
data () {
|
||||
components: {FormUser},
|
||||
data () {
|
||||
return {
|
||||
user: {
|
||||
username: "",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<form @submit="saveSettings" method="POST" action="settings">
|
||||
<form @submit="saveSettings" method="POST">
|
||||
<div class="form-group">
|
||||
<label>Project Name</label>
|
||||
<input v-model="core.name" type="text" class="form-control" placeholder="Great Uptime">
|
||||
|
@ -92,16 +92,20 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import time from '../components/Time'
|
||||
import Api from '../components/API'
|
||||
import time from '../components/Time'
|
||||
import Api from '../components/API'
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'CoreSettings',
|
||||
data () {
|
||||
return {
|
||||
core: this.$store.getters.core,
|
||||
}
|
||||
},
|
||||
async mounted () {
|
||||
const core = await Api.core()
|
||||
this.$store.commit('setCore', core)
|
||||
},
|
||||
computed: {
|
||||
now () {
|
||||
return time.now()
|
||||
|
|
|
@ -68,8 +68,8 @@
|
|||
|
||||
<div class="form-group">
|
||||
<div class="col-12">
|
||||
<label for="update_notify" class="d-inline d-sm-none">Send Updates only</label>
|
||||
<label for="update_notify" class="d-none d-sm-block">Send Updates only</label>
|
||||
<label class="d-inline d-sm-none">Send Updates only</label>
|
||||
<label class="d-none d-sm-block">Send Updates only</label>
|
||||
|
||||
<span class="switch">
|
||||
<input type="checkbox" name="update_notify-option" class="switch" id="switch-update_notify">
|
||||
|
@ -196,747 +196,9 @@
|
|||
|
||||
<div class="alert alert-danger d-none" id="alerter" role="alert"></div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tab-pane fade" id="v-pills-discord" role="tabpanel" aria-labelledby="v-pills-discord-tab">
|
||||
|
||||
|
||||
|
||||
<form class="ajax_form discord" data-func="SaveNotifier" action="api/notifier/discord" method="POST">
|
||||
<h4 class="text-capitalize">discord</h4>
|
||||
<p class="small text-muted">Send notifications to your discord channel using discord webhooks. Insert your discord channel Webhook URL to receive notifications. Based on the <a href="https://discordapp.com/developers/docs/resources/Webhook">discord webhooker API</a>.</p>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="discord_webhooker_url">discord webhooker URL</label>
|
||||
|
||||
<input type="text" name="host" class="form-control" value="https://discordapp.com/api/webhooks/****/*****" id="discord_webhooker_url" placeholder="Insert your Webhook URL here" >
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-9 col-sm-6">
|
||||
<div class="input-group mb-2">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">Limit</div>
|
||||
</div>
|
||||
<input type="number" class="form-control" name="limits" min="1" max="60" id="limits_per_hour_discord" value="3" placeholder="7">
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">Per Minute</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-3 col-sm-2 mt-1">
|
||||
<span class="switch">
|
||||
<input type="checkbox" name="enabled-option" class="switch" id="switch-discord" >
|
||||
<label for="switch-discord"></label>
|
||||
<input type="hidden" name="enabled" id="switch-discord-value" value="false">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="method" value="discord">
|
||||
|
||||
<div class="col-12 col-sm-4 mb-2 mb-sm-0 mt-2 mt-sm-0">
|
||||
<button type="submit" class="btn btn-primary btn-block text-capitalize"><i class="fa fa-check-circle"></i> Save</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-12 col-sm-12">
|
||||
<button class="test_notifier btn btn-secondary btn-block text-capitalize col-12 float-right"><i class="fa fa-vial"></i> Test Notifier</button>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-12 mt-2">
|
||||
<div class="alert alert-danger d-none" id="discord-error" role="alert">
|
||||
<i class="fa fa-exclamation-triangle"></i> discord has an error!
|
||||
</div>
|
||||
|
||||
<div class="alert alert-success d-none" id="discord-success" role="alert">
|
||||
<i class="fa fa-smile-beam"></i> The discord notifier is working correctly!
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<span class="d-block small text-center mt-3 mb-5">
|
||||
<span class="text-capitalize">discord</span> Notifier created by <a href="https://github.com/hunterlong" target="_blank">Hunter Long</a>
|
||||
</span>
|
||||
|
||||
<div class="alert alert-danger d-none" id="alerter" role="alert"></div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tab-pane fade" id="v-pills-email" role="tabpanel" aria-labelledby="v-pills-email-tab">
|
||||
|
||||
|
||||
|
||||
<form class="ajax_form email" data-func="SaveNotifier" action="api/notifier/email" method="POST">
|
||||
<h4 class="text-capitalize">email</h4>
|
||||
<p class="small text-muted">Send emails via SMTP when services are online or offline.</p>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="smtp_host">SMTP Host</label>
|
||||
|
||||
<input type="text" name="host" class="form-control" value="" id="smtp_host" placeholder="Insert your SMTP Host here." >
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="smtp_username">SMTP Username</label>
|
||||
|
||||
<input type="text" name="username" class="form-control" value="" id="smtp_username" placeholder="Insert your SMTP Username here." >
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="smtp_password">SMTP Password</label>
|
||||
|
||||
<input type="password" name="password" class="form-control" value="" id="smtp_password" placeholder="Insert your SMTP Password here." >
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="smtp_port">SMTP Port</label>
|
||||
|
||||
<input type="number" name="port" class="form-control" value="0" id="smtp_port" placeholder="Insert your SMTP Port here." >
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="outgoing_email_address">Outgoing Email Address</label>
|
||||
|
||||
<input type="text" name="var1" class="form-control" value="" id="outgoing_email_address" placeholder="outgoing@email.com" >
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="send_alerts_to">Send Alerts To</label>
|
||||
|
||||
<input type="email" name="var2" class="form-control" value="" id="send_alerts_to" placeholder="sendto@email.com" >
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="disable_tls_ssl">Disable TLS/SSL</label>
|
||||
|
||||
<input type="text" name="api_key" class="form-control" value="" id="disable_tls_ssl" placeholder="" >
|
||||
|
||||
|
||||
<small class="form-text text-muted">To Disable TLS/SSL insert 'true'</small>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-9 col-sm-6">
|
||||
<div class="input-group mb-2">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">Limit</div>
|
||||
</div>
|
||||
<input type="number" class="form-control" name="limits" min="1" max="60" id="limits_per_hour_email" value="3" placeholder="7">
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">Per Minute</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-3 col-sm-2 mt-1">
|
||||
<span class="switch">
|
||||
<input type="checkbox" name="enabled-option" class="switch" id="switch-email" >
|
||||
<label for="switch-email"></label>
|
||||
<input type="hidden" name="enabled" id="switch-email-value" value="false">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="method" value="email">
|
||||
|
||||
<div class="col-12 col-sm-4 mb-2 mb-sm-0 mt-2 mt-sm-0">
|
||||
<button type="submit" class="btn btn-primary btn-block text-capitalize"><i class="fa fa-check-circle"></i> Save</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-12 col-sm-12">
|
||||
<button class="test_notifier btn btn-secondary btn-block text-capitalize col-12 float-right"><i class="fa fa-vial"></i> Test Notifier</button>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-12 mt-2">
|
||||
<div class="alert alert-danger d-none" id="email-error" role="alert">
|
||||
<i class="fa fa-exclamation-triangle"></i> email has an error!
|
||||
</div>
|
||||
|
||||
<div class="alert alert-success d-none" id="email-success" role="alert">
|
||||
<i class="fa fa-smile-beam"></i> The email notifier is working correctly!
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<span class="d-block small text-center mt-3 mb-5">
|
||||
<span class="text-capitalize">email</span> Notifier created by <a href="https://github.com/hunterlong" target="_blank">Hunter Long</a>
|
||||
</span>
|
||||
|
||||
<div class="alert alert-danger d-none" id="alerter" role="alert"></div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tab-pane fade" id="v-pills-line_notify" role="tabpanel" aria-labelledby="v-pills-line_notify-tab">
|
||||
|
||||
|
||||
|
||||
<form class="ajax_form line_notify" data-func="SaveNotifier" action="api/notifier/line%20notify" method="POST">
|
||||
<h4 class="text-capitalize">LINE Notify</h4>
|
||||
<p class="small text-muted">LINE Notify will send notifications to your LINE Notify account when services are offline or online. Based on the <a href="https://notify-bot.line.me/doc/en/">LINE Notify API</a>.</p>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="access_token">Access Token</label>
|
||||
|
||||
<input type="text" name="api_secret" class="form-control" value="" id="access_token" placeholder="Insert your Line Notify Access Token here." >
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-9 col-sm-6">
|
||||
<div class="input-group mb-2">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">Limit</div>
|
||||
</div>
|
||||
<input type="number" class="form-control" name="limits" min="1" max="60" id="limits_per_hour_line_notify" value="3" placeholder="7">
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">Per Minute</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-3 col-sm-2 mt-1">
|
||||
<span class="switch">
|
||||
<input type="checkbox" name="enabled-option" class="switch" id="switch-line notify" >
|
||||
<label for="switch-line notify"></label>
|
||||
<input type="hidden" name="enabled" id="switch-line notify-value" value="false">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="method" value="line_notify">
|
||||
|
||||
<div class="col-12 col-sm-4 mb-2 mb-sm-0 mt-2 mt-sm-0">
|
||||
<button type="submit" class="btn btn-primary btn-block text-capitalize"><i class="fa fa-check-circle"></i> Save</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<span class="d-block small text-center mt-3 mb-5">
|
||||
<span class="text-capitalize">LINE Notify</span> Notifier created by <a href="https://github.com/dogrocker" target="_blank">Kanin Peanviriyakulkit</a>
|
||||
</span>
|
||||
|
||||
<div class="alert alert-danger d-none" id="alerter" role="alert"></div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tab-pane fade" id="v-pills-mobile" role="tabpanel" aria-labelledby="v-pills-mobile-tab">
|
||||
|
||||
|
||||
|
||||
<form class="ajax_form mobile" data-func="SaveNotifier" action="api/notifier/mobile" method="POST">
|
||||
<h4 class="text-capitalize">Mobile Notifications</h4>
|
||||
<p class="small text-muted">Receive push notifications on your Mobile device using the Statping App. You can scan the Authentication QR Code found in Settings to get the Mobile app setup in seconds.
|
||||
<p align="center"><a href="https://play.google.com/store/apps/details?id=com.statping"><img src="https://img.cjx.io/google-play.svg"></a><a href="https://itunes.apple.com/us/app/apple-store/id1445513219"><img src="https://img.cjx.io/app-store-badge.svg"></a></p>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize d-none" for="device_identifiers">Device Identifiers</label>
|
||||
|
||||
<input type="text" name="var1" class="form-control d-none" value="" id="device_identifiers" placeholder="A list of your Mobile device push notification ID's." >
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize d-none" for="array_of_device_numbers">Array of device numbers</label>
|
||||
|
||||
<input type="number" name="var2" class="form-control d-none" value="" id="array_of_device_numbers" placeholder="1 for iphone 2 for android" >
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-9 col-sm-6">
|
||||
<div class="input-group mb-2">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">Limit</div>
|
||||
</div>
|
||||
<input type="number" class="form-control" name="limits" min="1" max="60" id="limits_per_hour_mobile" value="3" placeholder="7">
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">Per Minute</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-3 col-sm-2 mt-1">
|
||||
<span class="switch">
|
||||
<input type="checkbox" name="enabled-option" class="switch" id="switch-mobile" >
|
||||
<label for="switch-mobile"></label>
|
||||
<input type="hidden" name="enabled" id="switch-mobile-value" value="false">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="method" value="mobile">
|
||||
|
||||
<div class="col-12 col-sm-4 mb-2 mb-sm-0 mt-2 mt-sm-0">
|
||||
<button type="submit" class="btn btn-primary btn-block text-capitalize"><i class="fa fa-check-circle"></i> Save</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-12 col-sm-12">
|
||||
<button class="test_notifier btn btn-secondary btn-block text-capitalize col-12 float-right"><i class="fa fa-vial"></i> Test Notifier</button>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-12 mt-2">
|
||||
<div class="alert alert-danger d-none" id="mobile-error" role="alert">
|
||||
<i class="fa fa-exclamation-triangle"></i> mobile has an error!
|
||||
</div>
|
||||
|
||||
<div class="alert alert-success d-none" id="mobile-success" role="alert">
|
||||
<i class="fa fa-smile-beam"></i> The mobile notifier is working correctly!
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<span class="d-block small text-center mt-3 mb-5">
|
||||
<span class="text-capitalize">Mobile Notifications</span> Notifier created by <a href="https://github.com/hunterlong" target="_blank">Hunter Long</a>
|
||||
</span>
|
||||
|
||||
<div class="alert alert-danger d-none" id="alerter" role="alert"></div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tab-pane fade" id="v-pills-slack" role="tabpanel" aria-labelledby="v-pills-slack-tab">
|
||||
|
||||
|
||||
|
||||
<form class="ajax_form slack" data-func="SaveNotifier" action="api/notifier/slack" method="POST">
|
||||
<h4 class="text-capitalize">slack</h4>
|
||||
<p class="small text-muted">Send notifications to your slack channel when a service is offline. Insert your Incoming webhooker URL for your channel to receive notifications. Based on the <a href="https://api.slack.com/incoming-webhooks">slack API</a>.</p>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="incoming_webhooker_url">Incoming webhooker Url</label>
|
||||
|
||||
<input type="text" name="host" class="form-control" value="https://webhooksurl.slack.com/***" id="incoming_webhooker_url" placeholder="Insert your slack Webhook URL here." required>
|
||||
|
||||
|
||||
<small class="form-text text-muted">Incoming webhooker URL from <a href="https://api.slack.com/apps" target="_blank">slack Apps</a></small>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-9 col-sm-6">
|
||||
<div class="input-group mb-2">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">Limit</div>
|
||||
</div>
|
||||
<input type="number" class="form-control" name="limits" min="1" max="60" id="limits_per_hour_slack" value="3" placeholder="7">
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">Per Minute</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-3 col-sm-2 mt-1">
|
||||
<span class="switch">
|
||||
<input type="checkbox" name="enabled-option" class="switch" id="switch-slack" >
|
||||
<label for="switch-slack"></label>
|
||||
<input type="hidden" name="enabled" id="switch-slack-value" value="false">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="method" value="slack">
|
||||
|
||||
<div class="col-12 col-sm-4 mb-2 mb-sm-0 mt-2 mt-sm-0">
|
||||
<button type="submit" class="btn btn-primary btn-block text-capitalize"><i class="fa fa-check-circle"></i> Save</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-12 col-sm-12">
|
||||
<button class="test_notifier btn btn-secondary btn-block text-capitalize col-12 float-right"><i class="fa fa-vial"></i> Test Notifier</button>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-12 mt-2">
|
||||
<div class="alert alert-danger d-none" id="slack-error" role="alert">
|
||||
<i class="fa fa-exclamation-triangle"></i> slack has an error!
|
||||
</div>
|
||||
|
||||
<div class="alert alert-success d-none" id="slack-success" role="alert">
|
||||
<i class="fa fa-smile-beam"></i> The slack notifier is working correctly!
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<span class="d-block small text-center mt-3 mb-5">
|
||||
<span class="text-capitalize">slack</span> Notifier created by <a href="https://github.com/hunterlong" target="_blank">Hunter Long</a>
|
||||
</span>
|
||||
|
||||
<div class="alert alert-danger d-none" id="alerter" role="alert"></div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tab-pane fade" id="v-pills-telegram" role="tabpanel" aria-labelledby="v-pills-telegram-tab">
|
||||
|
||||
|
||||
|
||||
<form class="ajax_form telegram" data-func="SaveNotifier" action="api/notifier/telegram" method="POST">
|
||||
<h4 class="text-capitalize">Telegram</h4>
|
||||
<p class="small text-muted">Receive notifications on your Telegram channel when a service has an issue. You must get a Telegram API token from the /botfather. Review the <a target="_blank" href="http://techthoughts.info/how-to-create-a-telegram-bot-and-send-messages-via-api">Telegram API Tutorial</a> to learn how to generate a new API Token.</p>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="telegram_api_token">Telegram API Token</label>
|
||||
|
||||
<input type="text" name="api_secret" class="form-control" value="" id="telegram_api_token" placeholder="383810182:EEx829dtCeufeQYXG7CUdiQopqdmmxBPO7-s" required>
|
||||
|
||||
|
||||
<small class="form-text text-muted">Enter the API Token given to you from the /botfather chat.</small>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="channel_or_user_id">Channel or User ID</label>
|
||||
|
||||
<input type="text" name="var1" class="form-control" value="" id="channel_or_user_id" placeholder="789325392" required>
|
||||
|
||||
|
||||
<small class="form-text text-muted">Insert your Telegram Channel ID or User ID here.</small>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-9 col-sm-6">
|
||||
<div class="input-group mb-2">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">Limit</div>
|
||||
</div>
|
||||
<input type="number" class="form-control" name="limits" min="1" max="60" id="limits_per_hour_telegram" value="3" placeholder="7">
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">Per Minute</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-3 col-sm-2 mt-1">
|
||||
<span class="switch">
|
||||
<input type="checkbox" name="enabled-option" class="switch" id="switch-telegram" >
|
||||
<label for="switch-telegram"></label>
|
||||
<input type="hidden" name="enabled" id="switch-telegram-value" value="false">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="method" value="telegram">
|
||||
|
||||
<div class="col-12 col-sm-4 mb-2 mb-sm-0 mt-2 mt-sm-0">
|
||||
<button type="submit" class="btn btn-primary btn-block text-capitalize"><i class="fa fa-check-circle"></i> Save</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-12 col-sm-12">
|
||||
<button class="test_notifier btn btn-secondary btn-block text-capitalize col-12 float-right"><i class="fa fa-vial"></i> Test Notifier</button>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-12 mt-2">
|
||||
<div class="alert alert-danger d-none" id="telegram-error" role="alert">
|
||||
<i class="fa fa-exclamation-triangle"></i> telegram has an error!
|
||||
</div>
|
||||
|
||||
<div class="alert alert-success d-none" id="telegram-success" role="alert">
|
||||
<i class="fa fa-smile-beam"></i> The telegram notifier is working correctly!
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<span class="d-block small text-center mt-3 mb-5">
|
||||
<span class="text-capitalize">Telegram</span> Notifier created by <a href="https://github.com/hunterlong" target="_blank">Hunter Long</a>
|
||||
</span>
|
||||
|
||||
<div class="alert alert-danger d-none" id="alerter" role="alert"></div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tab-pane fade" id="v-pills-twilio" role="tabpanel" aria-labelledby="v-pills-twilio-tab">
|
||||
|
||||
|
||||
|
||||
<form class="ajax_form twilio" data-func="SaveNotifier" action="api/notifier/twilio" method="POST">
|
||||
<h4 class="text-capitalize">Twilio</h4>
|
||||
<p class="small text-muted">Receive SMS text messages directly to your cellphone when a service is offline. You can use a Twilio test account with limits. This notifier uses the <a href="https://www.twilio.com/docs/usage/api">Twilio API</a>.</p>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="account_sid">Account SID</label>
|
||||
|
||||
<input type="text" name="api_key" class="form-control" value="" id="account_sid" placeholder="Insert your Twilio Account SID" required>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="account_token">Account Token</label>
|
||||
|
||||
<input type="text" name="api_secret" class="form-control" value="" id="account_token" placeholder="Insert your Twilio Account Token" required>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="sms_to_phone_number">SMS to Phone Number</label>
|
||||
|
||||
<input type="text" name="var1" class="form-control" value="" id="sms_to_phone_number" placeholder="18555555555" required>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="from_phone_number">From Phone Number</label>
|
||||
|
||||
<input type="text" name="var2" class="form-control" value="" id="from_phone_number" placeholder="18555555555" required>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-9 col-sm-6">
|
||||
<div class="input-group mb-2">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">Limit</div>
|
||||
</div>
|
||||
<input type="number" class="form-control" name="limits" min="1" max="60" id="limits_per_hour_twilio" value="3" placeholder="7">
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">Per Minute</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-3 col-sm-2 mt-1">
|
||||
<span class="switch">
|
||||
<input type="checkbox" name="enabled-option" class="switch" id="switch-twilio" >
|
||||
<label for="switch-twilio"></label>
|
||||
<input type="hidden" name="enabled" id="switch-twilio-value" value="false">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="method" value="twilio">
|
||||
|
||||
<div class="col-12 col-sm-4 mb-2 mb-sm-0 mt-2 mt-sm-0">
|
||||
<button type="submit" class="btn btn-primary btn-block text-capitalize"><i class="fa fa-check-circle"></i> Save</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-12 col-sm-12">
|
||||
<button class="test_notifier btn btn-secondary btn-block text-capitalize col-12 float-right"><i class="fa fa-vial"></i> Test Notifier</button>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-12 mt-2">
|
||||
<div class="alert alert-danger d-none" id="twilio-error" role="alert">
|
||||
<i class="fa fa-exclamation-triangle"></i> twilio has an error!
|
||||
</div>
|
||||
|
||||
<div class="alert alert-success d-none" id="twilio-success" role="alert">
|
||||
<i class="fa fa-smile-beam"></i> The twilio notifier is working correctly!
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<span class="d-block small text-center mt-3 mb-5">
|
||||
<span class="text-capitalize">Twilio</span> Notifier created by <a href="https://github.com/hunterlong" target="_blank">Hunter Long</a>
|
||||
</span>
|
||||
|
||||
<div class="alert alert-danger d-none" id="alerter" role="alert"></div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tab-pane fade" id="v-pills-webhook" role="tabpanel" aria-labelledby="v-pills-webhook-tab">
|
||||
|
||||
|
||||
|
||||
<form class="ajax_form webhook" data-func="SaveNotifier" action="api/notifier/Webhook" method="POST">
|
||||
<h4 class="text-capitalize">HTTP webhooker</h4>
|
||||
<p class="small text-muted">Send a custom HTTP request to a specific URL with your own body, headers, and parameters.</p>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="http_endpoint">HTTP Endpoint</label>
|
||||
|
||||
<input type="text" name="host" class="form-control" value="" id="http_endpoint" placeholder="http://webhookurl.com/JW2MCP4SKQP" required>
|
||||
|
||||
|
||||
<small class="form-text text-muted">Insert the URL for your HTTP Requests.</small>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="http_method">HTTP Method</label>
|
||||
|
||||
<input type="text" name="var1" class="form-control" value="" id="http_method" placeholder="POST" required>
|
||||
|
||||
|
||||
<small class="form-text text-muted">Choose a HTTP method for example: GET, POST, DELETE, or PATCH.</small>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="http_body">HTTP Body</label>
|
||||
|
||||
<textarea rows="3" class="form-control" name="var2" id="http_body"></textarea>
|
||||
|
||||
|
||||
<small class="form-text text-muted">Optional HTTP body for a POST request. You can insert variables into your body request.<br>%service.Id, %service.Name, %service.Online<br>%failure.Issue</small>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="content_type">Content Type</label>
|
||||
|
||||
<input type="text" name="api_key" class="form-control" value="" id="content_type" placeholder="application/json" >
|
||||
|
||||
|
||||
<small class="form-text text-muted">Optional content type for example: application/json or text/plain</small>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="text-capitalize" for="header">Header</label>
|
||||
|
||||
<input type="text" name="api_secret" class="form-control" value="" id="header" placeholder="Authorization=Token12345" >
|
||||
|
||||
|
||||
<small class="form-text text-muted">Optional Headers for request use format: KEY=Value,Key=Value</small>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-9 col-sm-6">
|
||||
<div class="input-group mb-2">
|
||||
<div class="input-group-prepend">
|
||||
<div class="input-group-text">Limit</div>
|
||||
</div>
|
||||
<input type="number" class="form-control" name="limits" min="1" max="60" id="limits_per_hour_webhook" value="3" placeholder="7">
|
||||
<div class="input-group-append">
|
||||
<div class="input-group-text">Per Minute</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-3 col-sm-2 mt-1">
|
||||
<span class="switch">
|
||||
<input type="checkbox" name="enabled-option" class="switch" id="switch-Webhook" >
|
||||
<label for="switch-Webhook"></label>
|
||||
<input type="hidden" name="enabled" id="switch-Webhook-value" value="false">
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="method" value="webhook">
|
||||
|
||||
<div class="col-12 col-sm-4 mb-2 mb-sm-0 mt-2 mt-sm-0">
|
||||
<button type="submit" class="btn btn-primary btn-block text-capitalize"><i class="fa fa-check-circle"></i> Save</button>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-12 col-sm-12">
|
||||
<button class="test_notifier btn btn-secondary btn-block text-capitalize col-12 float-right"><i class="fa fa-vial"></i> Test Notifier</button>
|
||||
</div>
|
||||
|
||||
<div class="col-12 col-sm-12 mt-2">
|
||||
<div class="alert alert-danger d-none" id="webhook-error" role="alert">
|
||||
<i class="fa fa-exclamation-triangle"></i> Webhook has an error!
|
||||
</div>
|
||||
|
||||
<div class="alert alert-success d-none" id="webhook-success" role="alert">
|
||||
<i class="fa fa-smile-beam"></i> The Webhook notifier is working correctly!
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<span class="d-block small text-center mt-3 mb-5">
|
||||
<span class="text-capitalize">HTTP webhooker</span> Notifier created by <a href="https://github.com/hunterlong" target="_blank">Hunter Long</a>
|
||||
</span>
|
||||
|
||||
<div class="alert alert-danger d-none" id="alerter" role="alert"></div>
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="tab-pane fade" id="v-pills-integration-csv" role="tabpanel" aria-labelledby="v-pills-integration-csv-tab">
|
||||
|
||||
|
@ -1073,7 +335,6 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import Api from "../components/API"
|
||||
import CoreSettings from '../forms/CoreSettings';
|
||||
|
||||
export default {
|
||||
|
|
Loading…
Reference in New Issue