@@ -66,6 +66,7 @@ class AdminSystemHealthController {
6666 this . apiContractRows = root . querySelector ( "[data-admin-system-health-api-contract-rows]" ) ;
6767 this . apiRegistryRows = root . querySelector ( "[data-admin-system-health-api-registry-rows]" ) ;
6868 this . capabilityRows = root . querySelector ( "[data-admin-system-health-capability-rows]" ) ;
69+ this . featureFlagRows = root . querySelector ( "[data-admin-system-health-feature-flag-rows]" ) ;
6970 this . actionRows = root . querySelector ( "[data-admin-system-health-action-rows]" ) ;
7071 this . actionButtons = Array . from ( root . querySelectorAll ( "[data-admin-system-health-action]" ) ) ;
7172 this . configurationRows = root . querySelector ( "[data-admin-system-health-configuration-rows]" ) ;
@@ -149,6 +150,7 @@ class AdminSystemHealthController {
149150 this . renderEnvironmentCapabilitiesPending ( reason ) ;
150151 this . renderApiContractPending ( reason ) ;
151152 this . renderAdminApiRegistryPending ( reason ) ;
153+ this . renderRuntimeFeatureFlagsPending ( reason ) ;
152154 this . renderServiceHealthPending ( reason ) ;
153155 this . renderConfigurationSummaryPending ( reason ) ;
154156 this . renderScheduledMonitoringPending ( reason ) ;
@@ -369,6 +371,45 @@ class AdminSystemHealthController {
369371 this . apiRegistryRows . replaceChildren ( fragment ) ;
370372 }
371373
374+ renderRuntimeFeatureFlagsPending ( reason ) {
375+ if ( ! this . featureFlagRows ) {
376+ return ;
377+ }
378+ const row = document . createElement ( "tr" ) ;
379+ row . append (
380+ this . createCell ( "Runtime Feature Flags" ) ,
381+ this . createCell ( "not available" ) ,
382+ this . createStatusCell ( "PENDING" , reason ) ,
383+ ) ;
384+ this . featureFlagRows . replaceChildren ( row ) ;
385+ }
386+
387+ renderRuntimeFeatureFlags ( runtimeFeatureFlags = { } ) {
388+ if ( ! this . featureFlagRows ) {
389+ return ;
390+ }
391+ if ( runtimeFeatureFlags ?. secretsExposed === true || runtimeFeatureFlags ?. secretEditingAllowed === true ) {
392+ this . renderRuntimeFeatureFlagsPending ( "Safe runtime feature flags response was blocked because it exposed secret controls." ) ;
393+ return ;
394+ }
395+ const rows = Array . isArray ( runtimeFeatureFlags . rows ) ? runtimeFeatureFlags . rows : [ ] ;
396+ if ( ! rows . length ) {
397+ this . renderRuntimeFeatureFlagsPending ( "Safe Admin System Health API returned no runtime feature flag rows." ) ;
398+ return ;
399+ }
400+ const fragment = document . createDocumentFragment ( ) ;
401+ rows . forEach ( ( featureRow ) => {
402+ const row = document . createElement ( "tr" ) ;
403+ row . append (
404+ this . createCell ( featureRow . flag ) ,
405+ this . createCell ( featureRow . value ) ,
406+ this . createStatusCell ( featureRow . status , runtimeFeatureFlags . message ) ,
407+ ) ;
408+ fragment . append ( row ) ;
409+ } ) ;
410+ this . featureFlagRows . replaceChildren ( fragment ) ;
411+ }
412+
372413 renderServiceHealthPending ( reason ) {
373414 if ( ! this . serviceCards ) {
374415 return ;
@@ -793,6 +834,7 @@ class AdminSystemHealthController {
793834 this . renderEnvironmentCapabilities ( data ?. environmentCapabilities || { } ) ;
794835 this . renderApiContract ( data ?. apiContract || { } ) ;
795836 this . renderAdminApiRegistry ( data ?. adminApiRegistry || { } ) ;
837+ this . renderRuntimeFeatureFlags ( data ?. runtimeFeatureFlags || { } ) ;
796838 this . renderServiceHealth ( data ?. serviceHealth || { } ) ;
797839 this . renderConfigurationSummary ( data ?. configurationSummary || { } ) ;
798840 this . renderScheduledMonitoring ( data ?. scheduledMonitoring || { } ) ;
0 commit comments