fix typo and os info
This commit is contained in:
		
							parent
							
								
									07137ac566
								
							
						
					
					
						commit
						c763478f66
					
				| @ -761,8 +761,8 @@ pub fn get_sysinfo() -> serde_json::Value { | |||||||
|     let cpu_freq = cpus.first().map(|x| x.frequency()).unwrap_or_default(); |     let cpu_freq = cpus.first().map(|x| x.frequency()).unwrap_or_default(); | ||||||
|     let num_cpus = num_cpus::get(); |     let num_cpus = num_cpus::get(); | ||||||
|     let num_pcpus = num_cpus::get_physical(); |     let num_pcpus = num_cpus::get_physical(); | ||||||
|     let os = system.name().unwrap_or(system.distribution_id()); |     let os = system.distribution_id(); | ||||||
|     let os = format!("{} {}", os, system.os_version().unwrap_or_default()); |     let os = format!("{} / {}", os, system.long_os_version().unwrap_or_default()); | ||||||
|     let hostname = system.host_name(); |     let hostname = system.host_name(); | ||||||
|     serde_json::json!({ |     serde_json::json!({ | ||||||
|         "cpu": format!("{cpu_name}, {cpu_freq}MHz, {num_cpus}/{num_pcpus} cores"), |         "cpu": format!("{cpu_name}, {cpu_freq}MHz, {num_cpus}/{num_pcpus} cores"), | ||||||
|  | |||||||
| @ -65,7 +65,7 @@ async fn start_hbbs_sync_async() { | |||||||
|                 } |                 } | ||||||
|                 if !info_uploaded.0 && info_uploaded.2.map(|x| x.elapsed() >= UPLOAD_SYSINFO_TIMEOUT).unwrap_or(true){ |                 if !info_uploaded.0 && info_uploaded.2.map(|x| x.elapsed() >= UPLOAD_SYSINFO_TIMEOUT).unwrap_or(true){ | ||||||
|                     let mut v = crate::get_sysinfo(); |                     let mut v = crate::get_sysinfo(); | ||||||
|                     v["verion"] = json!(crate::VERSION); |                     v["version"] = json!(crate::VERSION); | ||||||
|                     v["id"] = json!(Config::get_id()); |                     v["id"] = json!(Config::get_id()); | ||||||
|                     v["uuid"] = json!(crate::encode64(hbb_common::get_uuid())); |                     v["uuid"] = json!(crate::encode64(hbb_common::get_uuid())); | ||||||
|                     match crate::post_request(url.replace("heartbeat", "sysinfo"), v.to_string(), "").await { |                     match crate::post_request(url.replace("heartbeat", "sysinfo"), v.to_string(), "").await { | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user