This commit is contained in:
Nawaz Dhandala 2021-09-21 18:27:51 +01:00
parent c3c717982b
commit 6daedd4226
3 changed files with 19 additions and 4 deletions

View File

@ -3770,9 +3770,14 @@ module.exports = {
}
};
const incidentAlert = subscriber.notificationType?.incident;
let incidentAlert = subscriber.notificationType?.incident;
const statusPageId = subscriber?.statusPageId;
// if there is no notification type, then set incidentAlert to true.
if (!subscriber.notificationType) {
incidentAlert = true;
}
if (!statusPageId) {
sendAlerts();
} else {
@ -4986,10 +4991,14 @@ module.exports = {
}
};
const scheduledEventAlert =
let scheduledEventAlert =
subscriber.notificationType?.scheduledEvent;
const statusPageId = subscriber?.statusPageId;
if (!subscriber.notificationType) {
scheduledEventAlert = true;
}
if (!statusPageId) {
sendAlerts();
} else {
@ -5422,10 +5431,15 @@ module.exports = {
}
};
const announcementAlert =
let announcementAlert =
subscriber.notificationType?.announcement;
const statusPageId = subscriber?.statusPageId;
// if there is no notification type, then set incidentAlert to true.
if (!subscriber.notificationType) {
announcementAlert = true;
}
if (!statusPageId) {
sendAlerts();
} else {

View File

@ -203,6 +203,7 @@ services:
- IS_SAAS_SERVICE=${IS_SAAS_SERVICE}
- SCRIPT_RUNNER_URL=http://script-runner:3009
- CLUSTER_KEY=test
- REALTIME_URL=http://realtime:3300
depends_on:
- mongo
- redis

View File

@ -36,7 +36,7 @@
"prod": "docker-compose up -d",
"dev": "npm run build-dev $npm_config_services && npm run run-enterprise-dev $npm_config_services",
"saas-dev": "export IS_SAAS_SERVICE=true && npm run dev $npm_config_services",
"run-enterprise-dev": "DOCKER_CLIENT_TIMEOUT=240 && COMPOSE_HTTP_TIMEOUT=240 && docker-compose -f docker-compose.dev.yml up -d $npm_config_services",
"run-enterprise-dev": "DOCKER_CLIENT_TIMEOUT=1000 && COMPOSE_HTTP_TIMEOUT=1000 && docker-compose -f docker-compose.dev.yml up -d $npm_config_services",
"stop-dev": "docker-compose -f docker-compose.dev.yml down --remove-orphans",
"staging-test": "cd tests && npm run-script staging-test",
"remove-all-containers": "docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q) || echo 'No running containers'",