-
Notifications
You must be signed in to change notification settings - Fork 31
Add Routes for Get Visualizations & Saved Search #57
Add Routes for Get Visualizations & Saved Search #57
Conversation
server/routes/getVisualizations.ts
Outdated
}; | ||
try { | ||
const esResp = await context.core.elasticsearch.legacy.client.callAsInternalUser( | ||
'search', |
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.
is it required to be 'search' here?
server/routes/getVisualizations.ts
Outdated
size: 10000, | ||
}; | ||
try { | ||
const esResp = await context.core.elasticsearch.legacy.client.callAsInternalUser( |
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.
may be use full string like esResponse?
server/routes/getVisualizations.ts
Outdated
async ( | ||
context, | ||
request, | ||
response |
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.
this seems to be output param, if so may be use outResponse?
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.
I suggest group all these 3 routes into one to avoid duplicate code.
getVisualizationRoute & get SavedSearch & getDashboard --> something like getReportSource
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.
Merge into one router
Issue #, if available:
N/A
Description of changes:
Add routes to get list of visualizations and saved searches for user to select from when creating a report definition.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.