Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion packages/eslint-config-kibana/.eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module.exports = {

env: {
es6: true,
amd: true,
node: true,
mocha: true,
browser: true,
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-config-kibana/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@elastic/eslint-config-kibana",
"version": "0.11.0",
"version": "0.12.0",
"description": "The eslint config used by the kibana team",
"main": ".eslintrc.js",
"scripts": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint import/no-unresolved: 0 */
/* global define */
(function (window) {
"use strict";

Expand Down
75 changes: 36 additions & 39 deletions src/core_plugins/timelion/public/vis/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,45 @@ import image from '../images/icon-timelion.svg';
import { VisTypesRegistryProvider } from 'ui/registry/vis_types';
import { TimelionRequestHandlerProvider } from './timelion_request_handler';

define(function (require) {
// we also need to load the controller and directive used by the template
require('plugins/timelion/vis/timelion_vis_controller');
require('plugins/timelion/directives/timelion_expression_input');
// we also need to load the controller and directive used by the template
import 'plugins/timelion/vis/timelion_vis_controller';
import 'plugins/timelion/directives/timelion_expression_input';

// Stylin
require('plugins/timelion/vis/timelion_vis.less');
// Stylin
import 'plugins/timelion/vis/timelion_vis.less';

// register the provider with the visTypes registry so that other know it exists
VisTypesRegistryProvider.register(TimelionVisProvider);
import visConfigTemplate from 'plugins/timelion/vis/timelion_vis.html';
import editorConfigTemplate from 'plugins/timelion/vis/timelion_vis_params.html';

// register the provider with the visTypes registry so that other know it exists
VisTypesRegistryProvider.register(TimelionVisProvider);

function TimelionVisProvider(Private) {
const VisFactory = Private(VisFactoryProvider);
const timelionRequestHandler = Private(TimelionRequestHandlerProvider);
export default function TimelionVisProvider(Private) {
const VisFactory = Private(VisFactoryProvider);
const timelionRequestHandler = Private(TimelionRequestHandlerProvider);

// return the visType object, which kibana will use to display and configure new
// Vis object of this type.
return VisFactory.createAngularVisualization({
name: 'timelion',
title: 'Timelion',
image,
description: 'Build time-series using functional expressions',
category: CATEGORY.TIME,
visConfig: {
defaults: {
expression: '.es(*)',
interval: 'auto'
},
template: require('plugins/timelion/vis/timelion_vis.html'),
// return the visType object, which kibana will use to display and configure new
// Vis object of this type.
return VisFactory.createAngularVisualization({
name: 'timelion',
title: 'Timelion',
image,
description: 'Build time-series using functional expressions',
category: CATEGORY.TIME,
visConfig: {
defaults: {
expression: '.es(*)',
interval: 'auto'
},
editorConfig: {
optionsTemplate: require('plugins/timelion/vis/timelion_vis_params.html')
},
requestHandler: timelionRequestHandler.handler,
responseHandler: 'none',
options: {
showIndexSelection: false
}
});
}

// export the provider so that the visType can be required with Private()
return TimelionVisProvider;
});
template: visConfigTemplate,
},
editorConfig: {
optionsTemplate: editorConfigTemplate,
},
requestHandler: timelionRequestHandler.handler,
responseHandler: 'none',
options: {
showIndexSelection: false
}
});
}
15 changes: 8 additions & 7 deletions src/core_plugins/timelion/public/vis/timelion_vis_controller.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
define(function (require) {
require('plugins/timelion/directives/chart/chart');
require('plugins/timelion/directives/timelion_interval/timelion_interval');
require('ui/state_management/app_state');

const module = require('ui/modules').get('kibana/timelion_vis', ['kibana']);
module.controller('TimelionVisController', function ($scope) {
import 'plugins/timelion/directives/chart/chart';
import 'plugins/timelion/directives/timelion_interval/timelion_interval';
import 'ui/state_management/app_state';

import { uiModules } from 'ui/modules';

uiModules
.get('kibana/timelion_vis', ['kibana'])
.controller('TimelionVisController', function ($scope) {
$scope.$on('renderComplete', event => {
event.stopPropagation();
$scope.renderComplete();
});
});
});