Skip to content

Commit

Permalink
hive ui fixes after tablet availability feature (#1779)
Browse files Browse the repository at this point in the history
  • Loading branch information
vporyadke authored Feb 9, 2024
1 parent 446e145 commit e463939
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 5 deletions.
2 changes: 1 addition & 1 deletion ydb/core/mind/hive/hive_statics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ TString GetTypesHtml(const std::set<TTabletTypes::EType>& typesToShow, const std
<< "' onclick='applySetting(this,\"DefaultTabletLimit\",\"" << shortTypeName
<< ":0\")'>";
} else {
str << "<span class='box disabled' title='" << longTypeName
str << "<span class='box box-disabled' title='" << longTypeName
<< "' onclick='applySetting(this, \"DefaultTabletLimit\", \"" << shortTypeName
<< ":" << TNodeInfo::MAX_TABLET_COUNT_DEFAULT_VALUE << "\")'>";
}
Expand Down
20 changes: 16 additions & 4 deletions ydb/core/mind/hive/monitoring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,7 @@ class TTxMonEvent_Landing : public TTransactionBase<THive> {
out << ".blinking { animation:blinkingText 0.8s infinite; }";
out << "@keyframes blinkingText { 0% { color: #000; } 49% { color: #000; } 60% { color: transparent; } 99% { color:transparent; } 100% { color: #000; } }";
out << ".box { border: 1px solid grey; border-radius: 5px; padding-left: 2px; padding-right: 2px; display: inline-block; font: 11px Arial; cursor: pointer }";
out << ".disabled { text-decoration: line-through; }";
out << ".box-disabled { text-decoration: line-through; }";
out << "</style>";
out << "</head>";
out << "<body>";
Expand Down Expand Up @@ -2246,7 +2246,7 @@ class TTxMonEvent_LandingData : public TTransactionBase<THive> {
if (MaxCount > 0) {
str << "<span class='box' ";
} else {
str << "<span class='box disabled' ";
str << "<span class='box box-disabled' ";
}
if (totalCount > MaxCount) {
str << " style='color: red' ";
Expand All @@ -2267,11 +2267,24 @@ class TTxMonEvent_LandingData : public TTransactionBase<THive> {

void RenderJSONPage(IOutputStream &out) {
ui64 nodes = 0;
ui64 tablets = Self->Tablets.size();
ui64 tablets = 0;
ui64 runningTablets = 0;
ui64 aliveNodes = 0;
THashMap<ui32, TVector<TTabletsRunningInfo>> tabletsByNodeByType;

for (const auto& pr : Self->Tablets) {
++tablets;
if (pr.second.IsRunning()) {
++runningTablets;
}
for (const auto& follower : pr.second.Followers) {
++tablets;
if (follower.IsRunning()) {
++runningTablets;
}
}
}

for (const auto& pr : Self->Nodes) {
if (pr.second.IsAlive()) {
++aliveNodes;
Expand All @@ -2293,7 +2306,6 @@ class TTxMonEvent_LandingData : public TTransactionBase<THive> {
if (tablet == nullptr) {
continue;
}
++runningTablets;
if (tablet->IsLeader()) {
++current.LeaderCount;
} else {
Expand Down

0 comments on commit e463939

Please sign in to comment.