From b96cafcb5d440e329b74ef33be518cace8958725 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Sat, 29 Jul 2017 17:12:31 +0300 Subject: [PATCH 1/6] docs styles tweaks --- docs/sources/css/custom.css | 90 +++++++++++++++++++++++++++---------- 1 file changed, 67 insertions(+), 23 deletions(-) diff --git a/docs/sources/css/custom.css b/docs/sources/css/custom.css index 2c163b3..057b589 100644 --- a/docs/sources/css/custom.css +++ b/docs/sources/css/custom.css @@ -1,38 +1,82 @@ +@import url('https://fonts.googleapis.com/css?family=Roboto|Source+Code+Pro'); + .wy-side-nav-search, .wy-nav-top { - background-color: #8e3030 + background-color: #8e3030 } -p { - margin-bottom: 24px; +/* Content container */ +.wy-nav-content { + max-width: 1200px; +} + +.rst-content { + color: #404040; + font-family: 'Roboto', 'Lato', 'proxima-nova', 'Helvetica Neue', Arial, sans-serif; +} + +.rst-content p { + margin-bottom: 24px; + font-size: 18px; + line-height: 28px; +} + +.rst-content img { + max-width: 80%; + max-height: 800px; } .rst-content blockquote { - margin-left: 0px; - padding: 0 1em; - color: #777; - border-left: 0.25em solid #ddd; + margin-left: 0px; + padding: 0 1em; + color: #777; + border-left: 0.25em solid #ddd; } code, .rst-content tt { - font-size: 85%; - color: #404040; - background-color: #f4f4f4; - padding: 1px 5px; - border-radius: 2px; + font-family: 'Source Code Pro', monospace; + font-size: 90%; + color: #404040; + background-color: #f4f4f4; + padding: 1px 5px; + border-radius: 2px; + border: 0; } + +/** + * Colors are from solarized scheme. + */ .hljs { - font-size: 100%; - line-height: 1.5; - padding: 1em 0.5em; - border-radius: 4px; - border-color: #f4f4f4; + background-color: #fdf6e3; + color: #657b83; + border-color: #eee8d5; + + font-size: 100%; + line-height: 1.5; + padding: 1em 0.5em; + border-radius: 4px; +} + +.hljs-keyword { + color: #dc322f; +} + +.hljs-built_in { + color: #268bd2; +} + +.hljs-string { + color: #859900; +} + +.hljs-variable { + color: #6c71c4; } .btn-neutral:hover { - background-color: #8e3030 !important; - color: #f4f4f4 !important; - box-shadow: - 0px 1px 2px -1px rgba(255,255,255,0.5) inset, - 0px -2px 0px 0px rgba(0, 0, 0, 0.2) inset; -} \ No newline at end of file + background-color: #8e3030 !important; + color: #f4f4f4 !important; + box-shadow: + 0px 1px 2px -1px rgba(255,255,255,0.5) inset, + 0px -2px 0px 0px rgba(0, 0, 0, 0.2) inset; +} From 653de7cea98e8306b79d967ec2e603107b0d045c Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Sat, 29 Jul 2017 18:04:58 +0300 Subject: [PATCH 2/6] Update function list formatting --- docs/sources/reference/functions.md | 73 +++++++++++++++++++---------- 1 file changed, 47 insertions(+), 26 deletions(-) diff --git a/docs/sources/reference/functions.md b/docs/sources/reference/functions.md index 4a6e514..55a90ca 100644 --- a/docs/sources/reference/functions.md +++ b/docs/sources/reference/functions.md @@ -1,10 +1,10 @@ Functions reference =================== -Transform ---------- +## Transform -### groupBy + +### _groupBy_ ``` groupBy(interval, function) @@ -17,8 +17,9 @@ Examples: groupBy(10m, avg) groupBy(1h, median) ``` +--- -### scale +### _scale_ ``` scale(factor) ``` @@ -29,22 +30,25 @@ Examples: scale(100) scale(0.01) ``` +--- -### delta +### _delta_ ``` delta() ``` Converts absolute values to delta. This function just calculate difference between values. For the per-second calculation use `rate()`. +--- -### rate +### _rate_ ``` rate() ``` Calculates the per-second rate of increase of the time series. Resistant to counter reset. Suitable for converting of growing counters into the per-sercond rate. +--- -### movingAverage +### _movingAverage_ ``` movingAverage(windowSize) ``` @@ -55,8 +59,9 @@ Examples: movingAverage(60) calculates moving average over 60 points (if metric has 1 second resolution it matches 1 minute window) ``` +--- -### exponentialMovingAverage +### _exponentialMovingAverage_ ``` exponentialMovingAverage(windowSize) ``` @@ -79,11 +84,11 @@ Examples: movingAverage(60) calculates moving average over 60 points (if metric has 1 second resolution it matches 1 minute window) ``` +--- -Aggregate ---------- +## Aggregate -### aggregateBy +### _aggregateBy_ ``` aggregateBy(interval, function) ``` @@ -95,37 +100,44 @@ Examples: aggregateBy(10m, avg) aggregateBy(1h, median) ``` +--- -### sumSeries +### _sumSeries_ ``` sumSeries() ``` This will add metrics together and return the sum at each datapoint. This method required interpolation of each timeseries so it may cause high CPU load. Try to combine it with _groupBy()_ function to reduce load. -### average +--- + +### _average_ ``` average(interval) ``` **Deprecated**, use `aggregateBy(interval, avg)` instead. -### min +--- + +### _min_ ``` min(interval) ``` **Deprecated**, use `aggregateBy(interval, min)` instead. -### max +--- + +### _max_ ``` max(interval) ``` **Deprecated**, use `aggregateBy(interval, max)` instead. +--- -Filter ---------- +## Filter -### top +### _top_ ``` top(N, value) @@ -138,8 +150,9 @@ Examples: top(10, avg) top(5, max) ``` +--- -### bottom +### _bottom_ ``` bottom(N, value) @@ -151,20 +164,22 @@ Examples: ``` bottom(5, avg) ``` - +--- ## Trends -### trendValue +### _trendValue_ ``` trendValue(valueType) ``` Specifying type of trend value returned by Zabbix when trends are used (avg, min or max). +--- + ## Time -### timeShift +### _timeShift_ ``` timeShift(interval) ``` @@ -175,10 +190,11 @@ timeShift(24h) - shift metric back in 24h hours timeShift(-24h) - the same result as for timeShift(24h) timeShift(+1d) - shift metric forward in 1 day ``` +--- ## Alias -### setAlias +### _setAlias_ ``` setAlias(alias) ``` @@ -189,8 +205,9 @@ Examples: ``` setAlias(load) ``` +--- -### setAliasByRegex +### _setAliasByRegex_ ``` setAliasByRegex(regex) ``` @@ -201,8 +218,9 @@ Examples: ``` setAlias(Zabbix busy [a-zA-Z]+) ``` +--- -### replaceAlias +### _replaceAlias_ ``` replaceAlias(pattern, newAlias) ``` @@ -233,10 +251,11 @@ replaceAlias(/.*CPU (.*) time/, $1) -> system backend01: CPU system time replaceAlias(/(.*): CPU (.*) time/, $1 - $2) -> backend01 - system ``` +--- ## Special -### consolidateBy +### _consolidateBy_ ``` consolidateBy(consolidationFunc) ``` @@ -244,3 +263,5 @@ consolidateBy(consolidationFunc) When a graph is drawn where width of the graph size in pixels is smaller than the number of datapoints to be graphed, plugin consolidates the values to to prevent line overlap. The consolidateBy() function changes the consolidation function from the default of average to one of `sum`, `min`, `max` or `count`. Valid function names are `sum`, `avg`, `min`, `max` and `count`. + +--- From 4baaf5f34cb2786630326b256956600512e77466 Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Sat, 29 Jul 2017 18:09:50 +0300 Subject: [PATCH 3/6] docs css: functions list tweaks --- docs/sources/css/custom.css | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/sources/css/custom.css b/docs/sources/css/custom.css index 057b589..d7c6518 100644 --- a/docs/sources/css/custom.css +++ b/docs/sources/css/custom.css @@ -80,3 +80,18 @@ code, .rst-content tt { 0px 1px 2px -1px rgba(255,255,255,0.5) inset, 0px -2px 0px 0px rgba(0, 0, 0, 0.2) inset; } + +/* Functions list tweaks */ + +h3 em { + padding-top: 20px; + font-style: normal; + padding-bottom: 2px; + border-bottom: 4px; + border-bottom-style: solid; + border-bottom-color: #268bd2; +} + +hr { + margin: 24px 0 48px 0; +} From a0bc23312c7b11a30265fcb217a1de12963fb54e Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Sat, 29 Jul 2017 19:07:31 +0300 Subject: [PATCH 4/6] docs: more styles tweaks --- docs/sources/css/custom.css | 43 +++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/docs/sources/css/custom.css b/docs/sources/css/custom.css index d7c6518..464f3a0 100644 --- a/docs/sources/css/custom.css +++ b/docs/sources/css/custom.css @@ -9,14 +9,38 @@ max-width: 1200px; } -.rst-content { +.rst-content .section { color: #404040; font-family: 'Roboto', 'Lato', 'proxima-nova', 'Helvetica Neue', Arial, sans-serif; } +.rst-content p, .rst-content ul, .rst-content ol { + font-size: 18px; +} + +.rst-content h1 { + font-size: 200%; +} + +.rst-content h2 { + font-size: 175%; +} + +.rst-content h3 { + font-size: 150%; +} + +.rst-content h4 { + font-size: 125%; +} + .rst-content p { margin-bottom: 24px; - font-size: 18px; + line-height: 28px; +} + +.rst-content li { + margin-bottom: 8px; line-height: 28px; } @@ -26,10 +50,11 @@ } .rst-content blockquote { - margin-left: 0px; + max-width: 80%; + margin-left: 24px; padding: 0 1em; color: #777; - border-left: 0.25em solid #ddd; + border-left: 6px solid #ddd; } code, .rst-content tt { @@ -39,7 +64,7 @@ code, .rst-content tt { background-color: #f4f4f4; padding: 1px 5px; border-radius: 2px; - border: 0; + border-width: 0; } @@ -47,14 +72,18 @@ code, .rst-content tt { * Colors are from solarized scheme. */ .hljs { + max-width: 100%; + background-color: #fdf6e3; color: #657b83; + + border-width: 0 0 0 6px; border-color: #eee8d5; + border-left-color: #268bd2; font-size: 100%; line-height: 1.5; - padding: 1em 0.5em; - border-radius: 4px; + padding: 0.5em 1em; } .hljs-keyword { From 456962a7b65ed628ffe8e85adfcb2c5c8864b00a Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Mon, 31 Jul 2017 13:24:08 +0300 Subject: [PATCH 5/6] docs: adjust styles --- docs/sources/css/custom.css | 61 +++++++++++++++---------------------- 1 file changed, 25 insertions(+), 36 deletions(-) diff --git a/docs/sources/css/custom.css b/docs/sources/css/custom.css index 464f3a0..8487083 100644 --- a/docs/sources/css/custom.css +++ b/docs/sources/css/custom.css @@ -1,7 +1,13 @@ @import url('https://fonts.googleapis.com/css?family=Roboto|Source+Code+Pro'); .wy-side-nav-search, .wy-nav-top { - background-color: #8e3030 + background-color: #8e3030; +} + +.wy-side-nav-search input[type=text] { + border-radius: 2px; + width: 100%; + border-color: #e3e3e3; } /* Content container */ @@ -14,34 +20,15 @@ font-family: 'Roboto', 'Lato', 'proxima-nova', 'Helvetica Neue', Arial, sans-serif; } -.rst-content p, .rst-content ul, .rst-content ol { - font-size: 18px; -} - -.rst-content h1 { - font-size: 200%; -} - -.rst-content h2 { - font-size: 175%; -} - -.rst-content h3 { - font-size: 150%; -} - -.rst-content h4 { - font-size: 125%; -} - .rst-content p { - margin-bottom: 24px; - line-height: 28px; + margin-bottom: 16px; + line-height: 24px; } .rst-content li { - margin-bottom: 8px; - line-height: 28px; + margin-top: 6px; + margin-bottom: 6px; + line-height: 24px; } .rst-content img { @@ -51,12 +38,14 @@ .rst-content blockquote { max-width: 80%; - margin-left: 24px; + margin-left: 0em; padding: 0 1em; - color: #777; - border-left: 6px solid #ddd; + color: #757575; + border-left: 6px solid #e0e0e0; } +/* Source code highlighting */ + code, .rst-content tt { font-family: 'Source Code Pro', monospace; font-size: 90%; @@ -67,21 +56,18 @@ code, .rst-content tt { border-width: 0; } - -/** - * Colors are from solarized scheme. - */ .hljs { max-width: 100%; + /* Colors are from solarized scheme. */ background-color: #fdf6e3; color: #657b83; - border-width: 0 0 0 6px; + border-width: 0 0 0 4px; border-color: #eee8d5; border-left-color: #268bd2; - font-size: 100%; + font-size: 90%; line-height: 1.5; padding: 0.5em 1em; } @@ -113,12 +99,15 @@ code, .rst-content tt { /* Functions list tweaks */ h3 em { + font-family: 'Source Code Pro', monospace; + line-height: 2; padding-top: 20px; font-style: normal; padding-bottom: 2px; - border-bottom: 4px; + border-bottom: 2px; border-bottom-style: solid; - border-bottom-color: #268bd2; + border-bottom-color: #2aa198; + /* color: #cb4b16; */ } hr { From 0876aae27da725d9c0b2002fdc4f5bc7ee1e446d Mon Sep 17 00:00:00 2001 From: Alexander Zobnin Date: Wed, 13 Sep 2017 10:47:54 +0300 Subject: [PATCH 6/6] docs: tweak functions list styles --- docs/sources/css/custom.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/sources/css/custom.css b/docs/sources/css/custom.css index 8487083..94fcc73 100644 --- a/docs/sources/css/custom.css +++ b/docs/sources/css/custom.css @@ -107,7 +107,7 @@ h3 em { border-bottom: 2px; border-bottom-style: solid; border-bottom-color: #2aa198; - /* color: #cb4b16; */ + color: #01579b; } hr {