Skip to content

Commit

Permalink
perf: 调整 API 获取设置
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeEirc committed Feb 27, 2024
1 parent 914e22c commit 613ca76
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
2 changes: 1 addition & 1 deletion pkg/httpd/webserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ func (s *Server) GenerateViewMeta(targetId string) (meta ViewPageMata) {
if err != nil {
logger.Errorf("Get core api public setting err: %s", err)
}
meta.IconURL = setting.LogoURLS.Favicon
meta.IconURL = setting.Interface.Favicon
return
}

Expand Down
34 changes: 19 additions & 15 deletions pkg/jms-sdk-go/model/setting.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package model

type PublicSetting struct {
LoginTitle string `json:"LOGIN_TITLE"`
LogoURLS struct {
LogOut string `json:"logo_logout"`
Index string `json:"logo_index"`
Image string `json:"login_image"`
Favicon string `json:"favicon"`
} `json:"LOGO_URLS"`
Interface struct {
LoginTitle string `json:"login_title"`
LogOut string `json:"logo_logout"`
Index string `json:"logo_index"`
Image string `json:"login_image"`
Favicon string `json:"favicon"`
} `json:"INTERFACE"`
EnableWatermark bool `json:"SECURITY_WATERMARK_ENABLED"`
EnableSessionShare bool `json:"SECURITY_SESSION_SHARE"`
EnableAnnouncement bool `json:"ANNOUNCEMENT_ENABLED"`
Expand All @@ -32,13 +32,6 @@ type PublicSetting struct {
"SECURITY_PASSWORD_EXPIRATION_TIME": 10000,
"SECURITY_LUNA_REMEMBER_AUTH": true,
"XPACK_LICENSE_IS_VALID": true,
"LOGIN_TITLE": "欢迎使用JumpServer开源堡垒机",
"LOGO_URLS": {
"logo_logout": "/static/img/logo.png",
"logo_index": "/static/img/logo_text.png",
"login_image": "/static/img/login_image.jpg",
"favicon": "/static/img/facio.ico"
},
"TICKETS_ENABLED": true,
"PASSWORD_RULE": {
"SECURITY_PASSWORD_MIN_LENGTH": 6,
Expand All @@ -53,6 +46,17 @@ type PublicSetting struct {
"AUTH_FEISHU": true,
"SECURITY_WATERMARK_ENABLED": true,
"SECURITY_SESSION_SHARE": true,
"XRDP_ENABLED": true
"XRDP_ENABLED": true,
INTERFACE: {
logo_logout: "/static/img/logo.png",
logo_index: "/static/img/logo_text_white.png",
login_image: "/static/img/login_image.png",
favicon: "/static/img/facio.ico",
login_title: "JumpServer 开源堡垒机",
theme: "classic_green",
theme_info: { },
beian_link: "",
beian_text: ""
}
}
*/

0 comments on commit 613ca76

Please sign in to comment.