commit
						d7748dc756
					
				@ -561,7 +561,7 @@ func editAgentConfig() {
 | 
			
		||||
		panic(err)
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	fmt.Println("修改自定义配置成功,重启 Agnet 后生效")
 | 
			
		||||
	fmt.Println("修改自定义配置成功,重启 Agent 后生效")
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func println(v ...interface{}) {
 | 
			
		||||
 | 
			
		||||
@ -41,7 +41,7 @@ func GetHost(agentConfig *model.AgentConfig) *model.Host {
 | 
			
		||||
	hi, _ := host.Info()
 | 
			
		||||
	var cpuType string
 | 
			
		||||
	if hi.VirtualizationSystem != "" {
 | 
			
		||||
		cpuType = "Vrtual"
 | 
			
		||||
		cpuType = "Virtual"
 | 
			
		||||
	} else {
 | 
			
		||||
		cpuType = "Physical"
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
@ -50,11 +50,11 @@ func (oa *oauth2controller) getCommonOauth2Config(c *gin.Context) *oauth2.Config
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (oa *oauth2controller) getRedirectURL(c *gin.Context) string {
 | 
			
		||||
	schame := "http://"
 | 
			
		||||
	scheme := "http://"
 | 
			
		||||
	if strings.HasPrefix(c.Request.Referer(), "https://") {
 | 
			
		||||
		schame = "https://"
 | 
			
		||||
		scheme = "https://"
 | 
			
		||||
	}
 | 
			
		||||
	return schame + c.Request.Host + "/oauth2/callback"
 | 
			
		||||
	return scheme + c.Request.Host + "/oauth2/callback"
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
func (oa *oauth2controller) login(c *gin.Context) {
 | 
			
		||||
 | 
			
		||||
@ -24,7 +24,7 @@ type Cron struct {
 | 
			
		||||
	LastResult     bool      // 最后一次执行结果
 | 
			
		||||
	Cover          uint8
 | 
			
		||||
 | 
			
		||||
	CronJobID  cron.EntryID `gorn:"-"`
 | 
			
		||||
	CronJobID  cron.EntryID `gorm:"-"`
 | 
			
		||||
	ServersRaw string
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user