Skip to content

Commit

Permalink
perf: update terminal config api
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeEirc committed Nov 12, 2024
1 parent 0a77455 commit 99fb209
Show file tree
Hide file tree
Showing 9 changed files with 1,633 additions and 603 deletions.
13 changes: 7 additions & 6 deletions cmd/impl/jms.go
Original file line number Diff line number Diff line change
Expand Up @@ -381,12 +381,13 @@ func (j *JMServer) GetPublicSetting(ctx context.Context, empty *pb.Empty) (*pb.P
setting := j.uploader.GetTerminalSetting()
status.Ok = true
pbSetting := pb.PublicSetting{
XpackEnabled: data.XpackEnabled,
ValidLicense: data.ValidLicense,
GptBaseUrl: setting.GPTBaseURL,
GptApiKey: setting.GPTApiKey,
GptProxy: setting.GPTProxy,
GptModel: setting.GPTModel,
XpackEnabled: data.XpackEnabled,
ValidLicense: data.ValidLicense,
GptBaseUrl: setting.GPTBaseURL,
GptApiKey: setting.GPTApiKey,
GptProxy: setting.GPTProxy,
GptModel: setting.GPTModel,
LicenseContent: setting.LicenseContent,
}
return &pb.PublicSettingResponse{Status: &status, Data: &pbSetting}, nil
}
Expand Down
2 changes: 2 additions & 0 deletions pkg/jms-sdk-go/model/terminal.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ type TerminalConfig struct {
HeartbeatDuration int `json:"TERMINAL_HEARTBEAT_INTERVAL"`
HostKey string `json:"TERMINAL_HOST_KEY"`
EnableSessionShare bool `json:"SECURITY_SESSION_SHARE"`
LicenseContent string `json:"XPACK_LICENSE_CONTENT"`
LicenseIsValid bool `json:"XPACK_LICENSE_IS_VALID"`

GPTBaseURL string `json:"GPT_BASE_URL"`
GPTApiKey string `json:"GPT_API_KEY"`
Expand Down
Loading

0 comments on commit 99fb209

Please sign in to comment.