Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spelling #31

Merged
merged 60 commits into from
Jul 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
4a61dbf
spelling: from
jsoref Jul 26, 2023
44b55fe
spelling: javascript
jsoref Jul 26, 2023
2ceb277
spelling: the
jsoref Jul 26, 2023
0d7395b
spelling: adjust
jsoref Jul 26, 2023
8f470b3
spelling: attachment
jsoref Jul 26, 2023
ab58fe2
spelling: authenticator
jsoref Jul 26, 2023
b499f42
spelling: bandwidth
jsoref Jul 26, 2023
0043494
spelling: builtin
jsoref Jul 26, 2023
305d12a
spelling: children
jsoref Jul 26, 2023
de9870b
spelling: confirmation
jsoref Jul 26, 2023
289f51c
spelling: connect
jsoref Jul 26, 2023
c17a818
spelling: coord
jsoref Jul 26, 2023
b3f26c7
spelling: criticality
jsoref Jul 26, 2023
7f5625d
spelling: dashboard
jsoref Jul 26, 2023
4cedfcc
spelling: dedicated
jsoref Jul 26, 2023
b9268f6
spelling: deployed
jsoref Jul 26, 2023
e54d6a0
spelling: deployment
jsoref Jul 26, 2023
2ffd32c
spelling: disable
jsoref Jul 26, 2023
76df6c0
spelling: distinguish
jsoref Jul 26, 2023
9fa8c48
spelling: every time
jsoref Jul 26, 2023
1edf4c2
spelling: group
jsoref Jul 26, 2023
88e4076
spelling: handle
jsoref Jul 26, 2023
474ab3e
spelling: horizontal
jsoref Jul 26, 2023
f801df5
spelling: infinity
jsoref Jul 26, 2023
0c1123d
spelling: info
jsoref Jul 26, 2023
eff2855
spelling: initialize
jsoref Jul 26, 2023
4046934
spelling: interoperability
jsoref Jul 26, 2023
c9565c7
spelling: lessthan
jsoref Jul 26, 2023
823ac35
spelling: match
jsoref Jul 26, 2023
93f391e
spelling: nagios
jsoref Jul 26, 2023
c2c67f1
spelling: namespace
jsoref Jul 26, 2023
8e35902
spelling: overall
jsoref Jul 26, 2023
3338249
spelling: password
jsoref Jul 26, 2023
5601cbd
spelling: persisted
jsoref Jul 26, 2023
39460a6
spelling: persistent
jsoref Jul 26, 2023
f1877dc
spelling: platform
jsoref Jul 26, 2023
7393887
spelling: priority
jsoref Jul 26, 2023
51be994
spelling: querying
jsoref Jul 26, 2023
911ee81
spelling: realopinsight
jsoref Jul 26, 2023
79d2972
spelling: receiving
jsoref Jul 26, 2023
55692cc
spelling: response
jsoref Jul 26, 2023
abc996b
spelling: separate
jsoref Jul 26, 2023
6759e9b
spelling: series
jsoref Jul 26, 2023
1306d02
spelling: settings
jsoref Jul 26, 2023
3823170
spelling: should
jsoref Jul 26, 2023
6c581d5
spelling: slightly
jsoref Jul 26, 2023
5fcd280
spelling: source
jsoref Jul 26, 2023
c0dca7d
spelling: split
jsoref Jul 26, 2023
5074cca
spelling: submenus
jsoref Jul 26, 2023
837873b
spelling: successfully
jsoref Jul 26, 2023
302d2f1
spelling: synchronizer
jsoref Jul 26, 2023
d94a886
spelling: thumb
jsoref Jul 26, 2023
71c3cf6
spelling: thumbnail
jsoref Jul 26, 2023
256de31
spelling: toolbar
jsoref Jul 26, 2023
1da3abf
spelling: truthy
jsoref Jul 26, 2023
8b14d09
spelling: uninitialized
jsoref Jul 26, 2023
e5d6d33
spelling: updated
jsoref Jul 26, 2023
7684741
spelling: visibility
jsoref Jul 26, 2023
310fcef
spelling: waiting
jsoref Jul 26, 2023
ffaf979
spelling: writable
jsoref Jul 26, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

brand (matches below...)


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
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Duplicate words aren't technically misspellings, but spell-checking tools have flagged them for ages, so...

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());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably breaks translations.

There is an fr translation. For simplicity, I opted to not touch that file, and am hoping your translation process will deal w/ the change, but I can adjust it if requested.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I'll update the fr translation.

}


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> */
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??

Copy link
Owner

@rchakode rchakode Jul 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a comment for code readability, I think the index of the source is relevant?


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

Expand Down
Loading
Loading