Merge branch 'develop' into fix/nodemailer_relay

This commit is contained in:
Cahit Atilgan committed 2025-05-14 09:33:04 +02:00
commit e40b1f9c5b
14 files changed
+99 -45

No files matched your search

+14 -4
View File
@@ -11,6 +11,9 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
@@ -20,7 +23,8 @@ jobs:
- name: Build Client Docker image
run: |
docker build \
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t ghcr.io/bluewave-labs/checkmate:frontend-dist \
-f ./docker/dist/client.Dockerfile \
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \
@@ -36,6 +40,9 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
@@ -45,7 +52,8 @@ jobs:
- name: Build Server Docker image
run: |
docker build \
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t ghcr.io/bluewave-labs/checkmate:backend-dist \
-f ./docker/dist/server.Dockerfile \
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \
@@ -56,7 +64,8 @@ jobs:
- name: Build Mongo Docker image
run: |
docker build \
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t ghcr.io/bluewave-labs/checkmate:mongo-dist \
-f ./docker/dist/mongoDB.Dockerfile \
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \
@@ -67,7 +76,8 @@ jobs:
- name: Build Redis Docker image
run: |
docker build \
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t ghcr.io/bluewave-labs/checkmate:redis-dist \
-f ./docker/dist/redis.Dockerfile \
--label org.opencontainers.image.source=https://github.com/bluewave-labs/checkmate \
+9
View File
@@ -123,9 +123,15 @@ If one or more of these are missing, we may ask you to update your pull request
## Branching model
- Code contributions should go to the `develop` branch.
- `master` is used for stable releases.
- Use descriptive branch names, like `fix/login-error` or `feat/add-alerts`.
- Make sure that you are using the latest version.
- Make sure you run the code locally. The Checkmate [documentation](https://docs.checkmate.so) covers it.
- Find out if the functionality is already covered, maybe by an individual configuration.
- Perform a [search](/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
---
@@ -133,8 +139,11 @@ If one or more of these are missing, we may ask you to update your pull request
Thanks for making Checkmate better. We mean it. Whether it’s your first pull request or your 50th, we’re excited to build with you.
PS: feel free to introduce yourself on [Discord](https://discord.gg/YOUR-DISCORD-LINK) and say hi.
-- Checkmate team
Also make sure you read the [document about how to make a good pull request](/PULLREQUESTS.md).
+4 -3
View File
@@ -8,6 +8,7 @@
![](https://img.shields.io/github/issues/bluewave-labs/checkmate)
![](https://img.shields.io/github/issues-pr/bluewave-labs/checkmate)
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9901/badge)](https://www.bestpractices.dev/projects/9901)
[![Ask DeepWiki](https://deepwiki.com/badge.svg)](https://deepwiki.com/bluewave-labs/checkmate)
<h1 align="center"><a href="https://bluewavelabs.ca" target="_blank">Checkmate</a></h1>
@@ -29,11 +30,11 @@ You can see the latest build of [Checkmate](https://checkmate-demo.bluewavelabs.
## 🔗 User's guide
Usage instructions can be found [here](https://docs.checkmate.so/). It's still WIP and some of the information there might be outdated as we continuously add features weekly. Rest assured, we are doing our best! :)
Usage instructions can be found [here](https://docs.checkmate.so/checkmate-2.1). It's still WIP and some of the information there might be outdated as we continuously add features weekly. Rest assured, we are doing our best! :)
## 🛠️ Installation
See installation instructions in [Checkmate documentation portal](https://docs.checkmate.so/quickstart). Alternatively, you can also use [Coolify](https://coolify.io/) or [Elestio](https://elest.io/open-source/checkmate) for a one-click Docker deployment. If you would like to monitor your server infrastructure, you'll need [Capture agent](https://github.com/bluewave-labs/capture). Capture repository also contains the installation instructions.
See installation instructions in [Checkmate documentation portal](https://docs.checkmate.so/checkmate-2.1/users-guide/quickstart). Alternatively, you can also use [Coolify](https://coolify.io/) or [Elestio](https://elest.io/open-source/checkmate) for a one-click Docker deployment. If you would like to monitor your server infrastructure, you'll need [Capture agent](https://github.com/bluewave-labs/capture). Capture repository also contains the installation instructions.
## 🏁 Translations
@@ -117,7 +118,7 @@ Here's how you can contribute:
0. Star this repo :)
1. Check [Contributor's guideline](https://github.com/bluewave-labs/Checkmate/blob/develop/CONTRIBUTING.md). First timers are encouraged to check `good-first-issue` tag.
2. Check [project structure](https://docs.checkmate.so/developers-guide/general-project-structure) and [high level overview](https://bluewavelabs.gitbook.io/checkmate/developers-guide/high-level-overview).
2. Check [project structure](https://docs.checkmate.so/checkmate-2.1/developers-guide/general-project-structure) and [high level overview](https://bluewavelabs.gitbook.io/checkmate/developers-guide/high-level-overview).
3. Read a detailed structure of [Checkmate](https://deepwiki.com/bluewave-labs/Checkmate) if you would like to deep dive into the architecture.
4. Open an issue if you believe you've encountered a bug.
5. Check for good-first-issue's if you are a newcomer.
+1 -1
View File
@@ -111,7 +111,7 @@ const Alert = ({ variant, title, body, isToast, hasIcon = true, onClick }) => {
Alert.propTypes = {
variant: PropTypes.oneOf(["info", "error", "warning"]).isRequired,
title: PropTypes.string,
body: PropTypes.string,
body: PropTypes.oneOfType([PropTypes.string, PropTypes.object]),
isToast: PropTypes.bool,
hasIcon: PropTypes.bool,
onClick: function (props, propName, componentName) {
+41 -27
View File
@@ -11,7 +11,8 @@ import { useSelector } from "react-redux";
import Alert from "../Alert";
import { useTranslation } from "react-i18next";
import "./index.css";
import { useFetchSettings } from "../../Hooks/useFetchSettings";
import { useState } from "react";
/**
* Fallback component to display a fallback UI with a title, a list of checks, and a navigation button.
*
@@ -24,32 +25,41 @@ import "./index.css";
* @returns {JSX.Element} The rendered fallback UI.
*/
const Fallback = ({ title, checks, link = "/", isAdmin, vowelStart = false, showPageSpeedWarning = false }) => {
const Fallback = ({
title,
checks,
link = "/",
isAdmin,
vowelStart = false,
showPageSpeedWarning = false,
}) => {
const theme = useTheme();
const navigate = useNavigate();
const mode = useSelector((state) => state.ui.mode);
const { t } = useTranslation();
const [settingsData, setSettingsData] = useState(undefined);
const [isLoading, error] = useFetchSettings({ setSettingsData });
// Custom warning message with clickable link
const renderWarningMessage = () => {
return (
<>
{t("pageSpeedWarning")} {" "}
<Link
{t("pageSpeedWarning")}{" "}
<Link
component={RouterLink}
to="/settings"
sx={{
sx={{
textDecoration: "underline",
color: "inherit",
fontWeight: "inherit",
"&:hover": {
textDecoration: "underline",
}
},
}}
>
{t("pageSpeedLearnMoreLink")}
</Link>
{" "}{t("pageSpeedAddApiKey")}
</Link>{" "}
{t("pageSpeedAddApiKey")}
</>
);
};
@@ -120,7 +130,7 @@ const Fallback = ({ title, checks, link = "/", isAdmin, vowelStart = false, show
</Button>
{/* Bulk create of uptime monitors */}
{title === "uptime monitor" && (
<Button
<Button
variant="contained"
color="accent"
sx={{ alignSelf: "center" }}
@@ -129,27 +139,31 @@ const Fallback = ({ title, checks, link = "/", isAdmin, vowelStart = false, show
{t("bulkImport.fallbackPage")}
</Button>
)}
{/* Warning box for PageSpeed monitor */}
{(title === "pagespeed monitor" && showPageSpeedWarning) && (
{title === "pagespeed monitor" && showPageSpeedWarning && (
<Box sx={{ width: "80%", maxWidth: "600px", zIndex: 1 }}>
<Box sx={{
'& .alert.row-stack': {
backgroundColor: theme.palette.warningSecondary.main,
borderColor: theme.palette.warningSecondary.lowContrast,
'& .MuiTypography-root': {
color: theme.palette.warningSecondary.contrastText
<Box
sx={{
"& .alert.row-stack": {
backgroundColor: theme.palette.warningSecondary.main,
borderColor: theme.palette.warningSecondary.lowContrast,
"& .MuiTypography-root": {
color: theme.palette.warningSecondary.contrastText,
},
"& .MuiBox-root > svg": {
color: theme.palette.warningSecondary.contrastText,
},
},
'& .MuiBox-root > svg': {
color: theme.palette.warningSecondary.contrastText
}
}
}}>
<Alert
variant="warning"
hasIcon={true}
body={renderWarningMessage()}
/>
}}
>
{settingsData?.pagespeedKeySet === false && (
<Alert
variant="warning"
hasIcon={true}
body={renderWarningMessage()}
/>
)}
</Box>
</Box>
)}
+1 -1
View File
@@ -185,7 +185,7 @@ const ForgotPassword = () => {
value={form.email}
onChange={handleChange}
error={errors.email ? true : false}
helperText={errors.email}
helperText={t(errors.email)}
/>
<Button
variant="contained"
@@ -71,7 +71,7 @@ function StepTwo({ form, errors, onSubmit, onChange, onBack }) {
helperText={errors.email && (
errors.email.includes("required") ? t("authRegisterEmailRequired") :
errors.email.includes("valid email") ? t("authRegisterEmailInvalid") :
errors.email
t(errors.email)
)}
ref={inputRef}
/>
+1 -1
View File
@@ -15,7 +15,7 @@ const SettingsAbout = () => {
<Typography component="h1">{t("settingsAbout")}</Typography>
</Box>
<Box>
<Typography component="h2">Checkmate {2.0}</Typography>
<Typography component="h2">Checkmate {2.1}</Typography>
<Typography sx={{ mt: theme.spacing(2), mb: theme.spacing(6), opacity: 0.6 }}>
{t("settingsDevelopedBy")}
</Typography>
+12 -1
View File
@@ -15,6 +15,17 @@ const nameSchema = joi
"Name must contain only letters, spaces, apostrophes, or hyphens",
});
const lastnameSchema = joi
.string()
.max(50)
.trim()
.pattern(/^[\p{L}\p{M}''\- ]+$/u)
.messages({
"string.empty": "Surname is required",
"string.max": "Surname must be less than 50 characters",
"string.pattern.base": "Surname must contain only letters, spaces, apostrophes, or hyphens"
});
const passwordSchema = joi
.string()
.trim()
@@ -54,7 +65,7 @@ const passwordSchema = joi
const credentials = joi.object({
firstName: nameSchema,
lastName: nameSchema,
lastName: lastnameSchema,
email: joi
.string()
.trim()
+5 -4
View File
@@ -11,11 +11,12 @@ declare -A services=(
["bluewaveuptime/uptime_server"]="./docker/dist/server.Dockerfile"
)
# Loop through each service and build the corresponding image
for service in "${!services[@]}"; do
docker build -f "${services[$service]}" -t "$service" .
# Check if the build succeeded
docker buildx build \
--platform linux/amd64,linux/arm64 \
-f "${services[$service]}" \
-t "$service" \
if [ $? -ne 0 ]; then
echo "Error building $service image. Exiting..."
exit 1
+2 -1
View File
@@ -3,7 +3,7 @@ services:
image: ghcr.io/bluewave-labs/checkmate:frontend-dist
restart: always
environment:
UPTIME_APP_API_BASE_URL: "http://localhost:5000/api/v1"
UPTIME_APP_API_BASE_URL: "http://localhost:52345/api/v1"
UPTIME_APP_CLIENT_HOST: "http://localhost"
ports:
- "80:80"
@@ -22,6 +22,7 @@ services:
- DB_CONNECTION_STRING=mongodb://mongodb:27017/uptime_db?replicaSet=rs0
- REDIS_URL=redis://redis:6379
- CLIENT_HOST=http://localhost
- JWT_SECRET=my_secret
# volumes:
# - /var/run/docker.sock:/var/run/docker.sock:ro
redis:
+1 -1
View File
@@ -13,6 +13,7 @@ class SettingsController {
getAppSettings = async (req, res, next) => {
const dbSettings = await this.settingsService.getDBSettings();
const sanitizedSettings = { ...dbSettings };
delete sanitizedSettings.version;
const returnSettings = {
pagespeedKeySet: false,
@@ -27,7 +28,6 @@ class SettingsController {
returnSettings.emailPasswordSet = true;
delete sanitizedSettings.systemEmailPassword;
}
returnSettings.settings = sanitizedSettings;
return res.success({
msg: this.stringService.getAppSettings,
+4
View File
@@ -34,6 +34,10 @@ const AppSettingsSchema = mongoose.Schema(
unique: true,
default: true,
},
version: {
type: Number,
default: 1,
},
},
{
timestamps: true,
+3
View File
@@ -60,6 +60,9 @@ class SettingsService {
}
async getDBSettings() {
// Remove any old settings
await this.appSettings.deleteMany({ version: { $exists: false } });
let settings = await this.appSettings
.findOne({ singleton: true })
.select("-__v -_id -createdAt -updatedAt -singleton")