Skip to content

Commit

Permalink
[7.x] Timelion y-axis label not displayed (#80007) (#80521)
Browse files Browse the repository at this point in the history
* Timelion y-axis label not displayed (#80007)

* Moved flot in ui-shared-deps and leavt only one version.

* Removed unneeded import

* use commonJS so we can execute code between loading specific modules

* prefix i18n keys with flot.

* Fix Internationalization

* remove duplicate pie plugin

Co-authored-by: spalger <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>

* Fix test.

Co-authored-by: spalger <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
  • Loading branch information
3 people authored Oct 16, 2020
1 parent 8eaec06 commit f300a41
Show file tree
Hide file tree
Showing 68 changed files with 992 additions and 18,254 deletions.
7 changes: 1 addition & 6 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,14 @@ target
# plugin overrides
/src/core/lib/kbn_internal_native_observable
/src/legacy/plugin_discovery/plugin_pack/__tests__/fixtures/plugins/broken
/src/legacy/ui/public/flot-charts
/src/plugins/data/common/es_query/kuery/ast/_generated_/**
/src/plugins/vis_type_timelion/public/_generated_/**
/src/plugins/vis_type_timelion/public/flot/jquery.flot.*
/src/plugins/timelion/public/flot/jquery.flot.*
/x-pack/legacy/plugins/**/__tests__/fixtures/**
/x-pack/plugins/apm/e2e/**/snapshots.js
/x-pack/plugins/apm/e2e/tmp/*
/x-pack/plugins/canvas/canvas_plugin
/x-pack/plugins/canvas/canvas_plugin_src/lib/flot-charts
/x-pack/plugins/canvas/shareable_runtime/build
/x-pack/plugins/canvas/storybook/build
/x-pack/plugins/monitoring/public/lib/jquery_flot
/x-pack/plugins/reporting/server/export_types/printable_pdf/server/lib/pdf/assets/**
/x-pack/legacy/plugins/infra/common/graphql/types.ts
/x-pack/legacy/plugins/infra/public/graphql/types.ts
Expand All @@ -48,4 +43,4 @@ target
/packages/kbn-ui-framework/dist
/packages/kbn-ui-framework/doc_site/build
/packages/kbn-ui-framework/generator-kui/*/templates/

/packages/kbn-ui-shared-deps/flot_charts
8 changes: 1 addition & 7 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -1182,13 +1182,7 @@ module.exports = {
},
},
{
files: ['x-pack/plugins/canvas/canvas_plugin_src/lib/flot-charts/**/*.js'],
env: {
jquery: true,
},
},
{
files: ['x-pack/plugins/monitoring/public/lib/jquery_flot/**/*.js'],
files: ['packages/kbn-ui-shared-deps/flot_charts/**/*.js'],
env: {
jquery: true,
},
Expand Down
1 change: 1 addition & 0 deletions .i18nrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
"uiActionsExamples": "examples/ui_action_examples",
"share": "src/plugins/share",
"home": "src/plugins/home",
"flot": "packages/kbn-ui-shared-deps/flot_charts",
"charts": "src/plugins/charts",
"esUi": "src/plugins/es_ui_shared",
"devTools": "src/plugins/dev_tools",
Expand Down
5 changes: 2 additions & 3 deletions packages/kbn-ui-shared-deps/entry.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ require('./polyfills');
// must load before angular
export const Jquery = require('jquery');
window.$ = window.jQuery = Jquery;
require('./flot_charts');

// stateful deps
export const KbnI18n = require('@kbn/i18n');
Expand Down Expand Up @@ -50,11 +51,9 @@ export const ElasticEui = require('@elastic/eui');
export const ElasticEuiLibServices = require('@elastic/eui/lib/services');
export const ElasticEuiLibServicesFormat = require('@elastic/eui/lib/services/format');
export const ElasticEuiChartsTheme = require('@elastic/eui/dist/eui_charts_theme');
export const Theme = require('./theme.ts');
export const Lodash = require('lodash');
export const LodashFp = require('lodash/fp');

// runtime deps which don't need to be copied across all bundles
export const TsLib = require('tslib');

import * as Theme from './theme.ts';
export { Theme };
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
* Licensed to Elasticsearch B.V. under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch B.V. licenses this file to you under
* the Apache License, Version 2.0 (the "License"); you may
* not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

/* @notice
Expand Down Expand Up @@ -32,17 +45,15 @@
* THE SOFTWARE.
*/

import $ from 'jquery';
if (window) window.jQuery = $;
require('./jquery.flot');
require('./jquery.flot.time');
require('./jquery.flot.canvas');
require('./jquery.flot.symbol');
require('./jquery.flot.crosshair');
require('./jquery.flot.selection');
require('./jquery.flot.pie');
require('./jquery.flot.stack');
require('./jquery.flot.threshold');
require('./jquery.flot.fillbetween');
require('./jquery.flot.log');
module.exports = $;
import './jquery_flot';
import './jquery_flot_canvas';
import './jquery_flot_time';
import './jquery_flot_symbol';
import './jquery_flot_crosshair';
import './jquery_flot_selection';
import './jquery_flot_pie';
import './jquery_flot_stack';
import './jquery_flot_threshold';
import './jquery_flot_fillbetween';
import './jquery_flot_log';
import './jquery_flot_axislabels';
Loading

0 comments on commit f300a41

Please sign in to comment.