1717 */
1818
1919use actix_web:: web:: Json ;
20- use human_size:: SpecificSize ;
2120use serde_json:: json;
2221
2322use crate :: {
@@ -79,21 +78,6 @@ pub async fn about() -> Json<serde_json::Value> {
7978 let is_oidc_active = CONFIG . parseable . openid . is_some ( ) ;
8079 let ui_version = option_env ! ( "UI_VERSION" ) . unwrap_or ( "development" ) ;
8180
82- let cache_details: String = if CONFIG . cache_dir ( ) . is_none ( ) {
83- "Disabled" . to_string ( )
84- } else {
85- let cache_dir: & Option < PathBuf > = CONFIG . cache_dir ( ) ;
86- let cache_size: SpecificSize < human_size:: Gigibyte > =
87- SpecificSize :: new ( CONFIG . cache_size ( ) as f64 , human_size:: Byte )
88- . unwrap ( )
89- . into ( ) ;
90- format ! (
91- "Enabled, Path: {} (Size: {})" ,
92- cache_dir. as_ref( ) . unwrap( ) . display( ) ,
93- cache_size
94- )
95- } ;
96-
9781 let hot_tier_details: String = if CONFIG . hot_tier_dir ( ) . is_none ( ) {
9882 "Disabled" . to_string ( )
9983 } else {
@@ -105,6 +89,16 @@ pub async fn about() -> Json<serde_json::Value> {
10589 } ;
10690
10791 let ms_clarity_tag = & CONFIG . parseable . ms_clarity_tag ;
92+ let mut query_engine = "Parseable" . to_string ( ) ;
93+ if let ( Some ( _) , Some ( _) , Some ( _) , Some ( _) ) = (
94+ CONFIG . parseable . trino_endpoint . as_ref ( ) ,
95+ CONFIG . parseable . trino_catalog . as_ref ( ) ,
96+ CONFIG . parseable . trino_schema . as_ref ( ) ,
97+ CONFIG . parseable . trino_username . as_ref ( ) ,
98+ ) {
99+ // Trino is enabled
100+ query_engine = "Trino" . to_string ( ) ;
101+ }
108102
109103 Json ( json ! ( {
110104 "version" : current_version,
@@ -119,7 +113,6 @@ pub async fn about() -> Json<serde_json::Value> {
119113 "license" : "AGPL-3.0-only" ,
120114 "mode" : mode,
121115 "staging" : staging,
122- "cache" : cache_details,
123116 "hotTier" : hot_tier_details,
124117 "grpcPort" : grpc_port,
125118 "store" : {
@@ -128,7 +121,8 @@ pub async fn about() -> Json<serde_json::Value> {
128121 } ,
129122 "analytics" : {
130123 "clarityTag" : ms_clarity_tag
131- }
124+ } ,
125+ "queryEngine" : query_engine
132126
133127 } ) )
134128}
0 commit comments