Compare commits

..
Author SHA1 Message Date
Alexander Holliday 16a8552e6c Merge pull request #2890 from bluewave-labs/develop
develop->master
2025-08-30 19:31:37 -07:00
Alexander Holliday 845d5a5d51 Merge pull request #2885 from bluewave-labs/develop
develop->master
2025-08-30 16:23:40 -07:00
Alexander Holliday b86fc5edb3 Merge pull request #2883 from bluewave-labs/develop
develop -> master
2025-08-30 16:21:19 -07:00
Alexander Holliday 05dd5f7de2 Merge pull request #2858 from bluewave-labs/develop
develop -> master
2025-08-25 15:06:19 -07:00
Alexander Holliday ce3ec99c9f Merge pull request #2855 from bluewave-labs/develop
develop -> master
2025-08-25 14:38:06 -07:00
Alexander Holliday c2e2ae8dbd Merge pull request #2834 from bluewave-labs/develop
develop -> master
2025-08-21 10:13:48 -07:00
Alexander Holliday 25c66cff43 Merge pull request #2831 from bluewave-labs/develop
develop -> master
2025-08-21 09:15:40 -07:00
Alexander Holliday 8f971cfb02 Merge pull request #2826 from bluewave-labs/develop
develop -> master
2025-08-20 14:05:35 -07:00
Alexander Holliday 9b3ad54d0a Merge pull request #2797 from bluewave-labs/develop
develop -> master
2025-08-15 12:21:10 -07:00
Alexander Holliday 122a84b9e2 Merge pull request #2787 from bluewave-labs/develop
develop -> master for 3.0-beta
2025-08-14 15:28:35 -07:00
Alexander Holliday 9716e64c93 Merge pull request #2612 from bluewave-labs/develop
Develop -> Master
2025-07-14 14:23:40 -07:00
Alexander Holliday eb8cf1b6da Merge pull request #2584 from bluewave-labs/develop
bump version
2025-07-08 09:51:08 -07:00
Alexander Holliday c633a9ad8d Merge pull request #2582 from bluewave-labs/develop
develop -> master
2025-07-07 15:38:46 -07:00
Alexander Holliday 923eda1307 Merge pull request #2545 from bluewave-labs/develop
develop -> master
2025-06-25 12:42:33 +08:00
Alexander Holliday 997342a31c Merge pull request #2536 from bluewave-labs/develop
Develop -> Master for 2.2 release
2025-06-25 09:38:08 +08:00
3 changed files with 425 additions and 26 deletions

No files matched your search

+1 -1
View File
@@ -94,7 +94,7 @@ class AuthController extends BaseController {
await registrationBodyValidation.validateAsync(req.body);
const { user, token } = await this.userService.registerUser(req.body, req.file);
res.success({
msg: this.stringService.get("authCreateUser"),
msg: this.stringService.authCreateUser,
data: { user, token },
});
},
@@ -26,7 +26,7 @@ class StatusPageController extends BaseController {
teamId,
});
return res.success({
msg: this.stringService.get("statusPageCreate"),
msg: this.stringService.statusPageCreate,
data: statusPage,
});
},
@@ -41,10 +41,10 @@ class StatusPageController extends BaseController {
const statusPage = await this.db.statusPageModule.updateStatusPage(req.body, req.file);
if (statusPage === null) {
throw this.errorService.createNotFoundError(this.stringService.get("statusPageNotFound"));
throw this.errorService.createNotFoundError(this.stringService.statusPageNotFound);
}
return res.success({
msg: this.stringService.get("statusPageUpdate"),
msg: this.stringService.statusPageUpdate,
data: statusPage,
});
},
@@ -56,7 +56,7 @@ class StatusPageController extends BaseController {
async (req, res) => {
const statusPage = await this.db.statusPageModule.getStatusPage();
return res.success({
msg: this.stringService.get("statusPageByUrl"),
msg: this.stringService.statusPageByUrl,
data: statusPage,
});
},
@@ -71,7 +71,7 @@ class StatusPageController extends BaseController {
const statusPage = await this.db.statusPageModule.getStatusPageByUrl(req.params.url);
return res.success({
msg: this.stringService.get("statusPageByUrl"),
msg: this.stringService.statusPageByUrl,
data: statusPage,
});
},
@@ -85,7 +85,7 @@ class StatusPageController extends BaseController {
const statusPages = await this.db.statusPageModule.getStatusPagesByTeamId(teamId);
return res.success({
msg: this.stringService.get("statusPageByTeamId"),
msg: this.stringService.statusPageByTeamId,
data: statusPages,
});
},
@@ -97,7 +97,7 @@ class StatusPageController extends BaseController {
async (req, res) => {
await this.db.statusPageModule.deleteStatusPage(req.params.url);
return res.success({
msg: this.stringService.get("statusPageDelete"),
msg: this.stringService.statusPageDelete,
});
},
SERVICE_NAME,
+417 -18
View File
@@ -25,24 +25,423 @@ class StringService {
return this._language;
}
/**
* Get translation by key with optional parameters
* @param {string} key - Translation key
* @param {Object} params - Optional parameters to replace in the translation
* @returns {string} Translated string with replaced parameters
*/
get(key, params = {}) {
let translation = this.translationService.getTranslation(key);
// Replace parameters in the translation
Object.keys(params).forEach(paramKey => {
const paramValue = params[paramKey];
// Support both {param} and ${param} syntax
translation = translation.replace(new RegExp(`\\{${paramKey}\\}`, 'g'), paramValue);
translation = translation.replace(new RegExp(`\\$\\{${paramKey}\\}`, 'g'), paramValue);
});
return translation;
// Auth Messages
get dontHaveAccount() {
return this.translationService.getTranslation("dontHaveAccount");
}
get email() {
return this.translationService.getTranslation("email");
}
get forgotPassword() {
return this.translationService.getTranslation("forgotPassword");
}
get password() {
return this.translationService.getTranslation("password");
}
get signUp() {
return this.translationService.getTranslation("signUp");
}
get submit() {
return this.translationService.getTranslation("submit");
}
get title() {
return this.translationService.getTranslation("title");
}
get continue() {
return this.translationService.getTranslation("continue");
}
get enterEmail() {
return this.translationService.getTranslation("enterEmail");
}
get authLoginTitle() {
return this.translationService.getTranslation("authLoginTitle");
}
get authLoginEnterPassword() {
return this.translationService.getTranslation("authLoginEnterPassword");
}
get commonPassword() {
return this.translationService.getTranslation("commonPassword");
}
get commonBack() {
return this.translationService.getTranslation("commonBack");
}
get authForgotPasswordTitle() {
return this.translationService.getTranslation("authForgotPasswordTitle");
}
get authForgotPasswordResetPassword() {
return this.translationService.getTranslation("authForgotPasswordResetPassword");
}
get createPassword() {
return this.translationService.getTranslation("createPassword");
}
get createAPassword() {
return this.translationService.getTranslation("createAPassword");
}
get authRegisterAlreadyHaveAccount() {
return this.translationService.getTranslation("authRegisterAlreadyHaveAccount");
}
get commonAppName() {
return this.translationService.getTranslation("commonAppName");
}
get authLoginEnterEmail() {
return this.translationService.getTranslation("authLoginEnterEmail");
}
get authRegisterTitle() {
return this.translationService.getTranslation("authRegisterTitle");
}
get monitorGetAll() {
return this.translationService.getTranslation("monitorGetAll");
}
get monitorGetById() {
return this.translationService.getTranslation("monitorGetById");
}
get monitorGetByIdSuccess() {
return this.translationService.getTranslation("monitorGetByIdSuccess");
}
get monitorCreate() {
return this.translationService.getTranslation("monitorCreate");
}
get bulkMonitorsCreate() {
return this.translationService.getTranslation("bulkMonitorsCreate");
}
get monitorEdit() {
return this.translationService.getTranslation("monitorEdit");
}
get monitorDelete() {
return this.translationService.getTranslation("monitorDelete");
}
get monitorPause() {
return this.translationService.getTranslation("monitorPause");
}
get monitorResume() {
return this.translationService.getTranslation("monitorResume");
}
get monitorDemoAdded() {
return this.translationService.getTranslation("monitorDemoAdded");
}
get monitorStatsById() {
return this.translationService.getTranslation("monitorStatsById");
}
get monitorCertificate() {
return this.translationService.getTranslation("monitorCertificate");
}
// Maintenance Window Messages
get maintenanceWindowCreate() {
return this.translationService.getTranslation("maintenanceWindowCreate");
}
get maintenanceWindowGetById() {
return this.translationService.getTranslation("maintenanceWindowGetById");
}
get maintenanceWindowGetByTeam() {
return this.translationService.getTranslation("maintenanceWindowGetByTeam");
}
get maintenanceWindowDelete() {
return this.translationService.getTranslation("maintenanceWindowDelete");
}
get maintenanceWindowEdit() {
return this.translationService.getTranslation("maintenanceWindowEdit");
}
// Webhook Messages
get webhookUnsupportedPlatform() {
return this.translationService.getTranslation("webhookUnsupportedPlatform");
}
get webhookSendError() {
return this.translationService.getTranslation("webhookSendError");
}
get webhookSendSuccess() {
return this.translationService.getTranslation("webhookSendSuccess");
}
get telegramRequiresBotTokenAndChatId() {
return this.translationService.getTranslation("telegramRequiresBotTokenAndChatId");
}
get webhookUrlRequired() {
return this.translationService.getTranslation("webhookUrlRequired");
}
get platformRequired() {
return this.translationService.getTranslation("platformRequired");
}
get testNotificationFailed() {
return this.translationService.getTranslation("testNotificationFailed");
}
get monitorUpAlert() {
return this.translationService.getTranslation("monitorUpAlert");
}
get monitorDownAlert() {
return this.translationService.getTranslation("monitorDownAlert");
}
getWebhookUnsupportedPlatform(platform) {
return this.translationService.getTranslation("webhookUnsupportedPlatform").replace("{platform}", platform);
}
getWebhookSendError(platform) {
return this.translationService.getTranslation("webhookSendError").replace("{platform}", platform);
}
getMonitorStatus(name, status, url) {
const translationKey = status === true ? "monitorStatusUp" : "monitorStatusDown";
return this.translationService.getTranslation(translationKey).replace("{name}", name).replace("{url}", url);
}
// Error Messages
get unknownError() {
return this.translationService.getTranslation("unknownError");
}
get friendlyError() {
return this.translationService.getTranslation("friendlyError");
}
get authIncorrectPassword() {
return this.translationService.getTranslation("authIncorrectPassword");
}
get unauthorized() {
return this.translationService.getTranslation("unauthorized");
}
get authAdminExists() {
return this.translationService.getTranslation("authAdminExists");
}
get authInviteNotFound() {
return this.translationService.getTranslation("authInviteNotFound");
}
get unknownService() {
return this.translationService.getTranslation("unknownService");
}
get noAuthToken() {
return this.translationService.getTranslation("noAuthToken");
}
get invalidAuthToken() {
return this.translationService.getTranslation("invalidAuthToken");
}
get expiredAuthToken() {
return this.translationService.getTranslation("expiredAuthToken");
}
// Queue Messages
get queueGetMetrics() {
return this.translationService.getTranslation("queueGetMetrics");
}
get queueGetJobs() {
return this.translationService.getTranslation("queueGetJobs");
}
get queueAddJob() {
return this.translationService.getTranslation("queueAddJob");
}
get queueObliterate() {
return this.translationService.getTranslation("queueObliterate");
}
// Job Queue Messages
get jobQueueDeleteJobSuccess() {
return this.translationService.getTranslation("jobQueueDeleteJobSuccess");
}
get jobQueuePauseJob() {
return this.translationService.getTranslation("jobQueuePauseJob");
}
get jobQueueResumeJob() {
return this.translationService.getTranslation("jobQueueResumeJob");
}
// Status Page Messages
get statusPageByUrl() {
return this.translationService.getTranslation("statusPageByUrl");
}
get statusPageCreate() {
return this.translationService.getTranslation("statusPageCreate");
}
get statusPageDelete() {
return this.translationService.getTranslation("statusPageDelete");
}
get statusPageUpdate() {
return this.translationService.getTranslation("statusPageUpdate");
}
get statusPageNotFound() {
return this.translationService.getTranslation("statusPageNotFound");
}
get statusPageByTeamId() {
return this.translationService.getTranslation("statusPageByTeamId");
}
get statusPageUrlNotUnique() {
return this.translationService.getTranslation("statusPageUrlNotUnique");
}
// Docker Messages
get dockerFail() {
return this.translationService.getTranslation("dockerFail");
}
get dockerNotFound() {
return this.translationService.getTranslation("dockerNotFound");
}
get dockerSuccess() {
return this.translationService.getTranslation("dockerSuccess");
}
// Port Messages
get portFail() {
return this.translationService.getTranslation("portFail");
}
get portSuccess() {
return this.translationService.getTranslation("portSuccess");
}
// Alert Messages
get alertCreate() {
return this.translationService.getTranslation("alertCreate");
}
get alertGetByUser() {
return this.translationService.getTranslation("alertGetByUser");
}
get alertGetByMonitor() {
return this.translationService.getTranslation("alertGetByMonitor");
}
get alertGetById() {
return this.translationService.getTranslation("alertGetById");
}
get alertEdit() {
return this.translationService.getTranslation("alertEdit");
}
get alertDelete() {
return this.translationService.getTranslation("alertDelete");
}
getDeletedCount(count) {
return this.translationService.getTranslation("deletedCount").replace("{count}", count);
}
get pingSuccess() {
return this.translationService.getTranslation("pingSuccess");
}
get getAppSettings() {
return this.translationService.getTranslation("getAppSettings");
}
get httpNetworkError() {
return this.translationService.getTranslation("httpNetworkError");
}
get httpNotJson() {
return this.translationService.getTranslation("httpNotJson");
}
get httpJsonPathError() {
return this.translationService.getTranslation("httpJsonPathError");
}
get httpEmptyResult() {
return this.translationService.getTranslation("httpEmptyResult");
}
get httpMatchSuccess() {
return this.translationService.getTranslation("httpMatchSuccess");
}
get httpMatchFail() {
return this.translationService.getTranslation("httpMatchFail");
}
get updateAppSettings() {
return this.translationService.getTranslation("updateAppSettings");
}
get insufficientPermissions() {
return this.translationService.getTranslation("insufficientPermissions");
}
getDbFindMonitorById(monitorId) {
return this.translationService.getTranslation("dbFindMonitorById").replace("${monitorId}", monitorId);
}
get dbUserExists() {
return this.translationService.getTranslation("dbUserExists");
}
get testEmailSubject() {
return this.translationService.getTranslation("testEmailSubject");
}
get verifyOwnerNotFound() {
return this.translationService.getTranslation("verifyOwnerNotFound");
}
get verifyOwnerUnauthorized() {
return this.translationService.getTranslation("verifyOwnerUnauthorized");
}
get dbUserNotFound() {
return this.translationService.getTranslation("dbUserNotFound");
}
}