diff --git a/CHANGELOG.md b/CHANGELOG.md
index c6647f6..81aa0c4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,12 +20,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [0.3.2.1] - 2022-06-14
+### Changed
+
+- [System] Adjusted the display style.
+
### Fixed
-- Fix the problem of application opening failure on non-80 ports ([#283](https://github.com/IceWhaleTech/CasaOS/issues/283) [#280](https://github.com/IceWhaleTech/CasaOS/issues/280))
-- Modify port failure problem ([#282](https://github.com/IceWhaleTech/CasaOS/issues/282))
-- Modify environment variables disappearing problem([#284](https://github.com/IceWhaleTech/CasaOS/issues/284))
-- Fix no update alert([#278](https://github.com/IceWhaleTech/CasaOS/issues/278))
+- [System] Fixed the issue of widgets displaying wrongly on mobile devices.
+- [App] Fix the problem of application opening failure on non-80 ports ([#283](https://github.com/IceWhaleTech/CasaOS/issues/283) [#280](https://github.com/IceWhaleTech/CasaOS/issues/280))
+- [System] Modify port failure problem ([#282](https://github.com/IceWhaleTech/CasaOS/issues/282))
+- [App]Modify environment variables disappearing problem([#284](https://github.com/IceWhaleTech/CasaOS/issues/284))
+- [System]Fix no update alert([#278](https://github.com/IceWhaleTech/CasaOS/issues/278))
+- [System] Fixed some bugs of application cpu usage and memory staging([#272]https://github.com/IceWhaleTech/CasaOS/issues/272)
## [0.3.2] - 2022-06-10
diff --git a/model/docker.go b/model/docker.go
index 1718eb6..59b006d 100644
--- a/model/docker.go
+++ b/model/docker.go
@@ -1,3 +1,13 @@
+/*
+ * @Author: LinkLeong link@icewhale.com
+ * @Date: 2021-12-08 18:10:25
+ * @LastEditors: LinkLeong
+ * @LastEditTime: 2022-06-14 17:20:36
+ * @FilePath: /CasaOS/model/docker.go
+ * @Description:
+ * @Website: https://www.casaos.io
+ * Copyright (c) 2022 by icewhale, All Rights Reserved.
+ */
package model
type DockerStatsModel struct {
diff --git a/service/app.go b/service/app.go
index f976f13..4ed9728 100644
--- a/service/app.go
+++ b/service/app.go
@@ -464,12 +464,8 @@ func (a *appStruct) GetHardwareUsageSteam() {
fts := filters.NewArgs()
fts.Add("label", "casaos=casaos")
- //fts.Add("label", "casaos")
- //fts.Add("casaos", "casaos")
- containers, err := cli.ContainerList(context.Background(), types.ContainerListOptions{All: true, Filters: fts})
- if err != nil {
- loger.Error("Failed to get container_list", zap.Any("err", err))
- }
+ fts.Add("status", "running")
+
for i := 0; i < 100; i++ {
if config.CasaOSGlobalVariables.AppChange {
config.CasaOSGlobalVariables.AppChange = false
@@ -479,6 +475,10 @@ func (a *appStruct) GetHardwareUsageSteam() {
return true
})
}
+ containers, err := cli.ContainerList(context.Background(), types.ContainerListOptions{All: true, Filters: fts})
+ if err != nil {
+ loger.Error("Failed to get container_list", zap.Any("err", err))
+ }
var wg sync.WaitGroup
for _, v := range containers {
wg.Add(1)
@@ -486,6 +486,7 @@ func (a *appStruct) GetHardwareUsageSteam() {
defer wg.Done()
stats, err := cli.ContainerStats(ctx, v.ID, true)
if err != nil {
+ dataStats.Delete(v.ID)
return
}
decode := json.NewDecoder(stats.Body)
@@ -501,6 +502,7 @@ func (a *appStruct) GetHardwareUsageSteam() {
dockerStats.Data = data
dockerStats.Icon = v.Labels["icon"]
dockerStats.Title = strings.ReplaceAll(v.Names[0], "/", "")
+
dataStats.Store(v.ID, dockerStats)
if i == 99 {
stats.Body.Close()
@@ -509,7 +511,7 @@ func (a *appStruct) GetHardwareUsageSteam() {
}
wg.Wait()
isFinish = true
- time.Sleep(time.Second * 3)
+ time.Sleep(time.Second * 1)
}
isFinish = false
cancel()
diff --git a/web/index.html b/web/index.html
index 8ee9d75..fc39518 100644
--- a/web/index.html
+++ b/web/index.html
@@ -20,7 +20,7 @@
CasaOS
-
+