Skip to content

Commit

Permalink
Merge pull request #31 from jsoref/spelling
Browse files Browse the repository at this point in the history
Spelling
  • Loading branch information
rchakode authored Jul 30, 2023
2 parents 935a10e + ffaf979 commit 3f5639d
Show file tree
Hide file tree
Showing 47 changed files with 178 additions and 178 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ Key features:
![](./images/banners/screenshots.png)

# Getting Started
* [Deployment on Kubernetes](./docs/deployement-on-kubernetes.md)
* [Deployment on Docker](./docs/deployement-on-deployment-on-docker.md)
* [Deployment on Kubernetes](./docs/deployment-on-kubernetes.md)
* [Deployment on Docker](./docs/deployment-on-docker.md)
* [Integration with Kubernetes](https://realopinsight.com/docs/quickstart-kubernetes-dashboard/)
* [Integration with Zabbix](https://realopinsight.com/docs/quickstart-zabbix-dashboard/)
* [Integration with Nagios and alike](https://realopinsight.com/docs/quickstart-nagios-icinga-centreon-dashboard/)
Expand Down
18 changes: 9 additions & 9 deletions contribs/etc/wt_config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<!-- Every session runs within a dedicated process.
This mode guarantees kernel-level session privacy, but as every
session requires a seperate process, it is also an easy target
session requires a separate process, it is also an easy target
for DoS attacks if not shielded by access control.
It is also a convenient mode during development, as it is easy
Expand All @@ -56,7 +56,7 @@
session will kill all of the sessions in the same process. You
should debug extensively using valgrind. Also, it is your
responsibility to keep session state not interfering and
seperated.
separated.
On the other hand, sessions are inexpensive, and this mode
suffers far less from DoS attacks than dedicated-process mode.
Expand Down Expand Up @@ -116,7 +116,7 @@
will be started for every shared process, or for every session
which has ?debug appended to the command line.
The variable is slighly misnamed. Not only a path can be set,
The variable is slightly misnamed. Not only a path can be set,
but also options, like for example:
/usr/bin/valgrind - -leak-check=full
Expand All @@ -135,7 +135,7 @@
want to change this value if you would like to support
reentrant event loops, where you block one event loop
using WDialog::exec() or related static
methods. Everytime you enter such an event loop, one
methods. Every time you enter such an event loop, one
thread is blocked, and therefore the total number of
sessions that reliably can do this is limited to the
number of thread you have (minus one to unblock).
Expand Down Expand Up @@ -169,7 +169,7 @@
You may want to change this value if you would like to
support more reentrant event loops, where you block one
event loop using WDialog::exec() or related static
methods. Everytime you enter such an event loop, one
methods. Every time you enter such an event loop, one
thread is blocked, and therefore the total number of
sessions that reliably can do this is limited to the
number of thread you have (minus one to unblock).
Expand Down Expand Up @@ -207,7 +207,7 @@
<max-memory-request-size>1024</max-memory-request-size>
</connector-isapi>

<!-- Javascript debug options
<!-- JavaScript debug options
Values:
- true: JavaScript errors are not caught but the browser
Expand Down Expand Up @@ -281,7 +281,7 @@
how quickly they are generated.
In rare cases, the scheme may result in unwanted behaviour,
because the client-side is allowed to be slighly out of
because the client-side is allowed to be slightly out of
sync at the time an event is recorded with the server-side
(and more so on high-latency links). The drastic
alternative is to discard events while a response is
Expand Down Expand Up @@ -336,7 +336,7 @@

<!-- Whether inline CSS is allowed.
Some Wt widgets will insert CSS rules in the the inline
Some Wt widgets will insert CSS rules in the inline
stylesheet when first used. This can be disabled using this
configuration option.
Expand Down Expand Up @@ -445,7 +445,7 @@

<!-- resourcesURL property
The URL at which the resources/ folder is deploeyd that
The URL at which the resources/ folder is deployed that
comes distributed with Wt and contains auxiliary files
used to primarily for styles and themes.
Expand Down
2 changes: 1 addition & 1 deletion core/src/Base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ struct ThresholdT {
int sev_out;
};

struct ThresholdLessthanFnt {
struct ThresholdLessThanFnt {
bool operator () (const ThresholdT& th1, const ThresholdT& th2)
{
if (th1.sev_out < th2.sev_out)
Expand Down
2 changes: 1 addition & 1 deletion core/src/DashboardBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ void DashboardBase::signalUpdateProcessing(const SourceT& src)
{
QString monitorName = MonitorT::toString(src.mon_type);
if (src.mon_type == MonitorT::Nagios) {
Q_EMIT updateMessageChanged(QObject::tr("quering %1/%2 => %3:%4...").arg(monitorName, src.id, src.ls_addr, QString::number(src.ls_port)).toStdString());
Q_EMIT updateMessageChanged(QObject::tr("querying %1/%2 => %3:%4...").arg(monitorName, src.id, src.ls_addr, QString::number(src.ls_port)).toStdString());
} else {
Q_EMIT updateMessageChanged(QObject::tr("querying %1/%2 => %3)...").arg(monitorName, src.id, src.mon_url).toStdString());
}
Expand Down
12 changes: 6 additions & 6 deletions core/src/K8sHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ std::pair<QStringList, int> K8sHelper::listNamespaces(void)
}
}

// make request and conncet to the processing handlers
// make request and connect to the processing handlers
QNetworkReply* reply = QNetworkAccessManager::get(req);
connect(reply, SIGNAL(finished()), &m_eventLoop, SLOT(quit()));
connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(exitEventLoop(QNetworkReply::NetworkError)));
Expand Down Expand Up @@ -162,7 +162,7 @@ std::pair<QByteArray, int> K8sHelper::requestNamespacedItemsData(const QString&
}
}

// make request and conncet to the processing handlers
// make request and connect to the processing handlers
QNetworkReply* reply = QNetworkAccessManager::get(req);
connect(reply, SIGNAL(finished()), &m_eventLoop, SLOT(quit()));
connect(reply, SIGNAL(error(QNetworkReply::NetworkError)), this, SLOT(exitEventLoop(QNetworkReply::NetworkError)));
Expand Down Expand Up @@ -212,7 +212,7 @@ std::pair<QStringList, int> K8sHelper::parseNamespaces(const QByteArray& data)


std::pair<QString, int> K8sHelper::parseNamespacedServices(const QByteArray& in_data,
const QString& in_macthNamespace,
const QString& in_matchNamespace,
QMap<QString, QMap<QString, QString>>& out_selectorMaps,
NodeListT& out_bpnodes)
{
Expand All @@ -237,8 +237,8 @@ std::pair<QString, int> K8sHelper::parseNamespacedServices(const QByteArray& in_
auto&& metaData = serviceData["metadata"].toObject();
auto&& k8sNamespace = metaData["namespace"].toString();

// escape service if not matches the given namespac
if (k8sNamespace != in_macthNamespace) {
// escape service if not matches the given namespace
if (k8sNamespace != in_matchNamespace) {
continue;
}

Expand Down Expand Up @@ -450,7 +450,7 @@ std::tuple<int, std::string, std::string> K8sHelper::extractStateInfo(const QJs

// default state is "waiting"
// See Kubernetes documentation: https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.11/#containerstate-v1-core
return std::make_tuple(ngrt4n::K8sPending, "", QObject::tr("container is wating").toStdString());
return std::make_tuple(ngrt4n::K8sPending, "", QObject::tr("container is waiting").toStdString());
}


Expand Down
2 changes: 1 addition & 1 deletion core/src/K8sHelper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class K8sHelper : public QNetworkAccessManager
std::pair<QStringList, int> parseNamespaces(const QByteArray& data);

std::pair<QString, int> parseNamespacedServices(const QByteArray& in_data,
const QString& in_macthNamespace,
const QString& in_matchNamespace,
QMap<QString, QMap<QString, QString>>& out_selectorMaps,
NodeListT& out_bpnodes);

Expand Down
42 changes: 21 additions & 21 deletions core/src/Parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Parser::~Parser()

int Parser::processRenderingData(void)
{
fixupVisilityAndDependenciesGraph();
fixupVisibilityAndDependenciesGraph();
saveCoordinatesFile();
return computeCoordinates();
}
Expand Down Expand Up @@ -113,7 +113,7 @@ std::pair<int, QString> Parser::parse(const QString& viewFile)
if (node.sev_crule == CalcRules::WeightedAverageWithThresholds) {
QString thdata = xmlNode.firstChildElement("Thresholds").text().trimmed();
node.thresholdLimits = ThresholdHelper::dataToList(thdata);
std::sort(node.thresholdLimits.begin(), node.thresholdLimits.end(), ThresholdLessthanFnt());
std::sort(node.thresholdLimits.begin(), node.thresholdLimits.end(), ThresholdLessThanFnt());
}

node.check.status = -1;
Expand Down Expand Up @@ -198,7 +198,7 @@ QString Parser::escapeId4Graphviz(const QString& id)



void Parser::fixupVisilityAndDependenciesGraph(void)
void Parser::fixupVisibilityAndDependenciesGraph(void)
{
m_dotContent = "\n";

Expand Down Expand Up @@ -282,25 +282,25 @@ int Parser::computeCoordinates(void)
}

//start parsing
QTextStream coodFileStream(& qfile);
QTextStream coordFileStream(& qfile);
QString line;
if(static_cast<void>(line = coodFileStream.readLine(0)), line.isNull()) {
if(static_cast<void>(line = coordFileStream.readLine(0)), line.isNull()) {
m_lastErrorMsg = QObject::tr("Failed to read file: %1").arg(m_plainFile);
return ngrt4n::RcGenericFailure;
}

QRegExp regexSep("[ ]+");
QStringList splitedLine = line.split (regexSep);
if (splitedLine.size() != 4 || splitedLine[0] != "graph") {
QStringList splitLine = line.split (regexSep);
if (splitLine.size() != 4 || splitLine[0] != "graph") {
m_lastErrorMsg = QObject::tr("Invalid graphviz entry: %1").arg(line);
return ngrt4n::RcGenericFailure;
}

const ScaleFactors SCALE_FACTORS(settings.getGraphLayout());
m_cdata->graph_mode = static_cast<qint8>(settings.getGraphLayout());
auto maxWidthRaw = splitedLine[2].trimmed().toDouble();
auto maxWidthRaw = splitLine[2].trimmed().toDouble();
m_cdata->map_width = maxWidthRaw * SCALE_FACTORS.x() + NEATO_X_TRANSLATION_FACTOR * maxWidthRaw;
m_cdata->map_height = splitedLine[3].trimmed().toDouble() * SCALE_FACTORS.y();
m_cdata->map_height = splitLine[3].trimmed().toDouble() * SCALE_FACTORS.y();
m_cdata->min_x = 0;
m_cdata->min_y = 0;
double max_text_w = 0;
Expand All @@ -309,29 +309,29 @@ int Parser::computeCoordinates(void)
int x_index = 2;
int y_index = 3;

while (static_cast<void>(line = coodFileStream.readLine(0)), ! line.isNull()) {
splitedLine = line.split (regexSep);
if (splitedLine[0] == "node") {
while (static_cast<void>(line = coordFileStream.readLine(0)), ! line.isNull()) {
splitLine = line.split (regexSep);
if (splitLine[0] == "node") {
NodeListT::Iterator node;
QString nid = splitedLine[1].trimmed();
QString nid = splitLine[1].trimmed();
if (ngrt4n::findNode(m_cdata, nid, node)) {
auto posXRaw = splitedLine[x_index].trimmed().toDouble();
auto posXRaw = splitLine[x_index].trimmed().toDouble();
node->pos_x = posXRaw * SCALE_FACTORS.x() + NEATO_X_TRANSLATION_FACTOR * posXRaw;
node->pos_y = splitedLine[y_index].trimmed().toDouble() * SCALE_FACTORS.y();
node->pos_y = splitLine[y_index].trimmed().toDouble() * SCALE_FACTORS.y();

node->text_w = splitedLine[4].trimmed().toDouble() * SCALE_FACTORS.x();
node->text_h = splitedLine[5].trimmed().toDouble() * SCALE_FACTORS.y();
node->text_w = splitLine[4].trimmed().toDouble() * SCALE_FACTORS.x();
node->text_h = splitLine[5].trimmed().toDouble() * SCALE_FACTORS.y();

m_cdata->min_x = qMin<double>(m_cdata->min_x, node->pos_x);
m_cdata->min_y = qMin<double>(m_cdata->min_y, node->pos_y);

max_text_w = qMax(max_text_w, node->text_w);
max_text_h = qMax(max_text_h, node->text_h);
}
} else if (splitedLine[0] == "edge") {
// multiInsert because a node can have several childs
m_cdata->edges.insert(splitedLine[1], splitedLine[2]);
} else if (splitedLine[0] == "stop") {
} else if (splitLine[0] == "edge") {
// multiInsert because a node can have several children
m_cdata->edges.insert(splitLine[1], splitLine[2]);
} else if (splitLine[0] == "stop") {
break;
}
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/Parser.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class Parser : public QObject
DbSession* m_dbSession;


void fixupVisilityAndDependenciesGraph(void);
void fixupVisibilityAndDependenciesGraph(void);
void saveCoordinatesFile(void);
void insertITServiceNode(NodeT& node);
std::pair<int, QString> loadDynamicViewByGroup(QDomNodeList& inXmlDomNodes, CoreDataT& outCData);
Expand Down
2 changes: 1 addition & 1 deletion core/src/StatusAggregator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void StatusAggregator::addSeverity(int value, double weight)
void StatusAggregator::addThresholdLimit(QVector<ThresholdT>& thresholdsLimits, const ThresholdT& th)
{
thresholdsLimits.push_back(th);
std::sort(thresholdsLimits.begin(), thresholdsLimits.end(), ThresholdLessthanFnt());
std::sort(thresholdsLimits.begin(), thresholdsLimits.end(), ThresholdLessThanFnt());
}


Expand Down
2 changes: 1 addition & 1 deletion core/src/ZbxHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ int ZbxHelper::processGetApiVersionReply(void)

int ZbxHelper::processTriggerData(ChecksT &checks)
{
// check weird reponse
// check weird response
qint32 tid = m_jsonData["id"].toInt();

if (tid != GetTriggersByHostOrGroup && tid != GetTriggersByHostOrGroupV18 && tid != GetTriggersByIds)
Expand Down
28 changes: 14 additions & 14 deletions core/src/utilsCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,24 @@ QString ngrt4n::getAbsolutePath(const QString &_path)

qint8 ngrt4n::severityFromProbeStatus(const int &monitorType, const int &statusValue)
{
qint8 criticity = ngrt4n::Unknown;
qint8 criticality = ngrt4n::Unknown;
if (monitorType == MonitorT::Nagios)
{
switch (statusValue)
{
case ngrt4n::NagiosOk:
criticity = ngrt4n::Normal;
criticality = ngrt4n::Normal;
break;
case ngrt4n::NagiosWarning:
criticity = ngrt4n::Major;
criticality = ngrt4n::Major;
break;
case ngrt4n::NagiosCritical:
criticity = ngrt4n::Critical;
criticality = ngrt4n::Critical;
break;
default:
break;
}
return static_cast<ngrt4n::SeverityT>(criticity);
return static_cast<ngrt4n::SeverityT>(criticality);
}

if (monitorType == MonitorT::Zabbix)
Expand All @@ -64,22 +64,22 @@ qint8 ngrt4n::severityFromProbeStatus(const int &monitorType, const int &statusV
{
case ngrt4n::ZabbixClear:
case ngrt4n::ZabbixInfo:
criticity = ngrt4n::Normal;
criticality = ngrt4n::Normal;
break;
case ngrt4n::ZabbixWarn:
criticity = ngrt4n::Minor;
criticality = ngrt4n::Minor;
break;
case ngrt4n::ZabbixAverage:
criticity = ngrt4n::Major;
criticality = ngrt4n::Major;
break;
case ngrt4n::ZabbixHigh:
case ngrt4n::ZabbixDisaster:
criticity = ngrt4n::Critical;
criticality = ngrt4n::Critical;
break;
default:
break;
}
return static_cast<ngrt4n::SeverityT>(criticity);
return static_cast<ngrt4n::SeverityT>(criticality);
}

if (monitorType == MonitorT::Kubernetes)
Expand All @@ -88,17 +88,17 @@ qint8 ngrt4n::severityFromProbeStatus(const int &monitorType, const int &statusV
{
case ngrt4n::K8sRunning:
case ngrt4n::K8sSucceeded:
criticity = ngrt4n::Normal;
criticality = ngrt4n::Normal;
break;
case ngrt4n::K8sFailed:
criticity = ngrt4n::Critical;
criticality = ngrt4n::Critical;
break;
case ngrt4n::K8sPending:
default:
criticity = ngrt4n::Unknown;
criticality = ngrt4n::Unknown;
break;
}
return static_cast<ngrt4n::SeverityT>(criticity);
return static_cast<ngrt4n::SeverityT>(criticality);
}

return ngrt4n::Unknown;
Expand Down
4 changes: 2 additions & 2 deletions core/src/utilsCore.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ const IconMapT NodeIcons = {
{"Database Server", "images/db-server.png"},
{"Process", "images/process.png"},
{"Logfile", "images/log.png"},
{"Network Bandwith", "images/network-usage.png"},
{"Network Bandwidth", "images/network-usage.png"},
{"CPU", "images/cpu.png"},
{"CPU Load", "images/performance-level.png"},
{"Memory", "images/memory.png"},
Expand Down Expand Up @@ -164,7 +164,7 @@ bool findNode(const NodeListT &nodes, const QString &nodeId, NodeListT::const_it

void setCheckOnError(int status, const QString &msg, CheckT &invalidCheck);

StringPairT splitDataPointInfo(const QString &info); /* return <[sourcei:]hostaddr, checkid> */
StringPairT splitDataPointInfo(const QString &info); /* return <[source:]hostaddr, checkid> */

StringPairT splitSourceDataPointInfo(const QString &info); /* return <source, hostaddr> */

Expand Down
Loading

0 comments on commit 3f5639d

Please sign in to comment.