0.3.4 (#408)
* delete connect * update user * change branch * API feedback (#341) * wip * wip * wip * wip * wip * wip * wip * wip * change branch * update route * change branch * Update route.go * 0.3.4 Function development completed * Update system.go * update ui * Completed v0.3.4 and released alpha * Update gin.go * fix the problem of docker environment variables being displayed more than once Co-authored-by: Tiger Wang (王豫) <tigerwang@outlook.com>
This commit is contained in:
parent
3a60db3729
commit
87e66aae8a
26 changed files with 3281 additions and 3287 deletions
|
@ -45,7 +45,7 @@ type ServerAppList struct {
|
|||
Index string `json:"index"`
|
||||
CreatedAt time.Time `json:"created_at"`
|
||||
UpdatedAt time.Time `json:"updated_at"`
|
||||
State string `json:"state"`
|
||||
State int `json:"state"`
|
||||
Author string `json:"author"`
|
||||
MinMemory int `json:"min_memory"`
|
||||
MinDisk int `json:"min_disk"`
|
||||
|
|
|
@ -35,7 +35,7 @@ func InitRouter() *gin.Engine {
|
|||
r.POST("/v1/users/register", v1.PostUserRegister)
|
||||
r.POST("/v1/users/login", v1.PostUserLogin)
|
||||
r.GET("/v1/users/name", v1.GetUserAllUsername) //all/name
|
||||
r.POST("/v1/user/refresh", v1.PostUserRefreshToken)
|
||||
r.POST("/v1/users/refresh", v1.PostUserRefreshToken)
|
||||
// No short-term modifications
|
||||
r.GET("/v1/users/image", v1.GetUserImage)
|
||||
|
||||
|
|
|
@ -137,6 +137,7 @@ func MyAppList(c *gin.Context) {
|
|||
func AppUsageList(c *gin.Context) {
|
||||
list := service.MyService.App().GetHardwareUsage()
|
||||
c.JSON(common_err.SUCCESS, &model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: list})
|
||||
//c.JSON(common_err.SUCCESS, &model.Result{Success: common_err.SUCCESS, Message: common_err.GetMsg(common_err.SUCCESS), Data: nil})
|
||||
}
|
||||
|
||||
// @Summary 应用详情
|
||||
|
|
|
@ -1121,13 +1121,13 @@ func ContainerUpdateInfo(c *gin.Context) {
|
|||
showENV := info.Config.Labels["show_env"]
|
||||
showENVList := strings.Split(showENV, ",")
|
||||
showENVMap := make(map[string]string)
|
||||
if len(showENVList) > 1 {
|
||||
if len(showENVList) > 0 {
|
||||
for _, name := range showENVList {
|
||||
showENVMap[name] = "1"
|
||||
}
|
||||
}
|
||||
for _, v := range info.Config.Env {
|
||||
if len(showENVList) > 1 {
|
||||
if len(showENVList) > 0 {
|
||||
if _, ok := showENVMap[strings.Split(v, "=")[0]]; ok {
|
||||
temp := model.Env{
|
||||
Name: strings.Split(v, "=")[0],
|
||||
|
|
|
@ -240,7 +240,11 @@ func (o *casaService) GetServerAppInfo(id, t string, language string) (model.Ser
|
|||
if infoS == "" {
|
||||
return info, errors.New("server error")
|
||||
}
|
||||
json2.Unmarshal([]byte(gjson.Get(infoS, "data").String()), &info)
|
||||
err := json2.Unmarshal([]byte(gjson.Get(infoS, "data").String()), &info)
|
||||
if err != nil {
|
||||
fmt.Println(infoS)
|
||||
return info, err
|
||||
}
|
||||
|
||||
return info, nil
|
||||
}
|
||||
|
|
|
@ -59,6 +59,7 @@ func (d *diskService) SmartCTL(path string) model.SmartctlA {
|
|||
str := command2.ExecSmartCTLByPath(path)
|
||||
if str == nil {
|
||||
loger.Error("failed to exec shell ", zap.Any("err", "smartctl exec error"))
|
||||
Cache.Add(key, m, time.Minute*10)
|
||||
return m
|
||||
}
|
||||
|
||||
|
|
|
@ -346,3 +346,21 @@ USB_Remove_File() {
|
|||
GetDeviceTree(){
|
||||
cat /proc/device-tree/model
|
||||
}
|
||||
|
||||
# restart samba service
|
||||
RestartSMBD(){
|
||||
$sudo_cmd systemctl restart smbd
|
||||
}
|
||||
|
||||
# edit user password $1:username
|
||||
EditSmabaUserPassword(){
|
||||
$sudo_cmd smbpasswd $1
|
||||
}
|
||||
|
||||
AddSmabaUser(){
|
||||
$sudo_cmd useradd $1
|
||||
$sudo_cmd smbpasswd -a $1 <<EOF
|
||||
$2
|
||||
$2
|
||||
EOF
|
||||
}
|
|
@ -20,7 +20,7 @@
|
|||
<title>
|
||||
CasaOS
|
||||
</title>
|
||||
<link href="/ui/css/1.73b4186b.css" rel="prefetch"><link href="/ui/css/10.daa8e8be.css" rel="prefetch"><link href="/ui/css/11.232c3bcb.css" rel="prefetch"><link href="/ui/css/15.1f93b660.css" rel="prefetch"><link href="/ui/css/16.046fd3d8.css" rel="prefetch"><link href="/ui/css/5.ae1e42db.css" rel="prefetch"><link href="/ui/css/6.f02d5b96.css" rel="prefetch"><link href="/ui/css/7.32be8789.css" rel="prefetch"><link href="/ui/css/8.ee780c90.css" rel="prefetch"><link href="/ui/css/9.a00e5221.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/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.e3d6571d.css" rel="preload" as="style"><link href="/ui/css/vendors~app.6b5df7e4.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.6b5df7e4.css" rel="stylesheet"><link href="/ui/css/app.e3d6571d.css" rel="stylesheet"></head>
|
||||
<link href="/ui/css/13.a16d5119.css" rel="prefetch"><link href="/ui/css/14.cf8c898a.css" rel="prefetch"><link href="/ui/css/4.f7a3b3b4.css" rel="prefetch"><link href="/ui/css/5.e8438f80.css" rel="prefetch"><link href="/ui/css/6.d72d6157.css" rel="prefetch"><link href="/ui/css/7.805596b0.css" rel="prefetch"><link href="/ui/css/8.92188e4d.css" rel="prefetch"><link href="/ui/css/9.dccf29b4.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/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.344b6034.css" rel="preload" as="style"><link href="/ui/css/vendors~app.c42f9a2b.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.c42f9a2b.css" rel="stylesheet"><link href="/ui/css/app.344b6034.css" rel="stylesheet"></head>
|
||||
|
||||
<body>
|
||||
<noscript>
|
||||
|
|
38
web/js/1.js
38
web/js/1.js
File diff suppressed because one or more lines are too long
58
web/js/10.js
58
web/js/10.js
File diff suppressed because one or more lines are too long
50
web/js/11.js
50
web/js/11.js
File diff suppressed because one or more lines are too long
42
web/js/12.js
42
web/js/12.js
File diff suppressed because one or more lines are too long
34
web/js/13.js
34
web/js/13.js
File diff suppressed because one or more lines are too long
26
web/js/14.js
26
web/js/14.js
File diff suppressed because one or more lines are too long
18
web/js/15.js
18
web/js/15.js
File diff suppressed because one or more lines are too long
|
@ -1,5 +0,0 @@
|
|||
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([[16],{"./node_modules/vue-plyr/dist/vue-plyr.css":
|
||||
/*!*************************************************!*\
|
||||
!*** ./node_modules/vue-plyr/dist/vue-plyr.css ***!
|
||||
\*************************************************/
|
||||
/*! no static exports found */function(module,exports,__webpack_require__){eval("// extracted by mini-css-extract-plugin\n if(false) { var cssReload; }\n \n\n//# sourceURL=webpack:///./node_modules/vue-plyr/dist/vue-plyr.css?")}}]);
|
File diff suppressed because one or more lines are too long
38
web/js/2.js
38
web/js/2.js
File diff suppressed because one or more lines are too long
22
web/js/3.js
22
web/js/3.js
File diff suppressed because one or more lines are too long
1534
web/js/4.js
1534
web/js/4.js
File diff suppressed because one or more lines are too long
2750
web/js/5.js
2750
web/js/5.js
File diff suppressed because one or more lines are too long
1438
web/js/6.js
1438
web/js/6.js
File diff suppressed because one or more lines are too long
282
web/js/7.js
282
web/js/7.js
File diff suppressed because one or more lines are too long
90
web/js/8.js
90
web/js/8.js
File diff suppressed because one or more lines are too long
70
web/js/9.js
70
web/js/9.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue