Commit Graph

86 Commits

Author SHA1 Message Date
Bot 3319d7344f feat: rewrite notification system and telegram interactive bot 2026-04-28 00:04:29 +08:00
Bot 3d849b4b43 feat: implement VPS/Domain expiry notifications and native SMTP support 2026-04-16 21:36:49 +08:00
Bot bc32f8fce4 feat: add support for custom branding and background settings in Config 2026-04-16 17:18:48 +08:00
奶爸 e61772e858 feat(v2.0.0): tsdb (#1162)
* feat: tsdb

* fix(ci): remove --parseGoList=false from swag init to fix dependency resolution

* fix(ci): fix swag init directory and temporary remove s390x support due to cgo issues

* fix(ci): fix swag init output directory to cmd/dashboard/docs

* fix(ci): set GOTOOLCHAIN=auto for gosec

* feat: add system storage maintenance for SQLite and TSDB

* shit

* feat: add s390x support and improve service monitoring

* ci: upgrade goreleaser-cross image to v1.25

* ci: add libzstd-dev:s390x for cross-compilation

* ci: build libzstd for s390x from source

* ci: add libzstd_linux_s390x.go for gozstd linking

* ci: use vendor mode for s390x gozstd build

* ci: clone zstd source for s390x build

* refactor(tsdb): rename MaxDiskUsageGB to MinFreeDiskSpaceGB and optimize queries

- Rename config to accurately reflect VictoriaMetrics behavior: minimum free disk space threshold
- Add QueryServiceHistoryByServerID for batch query optimization
- Fix hasStatus to avoid false status counting when only delay data exists
- Fix service aggregation boundary: use successCount*2 >= count
- Fix serviceID parsing with strconv.ParseUint error handling
- Add TagFiltersCacheSize for better query performance

* feat(api): add server metrics endpoint and simplify service history response

- Add /server/:id/metrics API for querying TSDB server metrics
- Simplify getServiceHistory by removing redundant data conversion
- Change AvgDelay type from float32 to float64
- Remove generated swagger docs (to be regenerated)
- Update TSDB query, writer and tests

* chore: 临时禁用不支持前端

* ci: cache zstd build for s390x to speed up CI

* fix(tsdb): fix race conditions, data correctness and optimize performance

- Fix TOCTOU race between IsClosed() and write/query by holding RLock
- Fix delay=0 excluded from stats by using hasDelay flag instead of value > 0
- Fix fmt.Sscanf -> strconv.ParseUint for server_id parsing with error logging
- Fix buffer unbounded growth by flushing inside lock when over maxSize
- Split makeMetricRow into makeServerMetricRow/makeServiceMetricRow
- Extract InitGlobalSettings() from Open() for VictoriaMetrics globals
- Remove redundant instance/GetInstance/SetInstance singleton
- Add error logging for silently skipped block decode errors
- Optimize WriteBatch* to build all rows in single write call
- Optimize downsample to use linear scan instead of map for sorted data
- Optimize query slice reuse across block iterations

* 服务添加DisplayIndex (#1166)

* 服务添加DisplayIndex

* 根据ai建议修改

---------

Co-authored-by: huYang <306061454@qq.com>

* fix(tsdb): restore SQLite fallback and monthly status reload on restart

- Restore ServiceHistory model and SQLite write fallback when TSDB is disabled
- Reload monthlyStatus (30-day) and serviceStatusToday from TSDB/SQLite on startup
- Add SQLite fallback query for /service/:id/history and /server/:id/service
- Remove breaking GET /service/:id endpoint, keep /service/:id/history only
- Add QueryServiceDailyStats to TSDB for per-day aggregation
- Add tests for monthly status and today stats loading from both TSDB and SQLite
- Migrate ServiceHistory table only when TSDB is disabled

* ci: exclude false-positive gosec rules G117, G703, G704

* feat(api): expose tsdb_enabled in setting response

* ci: restore G115 exclusion accidentally dropped in previous commit

* fix: update version numbers for OfficialAdmin and Official templates

* chore: upgrade frontend

* chore: upgrade frontend

---------

Co-authored-by: 胡说丷刂 <34758853+laosan-xx@users.noreply.github.com>
Co-authored-by: huYang <306061454@qq.com>
2026-02-15 13:13:33 +08:00
UUBulb b6fed87d61 fix: member-created services shouldn't be applied to admin resources (#1113) 2025-08-28 22:37:44 +08:00
TomyJan 6493911d45 feat: separate real ip header of frontend/agent (#1057)
* test(deps): use self admin-frontend

* feat: separate real ip header of frontend/agent

* test(ci): test

* Revert "test(ci): test"

This reverts commit 1634c7e7d7bca2873c13955abb582ea88645844f.

* test(ci): test

* test(ci): test

* test(ci): test

* Revert "test(ci): test"

This reverts commit 8fce20a07e5a9503f665937337050d4373ca7e78.

* Revert "test(ci): test"

This reverts commit 3267cccbfb81776a711e8cb34e676536f0852d1c.

* Revert "test(ci): test"

This reverts commit 566660c0c6a9875864aa46537bcc6788769337eb.

* Revert "test(deps): use self admin-frontend"

This reverts commit 16a838b374ff040800b2c1c5f8e5ede577645669.
2025-04-13 18:41:28 +08:00
UUBulb 8f88db4f18 hide install_host for guest (#1029) 2025-03-15 18:01:23 +08:00
UUBulb f1e3613daf fix: config fields not generated on first startup (#1016)
* fix: config fields not generated on first startup

* cleanup

* fix reference

* replace yaml module

* remove duplicated fields

* remove yaml.v3 as a direct dependency

* update dependency

* chore
2025-03-03 19:02:25 +08:00
JSker9 b23680f913 feat: add configurable JWT timeout setting (#1014) 2025-03-02 15:37:46 +08:00
UUBulb 1d2f8d24f6 feat: update to go1.24 & support listening https (#1002)
* feat: support listening https

* refactor

* modernize

* support snake case in config

* more precise control of config fields

* update goreleaser config

* remove kubeyaml

* fix: expose agent_secret

* chore
2025-02-28 22:02:54 +08:00
UUBulb a5b7db10e1 feat: option to force authorization for vistor routes (#971) 2025-01-29 19:27:57 +08:00
naiba 18020939da feat: 绑定 oauth2 2024-12-28 23:50:59 +08:00
naiba 180773a4f3 feat: update language handling and frontend template versions 2024-12-15 17:07:53 +08:00
naiba 06738d5d16 feat: enhance template configuration and update README for translation status 2024-12-10 22:27:06 +08:00
Moraxyc 8f8a30c02c Refactor: Load UserTemplates from embedded yaml file (#575)
* Refactor: Load UserTemplates from embedded yaml file

* feat: add version field to UserTemplates

* refactor: use shell script to fetch frontends

* chore: add *-dist to .gitignore

* refactor: rename to FrontendTemplates

BREAKING CHANGE: This commit changes the `user_templates` filed
in the communication json between backend and the admin-frontend.

Keep user config.yml `user_template` filed.
2024-12-10 21:57:20 +08:00
naiba 9b0697491d feat: multi user template 2024-12-06 23:19:28 +08:00
Moraxyc 3fb49693d9 feat: add listen_host (#550) 2024-12-05 17:01:21 +08:00
UUBulb 91a7c934e6 fix config default value (#538)
* fix config & state fields

* revert state
2024-12-02 21:10:40 +08:00
naiba 1772de7c5e chore: dir perm 2024-11-28 20:15:12 +08:00
naiba 3cce7ebf01 rename repo 2024-11-28 19:38:54 +08:00
UUBulb 238ec25314 fix: ensure the configuration path exists (#19) 2024-11-25 20:18:30 +08:00
UUBulb 626a7d6059 apply upstream changes (#18)
* apply upstream changes

* update translations, fix i18n script

* remove installation scripts and related files
2024-11-24 01:07:14 +08:00
naiba d699d0ee87 feat: grpc / web get real ip 2024-11-22 00:19:36 +08:00
UUBulb 288e1b75e9 fix struct tags (#7) 2024-11-16 20:57:03 +08:00
uubulb d7012e36bf set c.Language to zh_CN if not specified 2024-11-01 14:36:14 +08:00
uubulb 5114fc2854 feat: add i18n support 2024-11-01 05:07:04 +08:00
UUBulb b4edb4cc95 add setting api (#461) 2024-10-27 13:10:07 +08:00
naiba c4011934f7 fix agent connect 2024-10-22 23:44:50 +08:00
naiba f99edfd7bd feat: terminal api 2024-10-22 22:01:01 +08:00
naiba aa20c97312 refactor agent auth & server api 2024-10-20 23:23:04 +08:00
naiba 53f1abb7c8 refactor: login & refresh token 2024-10-20 14:05:43 +08:00
naiba 606e10ca0a refactor: remove pages, combine grpc http port 2024-10-20 11:47:45 +08:00
naiba 9e6bbd3386 🎉 init swaggo 2024-10-19 23:14:53 +08:00
UUBulb aa81fc02ab fix: add custom theme key (#440) 2024-10-19 11:59:31 +08:00
UUBulb f6531a52bd ddns: remove ipv6 nameservers, support custom nameservers (#439) 2024-10-18 22:06:01 +08:00
UUBulb a503f0cf40 ddns: store configuation in database (#435)
* ddns: store configuation in database

Co-authored-by: nap0o <144927971+nap0o@users.noreply.github.com>

* feat: split domain with soa lookup

* switch to libdns interface

* ddns: add unit test

* ddns: skip TestSplitDomainSOA on ci

network is not steady

* fix error handling

* fix error handling

---------

Co-authored-by: nap0o <144927971+nap0o@users.noreply.github.com>
2024-10-17 21:03:03 +08:00
UUBulb 55f5c89c1c feat: description file for custom theme; use gjson (#433)
* feat: description file for custom theme; use gjson

* fix gosec

* remove outdated stuff
2024-10-10 00:08:16 +08:00
naiba daab64d232 feat: 管理后台自定义代码 2024-08-14 00:24:17 +08:00
Tao Chen e1513203b4 添加OIDC支持 (#387)
* add general OIDC

* use "github.com/coreos/go-oidc/v3/oidc" to simplify oidc config

* fix: check if https by X-Forwarded-Proto

* recovery config.yaml
2024-07-13 12:51:59 +08:00
UUBulb 2aabe1bd61 chore: fix some typos (#370) 2024-06-16 18:04:27 +08:00
Leon e0e2b8c3c2 Add support for sensor temperature in host state (#359)
* feat: Add support for sensor temperature in host state

* chore: Update file permissions for saving config data
2024-06-01 19:11:48 +08:00
Akkia 25e7f8a912 支持cloudflare access OIDC认证 (#354) 2024-05-03 08:47:53 +08:00
UUBulb 5c7652f047 Add DDNS Profiles, use publicsuffixlist domain parser (#350)
* Add DDNS Profiles, use publicsuffixlist domain parser

* Add Tencent Cloud DNS Provider

* Restore validate DDNS provider function

* chore: fmt & upgrade dependencies
2024-04-27 13:36:36 +08:00
naiba da6a3463ed 后台关闭切换主题功能 2024-02-27 21:05:39 +08:00
Darc Z 3b5ee464a7 Add DDNS support (#324)
* feat: add ddns updater framework

Note: no functionality implemented yet

* feat: add webhook ddns provider

* feat: update dashboard template

* fix: check nil and cron task string

* fix: webhook string formated with unexcepted param

* fix: webhook header split error

* feat: cloudflare ddns provider

* refract: move ddns update trigger into ReportSystemInfo

* lang: update other languages text

* fix: clear codes and logics

* fix: move update ddns to goroutine to avoid blocking

* fix: clear unused codes

* fix: update timestamp to prevent cache
2024-02-24 21:10:27 +08:00
xykt dbfea9a00b 对历史延迟图表进行了相关修复/美化工作 (#321)
* Update network.html

修复以下问题:
- 延迟默认最高300ms,超过后默认抹平
- 曲线上有很多ping值为0的无效散点,导致毛刺很多,干扰效果
- 图标的y轴比例失调,上方大片留白,大大降低了有效显示区域
- 默认只显示最近不到半小时左右的延迟表现,想看全天需要拖动,影响效果
- 曲线不显示极大极小值,不够直观

* Update config.go

修复了以下问题:
- 延迟默认最高300ms,超过后默认抹平
- 曲线上有很多ping值为0的无效散点,导致毛刺很多,干扰效果
- 图标的y轴比例失调,上方大片留白,大大降低了有效显示区域
- 默认只显示最近不到半小时左右的延迟表现,想看全天需要拖动,影响效果
- 曲线不显示极大极小值,不够直观
2024-02-19 13:52:43 +08:00
Ko no dio e8b8e59bd7 feat: add network monitor hitory (#316) · 三网ping
* feat: add network monitor hitory

* fix: revert proto change and add indexStore

* fix: update monitor delete unuse monitor history

* fix: delete unuse monitor type

---------

Co-authored-by: LvGJ <lvgj1998@gmail.com>
2024-02-12 14:16:04 +08:00
unclezs 470fa69ad9 feat: add server-status theme (#295)
*  feat: add server-status theme

* add `ServerStatus` theme to README

---------

Co-authored-by: naiba <hi@nai.ba>
2023-11-07 13:46:28 +08:00
naiba 61a14d204b dash: v0.14.12 new theme AngelKanade 2023-04-09 00:28:21 +08:00
rootmelo92118 aff4b093f6 Update config.go 2023-02-03 13:12:14 +08:00