Skip to content

Commit

Permalink
Merge branch 'master' into unified-logging-infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
CommanderStorm committed Sep 13, 2024
2 parents 14e3c3c + dd75890 commit 75c4c35
Show file tree
Hide file tree
Showing 138 changed files with 10,144 additions and 3,042 deletions.
28 changes: 0 additions & 28 deletions .devcontainer/README.md

This file was deleted.

23 changes: 0 additions & 23 deletions .devcontainer/devcontainer.json

This file was deleted.

2 changes: 0 additions & 2 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/.idea
/node_modules
/data*
/cypress
/out
/test
/kubernetes
Expand All @@ -18,7 +17,6 @@ README.md
.vscode
.eslint*
.stylelint*
/.devcontainer
/.github
yarn.lock
app.json
Expand Down
3 changes: 1 addition & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
module.exports = {
ignorePatterns: [
"test/*.js",
"test/cypress",
"server/modules/apicache/*",
"server/modules/*",
"src/util.js"
],
root: true,
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/stale-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
stale-issue-message: |-
We are clearing up our old `help`-issues and your issue has been open for 60 days with no activity.
Expand All @@ -21,7 +21,7 @@ jobs:
exempt-issue-labels: 'News,Medium,High,discussion,bug,doc,feature-request'
exempt-issue-assignees: 'louislam'
operations-per-run: 200
- uses: actions/stale@v8
- uses: actions/stale@v9
with:
stale-issue-message: |-
This issue was marked as `cannot-reproduce` by a maintainer.
Expand Down
8 changes: 1 addition & 7 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Different guidelines exist for different types of pull requests (PRs):
- `server/monitor-types/MONITORING_TYPE.js` is the core of each monitor.
the `async check(...)`-function should:
- throw an error for each fault that is detected with an actionable error message
- in the happy-path, you should set `heartbeat.msg` to a successfull message and set `heartbeat.status = UP`
- in the happy-path, you should set `heartbeat.msg` to a successful message and set `heartbeat.status = UP`
- `server/uptime-kuma-server.js` is where the monitoring backend needs to be registered.
*If you have an idea how we can skip this step, we would love to hear about it ^^*
- `src/pages/EditMonitor.vue` is the shared frontend users interact with.
Expand Down Expand Up @@ -236,12 +236,6 @@ The goal is to make the Uptime Kuma installation as easy as installing a mobile
- IDE that supports [`ESLint`](https://eslint.org/) and EditorConfig (I am using [`IntelliJ IDEA`](https://www.jetbrains.com/idea/))
- A SQLite GUI tool (f.ex. [`SQLite Expert Personal`](https://www.sqliteexpert.com/download.html) or [`DBeaver Community`](https://dbeaver.io/download/))
### GitHub Codespaces
If you don't want to setup an local environment, you can now develop on GitHub Codespaces, read more:

https://github.com/louislam/uptime-kuma/tree/master/.devcontainer

## Git Branches
- `master`: 2.X.X development. If you want to add a new feature, your pull request should base on this.
Expand Down
28 changes: 0 additions & 28 deletions config/cypress.config.js

This file was deleted.

10 changes: 0 additions & 10 deletions config/cypress.frontend.config.js

This file was deleted.

14 changes: 10 additions & 4 deletions config/playwright.config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { defineConfig, devices } from "@playwright/test";

const port = 30001;
const url = `http://localhost:${port}`;
export const url = `http://localhost:${port}`;

export default defineConfig({
// Look for test files in the "tests" directory, relative to this configuration file.
testDir: "../test/e2e",
testDir: "../test/e2e/specs",
outputDir: "../private/playwright-test-results",
fullyParallel: false,
locale: "en-US",
Expand Down Expand Up @@ -40,9 +40,15 @@ export default defineConfig({
// Configure projects for major browsers.
projects: [
{
name: "chromium",
name: "run-once setup",
testMatch: /setup-process\.once\.js/,
use: { ...devices["Desktop Chrome"] },
},
{
name: "specs",
use: { ...devices["Desktop Chrome"] },
dependencies: [ "run-once setup" ],
},
/*
{
name: "firefox",
Expand All @@ -52,7 +58,7 @@ export default defineConfig({

// Run your local dev server before starting the tests.
webServer: {
command: `node extra/remove-playwright-test-data.js && node server/server.js --port=${port} --data-dir=./data/playwright-test`,
command: `node extra/remove-playwright-test-data.js && cross-env NODE_ENV=development node server/server.js --port=${port} --data-dir=./data/playwright-test`,
url,
reuseExistingServer: false,
cwd: "../",
Expand Down
16 changes: 16 additions & 0 deletions db/knex_migrations/2024-04-26-0000-snmp-monitor.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
exports.up = function (knex) {
return knex.schema
.alterTable("monitor", function (table) {
table.string("snmp_oid").defaultTo(null);
table.enum("snmp_version", [ "1", "2c", "3" ]).defaultTo("2c");
table.string("json_path_operator").defaultTo(null);
});
};

exports.down = function (knex) {
return knex.schema.alterTable("monitor", function (table) {
table.dropColumn("snmp_oid");
table.dropColumn("snmp_version");
table.dropColumn("json_path_operator");
});
};
13 changes: 13 additions & 0 deletions db/knex_migrations/2024-08-24-000-add-cache-bust.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
exports.up = function (knex) {
return knex.schema
.alterTable("monitor", function (table) {
table.boolean("cache_bust").notNullable().defaultTo(false);
});
};

exports.down = function (knex) {
return knex.schema
.alterTable("monitor", function (table) {
table.dropColumn("cache_bust");
});
};
12 changes: 12 additions & 0 deletions db/knex_migrations/2024-08-24-0000-conditions.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
exports.up = function (knex) {
return knex.schema
.alterTable("monitor", function (table) {
table.text("conditions").notNullable().defaultTo("[]");
});
};

exports.down = function (knex) {
return knex.schema.alterTable("monitor", function (table) {
table.dropColumn("conditions");
});
};
22 changes: 16 additions & 6 deletions docker/debian-base.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ FROM node:20-bookworm-slim AS base2-slim
ARG TARGETPLATFORM

# Specify --no-install-recommends to skip unused dependencies, make the base much smaller!
# apprise = for notifications (From testing repo)
# sqlite3 = for debugging
# iputils-ping = for ping
# util-linux = for setpriv (Should be dropped in 2.0.0?)
Expand All @@ -12,10 +11,10 @@ ARG TARGETPLATFORM
# ca-certificates = keep the cert up-to-date
# sudo = for start service nscd with non-root user
# nscd = for better DNS caching
RUN echo "deb http://deb.debian.org/debian testing main" >> /etc/apt/sources.list && \
apt update && \
apt --yes --no-install-recommends -t testing install apprise sqlite3 ca-certificates && \
apt --yes --no-install-recommends -t stable install \
RUN apt update && \
apt --yes --no-install-recommends install \
sqlite3 \
ca-certificates \
iputils-ping \
util-linux \
dumb-init \
Expand All @@ -25,6 +24,15 @@ RUN echo "deb http://deb.debian.org/debian testing main" >> /etc/apt/sources.lis
rm -rf /var/lib/apt/lists/* && \
apt --yes autoremove

# apprise = for notifications (Install from the deb package, as the stable one is too old) (workaround for #4867)
# Switching to testing repo is no longer working, as the testing repo is not bookworm anymore.
# python3-paho-mqtt (#4859)
RUN curl http://ftp.debian.org/debian/pool/main/a/apprise/apprise_1.8.0-2_all.deb --output apprise.deb && \
apt update && \
apt --yes --no-install-recommends install ./apprise.deb python3-paho-mqtt && \
rm -rf /var/lib/apt/lists/* && \
rm -f apprise.deb && \
apt --yes autoremove

# Install cloudflared
RUN curl https://pkg.cloudflare.com/cloudflare-main.gpg --output /usr/share/keyrings/cloudflare-main.gpg && \
Expand All @@ -42,7 +50,9 @@ COPY ./docker/etc/sudoers /etc/sudoers

# Full Base Image
# MariaDB, Chromium and fonts
FROM base2-slim AS base2
# Make sure to reuse the slim image here. Uncomment the above line if you want to build it from scratch.
# FROM base2-slim AS base2
FROM louislam/uptime-kuma:base2-slim AS base2
ENV UPTIME_KUMA_ENABLE_EMBEDDED_MARIADB=1
RUN apt update && \
apt --yes --no-install-recommends install chromium fonts-indic fonts-noto fonts-noto-cjk mariadb-server && \
Expand Down
Loading

0 comments on commit 75c4c35

Please sign in to comment.