mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 09:48:58 -04:00
[ui-ace] prevent ace editor deprecation warnings
This commit is contained in:
parent
2f780507bf
commit
de4ea544c6
3 changed files with 25 additions and 15 deletions
|
@ -129,6 +129,8 @@ define(function (require) {
|
|||
if (_.contains(loadedEditors, editor)) return;
|
||||
loadedEditors.push(editor);
|
||||
|
||||
editor.$blockScrolling = Infinity;
|
||||
|
||||
var session = editor.getSession();
|
||||
var fieldName = editor.container.id;
|
||||
|
||||
|
|
|
@ -62,6 +62,7 @@
|
|||
readonly
|
||||
ui-ace="{
|
||||
useWrapMode: true,
|
||||
onLoad: aceLoaded,
|
||||
advanced: {
|
||||
highlightActiveLine: false
|
||||
},
|
||||
|
|
|
@ -17,24 +17,31 @@ define(function (require) {
|
|||
filter: '=?',
|
||||
columns: '=?'
|
||||
},
|
||||
link: function ($scope, $el, attr) {
|
||||
// If a field isn't in the mapping, use this
|
||||
$scope.mode = 'table';
|
||||
$scope.mapping = $scope.indexPattern.fields.byName;
|
||||
$scope.flattened = $scope.indexPattern.flattenHit($scope.hit);
|
||||
$scope.hitJson = angular.toJson($scope.hit, true);
|
||||
$scope.formatted = $scope.indexPattern.formatHit($scope.hit);
|
||||
$scope.fields = _.keys($scope.flattened).sort();
|
||||
link: {
|
||||
pre($scope) {
|
||||
$scope.aceLoaded = (editor) => {
|
||||
editor.$blockScrolling = Infinity;
|
||||
};
|
||||
},
|
||||
|
||||
$scope.toggleColumn = function (fieldName) {
|
||||
_.toggleInOut($scope.columns, fieldName);
|
||||
};
|
||||
post($scope, $el, attr) {
|
||||
// If a field isn't in the mapping, use this
|
||||
$scope.mode = 'table';
|
||||
$scope.mapping = $scope.indexPattern.fields.byName;
|
||||
$scope.flattened = $scope.indexPattern.flattenHit($scope.hit);
|
||||
$scope.hitJson = angular.toJson($scope.hit, true);
|
||||
$scope.formatted = $scope.indexPattern.formatHit($scope.hit);
|
||||
$scope.fields = _.keys($scope.flattened).sort();
|
||||
|
||||
$scope.showArrayInObjectsWarning = function (row, field) {
|
||||
var value = $scope.flattened[field];
|
||||
return _.isArray(value) && typeof value[0] === 'object';
|
||||
};
|
||||
$scope.toggleColumn = function (fieldName) {
|
||||
_.toggleInOut($scope.columns, fieldName);
|
||||
};
|
||||
|
||||
$scope.showArrayInObjectsWarning = function (row, field) {
|
||||
var value = $scope.flattened[field];
|
||||
return _.isArray(value) && typeof value[0] === 'object';
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue