diff --git a/accounts/package-lock.json b/accounts/package-lock.json index 07ed37ec87..a183f4e6c1 100644 --- a/accounts/package-lock.json +++ b/accounts/package-lock.json @@ -2245,9 +2245,9 @@ "integrity": "sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==" }, "axe-core": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-3.3.0.tgz", - "integrity": "sha512-54XaTd2VB7A6iBnXMUG2LnBOI7aRbnrVxC5Tz+rVUwYl9MX/cIJc/Ll32YUoFIE/e9UKWMZoQenQu9dFrQyZCg==", + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/axe-core/-/axe-core-3.5.5.tgz", + "integrity": "sha512-5P0QZ6J5xGikH780pghEdbEKijCTrruK9KxtPZCFWUpef0f6GipO+xEZ5GKCb020mmqgbiNO6TcA55CriL784Q==", "dev": true }, "axios": { @@ -4608,9 +4608,9 @@ "integrity": "sha512-2jhQxJKcjcSpVOQm0NAfuLq8o+130blrcawoumdXT6411xG/xIAOyZodO/y7WTaYlz/NHe3sCCAe/cJLnDsqTw==" }, "elliptic": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", - "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", "requires": { "bn.js": "^4.4.0", "brorand": "^1.0.1", @@ -6708,13 +6708,10 @@ "dev": true }, "intl-pluralrules": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/intl-pluralrules/-/intl-pluralrules-1.1.2.tgz", - "integrity": "sha512-awT+Y/f7ftsg8IUfxRotCYFnDdmpFJQqud1jkOw8RAOUjslbhSC+xJoG4pqj/X8casKgAlQttnsbQP3R0BICyQ==", - "dev": true, - "requires": { - "make-plural": "^6.1.0" - } + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/intl-pluralrules/-/intl-pluralrules-1.2.0.tgz", + "integrity": "sha512-7v29fFKsaPquXezxttUNFdE6LQUD41I8JX76royEWBPuYIEruvfvprU3d8CsiNVIieVg/VeV2ee5WI0w0Vs2Sg==", + "dev": true }, "invariant": { "version": "2.2.4", @@ -8189,9 +8186,9 @@ "dev": true }, "js-library-detector": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/js-library-detector/-/js-library-detector-5.8.0.tgz", - "integrity": "sha512-7H10W+oukLGvs5gT5SeMjqYX03rglIQt3ggXzRiQxveUkVupHhbrd2mGPTKQ87bxSvMzlnAMdExfCDnquUi93Q==", + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/js-library-detector/-/js-library-detector-5.9.0.tgz", + "integrity": "sha512-0wYHRVJv8uVsylJhfQQaH2vOBYGehyZyJbtaHuchoTP3Mb6hqYvrA0hoMQ1ZhARLHzHJMbMc/nCr4D3pTNSCgw==", "dev": true }, "js-tokens": { @@ -8434,13 +8431,13 @@ } }, "lighthouse": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/lighthouse/-/lighthouse-5.6.0.tgz", - "integrity": "sha512-PQYeK6/P0p/JxP/zq8yfcPmuep/aeib5ykROTgzDHejMiuzYdD6k6MaSCv0ncwK+lj+Ld67Az+66rHqiPKHc6g==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/lighthouse/-/lighthouse-6.1.1.tgz", + "integrity": "sha512-H/ulIcKGMCmgGlK8dDngo72ehBg8WBr2eGW47MN+SAneYoUQmQO41vGo8f7UG9l2oCyabBETEJO4R7yew3XF8g==", "dev": true, "requires": { - "axe-core": "3.3.0", - "chrome-launcher": "^0.11.2", + "axe-core": "3.5.5", + "chrome-launcher": "^0.13.3", "configstore": "^3.1.1", "cssstyle": "1.2.1", "details-element-polyfill": "^2.4.0", @@ -8450,7 +8447,7 @@ "intl-messageformat": "^4.4.0", "intl-pluralrules": "^1.0.3", "jpeg-js": "0.1.2", - "js-library-detector": "^5.5.0", + "js-library-detector": "^5.7.0", "jsonld": "^1.5.0", "jsonlint-mod": "^1.7.5", "lighthouse-logger": "^1.2.0", @@ -8458,7 +8455,6 @@ "lodash.set": "^4.3.2", "lookup-closest-locale": "6.0.4", "metaviewport-parser": "0.2.0", - "mkdirp": "0.5.1", "open": "^6.4.0", "parse-cache-control": "1.0.1", "raven": "^2.2.1", @@ -8466,11 +8462,11 @@ "robots-parser": "^2.0.1", "semver": "^5.3.0", "speedline-core": "1.4.2", - "third-party-web": "^0.11.0", + "third-party-web": "^0.11.1", "update-notifier": "^2.5.0", "ws": "3.3.2", "yargs": "3.32.0", - "yargs-parser": "7.0.0" + "yargs-parser": "^18.1.3" }, "dependencies": { "ansi-regex": { @@ -8492,16 +8488,28 @@ "dev": true }, "chrome-launcher": { - "version": "0.11.2", - "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-0.11.2.tgz", - "integrity": "sha512-jx0kJDCXdB2ARcDMwNCtrf04oY1Up4rOmVu+fqJ5MTPOOIG8EhRcEU9NZfXZc6dMw9FU8o1r21PNp8V2M0zQ+g==", + "version": "0.13.4", + "resolved": "https://registry.npmjs.org/chrome-launcher/-/chrome-launcher-0.13.4.tgz", + "integrity": "sha512-nnzXiDbGKjDSK6t2I+35OAPBy5Pw/39bgkb/ZAFwMhwJbdYBp6aH+vW28ZgtjdU890Q7D+3wN/tB8N66q5Gi2A==", "dev": true, "requires": { "@types/node": "*", - "is-wsl": "^2.1.0", + "escape-string-regexp": "^1.0.5", + "is-wsl": "^2.2.0", "lighthouse-logger": "^1.0.0", - "mkdirp": "0.5.1", - "rimraf": "^2.6.1" + "mkdirp": "^0.5.3", + "rimraf": "^3.0.2" + }, + "dependencies": { + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } } }, "cli-cursor": { @@ -8619,10 +8627,13 @@ "dev": true }, "is-wsl": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.1.1.tgz", - "integrity": "sha512-umZHcSrwlDHo2TGMXv0DZ8dIUGunZ2Iv68YZnrmCiBPkZ4aaOhtv7pXJKeki9k3qJ3RJr0cDyitcl5wEH3AYog==", - "dev": true + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-wsl/-/is-wsl-2.2.0.tgz", + "integrity": "sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==", + "dev": true, + "requires": { + "is-docker": "^2.0.0" + } }, "lcid": { "version": "1.0.0", @@ -8639,21 +8650,6 @@ "integrity": "sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ==", "dev": true }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, "mute-stream": { "version": "0.0.7", "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.7.tgz", @@ -8841,18 +8837,19 @@ } }, "yargs-parser": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-7.0.0.tgz", - "integrity": "sha1-jQrELxbqVd69MyyvTEA4s+P139k=", + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", "dev": true, "requires": { - "camelcase": "^4.1.0" + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" }, "dependencies": { "camelcase": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", - "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", "dev": true } } @@ -8986,9 +8983,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" }, "lodash-es": { "version": "4.17.15", @@ -9117,12 +9114,6 @@ } } }, - "make-plural": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/make-plural/-/make-plural-6.1.0.tgz", - "integrity": "sha512-0ekbPHqxcdRcmjZ43TkRuejK5rXgMF1OjG4FVnVHgCvOcjrexaSX7a0dfAvqhOm1qWPgjYnXtmz3cHpHW5ZewA==", - "dev": true - }, "makeerror": { "version": "1.0.11", "resolved": "https://registry.npmjs.org/makeerror/-/makeerror-1.0.11.tgz", @@ -14258,9 +14249,9 @@ "dev": true }, "underscore": { - "version": "1.9.2", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.2.tgz", - "integrity": "sha512-D39qtimx0c1fI3ya1Lnhk3E9nONswSKhnffBI0gME9C99fYOkNi04xs8K6pePLhvl1frbDemkaBQ5ikWllR2HQ==", + "version": "1.10.2", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.10.2.tgz", + "integrity": "sha512-N4P+Q/BuyuEKFJ43B9gYuOj4TQUHXX+j2FqguVOpjkssLUUrnJofCcBccJSCoeturDoZU6GorDTHSvUDlSQbTg==", "dev": true }, "unicode-canonical-property-names-ecmascript": { diff --git a/accounts/package.json b/accounts/package.json index 60767463ca..cd40030c79 100755 --- a/accounts/package.json +++ b/accounts/package.json @@ -54,7 +54,7 @@ "chrome-launcher": "^0.13.2", "commander": "^4.0.1", "depcheck": "^0.9.2", - "lighthouse": "^5.6.0", + "lighthouse": "^6.1.1", "npm-audit-ci-wrapper": "^2.5.1", "ora": "^4.0.3", "redux-logger": "^3.0.6", diff --git a/admin-dashboard/package-lock.json b/admin-dashboard/package-lock.json index 12efbbe7de..18816b84a7 100644 --- a/admin-dashboard/package-lock.json +++ b/admin-dashboard/package-lock.json @@ -5421,9 +5421,9 @@ "integrity": "sha512-i2QrQtHes5fK/F9QGG5XacM5WKEuR322fxTYF9e8O9Gu0mc0WmjjwGpV8c7Htso6Zf2Di18lc3SIPxmMeRFBug==" }, "elliptic": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", - "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", "requires": { "bn.js": "^4.4.0", "brorand": "^1.0.1", @@ -10473,9 +10473,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" }, "lodash-es": { "version": "4.17.15", diff --git a/backend/backend/api/probe.js b/backend/backend/api/probe.js index 6a8c79ac38..31d2395d1e 100755 --- a/backend/backend/api/probe.js +++ b/backend/backend/api/probe.js @@ -80,7 +80,7 @@ router.post('/ping/:monitorId', isAuthorizedProbe, async function( response ) { try { - const { monitor, res, resp, type } = req.body; + const { monitor, res, resp, type, retryCount } = req.body; let status, log; if (type === 'api' || type === 'url') { @@ -140,6 +140,7 @@ router.post('/ping/:monitorId', isAuthorizedProbe, async function( data.pwa = resp && resp.pwa ? resp.pwa : null; data.lighthouseData = resp && resp.lighthouseData ? resp.lighthouseData : null; + data.retryCount = retryCount || 0; if (data.lighthouseScanStatus) { if (data.lighthouseScanStatus === 'scanning') { diff --git a/backend/backend/services/probeService.js b/backend/backend/services/probeService.js index bdf3e0d29a..ffc477348b 100755 --- a/backend/backend/services/probeService.js +++ b/backend/backend/services/probeService.js @@ -198,6 +198,10 @@ module.exports = { // check if previous status is different from the current status // if different, resolve last incident, create a new incident and monitor status if (lastStatus) { + // check 3 times just to make sure + if (data.retryCount < 3) + return { retry: true, retryCount: data.retryCount }; + const monitor = await MonitorService.findOneBy({ _id: data.monitorId, }); @@ -221,13 +225,17 @@ module.exports = { ); } - const incidentIds = await _this.incidentCreateOrUpdate(data); + const incidentIdsOrRetry = await _this.incidentCreateOrUpdate( + data + ); + if (incidentIdsOrRetry.retry) return incidentIdsOrRetry; + await MonitorStatusService.create(data); - if (incidentIds && incidentIds.length) { + if (incidentIdsOrRetry && incidentIdsOrRetry.length) { log = await MonitorLogService.updateOneBy( { _id: log._id }, - { incidentIds } + { incidentIdsOrRetry } ); } } @@ -297,6 +305,8 @@ module.exports = { return newIncident; }); } else { + if (data.retryCount < 3) + return { retry: true, retryCount: data.retryCount }; incidentIds = await [ IncidentService.create({ projectId: monitor.projectId, @@ -339,6 +349,8 @@ module.exports = { return newIncident; }); } else { + if (data.retryCount < 3) + return { retry: true, retryCount: data.retryCount }; incidentIds = await [ IncidentService.create({ projectId: monitor.projectId, @@ -381,6 +393,8 @@ module.exports = { return newIncident; }); } else { + if (data.retryCount < 3) + return { retry: true, retryCount: data.retryCount }; incidentIds = await [ IncidentService.create({ projectId: monitor.projectId, diff --git a/backend/backend/services/twilioService.js b/backend/backend/services/twilioService.js index e956be8fd0..d16d1be31d 100755 --- a/backend/backend/services/twilioService.js +++ b/backend/backend/services/twilioService.js @@ -14,6 +14,7 @@ const UserModel = require('../models/user'); const UserService = require('./userService'); const SmsCountService = require('./smsCountService'); const AlertService = require('./alertService'); +const EncryptDecrypt = require('../config/encryptDecrypt'); const _this = { findByOne: async function(query) { @@ -169,9 +170,12 @@ const _this = { from: customTwilioSettings.phoneNumber, to: number, }; + const authToken = await EncryptDecrypt.decrypt( + customTwilioSettings.authToken + ); const twilioClient = _this.getClient( customTwilioSettings.accountSid, - customTwilioSettings.authToken + authToken ); const message = await twilioClient.messages.create(options); return message; diff --git a/backend/package-lock.json b/backend/package-lock.json index fc882c3853..6be77a0cd8 100644 --- a/backend/package-lock.json +++ b/backend/package-lock.json @@ -369,6 +369,13 @@ "lodash": "4.17.15", "request": "2.88.0", "xhr": "2.3.3" + }, + "dependencies": { + "lodash": { + "version": "4.17.15", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", + "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + } } }, "ajv": { @@ -3915,9 +3922,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" }, "lodash-node": { "version": "2.4.1", @@ -4381,16 +4388,6 @@ "y18n": "^4.0.0", "yargs-parser": "^13.1.1" } - }, - "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", - "dev": true, - "requires": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } } } }, @@ -7263,9 +7260,9 @@ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==" }, "yargs": { - "version": "15.1.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.1.0.tgz", - "integrity": "sha512-T39FNN1b6hCW4SOIk1XyTOWxtXdcen0t+XYrysQmChzSipvhBO8Bj0nK1ozAasdk24dNWuMZvr4k24nz+8HHLg==", + "version": "15.4.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-15.4.1.tgz", + "integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==", "dev": true, "requires": { "cliui": "^6.0.0", @@ -7278,7 +7275,7 @@ "string-width": "^4.2.0", "which-module": "^2.0.0", "y18n": "^4.0.0", - "yargs-parser": "^16.1.0" + "yargs-parser": "^18.1.2" }, "dependencies": { "ansi-regex": { @@ -7312,13 +7309,23 @@ "requires": { "ansi-regex": "^5.0.0" } + }, + "yargs-parser": { + "version": "18.1.3", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.3.tgz", + "integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } } } }, "yargs-parser": { - "version": "16.1.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-16.1.0.tgz", - "integrity": "sha512-H/V41UNZQPkUMIT5h5hiwg4QKIY1RPvoBV4XcjUbRM8Bk2oKqqyZ0DIEbTFZB0XjbtSPG8SAa/0DxCQmiRgzKg==", + "version": "13.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", + "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", "dev": true, "requires": { "camelcase": "^5.0.0", @@ -7458,9 +7465,9 @@ } }, "yargs-parser": { - "version": "13.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.1.tgz", - "integrity": "sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ==", + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", "dev": true, "requires": { "camelcase": "^5.0.0", diff --git a/backend/package.json b/backend/package.json index 7f49bca1a3..32ddf1411e 100755 --- a/backend/package.json +++ b/backend/package.json @@ -19,7 +19,7 @@ "jsdom": "^9.12.0", "jsonwebtoken": "^8.5.1", "jstoxml": "^1.6.0", - "lodash": "^4.17.15", + "lodash": "^4.17.19", "moment": "^2.24.0", "moment-timezone": "^0.5.27", "mongoose": "^5.7.14", diff --git a/backend/test/stripe.test.js b/backend/test/stripe.test.js index 32f5cb1cc3..d76964ed2e 100755 --- a/backend/test/stripe.test.js +++ b/backend/test/stripe.test.js @@ -204,7 +204,7 @@ describe('Stripe payment API', function() { .end(function(err, res) { expect(res).to.have.status(400); expect(res.body.message).to.be.equal( - 'No such token: "tok_invalid"' + "No such token: 'tok_invalid'" ); done(); }); diff --git a/backend/views/head.ejs b/backend/views/head.ejs index 90a2123142..4c66c36705 100755 --- a/backend/views/head.ejs +++ b/backend/views/head.ejs @@ -47,12 +47,12 @@ - + - + diff --git a/dashboard/package-lock.json b/dashboard/package-lock.json index 324fc2145e..7170f3ff88 100644 --- a/dashboard/package-lock.json +++ b/dashboard/package-lock.json @@ -7289,9 +7289,9 @@ "integrity": "sha512-i2QrQtHes5fK/F9QGG5XacM5WKEuR322fxTYF9e8O9Gu0mc0WmjjwGpV8c7Htso6Zf2Di18lc3SIPxmMeRFBug==" }, "elliptic": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", - "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", "requires": { "bn.js": "^4.4.0", "brorand": "^1.0.1", @@ -11358,9 +11358,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==" + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==" }, "lodash-es": { "version": "4.17.15", diff --git a/dashboard/package.json b/dashboard/package.json index 92af9cf501..e527d3b090 100755 --- a/dashboard/package.json +++ b/dashboard/package.json @@ -27,7 +27,7 @@ "imrc-datetime-picker": "^2.1.1", "js-uuid": "0.0.6", "loadable-components": "^2.2.3", - "lodash": "^4.17.5", + "lodash": "^4.17.19", "moment": "^2.24.0", "moment-range": "^4.0.1", "moment-timezone": "^0.5.27", diff --git a/dashboard/src/components/nav/SideNavItem.js b/dashboard/src/components/nav/SideNavItem.js index f12481d759..0abaa8cc25 100755 --- a/dashboard/src/components/nav/SideNavItem.js +++ b/dashboard/src/components/nav/SideNavItem.js @@ -114,6 +114,15 @@ export class SidebarNavItem extends Component { return response; }); + const isSubLinkActive = route.subRoutes.some(link => + link.title === 'Status Page' && + location.pathname.match( + /project\/([0-9]|[a-z])*\/sub-project\/([0-9]|[a-z])*\/status-page\/([0-9]|[a-z])*/ + ) + ? true + : false + ); + const routeStyle = { position: 'relative', marginTop: route.title === 'Back to Dashboard' ? '20px' : 0, @@ -138,7 +147,8 @@ export class SidebarNavItem extends Component { className={`db-SideNav-icon db-SideNav-icon--${ route.icon } ${ - isLinkActive + isLinkActive || + isSubLinkActive ? 'db-SideNav-icon--selected' : null }`} @@ -148,7 +158,7 @@ export class SidebarNavItem extends Component { (
-
+
diff --git a/dashboard/src/pages/Application.js b/dashboard/src/pages/Application.js index cd88489fd1..ce114ff911 100644 --- a/dashboard/src/pages/Application.js +++ b/dashboard/src/pages/Application.js @@ -60,7 +60,7 @@ class Application extends Component { gettingApplicationSecurities, gettingSecurityLogs, location: { pathname }, - components, + component, scanApplicationSecuritySuccess, getApplicationSecuritySuccess, } = this.props; @@ -76,8 +76,7 @@ class Application extends Component { }); }); - const componentName = - components.length > 0 ? components[0].name : 'loading...'; + const componentName = component ? component.name : ''; return ( @@ -176,7 +175,7 @@ Application.propTypes = { location: PropTypes.shape({ pathname: PropTypes.string, }), - components: PropTypes.arrayOf( + component: PropTypes.arrayOf( PropTypes.shape({ name: PropTypes.string, }) @@ -187,16 +186,14 @@ Application.propTypes = { const mapStateToProps = (state, ownProps) => { const { componentId, projectId } = ownProps.match.params; - const components = []; - // filter to get the actual component - state.component.componentList.components.map(item => - item.components.map(component => { - if (String(component._id) === String(componentId)) { - components.push(component); + let component; + state.component.componentList.components.forEach(item => { + item.components.forEach(c => { + if (String(c._id) === String(componentId)) { + component = c; } - return component; - }) - ); + }); + }); return { componentId, @@ -205,7 +202,7 @@ const mapStateToProps = (state, ownProps) => { gettingSecurityLogs: state.security.getApplicationSecurityLog.requesting, gettingApplicationSecurities: state.security.getApplication.requesting, - components, + component, }; }; diff --git a/dashboard/src/pages/ApplicationLog.js b/dashboard/src/pages/ApplicationLog.js index 9979110a34..8802342edc 100644 --- a/dashboard/src/pages/ApplicationLog.js +++ b/dashboard/src/pages/ApplicationLog.js @@ -70,7 +70,7 @@ class ApplicationLog extends Component { false ); - const componentName = component.length > 0 ? component[0].name : ''; + const componentName = component ? component.name : ''; return ( @@ -132,12 +132,15 @@ const mapStateToProps = (state, props) => { const applicationLog = state.applicationLog.applicationLogsList; const currentProject = state.project.currentProject; - - const component = state.component.componentList.components.map(item => { - return item.components.find( - component => String(component._id) === String(componentId) - ); + let component; + state.component.componentList.components.forEach(item => { + item.components.forEach(c => { + if (String(c._id) === String(componentId)) { + component = c; + } + }); }); + return { applicationLogTutorial: state.tutorial.applicationLog, componentId, diff --git a/dashboard/src/pages/ApplicationLogView.js b/dashboard/src/pages/ApplicationLogView.js index 9e9c1910a5..b4bb7d8b1e 100644 --- a/dashboard/src/pages/ApplicationLogView.js +++ b/dashboard/src/pages/ApplicationLogView.js @@ -40,12 +40,7 @@ class ApplicationLogView extends Component { applicationLog, } = this.props; - const componentName = - component.length > 0 - ? component[0] - ? component[0].name - : component[1].name - : null; + const componentName = component ? component.name : ''; const applicationLogName = applicationLog.length > 0 ? applicationLog[0].name : null; return ( @@ -104,8 +99,13 @@ const mapDispatchToProps = dispatch => { }; const mapStateToProps = (state, props) => { const { componentId, applicationLogId } = props.match.params; - const component = state.component.componentList.components.map(item => { - return item.components.find(component => component._id === componentId); + let component; + state.component.componentList.components.forEach(item => { + item.components.forEach(c => { + if (String(c._id) === String(componentId)) { + component = c; + } + }); }); const applicationLog = state.applicationLog.applicationLogsList.applicationLogs.filter( applicationLog => applicationLog._id === applicationLogId diff --git a/dashboard/src/pages/Container.js b/dashboard/src/pages/Container.js index 8238b9fbb3..44d7792995 100644 --- a/dashboard/src/pages/Container.js +++ b/dashboard/src/pages/Container.js @@ -59,7 +59,7 @@ class Container extends Component { gettingContainerSecurities, gettingSecurityLogs, location: { pathname }, - components, + component, scanContainerSecuritySuccess, getContainerSecuritySuccess, } = this.props; @@ -77,8 +77,7 @@ class Container extends Component { return containerSecurity; }); - const componentName = - components.length > 0 ? components[0].name : 'loading...'; + const componentName = component ? component.name : ''; return ( @@ -186,7 +185,7 @@ Container.propTypes = { location: PropTypes.shape({ pathname: PropTypes.string, }), - components: PropTypes.arrayOf( + component: PropTypes.arrayOf( PropTypes.shape({ name: PropTypes.string, }) @@ -196,18 +195,16 @@ Container.propTypes = { }; const mapStateToProps = (state, ownProps) => { - const components = []; // ids from url const { componentId, projectId } = ownProps.match.params; - // filter to get the actual component - state.component.componentList.components.map(item => - item.components.map(component => { - if (String(component._id) === String(componentId)) { - components.push(component); + let component; + state.component.componentList.components.forEach(item => { + item.components.forEach(c => { + if (String(c._id) === String(componentId)) { + component = c; } - return component; - }) - ); + }); + }); return { projectId, @@ -215,7 +212,7 @@ const mapStateToProps = (state, ownProps) => { containerSecurities: state.security.containerSecurities, gettingSecurityLogs: state.security.getContainerSecurityLog.requesting, gettingContainerSecurities: state.security.getContainer.requesting, - components, + component, }; }; diff --git a/dashboard/src/pages/Incident.js b/dashboard/src/pages/Incident.js index cdae201455..2954c183b2 100755 --- a/dashboard/src/pages/Incident.js +++ b/dashboard/src/pages/Incident.js @@ -225,12 +225,9 @@ class Incident extends React.Component { this.props.incident.monitorId.name ? this.props.incident.monitorId.name : null; - const componentId = - this.props.component.length > 0 - ? this.props.component[0] - ? this.props.component[0]._id - : this.props.component[1]._id - : null; + const componentId = this.props.component + ? this.props.component._id + : ''; if (this.props.incident) { variable = (
@@ -314,7 +311,7 @@ class Incident extends React.Component { component, location: { pathname }, } = this.props; - const componentName = component.length > 0 ? component[0].name : ''; + const componentName = component ? component.name : ''; return ( @@ -349,10 +346,13 @@ class Incident extends React.Component { const mapStateToProps = (state, props) => { const { componentId } = props.match.params; - const component = state.component.componentList.components.map(item => { - return item.components.find( - component => String(component._id) === String(componentId) - ); + let component; + state.component.componentList.components.forEach(item => { + item.components.forEach(c => { + if (String(c._id) === String(componentId)) { + component = c; + } + }); }); return { diff --git a/dashboard/src/pages/IncidentLog.js b/dashboard/src/pages/IncidentLog.js index 35851b8e57..3634da9633 100755 --- a/dashboard/src/pages/IncidentLog.js +++ b/dashboard/src/pages/IncidentLog.js @@ -181,7 +181,7 @@ class IncidentLog extends React.Component { ); allIncidents && allIncidents.unshift(projectIncident); - const componentName = component.length > 0 ? component[0].name : ''; + const componentName = component ? component.name : ''; return ( @@ -218,11 +218,13 @@ class IncidentLog extends React.Component { const mapStateToProps = (state, props) => { const { componentId } = props.match.params; let subProjects = state.subProject.subProjects.subProjects; - - const component = state.component.componentList.components.map(item => { - return item.components.find( - component => String(component._id) === String(componentId) - ); + let component; + state.component.componentList.components.forEach(item => { + item.components.forEach(c => { + if (String(c._id) === String(componentId)) { + component = c; + } + }); }); // sort subprojects names for display in alphabetical order diff --git a/dashboard/src/pages/Monitor.js b/dashboard/src/pages/Monitor.js index 3359a33ea6..79403e9f05 100755 --- a/dashboard/src/pages/Monitor.js +++ b/dashboard/src/pages/Monitor.js @@ -174,7 +174,7 @@ class DashboardView extends Component { subProjects, currentProject, location: { pathname }, - components, + component, } = this.props; const currentProjectId = currentProject ? currentProject._id : null; @@ -257,12 +257,7 @@ class DashboardView extends Component { ); monitors && monitors.unshift(projectMonitor); - const componentName = - components.length > 0 - ? components[0] - ? components[0].name - : components[1].name - : null; + const componentName = component ? component.name : ''; return ( @@ -429,16 +424,14 @@ const mapDispatchToProps = dispatch => { const mapStateToProps = (state, props) => { const { componentId } = props.match.params; const monitor = state.monitor; - const components = []; - // filter to get the actual component - state.component.componentList.components.map(item => - item.components.map(component => { - if (String(component._id) === String(componentId)) { - components.push(component); + let component; + state.component.componentList.components.forEach(item => { + item.components.forEach(c => { + if (String(c._id) === String(componentId)) { + component = c; } - return component; - }) - ); + }); + }); monitor.monitorsList.monitors.forEach(item => { item.monitors = item.monitors.filter( @@ -468,7 +461,7 @@ const mapStateToProps = (state, props) => { monitorTutorial: state.tutorial.monitor, startDate: state.monitor.monitorsList.startDate, endDate: state.monitor.monitorsList.endDate, - components, + component, }; }; @@ -504,7 +497,7 @@ DashboardView.propTypes = { location: PropTypes.shape({ pathname: PropTypes.string, }), - components: PropTypes.arrayOf( + component: PropTypes.arrayOf( PropTypes.shape({ name: PropTypes.string, }) diff --git a/dashboard/src/pages/MonitorView.js b/dashboard/src/pages/MonitorView.js index 578ad78f9f..c7ea1b91c2 100755 --- a/dashboard/src/pages/MonitorView.js +++ b/dashboard/src/pages/MonitorView.js @@ -119,12 +119,7 @@ class MonitorView extends React.Component { const subProjectId = this.props.monitor ? this.props.monitor.projectId._id || this.props.monitor.projectId : null; - const componentName = - component.length > 0 - ? component[0] - ? component[0].name - : component[1].name - : null; + const componentName = component ? component.name : ''; const monitorName = monitor ? monitor.name : ''; const componentMonitorsRoute = getParentRoute(pathname); @@ -405,10 +400,13 @@ class MonitorView extends React.Component { const mapStateToProps = (state, props) => { const { componentId, monitorId } = props.match.params; - const component = state.component.componentList.components.map(item => { - return item.components.find( - component => String(component._id) === String(componentId) - ); + let component; + state.component.componentList.components.forEach(item => { + item.components.forEach(c => { + if (String(c._id) === String(componentId)) { + component = c; + } + }); }); const monitor = state.monitor.monitorsList.monitors .map(monitor => diff --git a/dashboard/src/test/puppeteer/IncidentTimeline.test.js b/dashboard/src/test/puppeteer/IncidentTimeline.test.js index f1ae248e23..01fba12e4f 100644 --- a/dashboard/src/test/puppeteer/IncidentTimeline.test.js +++ b/dashboard/src/test/puppeteer/IncidentTimeline.test.js @@ -52,15 +52,15 @@ describe('Incident Timeline API', () => { // add new monitor to project await page.waitForSelector('#monitors'); - await page.click('#monitors'); + await page.$eval('#monitors', e => e.click()); await page.waitForSelector('#form-new-monitor'); - await page.click('input[id=name]'); + await page.$eval('input[id=name]', e => e.click()); await page.type('input[id=name]', projectMonitorName); await init.selectByText('#type', 'url', page); await page.waitForSelector('#url'); - await page.click('#url'); + await page.$eval('#url', e => e.click()); await page.type('#url', utils.HTTP_TEST_SERVER_URL); - await page.click('button[type=submit]'); + await page.$eval('button[type=submit]', e => e.click()); await page.waitFor(2000); }); }); @@ -86,19 +86,19 @@ describe('Incident Timeline API', () => { () => (document.getElementById('body').value = '') ); await page.waitForSelector('#responseTime'); - await page.click('input[name=responseTime]'); + await page.$eval('input[name=responseTime]', e => e.click()); await page.type('input[name=responseTime]', '0'); await page.waitForSelector('#statusCode'); - await page.click('input[name=statusCode]'); + await page.$eval('input[name=statusCode]', e => e.click()); await page.type('input[name=statusCode]', '400'); await page.select('#responseType', 'html'); await page.waitForSelector('#body'); - await page.click('textarea[name=body]'); + await page.$eval('textarea[name=body]', e => e.click()); await page.type( 'textarea[name=body]', `

${bodyText}

` ); - await page.click('button[type=submit]'); + await page.$eval('button[type=submit]', e => e.click()); await page.waitForSelector('#save-btn'); }; @@ -120,7 +120,9 @@ describe('Incident Timeline API', () => { ); await page.waitForSelector(`#incident_${projectMonitorName}_0`); - await page.click(`#incident_${projectMonitorName}_0`); + await page.$eval(`#incident_${projectMonitorName}_0`, e => + e.click() + ); await page.waitFor(5000); const incidentTimelineRows = await page.$$( @@ -154,19 +156,19 @@ describe('Incident Timeline API', () => { () => (document.getElementById('body').value = '') ); await page.waitForSelector('#responseTime'); - await page.click('input[name=responseTime]'); + await page.$eval('input[name=responseTime]', e => e.click()); await page.type('input[name=responseTime]', '0'); await page.waitForSelector('#statusCode'); - await page.click('input[name=statusCode]'); + await page.$eval('input[name=statusCode]', e => e.click()); await page.type('input[name=statusCode]', '200'); await page.select('#responseType', 'html'); await page.waitForSelector('#body'); - await page.click('textarea[name=body]'); + await page.$eval('textarea[name=body]', e => e.click()); await page.type( 'textarea[name=body]', `

${bodyText}

` ); - await page.click('button[type=submit]'); + await page.$eval('button[type=submit]', e => e.click()); await page.waitForSelector('#save-btn'); }; @@ -181,7 +183,9 @@ describe('Incident Timeline API', () => { expect(resolveTextSelector).not.toBeNull(); await page.waitForSelector(`#incident_${projectMonitorName}_0`); - await page.click(`#incident_${projectMonitorName}_0`); + await page.$eval(`#incident_${projectMonitorName}_0`, e => + e.click() + ); await page.waitFor(5000); const incidentTimelineRows = await page.$$( @@ -442,7 +446,9 @@ describe('Incident Timeline API', () => { await page.waitForSelector(`#componentResource_0`); await page.click(`#componentResource_0`); await page.waitForSelector(`#incident_${projectMonitorName}_0`); - await page.click(`#incident_${projectMonitorName}_0`); + await page.$eval(`#incident_${projectMonitorName}_0`, e => + e.click() + ); for (let i = 0; i < 10; i++) { // add internal note diff --git a/dashboard/src/test/puppeteer/MonitorDetail.test.js b/dashboard/src/test/puppeteer/MonitorDetail.test.js index fffd23b412..4a83f60a89 100644 --- a/dashboard/src/test/puppeteer/MonitorDetail.test.js +++ b/dashboard/src/test/puppeteer/MonitorDetail.test.js @@ -91,10 +91,12 @@ describe('Monitor Detail API', () => { ); await page.waitForSelector(`#createIncident_${monitorName}`); - await page.click(`#createIncident_${monitorName}`); + await page.$eval(`#createIncident_${monitorName}`, e => + e.click() + ); await page.waitForSelector('#createIncident'); await init.selectByText('#incidentType', 'Offline', page); - await page.click('#createIncident'); + await page.$eval('#createIncident', e => e.click()); const selector = 'tr.incidentListItem'; await page.waitForSelector(selector); @@ -120,7 +122,9 @@ describe('Monitor Detail API', () => { await page.waitForSelector( `#monitorCreateIncident_${monitorName}` ); - await page.click(`#monitorCreateIncident_${monitorName}`); + await page.$eval(`#monitorCreateIncident_${monitorName}`, e => + e.click() + ); await page.waitForSelector('#incidentTitleLabel'); let spanElement = await page.waitForSelector( `#incidentTitleLabel` @@ -178,15 +182,15 @@ describe('Monitor Detail API', () => { await page.waitFor(5000); const selector = 'tr.incidentListItem'; await page.waitForSelector(selector); - await page.click(selector); + await page.$eval(selector, e => e.click()); await page.waitFor(5000); await page.waitForSelector('button[id=deleteIncidentButton]'); - await page.click('#deleteIncidentButton'); + await page.$eval('#deleteIncidentButton', e => e.click()); await page.waitFor(5000); await page.waitForSelector('button[id=confirmDeleteIncident]', { visible: true, }); - await page.click('#confirmDeleteIncident'); + await page.$eval('#confirmDeleteIncident', e => e.click()); await page.waitForNavigation(); const incidentList = 'tr.incidentListItem'; @@ -213,17 +217,19 @@ describe('Monitor Detail API', () => { const addButtonSelector = '#addScheduledEventButton'; await page.waitForSelector(addButtonSelector); - await page.click(addButtonSelector); + await page.$eval(addButtonSelector, e => e.click()); await page.waitForSelector('form input[name=startDate]'); - await page.click('input[name=startDate]'); - await page.click( - 'div.MuiDialogActions-root button:nth-child(2)' + await page.$eval('input[name=startDate]', e => e.click()); + await page.$eval( + 'div.MuiDialogActions-root button:nth-child(2)', + e => e.click() ); - await page.click('input[name=endDate]'); - await page.click( - 'div.MuiDialogActions-root button:nth-child(2)' + await page.$eval('input[name=endDate]', e => e.click()); + await page.$eval( + 'div.MuiDialogActions-root button:nth-child(2)', + e => e.click() ); await page.type('input[name=name]', utils.scheduledEventName); @@ -238,17 +244,13 @@ describe('Monitor Detail API', () => { .click(); }); - const createScheduledEventPromise = page.waitForResponse( - response => response.url().includes('/scheduledEvent/') - ); - - await Promise.all([ - createScheduledEventPromise, - page.click('#createScheduledEventButton'), - ]); + await page.$eval('#createScheduledEventButton', e => e.click()), + await page.waitForResponse(response => + response.url().includes('/scheduledEvent/') + ); const createdScheduledEventSelector = '.scheduled-event-name'; - await page.waitFor(5000); + await page.waitForSelector(createdScheduledEventSelector); const createdScheduledEventName = await page.$eval( createdScheduledEventSelector, @@ -277,17 +279,19 @@ describe('Monitor Detail API', () => { const addButtonSelector = '#addScheduledEventButton'; await page.waitForSelector(addButtonSelector); - await page.click(addButtonSelector); + await page.$eval(addButtonSelector, e => e.click()); await page.waitForSelector('form input[name=startDate]'); - await page.click('input[name=startDate]'); - await page.click( - 'div.MuiDialogActions-root button:nth-child(2)' + await page.$eval('input[name=startDate]', e => e.click()); + await page.$eval( + 'div.MuiDialogActions-root button:nth-child(2)', + e => e.click() ); - await page.click('input[name=endDate]'); - await page.click( - 'div.MuiDialogActions-root button:nth-child(2)' + await page.$eval('input[name=endDate]', e => e.click()); + await page.$eval( + 'div.MuiDialogActions-root button:nth-child(2)', + e => e.click() ); await page.type( @@ -305,18 +309,14 @@ describe('Monitor Detail API', () => { .click(); }); - const createScheduledEventPromise = page.waitForResponse( - response => response.url().includes('/scheduledEvent/') - ); - - await Promise.all([ - createScheduledEventPromise, - page.click('#createScheduledEventButton'), - ]); + await page.$eval('#createScheduledEventButton', e => e.click()), + await page.waitForResponse(response => + response.url().includes('/scheduledEvent/') + ); const createdScheduledEventSelector = '#scheduledEventsList .scheduled-event-name'; - await page.waitFor(5000); + await page.waitForSelector(createdScheduledEventSelector); const scheduledEventRows = await page.$$( createdScheduledEventSelector @@ -343,13 +343,13 @@ describe('Monitor Detail API', () => { const addButtonSelector = '#addSubscriberButton'; await page.waitForSelector(addButtonSelector); - await page.click(addButtonSelector); + await page.$eval(addButtonSelector, e => e.click()); await page.waitForSelector('#alertViaId'); await init.selectByText('#alertViaId', 'email', page); await page.type('input[name=email]', subscriberEmail); - await page.click('#createSubscriber'); + await page.$eval('#createSubscriber', e => e.click()); const createdSubscriberSelector = '#subscribersList > tbody > tr.subscriber-list-item .contact'; @@ -383,14 +383,14 @@ describe('Monitor Detail API', () => { await page.waitForSelector(addButtonSelector); for (let i = 0; i < 5; i++) { - await page.click(addButtonSelector); + await page.$eval(addButtonSelector, e => e.click()); await page.waitForSelector('#alertViaId'); await init.selectByText('#alertViaId', 'email', page); await page.type( 'input[name=email]', utils.generateRandomBusinessEmail() ); - await page.click('#createSubscriber'); + await page.$eval('#createSubscriber', e => e.click()); await page.waitFor(1000); } @@ -442,7 +442,7 @@ describe('Monitor Detail API', () => { const addButtonSelector = '#addMsTeamsButton'; await page.waitForSelector(addButtonSelector); - await page.click(addButtonSelector); + await page.$eval(addButtonSelector, e => e.click()); await page.waitForSelector('#endpoint'); @@ -457,7 +457,7 @@ describe('Monitor Detail API', () => { const createdWebhookSelector = '#msteamsWebhookList > tbody > tr.webhook-list-item > td:nth-child(1) > div > span > div > span'; - await page.click('#createMsTeams'); + await page.$eval('#createMsTeams', e => e.click()); await page.waitForSelector(createdWebhookSelector); const createdWebhookEndpoint = await page.$eval( @@ -497,13 +497,12 @@ describe('Monitor Detail API', () => { const editWebhookButtonSelector = '#msteamsWebhookList > tbody > tr.webhook-list-item > td:nth-child(2) > div > span > div > button:nth-child(1)'; - await page.click(editWebhookButtonSelector); + await page.$eval(editWebhookButtonSelector, e => e.click()); const newWebhookEndpoint = utils.generateRandomWebsite(); await page.click('#endpoint', { clickCount: 3 }); - await page.keyboard.press('Backspace'); await page.type('#endpoint', newWebhookEndpoint); - await page.click('#msteamsUpdate'); + await page.$eval('#msteamsUpdate', e => e.click()); await page.waitFor(1000); const updatedWebhookEndpoint = await page.$eval( existingWebhookSelector, @@ -537,10 +536,10 @@ describe('Monitor Detail API', () => { const deleteWebhookButtonSelector = '#msteamsWebhookList > tbody > tr.webhook-list-item > td:nth-child(2) > div > span > div > button:nth-child(2)'; - await page.click(deleteWebhookButtonSelector); + await page.$eval(deleteWebhookButtonSelector, e => e.click()); await page.waitForSelector('#msteamsDelete'); - await page.click('#msteamsDelete'); + await page.$eval('#msteamsDelete', e => e.click()); await page.waitFor(1000); webhookRows = await page.$$(createdWebhookSelector); @@ -567,7 +566,7 @@ describe('Monitor Detail API', () => { await page.waitForSelector(addButtonSelector); for (let i = 0; i < 11; i++) { - await page.click(addButtonSelector); + await page.$eval(addButtonSelector, e => e.click()); await page.waitForSelector('#endpoint'); await page.type('#endpoint', utils.generateRandomWebsite()); @@ -576,7 +575,7 @@ describe('Monitor Detail API', () => { .querySelector('input[name=incidentCreated]') .click(); }); - await page.click('#createMsTeams'); + await page.$eval('#createMsTeams', e => e.click()); await page.waitFor(1000); } @@ -630,7 +629,7 @@ describe('Monitor Detail API', () => { const addButtonSelector = '#addSlackButton'; await page.waitForSelector(addButtonSelector); - await page.click(addButtonSelector); + await page.$eval(addButtonSelector, e => e.click()); await page.waitForSelector('#endpoint'); @@ -645,7 +644,7 @@ describe('Monitor Detail API', () => { const createdWebhookSelector = '#slackWebhookList > tbody > tr.webhook-list-item > td:nth-child(1) > div > span > div > span'; - await page.click('#createSlack'); + await page.$eval('#createSlack', e => e.click()); await page.waitForSelector(createdWebhookSelector); const createdWebhookEndpoint = await page.$eval( @@ -684,13 +683,12 @@ describe('Monitor Detail API', () => { const editWebhookButtonSelector = '#slackWebhookList > tbody > tr.webhook-list-item > td:nth-child(2) > div > span > div > button:nth-child(1)'; - await page.click(editWebhookButtonSelector); + await page.$eval(editWebhookButtonSelector, e => e.click()); const newWebhookEndpoint = utils.generateRandomWebsite(); await page.click('#endpoint', { clickCount: 3 }); - await page.keyboard.press('Backspace'); await page.type('#endpoint', newWebhookEndpoint); - await page.click('#slackUpdate'); + await page.$eval('#slackUpdate', e => e.click()); await page.waitFor(1000); const updatedWebhookEndpoint = await page.$eval( existingWebhookSelector, @@ -724,10 +722,10 @@ describe('Monitor Detail API', () => { const deleteWebhookButtonSelector = '#slackWebhookList > tbody > tr.webhook-list-item > td:nth-child(2) > div > span > div > button:nth-child(2)'; - await page.click(deleteWebhookButtonSelector); + await page.$eval(deleteWebhookButtonSelector, e => e.click()); await page.waitForSelector('#slackDelete'); - await page.click('#slackDelete'); + await page.$eval('#slackDelete', e => e.click()); await page.waitFor(1000); webhookRows = await page.$$(createdWebhookSelector); @@ -754,7 +752,7 @@ describe('Monitor Detail API', () => { await page.waitForSelector(addButtonSelector); for (let i = 0; i < 11; i++) { - await page.click(addButtonSelector); + await page.$eval(addButtonSelector, e => e.click()); await page.waitForSelector('#endpoint'); await page.type('#endpoint', utils.generateRandomWebsite()); @@ -763,7 +761,7 @@ describe('Monitor Detail API', () => { .querySelector('input[name=incidentCreated]') .click(); }); - await page.click('#createSlack'); + await page.$eval('#createSlack', e => e.click()); await page.waitFor(1000); } @@ -816,7 +814,7 @@ describe('Monitor Detail API', () => { const addButtonSelector = '#addWebhookButton'; await page.waitForSelector(addButtonSelector); - await page.click(addButtonSelector); + await page.$eval(addButtonSelector, e => e.click()); await page.waitForSelector('#endpoint'); @@ -832,7 +830,7 @@ describe('Monitor Detail API', () => { const createdWebhookSelector = '#webhookList > tbody > tr.webhook-list-item > td:nth-child(1) > div > span > div > span'; - await page.click('#createWebhook'); + await page.$eval('#createWebhook', e => e.click()); await page.waitForSelector(createdWebhookSelector); const createdWebhookEndpoint = await page.$eval( @@ -862,7 +860,7 @@ describe('Monitor Detail API', () => { await page.waitForSelector(addButtonSelector); for (let i = 0; i < 10; i++) { - await page.click(addButtonSelector); + await page.$eval(addButtonSelector, e => e.click()); await page.waitForSelector('#endpoint'); await page.type('#endpoint', utils.generateRandomWebsite()); @@ -873,7 +871,7 @@ describe('Monitor Detail API', () => { .querySelector('input[name=incidentCreated]') .click(); }); - await page.click('#createWebhook'); + await page.$eval('#createWebhook', e => e.click()); await page.waitFor(1000); } @@ -919,13 +917,13 @@ describe('Monitor Detail API', () => { await init.navigateToComponentDetails(componentName, page); await page.waitForSelector('#form-new-monitor'); - await page.click('input[id=name]'); + await page.$eval('input[id=name]', e => e.click()); await page.type('input[id=name]', urlMonitorName); await init.selectByText('#type', 'url', page); await page.waitForSelector('#url'); - await page.click('#url'); + await page.$eval('#url', e => e.click()); await page.type('#url', 'https://google.com'); - await page.click('button[type=submit]'); + await page.$eval('button[type=submit]', e => e.click()); // Navigate to Monitor details await init.navigateToMonitorDetails( @@ -963,12 +961,14 @@ describe('Monitor Detail API', () => { ); await page.waitForSelector(`#addSiteUrl_${urlMonitorName}`); - await page.click(`#addSiteUrl_${urlMonitorName}`); + await page.$eval(`#addSiteUrl_${urlMonitorName}`, e => + e.click() + ); await page.waitForSelector('input[id=siteUrl]'); - await page.click('input[id=siteUrl]'); + await page.$eval('input[id=siteUrl]', e => e.click()); await page.type('input[id=siteUrl]', 'http://localhost:3010'); - await page.click('#addSiteUrlButton'); + await page.$eval('#addSiteUrlButton', e => e.click()); await page.waitFor(5000); const createdLighthouseLogsSelector = @@ -1000,9 +1000,11 @@ describe('Monitor Detail API', () => { await page.waitForSelector( `#removeSiteUrl_${urlMonitorName}_0` ); - await page.click(`#removeSiteUrl_${urlMonitorName}_0`); + await page.$eval(`#removeSiteUrl_${urlMonitorName}_0`, e => + e.click() + ); await page.waitForSelector('#websiteUrlDelete'); - await page.click('#websiteUrlDelete'); + await page.$eval('#websiteUrlDelete', e => e.click()); await page.waitFor(5000); const createdLighthouseLogsSelector = @@ -1032,7 +1034,9 @@ describe('Monitor Detail API', () => { ); await page.waitForSelector(`#scanWebsites_${urlMonitorName}`); - await page.click(`#scanWebsites_${urlMonitorName}`); + await page.$eval(`#scanWebsites_${urlMonitorName}`, e => + e.click() + ); await page.waitFor(200000); @@ -1099,7 +1103,7 @@ describe('Monitor Detail API', () => { const createdLighthouseLogsSelector = '#lighthouseLogsList > tbody > tr.lighthouseLogsListItem > td:nth-child(1) > div > span > div > span'; await page.waitForSelector(createdLighthouseLogsSelector); - await page.click(createdLighthouseLogsSelector); + await page.$eval(createdLighthouseLogsSelector, e => e.click()); await page.waitFor(5000); let lighthousePerformanceElement = await page.waitForSelector( @@ -1172,13 +1176,12 @@ describe('Monitor Detail API', () => { ); const editButtonSelector = `#edit_${monitorName}`; - await page.click(editButtonSelector); + await page.$eval(editButtonSelector, e => e.click()); await page.waitForSelector('#form-new-monitor'); await page.click('input[id=name]', { clickCount: 3 }); - await page.keyboard.press('Backspace'); await page.type('input[id=name]', newMonitorName); - await page.click('button[type=submit]'); + await page.$eval('button[type=submit]', e => e.click()); const selector = `span#monitor-title-${newMonitorName}`; @@ -1205,11 +1208,11 @@ describe('Monitor Detail API', () => { ); const deleteButtonSelector = `#delete_${newMonitorName}`; - await page.click(deleteButtonSelector); + await page.$eval(deleteButtonSelector, e => e.click()); const confirmDeleteButtonSelector = '#deleteMonitor'; await page.waitForSelector(confirmDeleteButtonSelector); - await page.click(confirmDeleteButtonSelector); + await page.$eval(confirmDeleteButtonSelector, e => e.click()); await page.waitFor(5000); const selector = `span#monitor-title-${newMonitorName}`; diff --git a/dashboard/src/test/puppeteer/NewMonitor.test.js b/dashboard/src/test/puppeteer/NewMonitor.test.js index f99651670c..79e93c6499 100644 --- a/dashboard/src/test/puppeteer/NewMonitor.test.js +++ b/dashboard/src/test/puppeteer/NewMonitor.test.js @@ -54,7 +54,7 @@ describe('New Monitor API', () => { // Redirects automatically component to details page await init.addComponent(componentName, page); - for (let i = 0; i <= 5; i++) { + for (let i = 0; i < 5; i++) { const monitorName = utils.generateRandomString(); await init.addMonitorToComponent(null, monitorName, page); @@ -87,7 +87,7 @@ describe('New Monitor API', () => { // Redirects automatically component to details page await init.addComponent(componentName, page); - for (let i = 0; i <= 10; i++) { + for (let i = 0; i < 10; i++) { const monitorName = utils.generateRandomString(); await init.addMonitorToComponent(null, monitorName, page); @@ -120,7 +120,7 @@ describe('New Monitor API', () => { // Redirects automatically component to details page await init.addComponent(componentName, page); - for (let i = 0; i <= 15; i++) { + for (let i = 0; i < 15; i++) { const monitorName = utils.generateRandomString(); await init.addMonitorToComponent(null, monitorName, page); diff --git a/dashboard/src/test/puppeteer/test-init.js b/dashboard/src/test/puppeteer/test-init.js index a00f867ef0..e64c245b26 100644 --- a/dashboard/src/test/puppeteer/test-init.js +++ b/dashboard/src/test/puppeteer/test-init.js @@ -136,7 +136,7 @@ module.exports = { // Navigate to details page of component assumed created await page.waitForSelector(`#more-details-${component}`); - await page.click(`#more-details-${component}`); + await page.$eval(`#more-details-${component}`, e => e.click()); }, navigateToMonitorDetails: async function(component, monitor, page) { // Navigate to Components page @@ -144,7 +144,7 @@ module.exports = { // Navigate to details page of monitor assumed created await page.waitForSelector(`#more-details-${monitor}`); - await page.click(`#more-details-${monitor}`); + await page.$eval(`#more-details-${monitor}`, e => e.click()); await page.waitForSelector(`#monitor-title-${monitor}`, { visible: true, }); @@ -313,7 +313,7 @@ module.exports = { addMonitorToComponent: async function(component, monitorName, page) { component && (await this.addComponent(component, page)); - await page.waitForSelector('#form-new-monitor'); + await page.waitForSelector('input[id=name]'); await page.click('input[id=name]'); await page.type('input[id=name]', monitorName); await this.selectByText('#type', 'device', page); diff --git a/docs/introduction.md b/docs/introduction.md index 13f085bc2e..0e71b29bf5 100644 --- a/docs/introduction.md +++ b/docs/introduction.md @@ -1,6 +1,6 @@ # Introduction -Fyipe is one complete SRE and IT Ops platform. +Fyipe is one complete SRE and DevOps platform. Fyipe lets you do: diff --git a/helm-chart/public/fyipe/Chart.yaml b/helm-chart/public/fyipe/Chart.yaml index e23330e332..aac7c1921e 100644 --- a/helm-chart/public/fyipe/Chart.yaml +++ b/helm-chart/public/fyipe/Chart.yaml @@ -1,11 +1,11 @@ apiVersion: v2 name: Fyipe version: 3.0.0 -description: One complete DevOps and IT Ops platform. +description: One complete DevOps and DevOps platform. keywords: - DevOps - IT DevOps - - IT Ops + - DevOps - Monitoring - Status Page - On-Call diff --git a/helm-chart/public/fyipe/README.md b/helm-chart/public/fyipe/README.md index e3a0c2ecd9..b765887eb9 100644 --- a/helm-chart/public/fyipe/README.md +++ b/helm-chart/public/fyipe/README.md @@ -1,6 +1,6 @@ # Fyipe -Fyipe is one complete SRE and IT Ops platform. +Fyipe is one complete SRE and DevOps platform. Fyipe lets you do: diff --git a/helm-chart/public/index.yaml b/helm-chart/public/index.yaml index 6e808332fe..ad5f7dc1ba 100644 --- a/helm-chart/public/index.yaml +++ b/helm-chart/public/index.yaml @@ -13,14 +13,14 @@ entries: - name: redis repository: https://charts.bitnami.com/bitnami version: 10.5.11 - description: One complete SRE and IT Ops platform. + description: One complete SRE and DevOps platform. digest: 5c154b61becf64c877080c8106539ddf28988f57361c8d96fc98d721df250899 home: https://fyipe.com icon: https://fyipe.com/img/Fyipe.svg keywords: - DevOps - IT DevOps - - IT Ops + - DevOps - Monitoring - Status Page - On-Call diff --git a/home/config/product-compare.js b/home/config/product-compare.js index ad5ddef6d4..a50fa0c4cc 100644 --- a/home/config/product-compare.js +++ b/home/config/product-compare.js @@ -13,7 +13,7 @@ module.exports = product => { { question: 'How does Fyipe compare with PagerDuty?', answer: - 'PagerDuty is an incident management and on call tool whereas Fyipe is a complete SRE and IT Ops platform. Fyipe offers mostly everything that PagerDuty offers, but a lot more like monitoring, status-page, security, performance-monitoring and more. Please check detailed comparision above for more info.', + 'PagerDuty is an incident management and on call tool whereas Fyipe is a complete SRE and DevOps platform. Fyipe offers mostly everything that PagerDuty offers, but a lot more like monitoring, status-page, security, performance-monitoring and more. Please check detailed comparision above for more info.', }, { question: @@ -175,7 +175,7 @@ module.exports = product => { { question: 'How does Fyipe compare with StatusPage.io?', answer: - 'StatusPage.io is a status page tool whereas Fyipe is a complete SRE and IT Ops platform. Fyipe offers mostly everything that StatusPage.io offers, but a lot more like monitoring, incident management, on-call scheduling, security, performance-monitoring and more. Please check detailed comparision above for more info.', + 'StatusPage.io is a status page tool whereas Fyipe is a complete SRE and DevOps platform. Fyipe offers mostly everything that StatusPage.io offers, but a lot more like monitoring, incident management, on-call scheduling, security, performance-monitoring and more. Please check detailed comparision above for more info.', }, { question: @@ -337,7 +337,7 @@ module.exports = product => { { question: 'How does Fyipe compare with Pingdom?', answer: - 'Pingdom is an monitoring tool whereas Fyipe is a complete SRE and IT Ops platform. Fyipe offers mostly everything that Pingdom offers, but a lot more like monitoring, status-page, security, performance-monitoring and more. Please check detailed comparision above for more info.', + 'Pingdom is an monitoring tool whereas Fyipe is a complete SRE and DevOps platform. Fyipe offers mostly everything that Pingdom offers, but a lot more like monitoring, status-page, security, performance-monitoring and more. Please check detailed comparision above for more info.', }, { question: diff --git a/home/views/cta.ejs b/home/views/cta.ejs index 0ecb26b75e..27a68f6b7b 100755 --- a/home/views/cta.ejs +++ b/home/views/cta.ejs @@ -3,7 +3,7 @@

- One Complete Platform for all
your IT Ops and SRE needs.
+ One Complete Platform for all
your DevOps and SRE needs.

diff --git a/home/views/customers.ejs b/home/views/customers.ejs index 6d05b15d16..63a7cae8b6 100755 --- a/home/views/customers.ejs +++ b/home/views/customers.ejs @@ -5,7 +5,7 @@ - Fyipe | Status Page and On-call made simple. + Fyipe | One Complete SRE and DevOps platform. <% include ./head %> diff --git a/home/views/enterprise-overview.ejs b/home/views/enterprise-overview.ejs index b6aa3b126b..613e134318 100755 --- a/home/views/enterprise-overview.ejs +++ b/home/views/enterprise-overview.ejs @@ -106,7 +106,7 @@
  • Trains team on Best Practices.

    -

    Our dedicated engineer is a SRE and IT Ops expert and will train your team on +

    Our dedicated engineer is a SRE and DevOps expert and will train your team on best practices and processes to follow to eliminate downtime.

  • @@ -118,7 +118,7 @@
  • Our Customers

    -

    Organizations all over the world cut downtime and run IT Ops efficiently with +

    Organizations all over the world cut downtime and run DevOps efficiently with Fyipe.

    @@ -155,7 +155,7 @@

    More Enterprise Features.

    Efficient - IT Ops management depends
    on the right information being shared
    with the right people at + DevOps management depends
    on the right information being shared
    with the right people at the right time
    and knowing it’s shared securely.


    Fyipe ensures sensitive company
    and customer information remains
    secure with enterprise-ready security features and compliance with various
    industry and cloud service standards.

    @@ -184,7 +184,7 @@
  • -

    Mobile apps for IT Ops management.

    +

    Mobile apps for DevOps management.

  • diff --git a/home/views/head.ejs b/home/views/head.ejs index 591ea9946d..5f3b44c803 100755 --- a/home/views/head.ejs +++ b/home/views/head.ejs @@ -51,7 +51,7 @@ - + - + diff --git a/home/views/index.ejs b/home/views/index.ejs index d1469f5627..915309daa5 100755 --- a/home/views/index.ejs +++ b/home/views/index.ejs @@ -4,7 +4,7 @@ - Fyipe | Status Page and On-call made simple. + Fyipe | One Complete SRE and DevOps platform. <% include ./head %> @@ -36,7 +36,7 @@

    - One Complete SRE
    and IT Ops + One Complete SRE
    and DevOps platform.

    diff --git a/home/views/sdlc.ejs b/home/views/sdlc.ejs index 22ba23d0ed..09db916efd 100755 --- a/home/views/sdlc.ejs +++ b/home/views/sdlc.ejs @@ -1,7 +1,7 @@

    - +

    With Fyipe, you get a complete SRE toolchain out-of-the-box. One interface. @@ -202,7 +202,7 @@

    - Complete end-to-end real time visibility of all projects on more activities across the expanded IT Ops and + Complete end-to-end real time visibility of all projects on more activities across the expanded DevOps and SRE processes.

    diff --git a/http-test-server/views/head.ejs b/http-test-server/views/head.ejs index c152d7cdec..58ca173496 100755 --- a/http-test-server/views/head.ejs +++ b/http-test-server/views/head.ejs @@ -45,14 +45,14 @@ - + - + diff --git a/licensing/views/head.ejs b/licensing/views/head.ejs index 90a2123142..4c66c36705 100755 --- a/licensing/views/head.ejs +++ b/licensing/views/head.ejs @@ -47,12 +47,12 @@ - + - + diff --git a/log-js/package-lock.json b/log-js/package-lock.json index 8a9be0e5ca..0a474a2530 100644 --- a/log-js/package-lock.json +++ b/log-js/package-lock.json @@ -2573,9 +2573,9 @@ "dev": true }, "elliptic": { - "version": "6.5.2", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.2.tgz", - "integrity": "sha512-f4x70okzZbIQl/NSRLkI/+tteV/9WqL98zx+SQ69KbXxmVrmjwsNUPn/gYJJ0sHvEak24cZgHIPegRePAtA/xw==", + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", "dev": true, "requires": { "bn.js": "^4.4.0", @@ -3804,9 +3804,9 @@ } }, "lodash": { - "version": "4.17.15", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz", - "integrity": "sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==", + "version": "4.17.19", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.19.tgz", + "integrity": "sha512-JNvd8XER9GQX0v2qJgsaN/mzFCNA5BRe/j8JN9d+tWyGLSodKQHKFicdwNYzWwI3wjRnaKPsGj1XkBjx/F96DQ==", "dev": true }, "log-symbols": { diff --git a/marketing/README.md b/marketing/README.md index d5a954907b..c10c99e70d 100644 --- a/marketing/README.md +++ b/marketing/README.md @@ -29,7 +29,7 @@ Fyipe is a Status Page, Monitoring and On-call software all combined into one. T ### More detailed description -Fyipe is one complete SRE and IT Ops platform. +Fyipe is one complete SRE and DevOps platform. Fyipe lets you do: diff --git a/marketing/wikipedia.txt b/marketing/wikipedia.txt index 19641505b4..7fcac31f79 100644 --- a/marketing/wikipedia.txt +++ b/marketing/wikipedia.txt @@ -12,7 +12,7 @@ | num_employees=52 (2019) }} -'''Fyipe''' is a [[cloud computing]] company that produces a [[Software as a service|SaaS]] incident response platform for Enterprise IT departments.{{Cite web|url=https://fyipe.com|website=www.fyipe.com|title=Fyipe - Status page, monitoring and on-call made simple.}} +'''Fyipe''' is a [[cloud computing]] company that produces a [[Software as a service|SaaS]] incident response platform for Enterprise IT departments.{{Cite web|url=https://fyipe.com|website=www.fyipe.com|title=Fyipe - One Complete SRE and DevOps platform.}} Fyipe is headquartered in [[New York, NY]] {{Cite web|url=https://www.crunchbase.com/organization/fyipe|website=www.crunchbase.com|title=Fyipe, Crunchbase}} with operations in [[Hyderabad, India]]. Its platform is designed to alert clients to disruptions and outages through [[machine learning]] and automation. diff --git a/package.json b/package.json index d87a31d29a..4723b07a35 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "app", "version": "3.0.0", - "description": "One Complete SRE and IT Ops platform.", + "description": "One Complete SRE and DevOps platform.", "main": "index.js", "dependencies": { "prismjs": "^1.20.0", diff --git a/probe/workers/apiMonitors.js b/probe/workers/apiMonitors.js index d48315e011..448f63ace4 100755 --- a/probe/workers/apiMonitors.js +++ b/probe/workers/apiMonitors.js @@ -24,19 +24,31 @@ module.exports = { ? 'text' : 'formData' ); - const { res, resp } = await pingfetch( - monitor.data.url, - monitor.method, - body, - headers - ); - await ApiService.ping(monitor._id, { - monitor, - res, - resp, - type: monitor.type, - }); + let retry = true; + let retryCount = 0; + while (retry) { + const { res, resp } = await pingfetch( + monitor.data.url, + monitor.method, + body, + headers + ); + + const response = await ApiService.ping(monitor._id, { + monitor, + res, + resp, + type: monitor.type, + retryCount, + }); + + if (response && !response.retry) { + retry = false; + } else { + retryCount++; + } + } } } } catch (error) { diff --git a/probe/workers/urlMonitors.js b/probe/workers/urlMonitors.js index 14f1edc7f5..4788648e39 100755 --- a/probe/workers/urlMonitors.js +++ b/probe/workers/urlMonitors.js @@ -14,7 +14,25 @@ module.exports = { try { if (monitor && monitor.type) { if (monitor.data.url) { - const { res, resp } = await pingfetch(monitor.data.url); + let retry = true; + let retryCount = 0; + while (retry) { + const { res, resp } = await pingfetch(monitor.data.url); + + const response = await ApiService.ping(monitor._id, { + monitor, + res, + resp, + type: monitor.type, + retryCount, + }); + + if (response && !response.retry) { + retry = false; + } else { + retryCount++; + } + } const now = new Date().getTime(); const scanIntervalInDays = monitor.lighthouseScannedAt @@ -70,13 +88,6 @@ module.exports = { }, }); } - - await ApiService.ping(monitor._id, { - monitor, - res, - resp, - type: monitor.type, - }); } } } catch (error) {