Skip to content
This repository has been archived by the owner on Nov 22, 2017. It is now read-only.

String interpolation #43

Open
yehosef opened this issue Jan 7, 2016 · 2 comments
Open

String interpolation #43

yehosef opened this issue Jan 7, 2016 · 2 comments

Comments

@yehosef
Copy link

yehosef commented Jan 7, 2016

Sometimes I have similar changes with a small change in the query.

.es(index="users" q="+signup_date:[2015-12-01 TO 2015-12-31] +action:save")

And I have another chart that needs the same thing but with "+action:edit",

It would be great if I could do something like:

$action="save", .es(index="users" q="+signup_date:[2015-12-01 TO 2015-12-31] +action:$action")

and then in a different chart use (@1, $action="edit")

Additionally, it would be nice to be able to override basic components of the reference like:
(@1 index="users-new")

or similar.

@rashidkpc
Copy link
Contributor

Yeah, there's no string concatenation. I purposefully avoided documenting variables because I wasn't sure I wanted to keep that construct. And yeah, even less in references.

@rashidkpc
Copy link
Contributor

If I do string interpolation it will probably be ES6 style, eg backticks + ${} so in backticks:

this is my ${string}

@rashidkpc rashidkpc changed the title change variables in queries for references String interpolation May 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants