Assign version to backend
	
		
			
	
		
	
	
		
	
		
			All checks were successful
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is passing
				
			
		
		
	
	
				
					
				
			
		
			All checks were successful
		
		
	
	continuous-integration/drone/push Build is passing
				
			This commit is contained in:
		
							
								
								
									
										2
									
								
								central_backend/Cargo.lock
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										2
									
								
								central_backend/Cargo.lock
									
									
									
										generated
									
									
									
								
							@@ -656,7 +656,7 @@ dependencies = [
 | 
			
		||||
 | 
			
		||||
[[package]]
 | 
			
		||||
name = "central_backend"
 | 
			
		||||
version = "0.1.0"
 | 
			
		||||
version = "1.0.2"
 | 
			
		||||
dependencies = [
 | 
			
		||||
 "actix",
 | 
			
		||||
 "actix-cors",
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
[package]
 | 
			
		||||
name = "central_backend"
 | 
			
		||||
version = "0.1.0"
 | 
			
		||||
version = "1.0.2"
 | 
			
		||||
edition = "2021"
 | 
			
		||||
 | 
			
		||||
[dependencies]
 | 
			
		||||
 
 | 
			
		||||
@@ -13,6 +13,7 @@ struct ServerConfig {
 | 
			
		||||
    auth_disabled: bool,
 | 
			
		||||
    constraints: StaticConstraints,
 | 
			
		||||
    unsecure_origin: String,
 | 
			
		||||
    backend_version: &'static str,
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
impl Default for ServerConfig {
 | 
			
		||||
@@ -21,6 +22,7 @@ impl Default for ServerConfig {
 | 
			
		||||
            auth_disabled: AppConfig::get().unsecure_disable_login,
 | 
			
		||||
            constraints: Default::default(),
 | 
			
		||||
            unsecure_origin: AppConfig::get().unsecure_origin(),
 | 
			
		||||
            backend_version: env!("CARGO_PKG_VERSION"),
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -4,6 +4,7 @@ export interface ServerConfig {
 | 
			
		||||
  auth_disabled: boolean;
 | 
			
		||||
  constraints: ServerConstraint;
 | 
			
		||||
  unsecure_origin: string;
 | 
			
		||||
  backend_version: string;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export interface ServerConstraint {
 | 
			
		||||
 
 | 
			
		||||
@@ -12,9 +12,11 @@ import {
 | 
			
		||||
  ListItemButton,
 | 
			
		||||
  ListItemIcon,
 | 
			
		||||
  ListItemText,
 | 
			
		||||
  Typography,
 | 
			
		||||
} from "@mui/material";
 | 
			
		||||
import { useLocation } from "react-router-dom";
 | 
			
		||||
import { RouterLink } from "./RouterLink";
 | 
			
		||||
import { ServerApi } from "../api/ServerApi";
 | 
			
		||||
 | 
			
		||||
export function SolarEnergyNavList(): React.ReactElement {
 | 
			
		||||
  return (
 | 
			
		||||
@@ -52,6 +54,13 @@ export function SolarEnergyNavList(): React.ReactElement {
 | 
			
		||||
        uri="/logs"
 | 
			
		||||
        icon={<Icon path={mdiNotebookMultiple} size={1} />}
 | 
			
		||||
      />
 | 
			
		||||
      <Typography
 | 
			
		||||
        variant="caption"
 | 
			
		||||
        component="div"
 | 
			
		||||
        style={{ textAlign: "center", width: "100%", marginTop: "30px" }}
 | 
			
		||||
      >
 | 
			
		||||
        Version {ServerApi.Config.backend_version}
 | 
			
		||||
      </Typography>
 | 
			
		||||
    </List>
 | 
			
		||||
  );
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user