commit 68e29600466a640463d68ba0da9da29e7e08e591 Author: jinghui <3970260761@qq.com> Date: Fri Nov 6 16:04:28 2026 +0800 feat: fnos-resmon v1.2.0 资源监视器 diff --git a/ICON.PNG b/ICON.PNG new file mode 100644 index 0000000..c221ba6 Binary files /dev/null and b/ICON.PNG differ diff --git a/ICON_256.PNG b/ICON_256.PNG new file mode 100644 index 0000000..d5c1bd4 Binary files /dev/null and b/ICON_256.PNG differ diff --git a/app/.DS_Store b/app/.DS_Store new file mode 100644 index 0000000..982a645 Binary files /dev/null and b/app/.DS_Store differ diff --git a/app/docker/docker-compose.yaml b/app/docker/docker-compose.yaml new file mode 100644 index 0000000..78ff56d --- /dev/null +++ b/app/docker/docker-compose.yaml @@ -0,0 +1,16 @@ +services: + fnos-resmon: + image: 192.168.68.19:3200/jinghui/fnos-resmon:latest + container_name: fnos-resmon + network_mode: host + pid: host + restart: unless-stopped + environment: + - PORT=7031 + - PROCFS_PATH=/host/proc + privileged: true + volumes: + - /proc:/host/proc:rw + - /sys:/host/sys:ro + - /etc/passwd:/host/etc/passwd:ro + - /:/host:ro diff --git a/app/public/index.html b/app/public/index.html new file mode 100644 index 0000000..f4e2c81 --- /dev/null +++ b/app/public/index.html @@ -0,0 +1,187 @@ + + + + + +飞牛资源管理器 + + + +
+
CPU
+
内存
+
磁盘
+
网络
+
+
+ + + + +
+
+ + +
+
+ + + diff --git a/app/ui/.DS_Store b/app/ui/.DS_Store new file mode 100644 index 0000000..0b271e1 Binary files /dev/null and b/app/ui/.DS_Store differ diff --git a/app/ui/config b/app/ui/config new file mode 100644 index 0000000..c83710c --- /dev/null +++ b/app/ui/config @@ -0,0 +1,13 @@ +{ + ".url": { + "fnos-resmon.Application": { + "title": "飞牛资源管理器", + "icon": "images/icon_{0}.png", + "type": "url", + "protocol": "http", + "port": "7031", + "url": "/", + "allUsers": false + } + } +} diff --git a/app/ui/images/.DS_Store b/app/ui/images/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/app/ui/images/.DS_Store differ diff --git a/app/ui/images/icon_256.png b/app/ui/images/icon_256.png new file mode 100644 index 0000000..d5c1bd4 Binary files /dev/null and b/app/ui/images/icon_256.png differ diff --git a/app/ui/images/icon_64.png b/app/ui/images/icon_64.png new file mode 100644 index 0000000..c221ba6 Binary files /dev/null and b/app/ui/images/icon_64.png differ diff --git a/cmd/.DS_Store b/cmd/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/cmd/.DS_Store differ diff --git a/cmd/config_callback b/cmd/config_callback new file mode 100644 index 0000000..f96cbfb --- /dev/null +++ b/cmd/config_callback @@ -0,0 +1,5 @@ +#!/bin/bash + +### This script is called after the user change environment variables in application setting page. + +exit 0 \ No newline at end of file diff --git a/cmd/config_init b/cmd/config_init new file mode 100644 index 0000000..cacd475 --- /dev/null +++ b/cmd/config_init @@ -0,0 +1,5 @@ +#!/bin/bash + +### This script is called before the user change environment variables in application setting page. + +exit 0 \ No newline at end of file diff --git a/cmd/install_callback b/cmd/install_callback new file mode 100644 index 0000000..c7f9afa --- /dev/null +++ b/cmd/install_callback @@ -0,0 +1,5 @@ +#!/bin/bash + +### This script is called after the user installs the application. + +exit 0 \ No newline at end of file diff --git a/cmd/install_init b/cmd/install_init new file mode 100644 index 0000000..9ee0f11 --- /dev/null +++ b/cmd/install_init @@ -0,0 +1,5 @@ +#!/bin/bash + +### This script is called before the user installs the application. + +exit 0 \ No newline at end of file diff --git a/cmd/main b/cmd/main new file mode 100644 index 0000000..c6786a8 --- /dev/null +++ b/cmd/main @@ -0,0 +1,42 @@ +#!/bin/bash + +FILE_PATH="${TRIM_APPDEST}/docker/docker-compose.yaml" + +is_docker_running () { + DOCKER_NAME="" + + if [ -f "$FILE_PATH" ]; then + DOCKER_NAME=$(cat $FILE_PATH | grep "container_name" | awk -F ':' '{print $2}' | xargs) + echo "DOCKER_NAME is set to: $DOCKER_NAME" + fi + + if [ -n "$DOCKER_NAME" ]; then + docker inspect $DOCKER_NAME | grep -q "\"Status\": \"running\"," || exit 1 + return + fi +} + +case $1 in +start) + # run start command. exit 0 if success, exit 1 if failed + # do nothing, docker application will be started by appcenter + exit 0 + ;; +stop) + # run stop command. exit 0 if success, exit 1 if failed + # do nothing, docker application will be stopped by appcenter + exit 0 + ;; +status) + # check application status command. exit 0 if running, exit 3 if not running + # check first container by default, you cound modify it by yourself + if is_docker_running; then + exit 0 + else + exit 3 + fi + ;; +*) + exit 1 + ;; +esac \ No newline at end of file diff --git a/cmd/uninstall_callback b/cmd/uninstall_callback new file mode 100644 index 0000000..52f5bf0 --- /dev/null +++ b/cmd/uninstall_callback @@ -0,0 +1,5 @@ +#!/bin/bash + +### This script is called after the user uninstalls the application. + +exit 0 \ No newline at end of file diff --git a/cmd/uninstall_init b/cmd/uninstall_init new file mode 100644 index 0000000..52f5bf0 --- /dev/null +++ b/cmd/uninstall_init @@ -0,0 +1,5 @@ +#!/bin/bash + +### This script is called after the user uninstalls the application. + +exit 0 \ No newline at end of file diff --git a/cmd/upgrade_callback b/cmd/upgrade_callback new file mode 100644 index 0000000..80ae554 --- /dev/null +++ b/cmd/upgrade_callback @@ -0,0 +1,5 @@ +#!/bin/bash + +### This script is called after the user upgrades the application. + +exit 0 \ No newline at end of file diff --git a/cmd/upgrade_init b/cmd/upgrade_init new file mode 100644 index 0000000..997e45d --- /dev/null +++ b/cmd/upgrade_init @@ -0,0 +1,5 @@ +#!/bin/bash + +### This script is called before the user upgrades the application. + +exit 0 \ No newline at end of file diff --git a/config/.DS_Store b/config/.DS_Store new file mode 100644 index 0000000..5008ddf Binary files /dev/null and b/config/.DS_Store differ diff --git a/config/privilege b/config/privilege new file mode 100644 index 0000000..f266a0f --- /dev/null +++ b/config/privilege @@ -0,0 +1,5 @@ +{ + "network": ["host"], + "pid": ["host"], + "volumes": ["/proc", "/sys", "/etc/passwd", "/"] +} diff --git a/config/resource b/config/resource new file mode 100644 index 0000000..0967ef4 --- /dev/null +++ b/config/resource @@ -0,0 +1 @@ +{} diff --git a/fnos-resmon.fpk b/fnos-resmon.fpk new file mode 100644 index 0000000..9fa188e Binary files /dev/null and b/fnos-resmon.fpk differ diff --git a/manifest b/manifest new file mode 100644 index 0000000..db7e309 --- /dev/null +++ b/manifest @@ -0,0 +1,7 @@ +appname: fnos-resmon +version: 1.2.0 +display_name: 飞牛资源管理器 +desc: 飞牛 NAS 资源监视器(CPU/内存/磁盘/网络四页签,读取宿主真实数据) +arch: x86_64 +source: docker +maintainer: jinghui