Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,20 +92,31 @@
"post-autoload-dump": "@prepare",
"build": [
"@prepare",
"@clear",
"@php vendor/bin/testbench workbench:build"
],
"canvas": "@php vendor/bin/canvas",
"clear": "@php vendor/bin/testbench package:purge-skeleton --ansi",
"dev": [
"@build",
"Composer\\Config::disableProcessTimeout",
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#fdba74\" \"php vendor/bin/testbench serve\" \"php vendor/bin/testbench queue:listen --tries=1\" \"php vendor/bin/testbench pail\" \"npm run dev\" --names=server,queue,logs,vite"
"npx concurrently -c \"#93c5fd,#c4b5fd,#fb7185,#86efac\" \"php vendor/bin/testbench serve\" \"php vendor/bin/testbench queue:listen --tries=1\" \"npm run dev\" \"node scheduler.cjs\" --names=server,queue,vite,scheduler"
],
"prepare": "@php vendor/bin/testbench package:discover --ansi",
"start": [
"@dev"
],
"fresh": [
"@php vendor/bin/testbench migrate:fresh --seed --seeder=Cachet\\Database\\Seeders\\DatabaseSeeder",
"@serve"
],
"serve": [
"Composer\\Config::disableProcessTimeout",
"php vendor/bin/testbench serve --host=0.0.0.0 --port=8000"
],
"setup": [
"@prepare",
"@php vendor/bin/testbench workbench:build",
"npm run build"
],
"test:lint": [
"pint --test"
],
Expand Down
13 changes: 13 additions & 0 deletions config/cachet.php
Original file line number Diff line number Diff line change
Expand Up @@ -179,4 +179,17 @@
'cache' => env('CACHET_FEED_CACHE', 3600),
],

/*
Uptime Kuma Integration .env variables
*/
'uptime_kuma' => [
'enabled' => env('CACHET_UPTIME_KUMA_ENABLED', true),
'url' => env('CACHET_UPTIME_KUMA_URL', 'http://localhost:3001'),
'status_page_slug' => env('CACHET_UPTIME_KUMA_STATUS_PAGE_SLUG', 'united-codes'),
'webhook_secret' => env('CACHET_UPTIME_KUMA_WEBHOOK_SECRET', null),
'send_notifications' => env('CACHET_UPTIME_KUMA_NOTIFICATIONS', true),
'auto_resolve' => env('CACHET_UPTIME_KUMA_AUTO_RESOLVE', true),
'sync_interval' => env('CACHET_UPTIME_KUMA_SYNC_INTERVAL', 5),
],

];
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::table('component_groups', function (Blueprint $table) {
$table->json('meta')->nullable()->after('visible');
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::table('component_groups', function (Blueprint $table) {
$table->dropColumn('meta');
});
}
};
30 changes: 30 additions & 0 deletions database/migrations/2026_02_09_000000_add_integration_settings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

use Spatie\LaravelSettings\Migrations\SettingsMigration;

return new class extends SettingsMigration
{
public function up(): void
{
$this->migrator->add('integrations.uptime_kuma_url', null);
$this->migrator->add('integrations.uptime_kuma_status_page_slug', null);
$this->migrator->add('integrations.uptime_kuma_enabled', true);
$this->migrator->add('integrations.uptime_kuma_auto_incidents', true);
$this->migrator->add('integrations.uptime_kuma_auto_resolve', true);
$this->migrator->add('integrations.uptime_kuma_send_notifications', true);
$this->migrator->add('integrations.uptime_kuma_sync_interval', 5);
$this->migrator->add('integrations.uptime_kuma_last_sync', null);
}

public function down(): void
{
$this->migrator->delete('integrations.uptime_kuma_url');
$this->migrator->delete('integrations.uptime_kuma_status_page_slug');
$this->migrator->delete('integrations.uptime_kuma_enabled');
$this->migrator->delete('integrations.uptime_kuma_auto_incidents');
$this->migrator->delete('integrations.uptime_kuma_auto_resolve');
$this->migrator->delete('integrations.uptime_kuma_send_notifications');
$this->migrator->delete('integrations.uptime_kuma_sync_interval');
$this->migrator->delete('integrations.uptime_kuma_last_sync');
}
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?php

use Spatie\LaravelSettings\Migrations\SettingsMigration;

return new class extends SettingsMigration
{
public function up(): void
{
$this->migrator->add('integrations.uptime_kuma_webhook_secret', null);
}

public function down(): void
{
$this->migrator->delete('integrations.uptime_kuma_webhook_secret');
}
};
49 changes: 49 additions & 0 deletions database/migrations/2026_02_11_000000_add_branding_settings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<?php

use Spatie\LaravelSettings\Migrations\SettingsMigration;

return new class extends SettingsMigration
{
public function up(): void
{
// Header settings
$this->migrator->add('branding.header_bg_color', null);
$this->migrator->add('branding.header_text_color', null);
$this->migrator->add('branding.header_logo', null);
$this->migrator->add('branding.header_logo_height', 32);
$this->migrator->add('branding.header_links', null);
$this->migrator->add('branding.show_subscribe_button', true);
$this->migrator->add('branding.show_dashboard_link', true);

// Footer settings
$this->migrator->add('branding.footer_bg_color', null);
$this->migrator->add('branding.footer_text_color', null);
$this->migrator->add('branding.footer_copyright', null);
$this->migrator->add('branding.show_cachet_branding', true);
$this->migrator->add('branding.footer_links', null);

// General branding
$this->migrator->add('branding.page_bg_color', null);
$this->migrator->add('branding.favicon_url', null);
$this->migrator->add('branding.custom_css', null);
}

public function down(): void
{
$this->migrator->delete('branding.header_bg_color');
$this->migrator->delete('branding.header_text_color');
$this->migrator->delete('branding.header_logo');
$this->migrator->delete('branding.header_logo_height');
$this->migrator->delete('branding.header_links');
$this->migrator->delete('branding.show_subscribe_button');
$this->migrator->delete('branding.show_dashboard_link');
$this->migrator->delete('branding.footer_bg_color');
$this->migrator->delete('branding.footer_text_color');
$this->migrator->delete('branding.footer_copyright');
$this->migrator->delete('branding.show_cachet_branding');
$this->migrator->delete('branding.footer_links');
$this->migrator->delete('branding.page_bg_color');
$this->migrator->delete('branding.favicon_url');
$this->migrator->delete('branding.custom_css');
}
};
20 changes: 10 additions & 10 deletions database/seeders/DatabaseSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ class DatabaseSeeder extends Seeder
*/
public function run(): void
{
DB::table('users')->truncate();
DB::table('incidents')->truncate();
DB::table('components')->truncate();
DB::table('component_groups')->truncate();
DB::table('schedules')->truncate();
DB::table('metrics')->truncate();
DB::table('metric_points')->truncate();
DB::table('updates')->truncate();
DB::table('webhook_attempts')->truncate();
DB::table('webhook_subscriptions')->truncate();
// DB::table('users')->truncate();
// DB::table('incidents')->truncate();
// DB::table('components')->truncate();
// DB::table('component_groups')->truncate();
// DB::table('schedules')->truncate();
// DB::table('metrics')->truncate();
// DB::table('metric_points')->truncate();
// DB::table('updates')->truncate();
// DB::table('webhook_attempts')->truncate();
// DB::table('webhook_subscriptions')->truncate();

/** @var User $userModel */
$userModel = config('cachet.user_model');
Expand Down
Loading
Loading