@@ -251,6 +251,8 @@ class TConfigsDispatcher : public TActorBootstrapped<TConfigsDispatcher> {
251
251
bool StartupConfigProcessDiff = false ;
252
252
TString StartupConfigInfo;
253
253
::NMonitoring::TDynamicCounters::TCounterPtr StartupConfigChanged;
254
+ ::NMonitoring::TDynamicCounters::TCounterPtr ConfigurationV1;
255
+ ::NMonitoring::TDynamicCounters::TCounterPtr ConfigurationV2;
254
256
const std::optional<TDebugInfo> DebugInfo;
255
257
std::shared_ptr<NConfig::TRecordedInitialConfiguratorDeps> RecordedInitialConfiguratorDeps;
256
258
std::vector<TString> Args;
@@ -298,8 +300,18 @@ void TConfigsDispatcher::Bootstrap()
298
300
}
299
301
TIntrusivePtr<NMonitoring::TDynamicCounters> rootCounters = AppData ()->Counters ;
300
302
TIntrusivePtr<NMonitoring::TDynamicCounters> authCounters = GetServiceCounters (rootCounters, " config" );
301
- NMonitoring::TDynamicCounterPtr counters = authCounters->GetSubgroup (" subsystem" , " ConfigsDispatcher " );
303
+ NMonitoring::TDynamicCounterPtr counters = authCounters->GetSubgroup (" subsystem" , " configs_dispatcher " );
302
304
StartupConfigChanged = counters->GetCounter (" StartupConfigChanged" , true );
305
+ ConfigurationV1 = counters->GetCounter (" ConfigurationV1" , true );
306
+ ConfigurationV2 = counters->GetCounter (" ConfigurationV2" , false );
307
+
308
+ if (Labels.contains (" configuration_version" )) {
309
+ if (Labels.at (" configuration_version" ) == " v1" ) {
310
+ *ConfigurationV1 = 1 ;
311
+ } else {
312
+ *ConfigurationV2 = 1 ;
313
+ }
314
+ }
303
315
304
316
auto commonClient = CreateConfigsSubscriber (
305
317
SelfId (),
@@ -522,6 +534,7 @@ void TConfigsDispatcher::Handle(TEvInterconnect::TEvNodesInfo::TPtr &ev)
522
534
523
535
DIV_CLASS (" container" ) {
524
536
DIV_CLASS (" navbar navbar-expand-lg navbar-light bg-light" ) {
537
+ str << " <style>.navbar { z-index: 1030; position: relative; }</style>" << Endl;
525
538
DIV_CLASS (" navbar-collapse" ) {
526
539
UL_CLASS (" navbar-nav mr-auto" ) {
527
540
LI_CLASS (" nav-item" ) {
@@ -534,6 +547,17 @@ void TConfigsDispatcher::Handle(TEvInterconnect::TEvNodesInfo::TPtr &ev)
534
547
}
535
548
}
536
549
}
550
+
551
+ DIV_CLASS (" alert alert-info" ) {
552
+ str << " <style>.alert-info { position: relative; z-index: 1020; }</style>" << Endl;
553
+ str << " <strong>Configuration version: </strong>" ;
554
+ if (Labels.contains (" configuration_version" )) {
555
+ str << Labels.at (" configuration_version" );
556
+ } else {
557
+ str << " unknown" ;
558
+ }
559
+ }
560
+
537
561
DIV_CLASS (" tab-left" ) {
538
562
COLLAPSED_REF_CONTENT (" node-labels" , " Node labels" ) {
539
563
PRE () {
0 commit comments