File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -749,6 +749,9 @@ class TJsonNodes : public TViewerPipeClient<TJsonNodes> {
749
749
}
750
750
}
751
751
752
+ bool noDC = true ;
753
+ bool noRack = true ;
754
+
752
755
for (TNodeId nodeId : NodeIds) {
753
756
if (!CheckNodeFilters (nodeId)) {
754
757
continue ;
@@ -799,6 +802,19 @@ class TJsonNodes : public TViewerPipeClient<TJsonNodes> {
799
802
}
800
803
}
801
804
}
805
+
806
+ if (!nodeInfo.GetSystemState ().GetLocation ().GetDataCenter ().empty ()) {
807
+ noDC = false ;
808
+ }
809
+ if (nodeInfo.GetSystemState ().GetSystemLocation ().GetDataCenter () != 0 ) {
810
+ noDC = false ;
811
+ }
812
+ if (!nodeInfo.GetSystemState ().GetLocation ().GetRack ().empty ()) {
813
+ noRack = false ;
814
+ }
815
+ if (nodeInfo.GetSystemState ().GetSystemLocation ().GetRack () != 0 ) {
816
+ noRack = false ;
817
+ }
802
818
}
803
819
804
820
if (!SortedNodeList) {
@@ -883,6 +899,12 @@ class TJsonNodes : public TViewerPipeClient<TJsonNodes> {
883
899
if (MaximumDisksPerNode.has_value ()) {
884
900
result.SetMaximumDisksPerNode (MaximumDisksPerNode.value ());
885
901
}
902
+ if (noDC) {
903
+ result.SetNoDC (true );
904
+ }
905
+ if (noRack) {
906
+ result.SetNoRack (true );
907
+ }
886
908
887
909
TStringStream json;
888
910
TProtoToJson::ProtoToJson (json, result, JsonSettings);
Original file line number Diff line number Diff line change @@ -439,6 +439,8 @@ message TNodesInfo {
439
439
optional uint64 TotalNodes = 3 ;
440
440
optional uint64 FoundNodes = 4 ;
441
441
optional uint64 MaximumDisksPerNode = 5 ;
442
+ optional bool NoDC = 6 ;
443
+ optional bool NoRack = 7 ;
442
444
}
443
445
444
446
enum ENodeType {
You can’t perform that action at this time.
0 commit comments