Skip to content

Commit 93e09d2

Browse files
authored
[6.8] Tsvb less update (#65467) (#66200)
1 parent d9940e6 commit 93e09d2

File tree

4 files changed

+159
-10
lines changed

4 files changed

+159
-10
lines changed

docs/visualize/time-series-visual-builder.asciidoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,3 +217,17 @@ syntax uses the Handlebar.js processor which is an extended version of the Musta
217217
template language.
218218

219219
image:images/tsvb-markdown-tab.png["Markdown Tab"]
220+
221+
[float]
222+
[[tsvb-style-markdown]]
223+
==== Style Markdown text
224+
225+
Style your Markdown visualization using http://lesscss.org/features/[less syntax].
226+
227+
. Select *Markdown*.
228+
229+
. Select *Panel options*.
230+
231+
. Enter styling rules in *Custom CSS* section
232+
+
233+
Less in TSVB does not support custom plugins or inline JavaScript.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@
190190
"leaflet-responsive-popup": "0.2.0",
191191
"leaflet-vega": "^0.8.6",
192192
"leaflet.heat": "0.2.0",
193-
"less": "2.7.1",
193+
"less": "npm:@elastic/less@2.7.3-kibana",
194194
"less-loader": "4.1.0",
195195
"lodash": "npm:@elastic/lodash@3.10.1-kibana4",
196196
"lru-cache": "4.1.1",

src/legacy/core_plugins/metrics/public/components/panel_config/markdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ class MarkdownPanelConfigUi extends Component {
6464
const lessSrc = `#markdown-${model.id} {
6565
${value}
6666
}`;
67-
lessC.render(lessSrc, { compress: true }, (e, output) => {
67+
lessC.render(lessSrc, { compress: true, javascriptEnabled: false }, (e, output) => {
6868
const parts = { markdown_less: value };
6969
if (output) {
7070
parts.markdown_css = output.css;

yarn.lock

Lines changed: 143 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2556,7 +2556,7 @@ ajv-keywords@^3.0.0, ajv-keywords@^3.1.0:
25562556
resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.2.0.tgz#e86b819c602cf8821ad637413698f1dec021847a"
25572557
integrity sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo=
25582558

2559-
ajv@^4.7.0:
2559+
ajv@^4.7.0, ajv@^4.9.1:
25602560
version "4.11.8"
25612561
resolved "https://registry.yarnpkg.com/ajv/-/ajv-4.11.8.tgz#82ffb02b29e662ae53bdc20af15947706739c536"
25622562
integrity sha1-gv+wKynmYq5TvcIK8VlHcGc5xTY=
@@ -3200,6 +3200,11 @@ assert-plus@1.0.0, assert-plus@^1.0.0:
32003200
resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-1.0.0.tgz#f12e0f3c5d77b0b1cdd9146942e4e96c1e4dd525"
32013201
integrity sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=
32023202

3203+
assert-plus@^0.2.0:
3204+
version "0.2.0"
3205+
resolved "https://registry.yarnpkg.com/assert-plus/-/assert-plus-0.2.0.tgz#d74e1b87e7affc0db8aadb7021f3fe48101ab234"
3206+
integrity sha1-104bh+ev/A24qttwIfP+SBAasjQ=
3207+
32033208
assert@^1.1.1:
32043209
version "1.4.1"
32053210
resolved "https://registry.yarnpkg.com/assert/-/assert-1.4.1.tgz#99912d591836b5a6f5b345c0f07eefc08fc65d91"
@@ -3411,11 +3416,21 @@ aws-sdk@2.2.33:
34113416
xml2js "0.2.8"
34123417
xmlbuilder "0.4.2"
34133418

3419+
aws-sign2@~0.6.0:
3420+
version "0.6.0"
3421+
resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.6.0.tgz#14342dd38dbcc94d0e5b87d763cd63612c0e794f"
3422+
integrity sha1-FDQt0428yU0OW4fXY81jYSwOeU8=
3423+
34143424
aws-sign2@~0.7.0:
34153425
version "0.7.0"
34163426
resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8"
34173427
integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=
34183428

3429+
aws4@^1.2.1:
3430+
version "1.9.1"
3431+
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.9.1.tgz#7e33d8f7d449b3f673cd72deb9abdc552dbe528e"
3432+
integrity sha512-wMHVg2EOHaMRxbzgFJ9gtjOOCrI80OHLG14rxi28XwOW8ux6IiEbRCGGGqCtdAIg4FQCbW20k9RsT4y3gJlFug==
3433+
34193434
aws4@^1.6.0:
34203435
version "1.6.0"
34213436
resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.6.0.tgz#83ef5ca860b2b32e4a0deedee8c771b9db57471e"
@@ -4593,6 +4608,13 @@ boolbase@~1.0.0:
45934608
resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e"
45944609
integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24=
45954610

4611+
boom@2.x.x:
4612+
version "2.10.1"
4613+
resolved "https://registry.yarnpkg.com/boom/-/boom-2.10.1.tgz#39c8918ceff5799f83f9492a848f625add0c766f"
4614+
integrity sha1-OciRjO/1eZ+D+UkqhI9iWt0Mdm8=
4615+
dependencies:
4616+
hoek "2.x.x"
4617+
45964618
boom@3.1.1:
45974619
version "3.1.1"
45984620
resolved "https://registry.yarnpkg.com/boom/-/boom-3.1.1.tgz#b6424f01ed8d492b2b12ae86047c24e8b6a7c937"
@@ -5917,6 +5939,13 @@ combine-lists@^1.0.0:
59175939
dependencies:
59185940
lodash "^4.5.0"
59195941

5942+
combined-stream@^1.0.5:
5943+
version "1.0.8"
5944+
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.8.tgz#c3d45a8b34fd730631a110a8a2520682b31d5a7f"
5945+
integrity sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==
5946+
dependencies:
5947+
delayed-stream "~1.0.0"
5948+
59205949
combined-stream@^1.0.6, combined-stream@~1.0.5, combined-stream@~1.0.6:
59215950
version "1.0.7"
59225951
resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.7.tgz#2d1d24317afb8abe95d6d2c0b07b57813539d828"
@@ -6493,6 +6522,13 @@ crossvent@1.5.4:
64936522
dependencies:
64946523
custom-event "1.0.0"
64956524

6525+
cryptiles@2.x.x:
6526+
version "2.0.5"
6527+
resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-2.0.5.tgz#3bdfecdc608147c1c67202fa291e7dca59eaa3b8"
6528+
integrity sha1-O9/s3GCBR8HGcgL6KR59ylnqo7g=
6529+
dependencies:
6530+
boom "2.x.x"
6531+
64966532
cryptiles@3.x.x:
64976533
version "3.1.4"
64986534
resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.4.tgz#769a68c95612b56faadfcebf57ac86479cbe8322"
@@ -8843,7 +8879,7 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2:
88438879
assign-symbols "^1.0.0"
88448880
is-extendable "^1.0.1"
88458881

8846-
extend@^3.0.0, extend@~3.0.1, extend@~3.0.2:
8882+
extend@^3.0.0, extend@~3.0.0, extend@~3.0.1, extend@~3.0.2:
88478883
version "3.0.2"
88488884
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa"
88498885
integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==
@@ -9539,6 +9575,15 @@ form-data@^2.3.1, form-data@~2.3.1, form-data@~2.3.2:
95399575
combined-stream "^1.0.6"
95409576
mime-types "^2.1.12"
95419577

9578+
form-data@~2.1.1:
9579+
version "2.1.4"
9580+
resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.1.4.tgz#33c183acf193276ecaa98143a69e94bfee1750d1"
9581+
integrity sha1-M8GDrPGTJ27KqYFDpp6Uv+4XUNE=
9582+
dependencies:
9583+
asynckit "^0.4.0"
9584+
combined-stream "^1.0.5"
9585+
mime-types "^2.1.12"
9586+
95429587
formidable@^1.1.1:
95439588
version "1.1.1"
95449589
resolved "https://registry.yarnpkg.com/formidable/-/formidable-1.1.1.tgz#96b8886f7c3c3508b932d6bd70c4d3a88f35f1a9"
@@ -10966,11 +11011,24 @@ hapi@^17.5.3:
1096611011
teamwork "3.x.x"
1096711012
topo "3.x.x"
1096811013

11014+
har-schema@^1.0.5:
11015+
version "1.0.5"
11016+
resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-1.0.5.tgz#d263135f43307c02c602afc8fe95970c0151369e"
11017+
integrity sha1-0mMTX0MwfALGAq/I/pWXDAFRNp4=
11018+
1096911019
har-schema@^2.0.0:
1097011020
version "2.0.0"
1097111021
resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92"
1097211022
integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=
1097311023

11024+
har-validator@~4.2.1:
11025+
version "4.2.1"
11026+
resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-4.2.1.tgz#33481d0f1bbff600dd203d75812a6a5fba002e2a"
11027+
integrity sha1-M0gdDxu/9gDdID11gSpqX7oALio=
11028+
dependencies:
11029+
ajv "^4.9.1"
11030+
har-schema "^1.0.5"
11031+
1097411032
har-validator@~5.0.3:
1097511033
version "5.0.3"
1097611034
resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd"
@@ -11132,6 +11190,16 @@ hash.js@^1.0.0, hash.js@^1.0.3:
1113211190
inherits "^2.0.3"
1113311191
minimalistic-assert "^1.0.0"
1113411192

11193+
hawk@~3.1.3:
11194+
version "3.1.3"
11195+
resolved "https://registry.yarnpkg.com/hawk/-/hawk-3.1.3.tgz#078444bd7c1640b0fe540d2c9b73d59678e8e1c4"
11196+
integrity sha1-B4REvXwWQLD+VA0sm3PVlnjo4cQ=
11197+
dependencies:
11198+
boom "2.x.x"
11199+
cryptiles "2.x.x"
11200+
hoek "2.x.x"
11201+
sntp "1.x.x"
11202+
1113511203
hawk@~6.0.2:
1113611204
version "6.0.2"
1113711205
resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038"
@@ -11405,6 +11473,15 @@ http-proxy@^1.13.0, http-proxy@^1.16.2:
1140511473
eventemitter3 "1.x.x"
1140611474
requires-port "1.x.x"
1140711475

11476+
http-signature@~1.1.0:
11477+
version "1.1.1"
11478+
resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.1.1.tgz#df72e267066cd0ac67fb76adf8e134a8fbcf91bf"
11479+
integrity sha1-33LiZwZs0Kxn+3at+OE0qPvPkb8=
11480+
dependencies:
11481+
assert-plus "^0.2.0"
11482+
jsprim "^1.2.2"
11483+
sshpk "^1.7.0"
11484+
1140811485
http-signature@~1.2.0:
1140911486
version "1.2.0"
1141011487
resolved "https://registry.yarnpkg.com/http-signature/-/http-signature-1.2.0.tgz#9aecd925114772f3d95b65a60abb8f7c18fbace1"
@@ -13727,17 +13804,18 @@ less-loader@4.1.0:
1372713804
loader-utils "^1.1.0"
1372813805
pify "^3.0.0"
1372913806

13730-
less@2.7.1:
13731-
version "2.7.1"
13732-
resolved "https://registry.yarnpkg.com/less/-/less-2.7.1.tgz#6cbfea22b3b830304e9a5fb371d54fa480c9d7cf"
13733-
integrity sha1-bL/qIrO4MDBOml+zcdVPpIDJ188=
13807+
"less@npm:@elastic/less@2.7.3-kibana":
13808+
version "2.7.3-kibana"
13809+
resolved "https://registry.yarnpkg.com/@elastic/less/-/less-2.7.3-kibana.tgz#3de5e0b06bb095b1cc1149043d67f8dc36272d23"
13810+
integrity sha512-Okm31ZKE28/m3bH0h0mNpQH0zqVWNFqRKDlsBd1AYHGdM1yBq4mzeO6IRUykB81XDGlqL0m4ThSA7mc3hy+LVg==
1373413811
optionalDependencies:
1373513812
errno "^0.1.1"
1373613813
graceful-fs "^4.1.2"
1373713814
image-size "~0.5.0"
1373813815
mime "^1.2.11"
1373913816
mkdirp "^0.5.0"
1374013817
promise "^7.1.1"
13818+
request "2.81.0"
1374113819
source-map "^0.5.3"
1374213820

1374313821
leven@^2.1.0:
@@ -14900,6 +14978,11 @@ miller-rabin@^4.0.0:
1490014978
bn.js "^4.0.0"
1490114979
brorand "^1.0.1"
1490214980

14981+
mime-db@1.44.0:
14982+
version "1.44.0"
14983+
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92"
14984+
integrity sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==
14985+
1490314986
mime-db@1.x.x, "mime-db@>= 1.33.0 < 2", mime-db@~1.37.0:
1490414987
version "1.37.0"
1490514988
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.37.0.tgz#0b6a0ce6fdbe9576e25f1f2d2fde8830dc0ad0d8"
@@ -14924,6 +15007,13 @@ mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.18, mime-types@~2.1.19:
1492415007
dependencies:
1492515008
mime-db "~1.37.0"
1492615009

15010+
mime-types@~2.1.7:
15011+
version "2.1.27"
15012+
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.27.tgz#47949f98e279ea53119f5722e0f34e529bec009f"
15013+
integrity sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==
15014+
dependencies:
15015+
mime-db "1.44.0"
15016+
1492715017
mime@1.4.1:
1492815018
version "1.4.1"
1492915019
resolved "https://registry.yarnpkg.com/mime/-/mime-1.4.1.tgz#121f9ebc49e3766f311a76e1fa1c8003c4b03aa6"
@@ -15839,7 +15929,7 @@ nwsapi@^2.0.8:
1583915929
resolved "https://registry.yarnpkg.com/nwsapi/-/nwsapi-2.0.9.tgz#77ac0cdfdcad52b6a1151a84e73254edc33ed016"
1584015930
integrity sha512-nlWFSCTYQcHk/6A9FFnfhKc14c3aFhfdNBXgo8Qgi9QTBu/qg3Ww+Uiz9wMzXd1T8GFxPc2QIHB6Qtf2XFryFQ==
1584115931

15842-
oauth-sign@~0.8.2:
15932+
oauth-sign@~0.8.1, oauth-sign@~0.8.2:
1584315933
version "0.8.2"
1584415934
resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43"
1584515935
integrity sha1-Rqarfwrq2N6unsBWV4C31O/rnUM=
@@ -17458,6 +17548,11 @@ qs@6.5.2, qs@^6.0.2, qs@^6.4.0, qs@^6.5.1, qs@~6.5.1, qs@~6.5.2:
1745817548
resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36"
1745917549
integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==
1746017550

17551+
qs@~6.4.0:
17552+
version "6.4.0"
17553+
resolved "https://registry.yarnpkg.com/qs/-/qs-6.4.0.tgz#13e26d28ad6b0ffaa91312cd3bf708ed351e7233"
17554+
integrity sha1-E+JtKK1rD/qpExLNO/cI7TUecjM=
17555+
1746117556
query-string@^4.2.2:
1746217557
version "4.3.4"
1746317558
resolved "https://registry.yarnpkg.com/query-string/-/query-string-4.3.4.tgz#bbb693b9ca915c232515b228b1a02b609043dbeb"
@@ -18663,6 +18758,34 @@ request-promise-native@^1.0.3, request-promise-native@^1.0.5:
1866318758
stealthy-require "^1.1.0"
1866418759
tough-cookie ">=2.3.3"
1866518760

18761+
request@2.81.0:
18762+
version "2.81.0"
18763+
resolved "https://registry.yarnpkg.com/request/-/request-2.81.0.tgz#c6928946a0e06c5f8d6f8a9333469ffda46298a0"
18764+
integrity sha1-xpKJRqDgbF+Nb4qTM0af/aRimKA=
18765+
dependencies:
18766+
aws-sign2 "~0.6.0"
18767+
aws4 "^1.2.1"
18768+
caseless "~0.12.0"
18769+
combined-stream "~1.0.5"
18770+
extend "~3.0.0"
18771+
forever-agent "~0.6.1"
18772+
form-data "~2.1.1"
18773+
har-validator "~4.2.1"
18774+
hawk "~3.1.3"
18775+
http-signature "~1.1.0"
18776+
is-typedarray "~1.0.0"
18777+
isstream "~0.1.2"
18778+
json-stringify-safe "~5.0.1"
18779+
mime-types "~2.1.7"
18780+
oauth-sign "~0.8.1"
18781+
performance-now "^0.2.0"
18782+
qs "~6.4.0"
18783+
safe-buffer "^5.0.1"
18784+
stringstream "~0.0.4"
18785+
tough-cookie "~2.3.0"
18786+
tunnel-agent "^0.6.0"
18787+
uuid "^3.0.0"
18788+
1866618789
request@2.88.0, request@^2.88.0:
1866718790
version "2.88.0"
1866818791
resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef"
@@ -19743,6 +19866,13 @@ snapdragon@^0.8.1:
1974319866
source-map-resolve "^0.5.0"
1974419867
use "^2.0.0"
1974519868

19869+
sntp@1.x.x:
19870+
version "1.0.9"
19871+
resolved "https://registry.yarnpkg.com/sntp/-/sntp-1.0.9.tgz#6541184cc90aeea6c6e7b35e2659082443c66198"
19872+
integrity sha1-ZUEYTMkK7qbG57NeJlkIJEPGYZg=
19873+
dependencies:
19874+
hoek "2.x.x"
19875+
1974619876
sntp@2.x.x:
1974719877
version "2.1.0"
1974819878
resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8"
@@ -20321,6 +20451,11 @@ string_decoder@~1.1.1:
2032120451
dependencies:
2032220452
safe-buffer "~5.1.0"
2032320453

20454+
stringstream@~0.0.4:
20455+
version "0.0.6"
20456+
resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.6.tgz#7880225b0d4ad10e30927d167a1d6f2fd3b33a72"
20457+
integrity sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA==
20458+
2032420459
stringstream@~0.0.5:
2032520460
version "0.0.5"
2032620461
resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.5.tgz#4e484cd4de5a0bbbee18e46307710a8a81621878"
@@ -21199,7 +21334,7 @@ tough-cookie@>=2.3.3, tough-cookie@^2.0.0, tough-cookie@^2.3.3, tough-cookie@^2.
2119921334
psl "^1.1.24"
2120021335
punycode "^1.4.1"
2120121336

21202-
tough-cookie@~2.3.3:
21337+
tough-cookie@~2.3.0, tough-cookie@~2.3.3:
2120321338
version "2.3.4"
2120421339
resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655"
2120521340
integrity sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA==

0 commit comments

Comments
 (0)