-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Get link to result #1100
Closed
Closed
Get link to result #1100
Changes from 9 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2b412a8
Support URL args for any dashboard.
awheeler 22f4a70
Add a share link in the event panel.
awheeler 6e5948c
Fixed a * which should be a +
awheeler 70231e6
Switching to event based times, rather than dashboard based times to …
awheeler 07a04fb
Added greater flexability in the pattern match.
awheeler d4036e0
Switching to a json-aware method of updating the dashboard.
awheeler 8f51b72
Replaced missing line feed.
awheeler c91c0fc
Merge branch 'master' of https://github.com/elasticsearch/kibana
awheeler 1f78314
Merge branch 'master' of https://github.com/elasticsearch/kibana
awheeler 207293c
Fixed hardcoded reference to @timestamp.
awheeler 6282281
Merge branch 'master' of https://github.com/elasticsearch/kibana
awheeler File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -296,6 +296,20 @@ function (angular, $, kbn, _, config, moment, Modernizr) { | |
|
||
var renderTemplate = function(json,params) { | ||
var _r; | ||
var _json; | ||
if(!json.match('ARGS\.(to|from|style|query)')) { | ||
try { | ||
_json = angular.fromJson(json); | ||
_json.style = "{{ARGS.style || '" + _json.style + "'}}"; | ||
_json.services.filter.list[0].to = "{{ARGS.to || '" + _json.services.filter.list[0].to + "'}}"; | ||
_json.services.filter.list[0].from = "{{ARGS.from || '" + _json.services.filter.list[0].from + "'}}"; | ||
_json.services.query.list[0].query = "{{ARGS.query || '" + _json.services.query.list[0].query + "'}}"; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Since the dashboard doesn't already reference ARGS for to/from/style/query, it is safe to add dynamic support for those URL args. |
||
json=angular.toJson(_json); | ||
} catch(e) { | ||
_json = false; | ||
} | ||
} | ||
|
||
_.templateSettings = {interpolate : /\{\{(.+?)\}\}/g}; | ||
var template = _.template(json); | ||
var rendered = template({ARGS:params}); | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't make changes to dashboards that are already doing things with to/from/style/query.