Skip to content

Commit

Permalink
Tsvb less update (elastic#65467)
Browse files Browse the repository at this point in the history
  • Loading branch information
flash1293 committed May 14, 2020
1 parent 5a7cefb commit 94dc528
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
14 changes: 14 additions & 0 deletions docs/visualize/tsvb.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -122,3 +122,17 @@ Edit the source for the Markdown visualization.
. To insert the mustache template variable into the editor, click the variable name.
+
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.

[float]
[[tsvb-style-markdown]]
==== Style Markdown text

Style your Markdown visualization using http://lesscss.org/features/[less syntax].

. Select *Markdown*.

. Select *Panel options*.

. Enter styling rules in *Custom CSS* section
+
Less in TSVB does not support custom plugins or inline JavaScript.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@
"leaflet-responsive-popup": "0.6.4",
"leaflet-vega": "^0.8.6",
"leaflet.heat": "0.2.0",
"less": "^2.7.3",
"less": "npm:@elastic/less@2.7.3-kibana",
"less-loader": "5.0.0",
"lodash": "npm:@elastic/lodash@3.10.1-kibana4",
"lodash.clonedeep": "^4.5.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class MarkdownPanelConfigUi extends Component {
const lessSrc = `#markdown-${model.id} {
${value}
}`;
lessC.render(lessSrc, { compress: true }, (e, output) => {
lessC.render(lessSrc, { compress: true, javascriptEnabled: false }, (e, output) => {
const parts = { markdown_less: value };
if (output) {
parts.markdown_css = output.css;
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -20176,10 +20176,10 @@ less-loader@5.0.0:
loader-utils "^1.1.0"
pify "^4.0.1"

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

0 comments on commit 94dc528

Please sign in to comment.