Spelling web api server (#10921)
Josh Soref committed
Apr 14, 2021 at 06:39 UTC
b9fff8a3aaf87e7068c2f7c118d0a3ed8802bcd5
8 files changed
+42
-42
web/api/badges/web_buffer_svg.c
+1
-1
@@ -716,7 +716,7 @@ static int html_color_check(const char *str) {
716
// or whatever is given as def (without checking - caller responsible to give sensible
717
// safely escaped default) as default if it fails
718
// in any case this function must always return something we can put directly in XML
719
-// so no escaping is necessary anymore (with excpetion of default where caller is responsible)
719
+// so no escaping is necessary anymore (with exception of default where caller is responsible)
720
// to give sensible default
721
#define BADGE_SVG_COLOR_ARG_MAXLEN 20
722
web/api/health/health_cmdapi.c
+1
-1
@@ -86,7 +86,7 @@ void health_silencers2json(BUFFER *wb) {
86
/**
87
* Silencer to FILE
88
*
89
- * Write the sliencer buffer to a file.
89
+ * Write the silencer buffer to a file.
90
* @param wb
91
*/
92
void health_silencers2file(BUFFER *wb) {
web/api/netdata-swagger.json
+10
-10
@@ -202,7 +202,7 @@
202
{
203
"name": "group",
204
"in": "query",
205
- "description": "The grouping method. If multiple collected values are to be grouped in order to return fewer points, this parameters defines the method of grouping. methods supported \"min\", \"max\", \"average\", \"sum\", \"incremental-sum\". \"max\" is actually calculated on the absolute value collected (so it works for both positive and negative dimesions to return the most extreme value in either direction).",
205
+ "description": "The grouping method. If multiple collected values are to be grouped in order to return fewer points, this parameters defines the method of grouping. methods supported \"min\", \"max\", \"average\", \"sum\", \"incremental-sum\". \"max\" is actually calculated on the absolute value collected (so it works for both positive and negative dimensions to return the most extreme value in either direction).",
206
"required": true,
207
"allowEmptyValue": false,
208
"schema": {
@@ -416,7 +416,7 @@
416
{
417
"name": "group",
418
"in": "query",
419
- "description": "The grouping method. If multiple collected values are to be grouped in order to return fewer points, this parameters defines the method of grouping. methods are supported \"min\", \"max\", \"average\", \"sum\", \"incremental-sum\". \"max\" is actually calculated on the absolute value collected (so it works for both positive and negative dimesions to return the most extreme value in either direction).",
419
+ "description": "The grouping method. If multiple collected values are to be grouped in order to return fewer points, this parameters defines the method of grouping. methods are supported \"min\", \"max\", \"average\", \"sum\", \"incremental-sum\". \"max\" is actually calculated on the absolute value collected (so it works for both positive and negative dimensions to return the most extreme value in either direction).",
420
"required": true,
421
"allowEmptyValue": false,
422
"schema": {
@@ -514,7 +514,7 @@
514
{
515
"name": "value_color",
516
"in": "query",
517
- "description": "A color to be used for the background of the value *(right)* part of badge. You can set multiple using a pipe with a condition each, like this: `color<value|color:null` The following operators are supported: >, <, >=, <=, =, :null (to check if no value exists). Each color can be specified in same manner as for `label_color` parameter. Currently only integers are suported as values.",
517
+ "description": "A color to be used for the background of the value *(right)* part of badge. You can set multiple using a pipe with a condition each, like this: `color<value|color:null` The following operators are supported: >, <, >=, <=, =, :null (to check if no value exists). Each color can be specified in same manner as for `label_color` parameter. Currently only integers are supported as values.",
518
"required": false,
519
"allowEmptyValue": true,
520
"schema": {
@@ -525,7 +525,7 @@
525
{
526
"name": "text_color_lbl",
527
"in": "query",
528
- "description": "Font color for label *(left)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceeding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used.",
528
+ "description": "Font color for label *(left)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used.",
529
"required": false,
530
"allowEmptyValue": true,
531
"schema": {
@@ -556,7 +556,7 @@
556
{
557
"name": "text_color_val",
558
"in": "query",
559
- "description": "Font color for value *(right)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceeding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used.",
559
+ "description": "Font color for value *(right)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used.",
560
"required": false,
561
"allowEmptyValue": true,
562
"schema": {
@@ -998,7 +998,7 @@
998
"/manage/health": {
999
"get": {
1000
"summary": "Accesses the health management API to control health checks and notifications at runtime.",
1001
- "description": "Available from Netdata v1.12 and above, protected via bearer authorization. Especially useful for maintenance periods, the API allows you to disable health checks completely, silence alarm notifications, or Disable/Silence specific alarms that match selectors on alarm/template name, chart, context, host and family. For the simple disable/silence all scenaria, only the cmd parameter is required. The other parameters are used to define alarm selectors. For more information and examples, refer to the netdata documentation.",
1001
+ "description": "Available from Netdata v1.12 and above, protected via bearer authorization. Especially useful for maintenance periods, the API allows you to disable health checks completely, silence alarm notifications, or Disable/Silence specific alarms that match selectors on alarm/template name, chart, context, host and family. For the simple disable/silence all scenarios, only the cmd parameter is required. The other parameters are used to define alarm selectors. For more information and examples, refer to the netdata documentation.",
1002
"parameters": [
1003
{
1004
"name": "cmd",
@@ -1504,7 +1504,7 @@
1504
},
1505
"update_every": {
1506
"type": "number",
1507
- "description": "The update frequency of this chart, in seconds. One value every this amount of time is kept in the round robin database (indepedently of the current view)."
1507
+ "description": "The update frequency of this chart, in seconds. One value every this amount of time is kept in the round robin database (independently of the current view)."
1508
},
1509
"view_update_every": {
1510
"type": "number",
@@ -1512,11 +1512,11 @@
1512
},
1513
"first_entry": {
1514
"type": "number",
1515
- "description": "The UNIX timestamp of the first entry (the oldest) in the round robin database (indepedently of the current view)."
1515
+ "description": "The UNIX timestamp of the first entry (the oldest) in the round robin database (independently of the current view)."
1516
},
1517
"last_entry": {
1518
"type": "number",
1519
- "description": "The UNIX timestamp of the latest entry in the round robin database (indepedently of the current view)."
1519
+ "description": "The UNIX timestamp of the latest entry in the round robin database (independently of the current view)."
1520
},
1521
"after": {
1522
"type": "number",
@@ -1549,7 +1549,7 @@
1549
}
1550
},
1551
"latest_values": {
1552
- "description": "The latest values collected for the chart (indepedently of the current view).",
1552
+ "description": "The latest values collected for the chart (independently of the current view).",
1553
"type": "array",
1554
"items": {
1555
"type": "string"
web/api/netdata-swagger.yaml
+10
-10
@@ -176,7 +176,7 @@ paths:
176
of grouping. methods supported "min", "max", "average", "sum",
177
"incremental-sum". "max" is actually calculated on the absolute
178
value collected (so it works for both positive and negative
179
- dimesions to return the most extreme value in either direction).
179
+ dimensions to return the most extreme value in either direction).
180
required: true
181
allowEmptyValue: false
182
schema:
@@ -367,7 +367,7 @@ paths:
367
of grouping. methods are supported "min", "max", "average", "sum",
368
"incremental-sum". "max" is actually calculated on the absolute
369
value collected (so it works for both positive and negative
370
- dimesions to return the most extreme value in either direction).
370
+ dimensions to return the most extreme value in either direction).
371
required: true
372
allowEmptyValue: false
373
schema:
@@ -444,7 +444,7 @@ paths:
444
multiple using a pipe with a condition each, like this:
445
`color<value|color:null` The following operators are
446
supported: >, <, >=, <=, =, :null (to check if no value exists). Each color can be specified in same manner as for `label_color` parameter.
447
- Currently only integers are suported as values."
447
+ Currently only integers are supported as values."
448
required: false
449
allowEmptyValue: true
450
schema:
@@ -452,7 +452,7 @@ paths:
452
format: any text
453
- name: text_color_lbl
454
in: query
455
- description: Font color for label *(left)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceeding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used.
455
+ description: Font color for label *(left)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used.
456
required: false
457
allowEmptyValue: true
458
schema:
@@ -474,7 +474,7 @@ paths:
474
format: ^([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$
475
- name: text_color_val
476
in: query
477
- description: Font color for value *(right)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceeding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used.
477
+ description: Font color for value *(right)* part of the badge. One of predefined colors or as HTML hexadecimal color without preceding `#` character. Formats allowed `RGB` or `RRGGBB`. If no or wrong value given default color will be used.
478
required: false
479
allowEmptyValue: true
480
schema:
@@ -812,7 +812,7 @@ paths:
812
you to disable health checks completely, silence alarm notifications, or
813
Disable/Silence specific alarms that match selectors on alarm/template
814
name, chart, context, host and family. For the simple disable/silence
815
- all scenaria, only the cmd parameter is required. The other parameters
815
+ all scenarios, only the cmd parameter is required. The other parameters
816
are used to define alarm selectors. For more information and examples,
817
refer to the netdata documentation.
818
parameters:
@@ -1215,7 +1215,7 @@ components:
1215
update_every:
1216
type: number
1217
description: The update frequency of this chart, in seconds. One value every this
1218
- amount of time is kept in the round robin database (indepedently of
1218
+ amount of time is kept in the round robin database (independently of
1219
the current view).
1220
view_update_every:
1221
type: number
@@ -1225,11 +1225,11 @@ components:
1225
first_entry:
1226
type: number
1227
description: The UNIX timestamp of the first entry (the oldest) in the round
1228
- robin database (indepedently of the current view).
1228
+ robin database (independently of the current view).
1229
last_entry:
1230
type: number
1231
description: The UNIX timestamp of the latest entry in the round robin database
1232
- (indepedently of the current view).
1232
+ (independently of the current view).
1233
after:
1234
type: number
1235
description: The UNIX timestamp of the first entry (the oldest) returned in this
@@ -1256,7 +1256,7 @@ components:
1256
items:
1257
type: string
1258
latest_values:
1259
- description: The latest values collected for the chart (indepedently of the
1259
+ description: The latest values collected for the chart (independently of the
1260
current view).
1261
type: array
1262
items:
web/api/queries/query.c
+17
-17
@@ -669,7 +669,7 @@ static inline void do_dimension_fixedstep(
669
// fill RRDR for the whole chart
670
671
#ifdef NETDATA_INTERNAL_CHECKS
672
-static void rrd2rrdr_log_request_response_metdata(RRDR *r
672
+static void rrd2rrdr_log_request_response_metadata(RRDR *r
673
, RRDR_GROUPING group_method
674
, int aligned
675
, long group
@@ -902,7 +902,7 @@ static RRDR *rrd2rrdr_fixedstep(
902
// align the requested timeframe to fit it.
903
904
if(aligned) {
905
- // alignement has been requested, so align the values
905
+ // alignment has been requested, so align the values
906
before_requested -= before_requested % (group * update_every);
907
after_requested -= after_requested % (group * update_every);
908
}
@@ -1143,27 +1143,27 @@ static RRDR *rrd2rrdr_fixedstep(
1143
#ifdef NETDATA_INTERNAL_CHECKS
1144
if (dimensions_used) {
1145
if(r->internal.log)
1146
- rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ r->internal.log);
1146
+ rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ r->internal.log);
1147
1148
if(r->rows != points_wanted)
1149
- rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'points' is not wanted 'points'");
1149
+ rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'points' is not wanted 'points'");
1150
1151
if(aligned && (r->before % group) != 0)
1152
- rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "'before' is not aligned but alignment is required");
1152
+ rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "'before' is not aligned but alignment is required");
1153
1154
// 'after' should not be aligned, since we start inside the first group
1155
//if(aligned && (r->after % group) != 0)
1156
- // rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, after_slot, before_slot, "'after' is not aligned but alignment is required");
1156
+ // rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, after_slot, before_slot, "'after' is not aligned but alignment is required");
1157
1158
if(r->before != before_requested)
1159
- rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "chart is not aligned to requested 'before'");
1159
+ rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "chart is not aligned to requested 'before'");
1160
1161
if(r->before != before_wanted)
1162
- rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'before' is not wanted 'before'");
1162
+ rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'before' is not wanted 'before'");
1163
1164
// reported 'after' varies, depending on group
1165
if(r->after != after_wanted)
1166
- rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'after' is not wanted 'after'");
1166
+ rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'after' is not wanted 'after'");
1167
}
1168
#endif
1169
@@ -1276,7 +1276,7 @@ static RRDR *rrd2rrdr_variablestep(
1276
// align the requested timeframe to fit it.
1277
1278
if(aligned) {
1279
- // alignement has been requested, so align the values
1279
+ // alignment has been requested, so align the values
1280
before_requested -= before_requested % (group * update_every);
1281
after_requested -= after_requested % (group * update_every);
1282
}
@@ -1520,27 +1520,27 @@ static RRDR *rrd2rrdr_variablestep(
1520
1521
if (dimensions_used) {
1522
if(r->internal.log)
1523
- rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ r->internal.log);
1523
+ rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ r->internal.log);
1524
1525
if(r->rows != points_wanted)
1526
- rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'points' is not wanted 'points'");
1526
+ rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'points' is not wanted 'points'");
1527
1528
if(aligned && (r->before % group) != 0)
1529
- rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "'before' is not aligned but alignment is required");
1529
+ rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "'before' is not aligned but alignment is required");
1530
1531
// 'after' should not be aligned, since we start inside the first group
1532
//if(aligned && (r->after % group) != 0)
1533
- // rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, after_slot, before_slot, "'after' is not aligned but alignment is required");
1533
+ // rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, after_slot, before_slot, "'after' is not aligned but alignment is required");
1534
1535
if(r->before != before_requested)
1536
- rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "chart is not aligned to requested 'before'");
1536
+ rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "chart is not aligned to requested 'before'");
1537
1538
if(r->before != before_wanted)
1539
- rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'before' is not wanted 'before'");
1539
+ rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'before' is not wanted 'before'");
1540
1541
// reported 'after' varies, depending on group
1542
if(r->after != after_wanted)
1543
- rrd2rrdr_log_request_response_metdata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'after' is not wanted 'after'");
1543
+ rrd2rrdr_log_request_response_metadata(r, group_method, aligned, group, resampling_time_requested, resampling_group, after_wanted, after_requested, before_wanted, before_requested, points_requested, points_wanted, /*after_slot, before_slot,*/ "got 'after' is not wanted 'after'");
1544
}
1545
#endif
1546
web/api/queries/rrdr.h
+1
-1
@@ -22,7 +22,7 @@ typedef enum rrdr_options {
22
RRDR_OPTION_DISPLAY_ABS = 0x00002000, // for badges, display the absolute value, but calculate colors with sign
23
RRDR_OPTION_MATCH_IDS = 0x00004000, // when filtering dimensions, match only IDs
24
RRDR_OPTION_MATCH_NAMES = 0x00008000, // when filtering dimensions, match only names
25
- RRDR_OPTION_CUSTOM_VARS = 0x00010000, // when wraping response in a JSON, return custom variables in response
25
+ RRDR_OPTION_CUSTOM_VARS = 0x00010000, // when wrapping response in a JSON, return custom variables in response
26
RRDR_OPTION_ALLOW_PAST = 0x00020000, // The after parameter can extend in the past before the first entry
27
} RRDR_OPTIONS;
28
web/api/tests/web_api.c
+1
-1
@@ -263,7 +263,7 @@ static void destroy_web_client(struct web_client *w)
263
// ---------------------------------- Parameterized test-families -----------------------------------------------------
264
// There is no way to pass a parameter block into the setup fixture, we would have to patch CMocka and maintain it
265
// locally. (The void **current_state in _run_group_tests would be set from a parameter). This is unfortunate as a
266
-// parameteric unit-tester needs to be to pass parameters to the fixtures. We are faking this by calculating the
266
+// parametric unit-tester needs to be to pass parameters to the fixtures. We are faking this by calculating the
267
// space of tests in the launcher, passing an array of identical unit-tests to CMocka and then counting through the
268
// parameters in the shared state passed between tests. To initialise this counter structure we use this global to
269
// pass from the launcher (test-builder) to the setup-fixture.
web/server/static/static-threaded.c
+1
-1
@@ -141,7 +141,7 @@ static int web_server_file_write_callback(POLLINFO *pi, short int *events) {
141
// web server clients
142
143
static void *web_server_add_callback(POLLINFO *pi, short int *events, void *data) {
144
- (void)data; // Supress warning on unused argument
144
+ (void)data; // Suppress warning on unused argument
145
146
worker_private->connected++;
147