Skip to content

Commit

Permalink
remove dead code
Browse files Browse the repository at this point in the history
  • Loading branch information
vporyadke committed Feb 9, 2024
1 parent 0025c6a commit 2794150
Showing 1 changed file with 0 additions and 79 deletions.
79 changes: 0 additions & 79 deletions ydb/core/mind/hive/monitoring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4284,85 +4284,6 @@ class TTxMonEvent_OperationsLog : public TTransactionBase<THive> {
MaxCount = FromStringWithDefault(Event->Cgi().Get("max"), MaxCount);
}

/*void WriteDescription(TStringStream& out, const NKikimrHive::TOperation& protoOperation) {
bool written = false;
if (protoOperation.HasConfigUpdates()) {
written = true;
out << "Config Update:<br>";
out << "<ul>";
const auto* descriptor = Self->CurrentConfig.GetDescriptor();
for (const auto& protoUpdate : protoOperation.GetConfigUpdates().GetConfigUpdate()) {
const auto* field = descriptor->FindFieldByNumber(protoUpdate.GetFieldNumber());
out << "<li>";
if (field) {
out << field->name();
} else {
out << "[field #" << protoUpdate.GetFieldNumber() << "]";
}
out << ": ";
const auto& value = protoUpdate.GetValue();
if (value.empty()) {
out << "[default]";
} else {
out << value;
}
out << "</li>";
}
out << "</ul>";
}
if (protoOperation.HasNodeOperation()) {
written = true;
const auto& nodeOp = protoOperation.GetNodeOperation();
out << "Node " << nodeOp.GetNodeId() << " Settings update:";
out << "<ul>";
if (nodeOp.HasDown()) {
out << "<li> Down: " << nodeOp.GetDown() << "</li>";
}
if (nodeOp.HasFreeze()) {
out << "<li> Freeze: " << nodeOp.GetFreeze() << "</li>";
}
if (!nodeOp.GetTabletAvailability().empty()) {
out << "<li> TabletAvailability:";
out << "<ul>";
for (const auto& tabletAvailability : nodeOp.GetTabletAvailability()) {
out << "<li> " << TTabletTypes::TypeToStr(tabletAvailability.GetType());
out << ": ";
if (tabletAvailability.HasMaxCount()) {
out << tabletAvailability.GetMaxCount();
} else {
out << "[default]";
}
out << "</li>";
}
out << "</ul></li>";
}
out << "</ul>";
}
if (protoOperation.HasAllowedMetricsUpdates()) {
written = true;
out << "Allowed metrics update:";
out << "<ul>";
const auto* descriptor = NKikimrTabletBase::TMetrics::descriptor();
for (const auto& protoUpdate : protoOperation.GetAllowedMetricsUpdates().GetAllowedMetricsUpdate()) {
out << "<li>" << TTabletTypes::TypeToStr(protoUpdate.GetType()) << ": ";
for (ui64 metricNum : protoUpdate.GetAllowedMetrics()) {
const auto* field = descriptor->FindFieldByNumber(metricNum);
if (field) {
out << field->name();
} else {
out << metricNum;
}
out << " ";
}
out << "</li>";
}
out << "</ul>";
}
if (!written) {
out << "???";
}
}*/

bool Execute(TTransactionContext& txc, const TActorContext& ctx) override {
TStringStream out;
out << "<head>";
Expand Down

0 comments on commit 2794150

Please sign in to comment.