Skip to content

Commit

Permalink
fixed bug
Browse files Browse the repository at this point in the history
- [System] Fixed the issue of widgets displaying wrongly on mobile devices.
- [App] Fix the problem of application opening failure on non-80 ports ([#283](#283) [#280](#280))
- [System] Modify port failure problem ([#282](#282))
- [App]Modify environment variables disappearing problem([#284](#284))
- [System]Fix no update alert([#278](#278))
- [System] Fixed some bugs of application cpu usage and memory staging([#272]#272)
  • Loading branch information
LinkLeong committed Jun 14, 2022
1 parent 6d1528c commit baf306d
Show file tree
Hide file tree
Showing 11 changed files with 58 additions and 40 deletions.
14 changes: 10 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
10 changes: 10 additions & 0 deletions model/docker.go
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down
16 changes: 9 additions & 7 deletions service/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -479,13 +475,18 @@ 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)
go func(v types.Container, i int) {
defer wg.Done()
stats, err := cli.ContainerStats(ctx, v.ID, true)
if err != nil {
dataStats.Delete(v.ID)
return
}
decode := json.NewDecoder(stats.Body)
Expand All @@ -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()
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<title>
CasaOS
</title>
<link href="/ui/css/10.d72d6157.css" rel="prefetch"><link href="/ui/css/11.f8326b27.css" rel="prefetch"><link href="/ui/css/16.a16d5119.css" rel="prefetch"><link href="/ui/css/17.cf8c898a.css" rel="prefetch"><link href="/ui/css/8.11ecc7a4.css" rel="prefetch"><link href="/ui/css/9.e57f27f9.css" rel="prefetch"><link href="/ui/js/0.js" rel="prefetch"><link href="/ui/js/1.js" rel="prefetch"><link href="/ui/js/10.js" rel="prefetch"><link href="/ui/js/11.js" rel="prefetch"><link href="/ui/js/12.js" rel="prefetch"><link href="/ui/js/13.js" rel="prefetch"><link href="/ui/js/14.js" rel="prefetch"><link href="/ui/js/15.js" rel="prefetch"><link href="/ui/js/16.js" rel="prefetch"><link href="/ui/js/17.js" rel="prefetch"><link href="/ui/js/18.js" rel="prefetch"><link href="/ui/js/2.js" rel="prefetch"><link href="/ui/js/3.js" rel="prefetch"><link href="/ui/js/4.js" rel="prefetch"><link href="/ui/js/5.js" rel="prefetch"><link href="/ui/js/6.js" rel="prefetch"><link href="/ui/js/7.js" rel="prefetch"><link href="/ui/js/8.js" rel="prefetch"><link href="/ui/js/9.js" rel="prefetch"><link href="/ui/css/app.4293eecd.css" rel="preload" as="style"><link href="/ui/css/vendors~app.8a2c28d7.css" rel="preload" as="style"><link href="/ui/js/app.js" rel="preload" as="script"><link href="/ui/js/vendors~app.js" rel="preload" as="script"><link href="/ui/css/vendors~app.8a2c28d7.css" rel="stylesheet"><link href="/ui/css/app.4293eecd.css" rel="stylesheet"></head>
<link href="/ui/css/10.32be8789.css" rel="prefetch"><link href="/ui/css/11.dc77452d.css" rel="prefetch"><link href="/ui/css/16.1f93b660.css" rel="prefetch"><link href="/ui/css/17.046fd3d8.css" rel="prefetch"><link href="/ui/css/8.332ce37a.css" rel="prefetch"><link href="/ui/css/9.e1b97a16.css" rel="prefetch"><link href="/ui/js/0.js" rel="prefetch"><link href="/ui/js/1.js" rel="prefetch"><link href="/ui/js/10.js" rel="prefetch"><link href="/ui/js/11.js" rel="prefetch"><link href="/ui/js/12.js" rel="prefetch"><link href="/ui/js/13.js" rel="prefetch"><link href="/ui/js/14.js" rel="prefetch"><link href="/ui/js/15.js" rel="prefetch"><link href="/ui/js/16.js" rel="prefetch"><link href="/ui/js/17.js" rel="prefetch"><link href="/ui/js/18.js" rel="prefetch"><link href="/ui/js/2.js" rel="prefetch"><link href="/ui/js/3.js" rel="prefetch"><link href="/ui/js/4.js" rel="prefetch"><link href="/ui/js/5.js" rel="prefetch"><link href="/ui/js/6.js" rel="prefetch"><link href="/ui/js/7.js" rel="prefetch"><link href="/ui/js/8.js" rel="prefetch"><link href="/ui/js/9.js" rel="prefetch"><link href="/ui/css/app.f66141f5.css" rel="preload" as="style"><link href="/ui/css/vendors~app.a048753d.css" rel="preload" as="style"><link href="/ui/js/app.js" rel="preload" as="script"><link href="/ui/js/vendors~app.js" rel="preload" as="script"><link href="/ui/css/vendors~app.a048753d.css" rel="stylesheet"><link href="/ui/css/app.f66141f5.css" rel="stylesheet"></head>

<body>
<noscript>
Expand Down
2 changes: 1 addition & 1 deletion web/js/11.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit baf306d

Please sign in to comment.