Skip to content

Commit a418dc6

Browse files
authored
Tsvb less update (#65467) (#66547)
1 parent bbe389f commit a418dc6

File tree

4 files changed

+20
-6
lines changed

4 files changed

+20
-6
lines changed

docs/visualize/tsvb.asciidoc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,3 +122,17 @@ Edit the source for the Markdown visualization.
122122
. To insert the mustache template variable into the editor, click the variable name.
123123
+
124124
The http://mustache.github.io/mustache.5.html[mustache syntax] uses the Handlebar.js processor, which is an extended version of the Mustache template language.
125+
126+
[float]
127+
[[tsvb-style-markdown]]
128+
==== Style Markdown text
129+
130+
Style your Markdown visualization using http://lesscss.org/features/[less syntax].
131+
132+
. Select *Markdown*.
133+
134+
. Select *Panel options*.
135+
136+
. Enter styling rules in *Custom CSS* section
137+
+
138+
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
@@ -204,7 +204,7 @@
204204
"leaflet-responsive-popup": "0.6.4",
205205
"leaflet-vega": "^0.8.6",
206206
"leaflet.heat": "0.2.0",
207-
"less": "^2.7.3",
207+
"less": "npm:@elastic/less@2.7.3-kibana",
208208
"less-loader": "5.0.0",
209209
"lodash": "npm:@elastic/lodash@3.10.1-kibana4",
210210
"lodash.clonedeep": "^4.5.0",

src/legacy/core_plugins/vis_type_timeseries/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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20176,10 +20176,10 @@ less-loader@5.0.0:
2017620176
loader-utils "^1.1.0"
2017720177
pify "^4.0.1"
2017820178

20179-
less@^2.7.3:
20180-
version "2.7.3"
20181-
resolved "https://registry.yarnpkg.com/less/-/less-2.7.3.tgz#cc1260f51c900a9ec0d91fb6998139e02507b63b"
20182-
integrity sha512-KPdIJKWcEAb02TuJtaLrhue0krtRLoRoo7x6BNJIBelO00t/CCdJQUnHW5V34OnHMWzIktSalJxRO+FvytQlCQ==
20179+
"less@npm:@elastic/less@2.7.3-kibana":
20180+
version "2.7.3-kibana"
20181+
resolved "https://registry.yarnpkg.com/@elastic/less/-/less-2.7.3-kibana.tgz#3de5e0b06bb095b1cc1149043d67f8dc36272d23"
20182+
integrity sha512-Okm31ZKE28/m3bH0h0mNpQH0zqVWNFqRKDlsBd1AYHGdM1yBq4mzeO6IRUykB81XDGlqL0m4ThSA7mc3hy+LVg==
2018320183
optionalDependencies:
2018420184
errno "^0.1.1"
2018520185
graceful-fs "^4.1.2"

0 commit comments

Comments
 (0)