From: Costa Tsaousis (ktsaou) Date: Sat, 4 Jun 2016 17:07:33 +0000 (+0300) Subject: increased version in html for CDN refresh; updated API reference for badge.svg; insta... X-Git-Tag: v1.3.0~172^2~1 X-Git-Url: https://arthur.barton.de/gitweb/?a=commitdiff_plain;ds=sidebyside;h=348f0302fc3764c0bbd11c8cbafa41af3b2dbeed;p=netdata.git increased version in html for CDN refresh; updated API reference for badge.svg; installer attempts to use service with restart argument; enable exim plugin for installation --- diff --git a/charts.d/Makefile.am b/charts.d/Makefile.am index ad11e972..268b4086 100644 --- a/charts.d/Makefile.am +++ b/charts.d/Makefile.am @@ -11,6 +11,7 @@ dist_charts_SCRIPTS = \ cpufreq.chart.sh \ crsproxy.chart.sh \ example.chart.sh \ + exim.chart.sh \ load_average.chart.sh \ mem_apps.chart.sh \ mysql.chart.sh \ diff --git a/netdata-installer.sh b/netdata-installer.sh index f07da52d..1c08d8d9 100755 --- a/netdata-installer.sh +++ b/netdata-installer.sh @@ -607,7 +607,7 @@ if [ "${UID}" -eq 0 ] fi stop_all_netdata - run service netdata start && started=1 + run service netdata restart && started=1 fi if [ ${started} -eq 0 ] @@ -615,7 +615,11 @@ if [ "${UID}" -eq 0 ] # check if we can use the system service run service netdata stop stop_all_netdata - run service netdata start && started=1 + run service netdata restart && started=1 + if [ ${started} -eq 0 ] + then + run service netdata start && started=1 + fi fi fi diff --git a/src/web_client.c b/src/web_client.c index 87787f78..b728e1d3 100644 --- a/src/web_client.c +++ b/src/web_client.c @@ -740,9 +740,6 @@ int web_client_api_v1_badge(struct web_client *w, char *url) { else if(!strcmp(name, "group")) { group = web_client_api_request_v1_data_group(value); } - else if(!strcmp(name, "format")) { - format = web_client_api_request_v1_data_format(value); - } else if(!strcmp(name, "options")) { options |= web_client_api_request_v1_data_options(value); } diff --git a/web/dashboard.html b/web/dashboard.html index 0f9aca69..49bdc737 100644 --- a/web/dashboard.html +++ b/web/dashboard.html @@ -654,4 +654,4 @@ So, to avoid flashing the charts, we destroy and re-create the charts on each up - + diff --git a/web/demo.html b/web/demo.html index 108a9486..051c9421 100644 --- a/web/demo.html +++ b/web/demo.html @@ -19,7 +19,7 @@ - + diff --git a/web/demo2.html b/web/demo2.html index 237facd4..8fe28d45 100644 --- a/web/demo2.html +++ b/web/demo2.html @@ -20,7 +20,7 @@ - + diff --git a/web/demosites.html b/web/demosites.html index 3a106ede..93c4e149 100644 --- a/web/demosites.html +++ b/web/demosites.html @@ -50,7 +50,7 @@ and that you have chown it to be owned by netdata:netdata --> - + - + @@ -2427,14 +2427,14 @@ function finalizePage() { offset: $(window).height() / 3 // controls the diff of the element to the top, to select it }); - $('#sidebar').on('activate.bs.scrollspy', function (e) - { - var el = $(e.target); - if (el.find('ul').size() == 0) - { - var href = el.find('a').attr('href'); - history.pushState(null, document.title, href); - }; + $('#sidebar').on('activate.bs.scrollspy', function (e) + { + var el = $(e.target); + if (el.find('ul').size() == 0) + { + var href = el.find('a').attr('href'); + history.pushState(null, document.title, href); + }; }); document.getElementById('footer').style.display = 'block'; diff --git a/web/netdata-swagger.yaml b/web/netdata-swagger.yaml index 7dfef0aa..55211b39 100644 --- a/web/netdata-swagger.yaml +++ b/web/netdata-swagger.yaml @@ -2,7 +2,7 @@ swagger: '2.0' info: title: NetData API description: 'Real time data collection and graphs...' - version: 1.0.0 + version: 1.2.1_master host: netdata.firehol.org schemes: - http @@ -143,6 +143,123 @@ paths: description: 'No chart with the given id is found.' '500': description: 'Internal server error. This usually means the server is out of memory.' + /badge.svg: + get: + summary: 'Generate a SVG image for a chart (or dimension)' + description: | + Successful responses are SVG images + parameters: + - name: chart + in: query + description: 'The id of the chart as returned by the /charts call.' + required: true + type: string + format: 'as returned by /charts' + allowEmptyValue: false + default: system.cpu + - name: dimension + in: query + description: 'zero, one or more dimension ids, as returned by the /chart call.' + required: false + type: array + items: + type: string + collectionFormat: pipes + format: 'as returned by /charts' + allowEmptyValue: false + - name: after + in: query + description: 'This parameter can either be an absolute timestamp specifying the starting point of the data to be returned, or a relative number of seconds, to the last collected timestamp. Netdata will assume it is a relative number if it is smaller than the duration of the round robin database for this chart. So, if the round robin database is 3600 seconds, any value from -3600 to 3600 will trigger relative arithmetics. Netdata will adapt this parameter to the boundaries of the round robin database.' + required: true + type: number + format: integer + allowEmptyValue: false + default: -600 + - name: before + in: query + description: 'This parameter can either be an absolute timestamp specifying the ending point of the data to be returned, or a relative number of seconds, to the last collected timestamp. Netdata will assume it is a relative number if it is smaller than the duration of the round robin database for this chart. So, if the round robin database is 3600 seconds, any value from -3600 to 3600 will trigger relative arithmetics. Netdata will adapt this parameter to the boundaries of the round robin database.' + required: false + type: number + format: integer + default: 0 + - name: points + in: query + description: 'The number of points to be returned. If not given, or it is <= 0, or it is bigger than the points stored in the round robin database for this chart for the given duration, all the available collected values for the given duration are returned.' + required: true + type: number + format: integer + allowEmptyValue: false + default: 20 + - 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. Two methods are supported, "max" and "average". "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).' + required: true + type: string + enum: [ 'max', 'average' ] + default: 'average' + allowEmptyValue: false + - name: options + in: query + description: 'Options that affect data generation.' + required: false + type: array + items: + type: string + enum: [ 'nonzero', 'flip', 'abs', 'absolute', 'absolute-sum', 'null2zero', 'percentage' ] + collectionFormat: pipes + default: ['absolute'] + allowEmptyValue: true + - name: label + in: query + description: 'a text to be used as the label' + required: false + type: string + format: 'any text' + allowEmptyValue: true + - name: units + in: query + description: 'a text to be used as the units' + required: false + type: string + format: 'any text' + allowEmptyValue: true + - name: label_color + in: query + description: 'a color to be used for the background of the label' + required: false + type: string + format: 'any text' + allowEmptyValue: true + - name: value_color + in: query + description: 'a color to be used for the background of the label. You can set multiple using a pipe with a condition each, like this: colorvalue|color:null The following operators are supported: >, <, >=, <=, =, :null (to check if no value exists).' + required: false + type: string + format: 'any text' + allowEmptyValue: true + - name: multiply + in: query + description: 'multiply the value with this number for rendering it at the image (integer value required)' + required: false + type: number + format: integer + allowEmptyValue: true + - name: divide + in: query + description: 'divide the value with this number for rendering it at the image (integer value required)' + required: false + type: number + format: integer + allowEmptyValue: true + responses: + '200': + description: 'The call was successful. The response should be an SVG image.' + '400': + description: 'Bad request - the body will include a message stating what is wrong.' + '404': + description: 'No chart with the given id is found.' + '500': + description: 'Internal server error. This usually means the server is out of memory.' definitions: chart_summary: type: object diff --git a/web/registry.html b/web/registry.html index b2e7099c..ea308bd2 100644 --- a/web/registry.html +++ b/web/registry.html @@ -133,7 +133,7 @@ and that you have chown it to be owned by netdata:netdata --> - + +