From 7815c4e5432b3d913430976137d66ea6330e1f5a Mon Sep 17 00:00:00 2001 From: spalger Date: Wed, 23 Mar 2016 11:07:05 -0700 Subject: [PATCH] [es6ify] re-apply automatic module transformer --- src/fixtures/agg_resp/range.js | 2 +- src/plugins/dev_mode/index.js | 2 +- src/plugins/elasticsearch/lib/get_basic_auth_realm.js | 2 +- src/plugins/kbn_doc_views/index.js | 2 +- src/plugins/kbn_vislib_vis_types/index.js | 2 +- src/plugins/markdown_vis/index.js | 2 +- src/plugins/metric_vis/index.js | 2 +- src/plugins/spy_modes/index.js | 2 +- src/plugins/status_page/index.js | 2 +- src/plugins/status_page/public/status_page.js | 3 ++- src/plugins/table_vis/index.js | 2 +- src/server/config/complete.js | 2 +- src/server/lib/commander_extensions.js | 2 +- src/ui/public/agg_types/buckets/range_key.js | 2 +- src/ui/public/dom_location.js | 2 +- src/ui/public/registry/settings_sections.js | 9 ++++----- 16 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/fixtures/agg_resp/range.js b/src/fixtures/agg_resp/range.js index c571d1e1d2ae1..f857951c27051 100644 --- a/src/fixtures/agg_resp/range.js +++ b/src/fixtures/agg_resp/range.js @@ -1,4 +1,4 @@ -module.exports = { +export default { "took": 35, "timed_out": false, "_shards": { diff --git a/src/plugins/dev_mode/index.js b/src/plugins/dev_mode/index.js index 6e54e0e9c7916..f06eeb323f246 100644 --- a/src/plugins/dev_mode/index.js +++ b/src/plugins/dev_mode/index.js @@ -1,4 +1,4 @@ -module.exports = (kibana) => { +export default (kibana) => { if (!kibana.config.get('env.dev')) return; return new kibana.Plugin({ uiExports: { diff --git a/src/plugins/elasticsearch/lib/get_basic_auth_realm.js b/src/plugins/elasticsearch/lib/get_basic_auth_realm.js index 5da2bb1c8d467..9a9c183def983 100644 --- a/src/plugins/elasticsearch/lib/get_basic_auth_realm.js +++ b/src/plugins/elasticsearch/lib/get_basic_auth_realm.js @@ -1,4 +1,4 @@ -module.exports = function getBasicAuthRealm(message) { +export default function getBasicAuthRealm(message) { if (!message || typeof message !== 'string') return null; const parts = message.match(/Basic\ realm=\\"(.*)\\"/); diff --git a/src/plugins/kbn_doc_views/index.js b/src/plugins/kbn_doc_views/index.js index 708acb257662c..7f94a42489d31 100644 --- a/src/plugins/kbn_doc_views/index.js +++ b/src/plugins/kbn_doc_views/index.js @@ -1,4 +1,4 @@ -module.exports = function (kibana) { +export default function (kibana) { return new kibana.Plugin({ diff --git a/src/plugins/kbn_vislib_vis_types/index.js b/src/plugins/kbn_vislib_vis_types/index.js index a9c8a5c0c90f9..0f7e42cfbf556 100644 --- a/src/plugins/kbn_vislib_vis_types/index.js +++ b/src/plugins/kbn_vislib_vis_types/index.js @@ -1,4 +1,4 @@ -module.exports = function (kibana) { +export default function (kibana) { return new kibana.Plugin({ diff --git a/src/plugins/markdown_vis/index.js b/src/plugins/markdown_vis/index.js index 85c44ec5b2b40..973760d27889c 100644 --- a/src/plugins/markdown_vis/index.js +++ b/src/plugins/markdown_vis/index.js @@ -1,4 +1,4 @@ -module.exports = function (kibana) { +export default function (kibana) { return new kibana.Plugin({ diff --git a/src/plugins/metric_vis/index.js b/src/plugins/metric_vis/index.js index 129211697e149..4824fe245d402 100644 --- a/src/plugins/metric_vis/index.js +++ b/src/plugins/metric_vis/index.js @@ -1,4 +1,4 @@ -module.exports = function (kibana) { +export default function (kibana) { return new kibana.Plugin({ diff --git a/src/plugins/spy_modes/index.js b/src/plugins/spy_modes/index.js index 83ca9f1880035..1de9c844b168d 100644 --- a/src/plugins/spy_modes/index.js +++ b/src/plugins/spy_modes/index.js @@ -1,4 +1,4 @@ -module.exports = function (kibana) { +export default function (kibana) { return new kibana.Plugin({ uiExports: { spyModes: [ diff --git a/src/plugins/status_page/index.js b/src/plugins/status_page/index.js index d7e7649f9d492..cf9ebb95f2f09 100644 --- a/src/plugins/status_page/index.js +++ b/src/plugins/status_page/index.js @@ -1,4 +1,4 @@ -module.exports = function (kibana) { +export default function (kibana) { return new kibana.Plugin({ uiExports: { app: { diff --git a/src/plugins/status_page/public/status_page.js b/src/plugins/status_page/public/status_page.js index 52e39042bb874..75731f29aa7ea 100644 --- a/src/plugins/status_page/public/status_page.js +++ b/src/plugins/status_page/public/status_page.js @@ -4,6 +4,7 @@ import $ from 'jquery'; import 'ui/autoload/styles'; import 'plugins/status_page/status_page_metric'; import 'plugins/status_page/status_page.less'; +import uiModules from 'ui/modules'; const chrome = require('ui/chrome') @@ -48,7 +49,7 @@ const chrome = require('ui/chrome') ui.refresh(); }); -require('ui/modules').get('kibana') +uiModules.get('kibana') .config(function (appSwitcherEnsureNavigationProvider) { appSwitcherEnsureNavigationProvider.forceNavigation(true); }); diff --git a/src/plugins/table_vis/index.js b/src/plugins/table_vis/index.js index 438e8cee479cf..88b6f81386311 100644 --- a/src/plugins/table_vis/index.js +++ b/src/plugins/table_vis/index.js @@ -1,4 +1,4 @@ -module.exports = function (kibana) { +export default function (kibana) { return new kibana.Plugin({ uiExports: { diff --git a/src/server/config/complete.js b/src/server/config/complete.js index f4c55170bfa2e..be44448733782 100644 --- a/src/server/config/complete.js +++ b/src/server/config/complete.js @@ -1,4 +1,4 @@ -module.exports = function (kbnServer, server, config) { +export default function (kbnServer, server, config) { server.decorate('server', 'config', function () { return kbnServer.config; diff --git a/src/server/lib/commander_extensions.js b/src/server/lib/commander_extensions.js index f1e76b4bb1710..abbd76e3be85d 100644 --- a/src/server/lib/commander_extensions.js +++ b/src/server/lib/commander_extensions.js @@ -1,4 +1,4 @@ -module.exports = function (program) { +export default function (program) { function isCommand(val) { return typeof val === 'object' && val._name; } diff --git a/src/ui/public/agg_types/buckets/range_key.js b/src/ui/public/agg_types/buckets/range_key.js index 5917de5ce335a..27508492855d0 100644 --- a/src/ui/public/agg_types/buckets/range_key.js +++ b/src/ui/public/agg_types/buckets/range_key.js @@ -1,4 +1,4 @@ -module.exports = function () { +export default function () { const id = Symbol('id'); diff --git a/src/ui/public/dom_location.js b/src/ui/public/dom_location.js index f17926fd10a1a..eb9008185de0c 100644 --- a/src/ui/public/dom_location.js +++ b/src/ui/public/dom_location.js @@ -1,4 +1,4 @@ -module.exports = function DomLocationProvider($window) { +export default function DomLocationProvider($window) { return { reload: function (forceFetch) { $window.location.reload(forceFetch); diff --git a/src/ui/public/registry/settings_sections.js b/src/ui/public/registry/settings_sections.js index b00f1363eb053..0dcd261a2bd33 100644 --- a/src/ui/public/registry/settings_sections.js +++ b/src/ui/public/registry/settings_sections.js @@ -1,6 +1,5 @@ -define(function (require) { - return require('ui/registry/_registry')({ - name: 'settingsSections', - order: ['order'] - }); +import uiRegistry from 'ui/registry/_registry'; +export default uiRegistry({ + name: 'settingsSections', + order: ['order'] });