Commit Graph

96 Commits

Author SHA1 Message Date
GT610
0659e7f9d0 fix(ssh): Modify the return type of execWithPwd to include the output content
Adjust the return type of the `execWithPwd` method to `(int?, String)` so that it can simultaneously return the exit code and output content

Fix the issue in ContainerNotifier where the return result of execWithPwd is not handled correctly

Ensure that server operations (shutdown/restart/suspend) are correctly pending until the command execution is completed
2026-01-11 22:37:18 +08:00
lxdklp
75d1a59e77 fix: Unable to obtain Windows server information (#963)
* fix: FormatException: Unexpected extension byte (at offset 8) error

* fix: PowerShell script error repair, Windows data parsing repair

* fix: Unable to obtain network card information

* fix: Unable to obtain system startup time

* fix conversation as resolved.
2025-11-22 19:17:40 +08:00
lollipopkit🏳️‍⚧️
3b7fdf36fb opt. 2025-08-31 23:59:53 +08:00
lollipopkit🏳️‍⚧️
53a7c0d8ff migrate: riverpod + freezed (#870) 2025-08-31 00:55:54 +08:00
lollipopkit🏳️‍⚧️
ed8a1d18b9 opt.: systemd page (#851) 2025-08-13 22:16:55 +08:00
lollipopkit🏳️‍⚧️
3a615449e3 feat: Windows compatibility (#836)
* feat: win compatibility

* fix

* fix: uptime parse

* opt.: linux uptime accuracy

* fix: windows temperature fetching

* opt.

* opt.: powershell exec

* refactor: address PR review feedback and improve code quality

### Major Improvements:
- **Refactored Windows status parsing**: Broke down large `_getWindowsStatus` method into 13 smaller, focused helper methods for better maintainability and readability
- **Extracted system detection logic**: Created dedicated `SystemDetector` helper class to separate OS detection concerns from ServerProvider
- **Improved concurrency handling**: Implemented proper synchronization for server updates using Future-based locks to prevent race conditions

### Bug Fixes:
- **Fixed CPU percentage parsing**: Removed incorrect '*100' multiplication in BSD CPU parsing (values were already percentages)
- **Enhanced memory parsing**: Added validation and error handling to BSD memory fallback parsing with proper logging
- **Improved uptime parsing**: Added support for multiple Windows date formats and robust error handling with validation
- **Fixed division by zero**: Added safety checks in Swap.usedPercent getter

### Code Quality Enhancements:
- **Added comprehensive documentation**: Documented Windows CPU counter limitations and approach
- **Strengthened error handling**: Added detailed logging and validation throughout parsing methods
- **Improved robustness**: Enhanced BSD CPU parsing with percentage validation and warnings
- **Better separation of concerns**: Each parsing method now has single responsibility

### Files Changed:
- `lib/data/helper/system_detector.dart` (new): System detection helper
- `lib/data/model/server/cpu.dart`: Fixed percentage parsing and added validation
- `lib/data/model/server/memory.dart`: Enhanced fallback parsing and division-by-zero protection
- `lib/data/model/server/server_status_update_req.dart`: Refactored into 13 focused parsing methods
- `lib/data/provider/server.dart`: Improved synchronization and extracted system detection

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor: parse & shell fn struct

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-08 16:56:36 +08:00
lollipopkit🏳️‍⚧️
0c1ada0067 fix: cloud sync (#769) 2025-06-04 00:11:31 +08:00
lollipopkit🏳️‍⚧️
391e4f6b65 opt.: page struct 2025-04-09 12:15:42 +08:00
lollipopkit🏳️‍⚧️
ddd32e82d4 opt.: migrate to new fl_lib (#649)
Fixes #648
2024-12-02 21:06:44 +08:00
lollipopkit🏳️‍⚧️
50af289574 migrate: fl_lib 2024-09-21 11:01:41 +08:00
lollipopkit🏳️‍⚧️
195ddd2bcc refactor: SSHClientX.exec 2024-08-15 11:27:22 +08:00
lollipopkit🏳️‍⚧️
267b0b0a69 opt.: sftp home & back (#533) 2024-08-14 19:01:44 +08:00
lollipopkit🏳️‍⚧️
41e3fcb23a feat: systemd management (#532) 2024-08-14 14:29:03 +08:00
lollipopkit🏳️‍⚧️
076082c945 feat: sftp perm setting & path copy (#467) 2024-07-18 21:40:40 +08:00
lollipopkit
336b11b808 chore: change dart pkg id 2024-06-11 22:06:29 +08:00
lollipopkit
d1f14bee59 opt.: speed up docker page 2024-06-01 22:36:02 +08:00
lollipopkit
9eb16f4703 opt.: l10n 2024-05-16 17:25:38 +08:00
lollipopkit
04dfede535 opt.: migrate fl_lib 2024-05-14 22:29:37 +08:00
lollipopkit
dc16574a04 fix: disk parse 2024-05-09 14:51:41 +08:00
lollipopkit
d0523c1e54 feat: keyboard-interactive auth (#349) 2024-05-07 15:22:31 +08:00
lollipopkit
3237d9eb21 opt. & new: icons 2024-04-26 00:39:03 +08:00
lollipopkit
23764f8c93 readd: jump server 2024-04-21 00:42:00 +08:00
lollipopkit
57fc8c2687 chore: README 2024-04-12 00:26:00 +08:00
lollipopkit
78e156bfb2 fix: condig dir perm (#299) 2024-04-02 12:35:05 +08:00
lollipopkit
f5d5bf9c37 fix & opt.
- fix: db type err
- opt.: server detail page `customCmd` card
2024-03-28 11:10:12 +08:00
lollipopkit
b6a797c993 new: custom cmds (#313) 2024-03-25 15:03:39 +08:00
lollipopkit
26264ecdea new: pve (#307) 2024-03-18 18:34:25 +08:00
lollipopkit
baffe6dbe0 feat: separate ssh term theme setting (#305) 2024-03-12 14:56:19 +08:00
lollipopkit
f187bc6ccf new: remember pwd in mem 2024-03-11 10:15:24 +08:00
lollipopkit
2ddc29f45e new: setting of termCursor type 2024-03-08 17:03:11 +08:00
lollipopkit
183fc7f160 opt.: loading dialog 2024-02-29 18:12:44 +08:00
lollipopkit
8e484a575c readd: server tab double column (#277) 2024-02-20 18:02:08 +08:00
lollipopkit
ba564a886b new: pick dialog support tags 2024-02-20 16:13:36 +08:00
lollipopkit
f4bf7a4d5e new: auto refresh container page 2024-02-20 15:16:40 +08:00
lollipopkit
61ddb56639 new: auto run snippet (#67) 2024-02-18 15:00:41 +08:00
PaperCube
21860daf41 Fix sudo pswd dialog neither re-appearing nor closing session
- Fixed that when empty password was provided the dialog should have stopped the session
- Fixed that when wrong password was provided the dialog should have appeared again but it didn't
2024-02-17 01:46:02 +00:00
PaperCube
1f69f88b81 Docker: Adaptive sudo 2024-02-14 15:02:59 +00:00
PaperCube
694854a89f Rework shell installer script writer s.t. fish shell doesn't rely on sftp 2024-02-13 21:03:14 +00:00
lollipopkit
50d6ed919b opt.: disk size (#252) 2024-01-21 18:01:11 +08:00
lollipopkit
ee96f2696e opt.: file view (#249) 2024-01-16 11:42:30 +08:00
lollipopkit
460f3f957e opt.: auto add date for manual webdav backup 2024-01-11 18:37:57 +08:00
lollipopkit
527e161264 opt.: battery status 2023-12-21 17:34:04 +08:00
lollipopkit
6924290626 opt. 2023-12-20 11:34:18 +08:00
lollipopkit
2b1b6c7afb new & opt.: server page font size 2023-12-19 14:27:59 +08:00
lollipopkit
48bc6da7b5 new: battery (#235) 2023-12-18 17:43:38 +08:00
lollipopkit
ee18b85108 opt.: tag switcher 2023-12-15 12:01:55 +08:00
lollipopkit
66d344c910 chore: screenshots 2023-12-03 13:16:51 +08:00
lollipopkit
440dabfca8 opt.: server tab 2023-12-02 17:35:14 +08:00
lollipopkit
fc0c9b3a49 opt.: android only arm64 & ssh tab page 2023-12-02 00:21:07 +08:00
lollipopkit
a23a284d1a new: picker & opt. rm -r 2023-10-05 19:51:24 +08:00