17
17
*/
18
18
19
19
use actix_web:: web:: Json ;
20
- use human_size:: SpecificSize ;
21
20
use serde_json:: json;
22
21
23
22
use crate :: {
@@ -79,21 +78,6 @@ pub async fn about() -> Json<serde_json::Value> {
79
78
let is_oidc_active = CONFIG . parseable . openid . is_some ( ) ;
80
79
let ui_version = option_env ! ( "UI_VERSION" ) . unwrap_or ( "development" ) ;
81
80
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
-
97
81
let hot_tier_details: String = if CONFIG . hot_tier_dir ( ) . is_none ( ) {
98
82
"Disabled" . to_string ( )
99
83
} else {
@@ -105,6 +89,16 @@ pub async fn about() -> Json<serde_json::Value> {
105
89
} ;
106
90
107
91
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
+ }
108
102
109
103
Json ( json ! ( {
110
104
"version" : current_version,
@@ -119,7 +113,6 @@ pub async fn about() -> Json<serde_json::Value> {
119
113
"license" : "AGPL-3.0-only" ,
120
114
"mode" : mode,
121
115
"staging" : staging,
122
- "cache" : cache_details,
123
116
"hotTier" : hot_tier_details,
124
117
"grpcPort" : grpc_port,
125
118
"store" : {
@@ -128,7 +121,8 @@ pub async fn about() -> Json<serde_json::Value> {
128
121
} ,
129
122
"analytics" : {
130
123
"clarityTag" : ms_clarity_tag
131
- }
124
+ } ,
125
+ "queryEngine" : query_engine
132
126
133
127
} ) )
134
128
}
0 commit comments