Skip to content

Commit e463939

Browse files
authored
hive ui fixes after tablet availability feature (#1779)
1 parent 446e145 commit e463939

File tree

2 files changed

+17
-5
lines changed

2 files changed

+17
-5
lines changed

ydb/core/mind/hive/hive_statics.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ TString GetTypesHtml(const std::set<TTabletTypes::EType>& typesToShow, const std
456456
<< "' onclick='applySetting(this,\"DefaultTabletLimit\",\"" << shortTypeName
457457
<< ":0\")'>";
458458
} else {
459-
str << "<span class='box disabled' title='" << longTypeName
459+
str << "<span class='box box-disabled' title='" << longTypeName
460460
<< "' onclick='applySetting(this, \"DefaultTabletLimit\", \"" << shortTypeName
461461
<< ":" << TNodeInfo::MAX_TABLET_COUNT_DEFAULT_VALUE << "\")'>";
462462
}

ydb/core/mind/hive/monitoring.cpp

+16-4
Original file line numberDiff line numberDiff line change
@@ -1408,7 +1408,7 @@ class TTxMonEvent_Landing : public TTransactionBase<THive> {
14081408
out << ".blinking { animation:blinkingText 0.8s infinite; }";
14091409
out << "@keyframes blinkingText { 0% { color: #000; } 49% { color: #000; } 60% { color: transparent; } 99% { color:transparent; } 100% { color: #000; } }";
14101410
out << ".box { border: 1px solid grey; border-radius: 5px; padding-left: 2px; padding-right: 2px; display: inline-block; font: 11px Arial; cursor: pointer }";
1411-
out << ".disabled { text-decoration: line-through; }";
1411+
out << ".box-disabled { text-decoration: line-through; }";
14121412
out << "</style>";
14131413
out << "</head>";
14141414
out << "<body>";
@@ -2246,7 +2246,7 @@ class TTxMonEvent_LandingData : public TTransactionBase<THive> {
22462246
if (MaxCount > 0) {
22472247
str << "<span class='box' ";
22482248
} else {
2249-
str << "<span class='box disabled' ";
2249+
str << "<span class='box box-disabled' ";
22502250
}
22512251
if (totalCount > MaxCount) {
22522252
str << " style='color: red' ";
@@ -2267,11 +2267,24 @@ class TTxMonEvent_LandingData : public TTransactionBase<THive> {
22672267

22682268
void RenderJSONPage(IOutputStream &out) {
22692269
ui64 nodes = 0;
2270-
ui64 tablets = Self->Tablets.size();
2270+
ui64 tablets = 0;
22712271
ui64 runningTablets = 0;
22722272
ui64 aliveNodes = 0;
22732273
THashMap<ui32, TVector<TTabletsRunningInfo>> tabletsByNodeByType;
22742274

2275+
for (const auto& pr : Self->Tablets) {
2276+
++tablets;
2277+
if (pr.second.IsRunning()) {
2278+
++runningTablets;
2279+
}
2280+
for (const auto& follower : pr.second.Followers) {
2281+
++tablets;
2282+
if (follower.IsRunning()) {
2283+
++runningTablets;
2284+
}
2285+
}
2286+
}
2287+
22752288
for (const auto& pr : Self->Nodes) {
22762289
if (pr.second.IsAlive()) {
22772290
++aliveNodes;
@@ -2293,7 +2306,6 @@ class TTxMonEvent_LandingData : public TTransactionBase<THive> {
22932306
if (tablet == nullptr) {
22942307
continue;
22952308
}
2296-
++runningTablets;
22972309
if (tablet->IsLeader()) {
22982310
++current.LeaderCount;
22992311
} else {

0 commit comments

Comments
 (0)