-
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
additional visualizations plugin cleanup before moving to NP #59318
Merged
Merged
Changes from 10 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
6c571b3
removing unnecesarry static exports
ppisljar 2b02da8
createSavedVisLoader should not be statically exported
ppisljar cf938ff
moving calculateObjectHash to kibana_utils
ppisljar ec57155
moving defaultFeedbackMessage to kibana_utils
ppisljar 58f3841
adding basic docs
ppisljar ca9fd34
flattening API
ppisljar c65b756
createVis instead of exposing Vis
ppisljar f17e547
fixes
ppisljar 08e3b3c
Merge branch 'master' into docs/visualizations
ppisljar 1e8c7cb
more fixes
ppisljar c7f491d
fix discover building dimensions
ppisljar deb1993
updating imports
ppisljar 1374919
Merge branch 'master' into docs/visualizations
elasticmachine f10a9d6
Merge branch 'master' into docs/visualizations
elasticmachine ad8aa44
updating karma tests
ppisljar 402ed88
Merge branch 'master' into docs/visualizations
elasticmachine 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 |
---|---|---|
|
@@ -22,8 +22,9 @@ import { i18n } from '@kbn/i18n'; | |
import { createInputControlVisController } from './vis_controller'; | ||
import { getControlsTab } from './components/editor/controls_tab'; | ||
import { OptionsTab } from './components/editor/options_tab'; | ||
import { Status, defaultFeedbackMessage } from '../../visualizations/public'; | ||
import { Status } from '../../visualizations/public'; | ||
import { InputControlVisDependencies } from './plugin'; | ||
import { defaultFeedbackMessage } from '../../../../plugins/kibana_utils/common/default_feedback_message'; | ||
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. Also, should be imported from the root? |
||
|
||
export function createInputControlVisTypeDefinition(deps: InputControlVisDependencies) { | ||
const InputControlVisController = createInputControlVisController(deps); | ||
|
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 |
---|---|---|
|
@@ -45,7 +45,6 @@ import { getPainlessError } from './get_painless_error'; | |
import { discoverResponseHandler } from './response_handler'; | ||
import { | ||
angular, | ||
buildVislibDimensions, | ||
getRequestInspectorStats, | ||
getResponseInspectorStats, | ||
getServices, | ||
|
@@ -818,14 +817,28 @@ function discoverController( | |
if ($scope.opts.timefield) { | ||
const tabifiedData = tabifyAggResponse($scope.vis.aggs, resp); | ||
$scope.searchSource.rawResponse = resp; | ||
Promise.resolve( | ||
buildVislibDimensions($scope.vis, { | ||
timefilter, | ||
timeRange: $scope.timeRange, | ||
searchSource: $scope.searchSource, | ||
}) | ||
).then(resp => { | ||
$scope.histogramData = discoverResponseHandler(tabifiedData, resp); | ||
const metric = $scope.vis.aggs.aggs[1]; | ||
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. For the sake of clarity, I would put this code into a |
||
const agg = $scope.vis.aggs.aggs[0]; | ||
agg.params.timeRange = $scope.timeRange; | ||
agg.buckets.setBounds(agg); | ||
const { esUnit, esValue } = agg.buckets.getInterval(); | ||
$scope.histogramData = discoverResponseHandler(tabifiedData, { | ||
x: { | ||
accessor: 1, | ||
label: agg.makeLabel(), | ||
params: { | ||
date: true, | ||
interval: moment.duration(esValue, esUnit), | ||
intervalESValue: esValue, | ||
intervalESUnit: esUnit, | ||
format: agg.buckets.getScaledDateFormat(), | ||
bounds: agg.buckets.getBounds(), | ||
}, | ||
}, | ||
y: { | ||
accessor: 0, | ||
label: metric.makeLabel(), | ||
}, | ||
}); | ||
} | ||
|
||
|
@@ -993,7 +1006,7 @@ function discoverController( | |
}, | ||
}; | ||
|
||
$scope.vis = new visualizations.Vis( | ||
$scope.vis = visualizations.createVis( | ||
$scope.searchSource.getField('index'), | ||
visSavedObject.visState | ||
); | ||
|
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
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
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
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
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
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
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
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
Oops, something went wrong.
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.
should be imported from the root?