Browse Source

Spelling web api server (#10921)

Josh Soref 3 years ago
parent
commit
b9fff8a3aa

+ 1 - 1
web/api/badges/web_buffer_svg.c

@@ -716,7 +716,7 @@ static int html_color_check(const char *str) {
 // or whatever is given as def (without checking - caller responsible to give sensible
 // safely escaped default) as default if it fails
 // in any case this function must always return something we can put directly in XML
-// so no escaping is necessary anymore (with excpetion of default where caller is responsible)
+// so no escaping is necessary anymore (with exception of default where caller is responsible)
 // to give sensible default
 #define BADGE_SVG_COLOR_ARG_MAXLEN 20
 

+ 1 - 1
web/api/health/health_cmdapi.c

@@ -86,7 +86,7 @@ void health_silencers2json(BUFFER *wb) {
 /**
  * Silencer to FILE
  *
- * Write the sliencer buffer to a file.
+ * Write the silencer buffer to a file.
  * @param wb
  */
 void health_silencers2file(BUFFER *wb) {

+ 10 - 10
web/api/netdata-swagger.json

@@ -202,7 +202,7 @@
           {
             "name": "group",
             "in": "query",
-            "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).",
+            "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).",
             "required": true,
             "allowEmptyValue": false,
             "schema": {
@@ -416,7 +416,7 @@
           {
             "name": "group",
             "in": "query",
-            "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).",
+            "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).",
             "required": true,
             "allowEmptyValue": false,
             "schema": {
@@ -514,7 +514,7 @@
           {
             "name": "value_color",
             "in": "query",
-            "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.",
+            "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.",
             "required": false,
             "allowEmptyValue": true,
             "schema": {
@@ -525,7 +525,7 @@
           {
             "name": "text_color_lbl",
             "in": "query",
-            "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.",
+            "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.",
             "required": false,
             "allowEmptyValue": true,
             "schema": {
@@ -556,7 +556,7 @@
           {
             "name": "text_color_val",
             "in": "query",
-            "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.",
+            "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.",
             "required": false,
             "allowEmptyValue": true,
             "schema": {
@@ -998,7 +998,7 @@
     "/manage/health": {
       "get": {
         "summary": "Accesses the health management API to control health checks and notifications at runtime.",
-        "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.",
+        "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.",
         "parameters": [
           {
             "name": "cmd",
@@ -1504,7 +1504,7 @@
           },
           "update_every": {
             "type": "number",
-            "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)."
+            "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)."
           },
           "view_update_every": {
             "type": "number",
@@ -1512,11 +1512,11 @@
           },
           "first_entry": {
             "type": "number",
-            "description": "The UNIX timestamp of the first entry (the oldest) in the round robin database (indepedently of the current view)."
+            "description": "The UNIX timestamp of the first entry (the oldest) in the round robin database (independently of the current view)."
           },
           "last_entry": {
             "type": "number",
-            "description": "The UNIX timestamp of the latest entry in the round robin database (indepedently of the current view)."
+            "description": "The UNIX timestamp of the latest entry in the round robin database (independently of the current view)."
           },
           "after": {
             "type": "number",
@@ -1549,7 +1549,7 @@
             }
           },
           "latest_values": {
-            "description": "The latest values collected for the chart (indepedently of the current view).",
+            "description": "The latest values collected for the chart (independently of the current view).",
             "type": "array",
             "items": {
               "type": "string"

+ 10 - 10
web/api/netdata-swagger.yaml

@@ -176,7 +176,7 @@ paths:
             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).
+            dimensions to return the most extreme value in either direction).
           required: true
           allowEmptyValue: false
           schema:
@@ -367,7 +367,7 @@ paths:
             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).
+            dimensions to return the most extreme value in either direction).
           required: true
           allowEmptyValue: false
           schema:
@@ -444,7 +444,7 @@ paths:
             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."
+            Currently only integers are supported as values."
           required: false
           allowEmptyValue: true
           schema:
@@ -452,7 +452,7 @@ paths:
             format: any text
         - name: text_color_lbl
           in: query
-          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.
+          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.
           required: false
           allowEmptyValue: true
           schema:
@@ -474,7 +474,7 @@ paths:
                 format: ^([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$
         - name: text_color_val
           in: query
-          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.
+          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.
           required: false
           allowEmptyValue: true
           schema:
@@ -812,7 +812,7 @@ paths:
         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
+        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.
       parameters:
@@ -1215,7 +1215,7 @@ components:
         update_every:
           type: number
           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
+            amount of time is kept in the round robin database (independently of
             the current view).
         view_update_every:
           type: number
@@ -1225,11 +1225,11 @@ components:
         first_entry:
           type: number
           description: The UNIX timestamp of the first entry (the oldest) in the round
-            robin database (indepedently of the current view).
+            robin database (independently of the current view).
         last_entry:
           type: number
           description: The UNIX timestamp of the latest entry in the round robin database
-            (indepedently of the current view).
+            (independently of the current view).
         after:
           type: number
           description: The UNIX timestamp of the first entry (the oldest) returned in this
@@ -1256,7 +1256,7 @@ components:
           items:
             type: string
         latest_values:
-          description: The latest values collected for the chart (indepedently of the
+          description: The latest values collected for the chart (independently of the
             current view).
           type: array
           items:

+ 17 - 17
web/api/queries/query.c

@@ -669,7 +669,7 @@ static inline void do_dimension_fixedstep(
 // fill RRDR for the whole chart
 
 #ifdef NETDATA_INTERNAL_CHECKS
-static void rrd2rrdr_log_request_response_metdata(RRDR *r
+static void rrd2rrdr_log_request_response_metadata(RRDR *r
         , RRDR_GROUPING group_method
         , int aligned
         , long group
@@ -902,7 +902,7 @@ static RRDR *rrd2rrdr_fixedstep(
     // align the requested timeframe to fit it.
 
     if(aligned) {
-        // alignement has been requested, so align the values
+        // alignment has been requested, so align the values
         before_requested -= before_requested % (group * update_every);
         after_requested  -= after_requested % (group * update_every);
     }
@@ -1143,27 +1143,27 @@ static RRDR *rrd2rrdr_fixedstep(
     #ifdef NETDATA_INTERNAL_CHECKS
     if (dimensions_used) {
         if(r->internal.log)
-            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);
+            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);
 
         if(r->rows != points_wanted)
-            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'");
+            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'");
 
         if(aligned && (r->before % group) != 0)
-            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");
+            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");
 
         // 'after' should not be aligned, since we start inside the first group
         //if(aligned && (r->after % group) != 0)
-        //    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");
+        //    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");
 
         if(r->before != before_requested)
-            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'");
+            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'");
 
         if(r->before != before_wanted)
-            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'");
+            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'");
 
         // reported 'after' varies, depending on group
         if(r->after != after_wanted)
-            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'");
+            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'");
     }
     #endif
 
@@ -1276,7 +1276,7 @@ static RRDR *rrd2rrdr_variablestep(
     // align the requested timeframe to fit it.
 
     if(aligned) {
-        // alignement has been requested, so align the values
+        // alignment has been requested, so align the values
         before_requested -= before_requested % (group * update_every);
         after_requested  -= after_requested % (group * update_every);
     }
@@ -1520,27 +1520,27 @@ static RRDR *rrd2rrdr_variablestep(
 
     if (dimensions_used) {
         if(r->internal.log)
-            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);
+            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);
 
         if(r->rows != points_wanted)
-            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'");
+            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'");
 
         if(aligned && (r->before % group) != 0)
-            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");
+            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");
 
         // 'after' should not be aligned, since we start inside the first group
         //if(aligned && (r->after % group) != 0)
-        //    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");
+        //    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");
 
         if(r->before != before_requested)
-            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'");
+            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'");
 
         if(r->before != before_wanted)
-            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'");
+            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'");
 
         // reported 'after' varies, depending on group
         if(r->after != after_wanted)
-            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'");
+            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'");
     }
     #endif
 

+ 1 - 1
web/api/queries/rrdr.h

@@ -22,7 +22,7 @@ typedef enum rrdr_options {
     RRDR_OPTION_DISPLAY_ABS  = 0x00002000, // for badges, display the absolute value, but calculate colors with sign
     RRDR_OPTION_MATCH_IDS    = 0x00004000, // when filtering dimensions, match only IDs
     RRDR_OPTION_MATCH_NAMES  = 0x00008000, // when filtering dimensions, match only names
-    RRDR_OPTION_CUSTOM_VARS  = 0x00010000, // when wraping response in a JSON, return custom variables in response
+    RRDR_OPTION_CUSTOM_VARS  = 0x00010000, // when wrapping response in a JSON, return custom variables in response
     RRDR_OPTION_ALLOW_PAST   = 0x00020000, // The after parameter can extend in the past before the first entry
 } RRDR_OPTIONS;
 

+ 1 - 1
web/api/tests/web_api.c

@@ -263,7 +263,7 @@ static void destroy_web_client(struct web_client *w)
 // ---------------------------------- Parameterized test-families -----------------------------------------------------
 // There is no way to pass a parameter block into the setup fixture, we would have to patch CMocka and maintain it
 // locally. (The void **current_state in _run_group_tests would be set from a parameter). This is unfortunate as a
-// parameteric unit-tester needs to be to pass parameters to the fixtures. We are faking this by calculating the
+// parametric unit-tester needs to be to pass parameters to the fixtures. We are faking this by calculating the
 // space of tests in the launcher, passing an array of identical unit-tests to CMocka and then counting through the
 // parameters in the shared state passed between tests. To initialise this counter structure we use this global to
 // pass from the launcher (test-builder) to the setup-fixture.

+ 1 - 1
web/server/static/static-threaded.c

@@ -141,7 +141,7 @@ static int web_server_file_write_callback(POLLINFO *pi, short int *events) {
 // web server clients
 
 static void *web_server_add_callback(POLLINFO *pi, short int *events, void *data) {
-    (void)data;         // Supress warning on unused argument
+    (void)data;         // Suppress warning on unused argument
 
     worker_private->connected++;